generated-configure.sh revision 2381:74485ef9aacb
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
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIB_FILE
675ENABLE_LIBFFI_BUNDLING
676LIBFFI_LIBS
677LIBFFI_CFLAGS
678ALSA_LIBS
679ALSA_CFLAGS
680FREETYPE_BUNDLE_LIB_PATH
681FREETYPE_LIBS
682FREETYPE_CFLAGS
683CUPS_CFLAGS
684X_EXTRA_LIBS
685X_LIBS
686X_PRE_LIBS
687X_CFLAGS
688XMKMF
689MSVCP_DLL
690MSVCR_DLL
691LIBCXX
692FIXPATH_DETACH_FLAG
693FIXPATH
694BUILD_GTEST
695VALID_JVM_FEATURES
696JVM_FEATURES_custom
697JVM_FEATURES_zeroshark
698JVM_FEATURES_zero
699JVM_FEATURES_minimal
700JVM_FEATURES_core
701JVM_FEATURES_client
702JVM_FEATURES_server
703INCLUDE_DTRACE
704GCOV_ENABLED
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794BUILD_AS
795BUILD_LDCXX
796BUILD_LD
797BUILD_STRIP
798BUILD_OBJCOPY
799BUILD_AR
800BUILD_NM
801BUILD_CXX
802BUILD_CC
803BUILD_SYSROOT_LDFLAGS
804BUILD_SYSROOT_CFLAGS
805ac_ct_OBJDUMP
806OBJDUMP
807ac_ct_OBJCOPY
808OBJCOPY
809ac_ct_NM
810ac_ct_STRIP
811GNM
812NM
813STRIP
814MSBUILD
815DUMPBIN
816RC
817MT
818LIPO
819ac_ct_AR
820AR
821AS
822LDCXX
823LD
824CXXCPP
825CPP
826CXX_VERSION_NUMBER
827CC_VERSION_NUMBER
828ac_ct_CXX
829CXXFLAGS
830CXX
831TOOLCHAIN_PATH_CXX
832POTENTIAL_CXX
833OBJEXT
834EXEEXT
835ac_ct_CC
836CPPFLAGS
837LDFLAGS
838CFLAGS
839CC
840TOOLCHAIN_PATH_CC
841POTENTIAL_CC
842TOOLCHAIN_VERSION
843VS_LIB
844VS_INCLUDE
845VS_PATH
846CYGWIN_LINK
847SYSROOT_LDFLAGS
848SYSROOT_CFLAGS
849EXTRA_LDFLAGS
850EXTRA_CXXFLAGS
851EXTRA_CFLAGS
852LEGACY_EXTRA_LDFLAGS
853LEGACY_EXTRA_CXXFLAGS
854LEGACY_EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883BOOT_JDK_BITS
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935TIME
936STAT
937HG
938READELF
939OTOOL
940LDD
941ZIPEXE
942UNZIP
943TAR_SUPPORTS_TRANSFORM
944TAR_INCLUDE_PARAM
945TAR_CREATE_EXTRA_PARAM
946TAR_TYPE
947FIND_DELETE
948OUTPUT_SYNC
949OUTPUT_SYNC_SUPPORTED
950CHECK_TOOLSDIR_MAKE
951CHECK_TOOLSDIR_GMAKE
952CHECK_MAKE
953CHECK_GMAKE
954MAKE
955PKGHANDLER
956CONFIGURESUPPORT_OUTPUTDIR
957OUTPUT_ROOT
958CONF_NAME
959SPEC
960SDKROOT
961XCODEBUILD
962JVM_VARIANT_MAIN
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968USERNAME
969CANONICAL_TOPDIR
970ORIGINAL_TOPDIR
971TOPDIR
972PATH_SEP
973ZERO_ARCHDEF
974HOTSPOT_BUILD_CPU_DEFINE
975HOTSPOT_BUILD_CPU_ARCH
976HOTSPOT_BUILD_CPU
977HOTSPOT_BUILD_OS_TYPE
978HOTSPOT_BUILD_OS
979OPENJDK_BUILD_BUNDLE_PLATFORM
980OPENJDK_BUILD_CPU_BUNDLE
981OPENJDK_BUILD_OS_BUNDLE
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_JLI_CFLAGS
984OPENJDK_BUILD_CPU_OSARCH
985OPENJDK_BUILD_CPU_ISADIR
986OPENJDK_BUILD_CPU_LIBDIR
987OPENJDK_BUILD_CPU_LEGACY_LIB
988OPENJDK_BUILD_CPU_LEGACY
989HOTSPOT_TARGET_CPU_DEFINE
990HOTSPOT_TARGET_CPU_ARCH
991HOTSPOT_TARGET_CPU
992HOTSPOT_TARGET_OS_TYPE
993HOTSPOT_TARGET_OS
994DEFINE_CROSS_COMPILE_ARCH
995LP64
996OPENJDK_TARGET_BUNDLE_PLATFORM
997OPENJDK_TARGET_CPU_BUNDLE
998OPENJDK_TARGET_OS_BUNDLE
999OPENJDK_TARGET_OS_EXPORT_DIR
1000OPENJDK_TARGET_CPU_JLI_CFLAGS
1001OPENJDK_TARGET_CPU_OSARCH
1002OPENJDK_TARGET_CPU_ISADIR
1003OPENJDK_TARGET_CPU_LIBDIR
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_devkit
1138with_sys_root
1139with_sysroot
1140with_tools_dir
1141with_toolchain_path
1142with_extra_path
1143with_sdk_name
1144with_conf_name
1145with_output_sync
1146with_default_make_target
1147enable_headless_only
1148with_cacerts_file
1149enable_unlimited_crypto
1150with_copyright_year
1151enable_keep_packaged_modules
1152with_milestone
1153with_update_version
1154with_user_release_suffix
1155with_build_number
1156with_version_string
1157with_version_pre
1158with_version_opt
1159with_version_build
1160with_version_major
1161with_version_minor
1162with_version_security
1163with_version_patch
1164with_boot_jdk
1165with_build_jdk
1166with_add_source_root
1167with_override_source_root
1168with_adds_and_overrides
1169with_override_langtools
1170with_override_corba
1171with_override_jaxp
1172with_override_jaxws
1173with_override_hotspot
1174with_override_nashorn
1175with_override_jdk
1176with_import_hotspot
1177with_import_modules
1178enable_static_build
1179with_toolchain_type
1180with_extra_cflags
1181with_extra_cxxflags
1182with_extra_ldflags
1183with_toolchain_version
1184with_build_devkit
1185with_jtreg
1186enable_warnings_as_errors
1187with_native_debug_symbols
1188enable_debug_symbols
1189enable_zip_debug_info
1190enable_native_coverage
1191enable_dtrace
1192with_jvm_features
1193with_jvm_interpreter
1194enable_hotspot_gtest
1195with_stdc__lib
1196with_msvcr_dll
1197with_msvcp_dll
1198with_x
1199with_cups
1200with_cups_include
1201with_freetype
1202with_freetype_include
1203with_freetype_lib
1204with_freetype_src
1205enable_freetype_bundling
1206with_alsa
1207with_alsa_include
1208with_alsa_lib
1209with_libffi
1210with_libffi_include
1211with_libffi_lib
1212enable_libffi_bundling
1213with_libjpeg
1214with_giflib
1215with_libpng
1216with_zlib
1217with_lcms
1218with_dxsdk
1219with_dxsdk_lib
1220with_dxsdk_include
1221enable_jtreg_failure_handler
1222enable_generate_classlist
1223with_num_cores
1224with_memory_size
1225with_jobs
1226with_test_jobs
1227with_boot_jdk_jvmargs
1228with_sjavac_server_java
1229enable_sjavac
1230enable_javac_server
1231enable_icecc
1232enable_precompiled_headers
1233enable_ccache
1234with_ccache_dir
1235'
1236      ac_precious_vars='build_alias
1237host_alias
1238target_alias
1239BASENAME
1240BASH
1241CAT
1242CHMOD
1243CMP
1244COMM
1245CP
1246CUT
1247DATE
1248DIFF
1249DIRNAME
1250ECHO
1251EXPR
1252FILE
1253FIND
1254HEAD
1255GUNZIP
1256GZIP
1257LN
1258LS
1259MKDIR
1260MKTEMP
1261MV
1262NAWK
1263PRINTF
1264RM
1265RMDIR
1266SH
1267SORT
1268TAIL
1269TAR
1270TEE
1271TOUCH
1272TR
1273UNAME
1274UNIQ
1275WC
1276WHICH
1277XARGS
1278AWK
1279GREP
1280EGREP
1281FGREP
1282SED
1283CYGPATH
1284READLINK
1285DF
1286CPIO
1287NICE
1288MAKE
1289UNZIP
1290ZIPEXE
1291LDD
1292OTOOL
1293READELF
1294HG
1295STAT
1296TIME
1297DTRACE
1298PATCH
1299DSYMUTIL
1300XATTR
1301CODESIGN
1302SETFILE
1303PKG_CONFIG
1304JAVA
1305JAVAC
1306JAVAH
1307JAR
1308JARSIGNER
1309CC
1310CFLAGS
1311LDFLAGS
1312LIBS
1313CPPFLAGS
1314CXX
1315CXXFLAGS
1316CCC
1317CPP
1318CXXCPP
1319AS
1320AR
1321LIPO
1322STRIP
1323NM
1324GNM
1325OBJCOPY
1326OBJDUMP
1327BUILD_CC
1328BUILD_CXX
1329BUILD_NM
1330BUILD_AR
1331BUILD_OBJCOPY
1332BUILD_STRIP
1333JTREGEXE
1334XMKMF
1335FREETYPE_CFLAGS
1336FREETYPE_LIBS
1337ALSA_CFLAGS
1338ALSA_LIBS
1339LIBFFI_CFLAGS
1340LIBFFI_LIBS
1341PNG_CFLAGS
1342PNG_LIBS
1343LCMS_CFLAGS
1344LCMS_LIBS
1345ICECC_CMD
1346ICECC_CREATE_ENV
1347ICECC_WRAPPER
1348CCACHE'
1349
1350
1351# Initialize some variables set by options.
1352ac_init_help=
1353ac_init_version=false
1354ac_unrecognized_opts=
1355ac_unrecognized_sep=
1356# The variables have the same names as the options, with
1357# dashes changed to underlines.
1358cache_file=/dev/null
1359exec_prefix=NONE
1360no_create=
1361no_recursion=
1362prefix=NONE
1363program_prefix=NONE
1364program_suffix=NONE
1365program_transform_name=s,x,x,
1366silent=
1367site=
1368srcdir=
1369verbose=
1370x_includes=NONE
1371x_libraries=NONE
1372
1373# Installation directory options.
1374# These are left unexpanded so users can "make install exec_prefix=/foo"
1375# and all the variables that are supposed to be based on exec_prefix
1376# by default will actually change.
1377# Use braces instead of parens because sh, perl, etc. also accept them.
1378# (The list follows the same order as the GNU Coding Standards.)
1379bindir='${exec_prefix}/bin'
1380sbindir='${exec_prefix}/sbin'
1381libexecdir='${exec_prefix}/libexec'
1382datarootdir='${prefix}/share'
1383datadir='${datarootdir}'
1384sysconfdir='${prefix}/etc'
1385sharedstatedir='${prefix}/com'
1386localstatedir='${prefix}/var'
1387includedir='${prefix}/include'
1388oldincludedir='/usr/include'
1389docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1390infodir='${datarootdir}/info'
1391htmldir='${docdir}'
1392dvidir='${docdir}'
1393pdfdir='${docdir}'
1394psdir='${docdir}'
1395libdir='${exec_prefix}/lib'
1396localedir='${datarootdir}/locale'
1397mandir='${datarootdir}/man'
1398
1399ac_prev=
1400ac_dashdash=
1401for ac_option
1402do
1403  # If the previous option needs an argument, assign it.
1404  if test -n "$ac_prev"; then
1405    eval $ac_prev=\$ac_option
1406    ac_prev=
1407    continue
1408  fi
1409
1410  case $ac_option in
1411  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1412  *=)   ac_optarg= ;;
1413  *)    ac_optarg=yes ;;
1414  esac
1415
1416  # Accept the important Cygnus configure options, so we can diagnose typos.
1417
1418  case $ac_dashdash$ac_option in
1419  --)
1420    ac_dashdash=yes ;;
1421
1422  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1423    ac_prev=bindir ;;
1424  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1425    bindir=$ac_optarg ;;
1426
1427  -build | --build | --buil | --bui | --bu)
1428    ac_prev=build_alias ;;
1429  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1430    build_alias=$ac_optarg ;;
1431
1432  -cache-file | --cache-file | --cache-fil | --cache-fi \
1433  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1434    ac_prev=cache_file ;;
1435  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1436  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1437    cache_file=$ac_optarg ;;
1438
1439  --config-cache | -C)
1440    cache_file=config.cache ;;
1441
1442  -datadir | --datadir | --datadi | --datad)
1443    ac_prev=datadir ;;
1444  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1445    datadir=$ac_optarg ;;
1446
1447  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1448  | --dataroo | --dataro | --datar)
1449    ac_prev=datarootdir ;;
1450  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1451  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1452    datarootdir=$ac_optarg ;;
1453
1454  -disable-* | --disable-*)
1455    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1456    # Reject names that are not valid shell variable names.
1457    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1458      as_fn_error $? "invalid feature name: $ac_useropt"
1459    ac_useropt_orig=$ac_useropt
1460    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1461    case $ac_user_opts in
1462      *"
1463"enable_$ac_useropt"
1464"*) ;;
1465      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1466	 ac_unrecognized_sep=', ';;
1467    esac
1468    eval enable_$ac_useropt=no ;;
1469
1470  -docdir | --docdir | --docdi | --doc | --do)
1471    ac_prev=docdir ;;
1472  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1473    docdir=$ac_optarg ;;
1474
1475  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1476    ac_prev=dvidir ;;
1477  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1478    dvidir=$ac_optarg ;;
1479
1480  -enable-* | --enable-*)
1481    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1482    # Reject names that are not valid shell variable names.
1483    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1484      as_fn_error $? "invalid feature name: $ac_useropt"
1485    ac_useropt_orig=$ac_useropt
1486    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1487    case $ac_user_opts in
1488      *"
1489"enable_$ac_useropt"
1490"*) ;;
1491      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1492	 ac_unrecognized_sep=', ';;
1493    esac
1494    eval enable_$ac_useropt=\$ac_optarg ;;
1495
1496  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1497  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1498  | --exec | --exe | --ex)
1499    ac_prev=exec_prefix ;;
1500  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1501  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1502  | --exec=* | --exe=* | --ex=*)
1503    exec_prefix=$ac_optarg ;;
1504
1505  -gas | --gas | --ga | --g)
1506    # Obsolete; use --with-gas.
1507    with_gas=yes ;;
1508
1509  -help | --help | --hel | --he | -h)
1510    ac_init_help=long ;;
1511  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1512    ac_init_help=recursive ;;
1513  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1514    ac_init_help=short ;;
1515
1516  -host | --host | --hos | --ho)
1517    ac_prev=host_alias ;;
1518  -host=* | --host=* | --hos=* | --ho=*)
1519    host_alias=$ac_optarg ;;
1520
1521  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1522    ac_prev=htmldir ;;
1523  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1524  | --ht=*)
1525    htmldir=$ac_optarg ;;
1526
1527  -includedir | --includedir | --includedi | --included | --include \
1528  | --includ | --inclu | --incl | --inc)
1529    ac_prev=includedir ;;
1530  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1531  | --includ=* | --inclu=* | --incl=* | --inc=*)
1532    includedir=$ac_optarg ;;
1533
1534  -infodir | --infodir | --infodi | --infod | --info | --inf)
1535    ac_prev=infodir ;;
1536  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1537    infodir=$ac_optarg ;;
1538
1539  -libdir | --libdir | --libdi | --libd)
1540    ac_prev=libdir ;;
1541  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1542    libdir=$ac_optarg ;;
1543
1544  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1545  | --libexe | --libex | --libe)
1546    ac_prev=libexecdir ;;
1547  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1548  | --libexe=* | --libex=* | --libe=*)
1549    libexecdir=$ac_optarg ;;
1550
1551  -localedir | --localedir | --localedi | --localed | --locale)
1552    ac_prev=localedir ;;
1553  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1554    localedir=$ac_optarg ;;
1555
1556  -localstatedir | --localstatedir | --localstatedi | --localstated \
1557  | --localstate | --localstat | --localsta | --localst | --locals)
1558    ac_prev=localstatedir ;;
1559  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1560  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1561    localstatedir=$ac_optarg ;;
1562
1563  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1564    ac_prev=mandir ;;
1565  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1566    mandir=$ac_optarg ;;
1567
1568  -nfp | --nfp | --nf)
1569    # Obsolete; use --without-fp.
1570    with_fp=no ;;
1571
1572  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1573  | --no-cr | --no-c | -n)
1574    no_create=yes ;;
1575
1576  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1577  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1578    no_recursion=yes ;;
1579
1580  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1581  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1582  | --oldin | --oldi | --old | --ol | --o)
1583    ac_prev=oldincludedir ;;
1584  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1585  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1586  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1587    oldincludedir=$ac_optarg ;;
1588
1589  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1590    ac_prev=prefix ;;
1591  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1592    prefix=$ac_optarg ;;
1593
1594  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1595  | --program-pre | --program-pr | --program-p)
1596    ac_prev=program_prefix ;;
1597  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1598  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1599    program_prefix=$ac_optarg ;;
1600
1601  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1602  | --program-suf | --program-su | --program-s)
1603    ac_prev=program_suffix ;;
1604  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1605  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1606    program_suffix=$ac_optarg ;;
1607
1608  -program-transform-name | --program-transform-name \
1609  | --program-transform-nam | --program-transform-na \
1610  | --program-transform-n | --program-transform- \
1611  | --program-transform | --program-transfor \
1612  | --program-transfo | --program-transf \
1613  | --program-trans | --program-tran \
1614  | --progr-tra | --program-tr | --program-t)
1615    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
1624
1625  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1626    ac_prev=pdfdir ;;
1627  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1628    pdfdir=$ac_optarg ;;
1629
1630  -psdir | --psdir | --psdi | --psd | --ps)
1631    ac_prev=psdir ;;
1632  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1633    psdir=$ac_optarg ;;
1634
1635  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1636  | -silent | --silent | --silen | --sile | --sil)
1637    silent=yes ;;
1638
1639  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1640    ac_prev=sbindir ;;
1641  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1642  | --sbi=* | --sb=*)
1643    sbindir=$ac_optarg ;;
1644
1645  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1646  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1647  | --sharedst | --shareds | --shared | --share | --shar \
1648  | --sha | --sh)
1649    ac_prev=sharedstatedir ;;
1650  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1651  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1652  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1653  | --sha=* | --sh=*)
1654    sharedstatedir=$ac_optarg ;;
1655
1656  -site | --site | --sit)
1657    ac_prev=site ;;
1658  -site=* | --site=* | --sit=*)
1659    site=$ac_optarg ;;
1660
1661  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1662    ac_prev=srcdir ;;
1663  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1664    srcdir=$ac_optarg ;;
1665
1666  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1667  | --syscon | --sysco | --sysc | --sys | --sy)
1668    ac_prev=sysconfdir ;;
1669  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1670  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1671    sysconfdir=$ac_optarg ;;
1672
1673  -target | --target | --targe | --targ | --tar | --ta | --t)
1674    ac_prev=target_alias ;;
1675  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1676    target_alias=$ac_optarg ;;
1677
1678  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1679    verbose=yes ;;
1680
1681  -version | --version | --versio | --versi | --vers | -V)
1682    ac_init_version=: ;;
1683
1684  -with-* | --with-*)
1685    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1686    # Reject names that are not valid shell variable names.
1687    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1688      as_fn_error $? "invalid package name: $ac_useropt"
1689    ac_useropt_orig=$ac_useropt
1690    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1691    case $ac_user_opts in
1692      *"
1693"with_$ac_useropt"
1694"*) ;;
1695      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1696	 ac_unrecognized_sep=', ';;
1697    esac
1698    eval with_$ac_useropt=\$ac_optarg ;;
1699
1700  -without-* | --without-*)
1701    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1702    # Reject names that are not valid shell variable names.
1703    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1704      as_fn_error $? "invalid package name: $ac_useropt"
1705    ac_useropt_orig=$ac_useropt
1706    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1707    case $ac_user_opts in
1708      *"
1709"with_$ac_useropt"
1710"*) ;;
1711      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1712	 ac_unrecognized_sep=', ';;
1713    esac
1714    eval with_$ac_useropt=no ;;
1715
1716  --x)
1717    # Obsolete; use --with-x.
1718    with_x=yes ;;
1719
1720  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1721  | --x-incl | --x-inc | --x-in | --x-i)
1722    ac_prev=x_includes ;;
1723  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1724  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1725    x_includes=$ac_optarg ;;
1726
1727  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1728  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1729    ac_prev=x_libraries ;;
1730  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1731  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1732    x_libraries=$ac_optarg ;;
1733
1734  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1735Try \`$0 --help' for more information"
1736    ;;
1737
1738  *=*)
1739    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1740    # Reject names that are not valid shell variable names.
1741    case $ac_envvar in #(
1742      '' | [0-9]* | *[!_$as_cr_alnum]* )
1743      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1744    esac
1745    eval $ac_envvar=\$ac_optarg
1746    export $ac_envvar ;;
1747
1748  *)
1749    # FIXME: should be removed in autoconf 3.0.
1750    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1751    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1752      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1753    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1754    ;;
1755
1756  esac
1757done
1758
1759if test -n "$ac_prev"; then
1760  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1761  as_fn_error $? "missing argument to $ac_option"
1762fi
1763
1764if test -n "$ac_unrecognized_opts"; then
1765  case $enable_option_checking in
1766    no) ;;
1767    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1768    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1769  esac
1770fi
1771
1772# Check all directory arguments for consistency.
1773for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1774		datadir sysconfdir sharedstatedir localstatedir includedir \
1775		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1776		libdir localedir mandir
1777do
1778  eval ac_val=\$$ac_var
1779  # Remove trailing slashes.
1780  case $ac_val in
1781    */ )
1782      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1783      eval $ac_var=\$ac_val;;
1784  esac
1785  # Be sure to have absolute directory names.
1786  case $ac_val in
1787    [\\/$]* | ?:[\\/]* )  continue;;
1788    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1789  esac
1790  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1791done
1792
1793# There might be people who depend on the old broken behavior: `$host'
1794# used to hold the argument of --host etc.
1795# FIXME: To remove some day.
1796build=$build_alias
1797host=$host_alias
1798target=$target_alias
1799
1800# FIXME: To remove some day.
1801if test "x$host_alias" != x; then
1802  if test "x$build_alias" = x; then
1803    cross_compiling=maybe
1804  elif test "x$build_alias" != "x$host_alias"; then
1805    cross_compiling=yes
1806  fi
1807fi
1808
1809ac_tool_prefix=
1810test -n "$host_alias" && ac_tool_prefix=$host_alias-
1811
1812test "$silent" = yes && exec 6>/dev/null
1813
1814
1815ac_pwd=`pwd` && test -n "$ac_pwd" &&
1816ac_ls_di=`ls -di .` &&
1817ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1818  as_fn_error $? "working directory cannot be determined"
1819test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1820  as_fn_error $? "pwd does not report name of working directory"
1821
1822
1823# Find the source files, if location was not specified.
1824if test -z "$srcdir"; then
1825  ac_srcdir_defaulted=yes
1826  # Try the directory containing this script, then the parent directory.
1827  ac_confdir=`$as_dirname -- "$as_myself" ||
1828$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1829	 X"$as_myself" : 'X\(//\)[^/]' \| \
1830	 X"$as_myself" : 'X\(//\)$' \| \
1831	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1832$as_echo X"$as_myself" |
1833    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1834	    s//\1/
1835	    q
1836	  }
1837	  /^X\(\/\/\)[^/].*/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\).*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  s/.*/./; q'`
1850  srcdir=$ac_confdir
1851  if test ! -r "$srcdir/$ac_unique_file"; then
1852    srcdir=..
1853  fi
1854else
1855  ac_srcdir_defaulted=no
1856fi
1857if test ! -r "$srcdir/$ac_unique_file"; then
1858  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1859  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1860fi
1861ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1862ac_abs_confdir=`(
1863	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1864	pwd)`
1865# When building in place, set srcdir=.
1866if test "$ac_abs_confdir" = "$ac_pwd"; then
1867  srcdir=.
1868fi
1869# Remove unnecessary trailing slashes from srcdir.
1870# Double slashes in file names in object file debugging info
1871# mess up M-x gdb in Emacs.
1872case $srcdir in
1873*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1874esac
1875for ac_var in $ac_precious_vars; do
1876  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_env_${ac_var}_value=\$${ac_var}
1878  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1880done
1881
1882#
1883# Report the --help message.
1884#
1885if test "$ac_init_help" = "long"; then
1886  # Omit some internal or obsolete options to make the list less imposing.
1887  # This message is too long to be a string in the A/UX 3.1 sh.
1888  cat <<_ACEOF
1889\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1890
1891Usage: $0 [OPTION]... [VAR=VALUE]...
1892
1893To assign environment variables (e.g., CC, CFLAGS...), specify them as
1894VAR=VALUE.  See below for descriptions of some of the useful variables.
1895
1896Defaults for the options are specified in brackets.
1897
1898Configuration:
1899  -h, --help              display this help and exit
1900      --help=short        display options specific to this package
1901      --help=recursive    display the short help of all the included packages
1902  -V, --version           display version information and exit
1903  -q, --quiet, --silent   do not print \`checking ...' messages
1904      --cache-file=FILE   cache test results in FILE [disabled]
1905  -C, --config-cache      alias for \`--cache-file=config.cache'
1906  -n, --no-create         do not create output files
1907      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1908
1909Installation directories:
1910  --prefix=PREFIX         install architecture-independent files in PREFIX
1911                          [$ac_default_prefix]
1912  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1913                          [PREFIX]
1914
1915By default, \`make install' will install all the files in
1916\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1917an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1918for instance \`--prefix=\$HOME'.
1919
1920For better control, use the options below.
1921
1922Fine tuning of the installation directories:
1923  --bindir=DIR            user executables [EPREFIX/bin]
1924  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1925  --libexecdir=DIR        program executables [EPREFIX/libexec]
1926  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1927  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1928  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1929  --libdir=DIR            object code libraries [EPREFIX/lib]
1930  --includedir=DIR        C header files [PREFIX/include]
1931  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1932  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1933  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1934  --infodir=DIR           info documentation [DATAROOTDIR/info]
1935  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1936  --mandir=DIR            man documentation [DATAROOTDIR/man]
1937  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1938  --htmldir=DIR           html documentation [DOCDIR]
1939  --dvidir=DIR            dvi documentation [DOCDIR]
1940  --pdfdir=DIR            pdf documentation [DOCDIR]
1941  --psdir=DIR             ps documentation [DOCDIR]
1942_ACEOF
1943
1944  cat <<\_ACEOF
1945
1946X features:
1947  --x-includes=DIR    X include files are in DIR
1948  --x-libraries=DIR   X library files are in DIR
1949
1950System types:
1951  --build=BUILD     configure for building on BUILD [guessed]
1952  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1953  --target=TARGET   configure for building compilers for TARGET [HOST]
1954_ACEOF
1955fi
1956
1957if test -n "$ac_init_help"; then
1958  case $ac_init_help in
1959     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1960   esac
1961  cat <<\_ACEOF
1962
1963Optional Features:
1964  --disable-option-checking  ignore unrecognized --enable/--with options
1965  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1966  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1967  --enable-openjdk-only   suppress building custom source even if present
1968                          [disabled]
1969  --enable-debug          set the debug level to fastdebug (shorthand for
1970                          --with-debug-level=fastdebug) [disabled]
1971  --enable-headless-only  only build headless (no GUI) support [disabled]
1972  --disable-unlimited-crypto
1973                          Disable unlimited crypto policy [enabled]
1974  --disable-keep-packaged-modules
1975                          Do not keep packaged modules in jdk image [enable]
1976  --enable-static-build   enable static library build [disabled]
1977  --disable-warnings-as-errors
1978                          do not consider native warnings to be an error
1979                          [enabled]
1980  --enable-debug-symbols  Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-zip-debug-info Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --enable-native-coverage
1985                          enable native compilation with code coverage
1986                          data[disabled]
1987  --enable-dtrace[=yes/no/auto]
1988                          enable dtrace. Default is auto, where dtrace is
1989                          enabled if all dependencies are present.
1990  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1991  --disable-freetype-bundling
1992                          disable bundling of the freetype library with the
1993                          build result [enabled on Windows or when using
1994                          --with-freetype, disabled otherwise]
1995  --enable-libffi-bundling
1996                          enable bundling of libffi.so to make the built JDK
1997                          runnable on more systems
1998  --enable-jtreg-failure-handler
1999                          forces build of the jtreg failure handler to be
2000                          enabled, missing dependencies become fatal errors.
2001                          Default is auto, where the failure handler is built
2002                          if all dependencies are present and otherwise just
2003                          disabled.
2004  --disable-generate-classlist
2005                          forces enabling or disabling of the generation of a
2006                          CDS classlist at build time. Default is to generate
2007                          it when either the server or client JVMs are built.
2008  --enable-sjavac         use sjavac to do fast incremental compiles
2009                          [disabled]
2010  --disable-javac-server  disable javac server [enabled]
2011  --enable-icecc          enable distribted compilation of native code using
2012                          icecc/icecream [disabled]
2013  --disable-precompiled-headers
2014                          disable using precompiled headers when compiling C++
2015                          [enabled]
2016  --enable-ccache         enable using ccache to speed up recompilations
2017                          [disabled]
2018
2019Optional Packages:
2020  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2021  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2022  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2023                          support it), e.g. --with-target-bits=32 [guessed]
2024  --with-custom-make-dir  Deprecated. Option is kept for backwards
2025                          compatibility and is ignored
2026  --with-jdk-variant      JDK variant to build (normal) [normal]
2027  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2028                          optimized) [release]
2029  --with-jvm-variants     JVM variants (separated by commas) to build
2030                          (server,client,minimal,core,zero,zeroshark,custom)
2031                          [server]
2032  --with-devkit           use this devkit for compilers, tools and resources
2033  --with-sys-root         alias for --with-sysroot for backwards compatability
2034  --with-sysroot          use this directory as sysroot
2035  --with-tools-dir        alias for --with-toolchain-path for backwards
2036                          compatibility
2037  --with-toolchain-path   prepend these directories when searching for
2038                          toolchain binaries (compilers etc)
2039  --with-extra-path       prepend these directories to the default path
2040  --with-sdk-name         use the platform SDK of the given name. [macosx]
2041  --with-conf-name        use this as the name of the configuration [generated
2042                          from important configuration options]
2043  --with-output-sync      set make output sync type if supported by make.
2044                          [recurse]
2045  --with-default-make-target
2046                          set the default make target [exploded-image]
2047  --with-cacerts-file     specify alternative cacerts file
2048  --with-copyright-year   Set copyright year value for build [current year]
2049  --with-milestone        Deprecated. Option is kept for backwards
2050                          compatibility and is ignored
2051  --with-update-version   Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-user-release-suffix
2054                          Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-build-number     Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-version-string   Set version string [calculated]
2059  --with-version-pre      Set the base part of the version 'PRE' field
2060                          (pre-release identifier) ['internal']
2061  --with-version-opt      Set version 'OPT' field (build metadata)
2062                          [<timestamp>.<user>.<dirname>]
2063  --with-version-build    Set version 'BUILD' field (build number) [not
2064                          specified]
2065  --with-version-major    Set version 'MAJOR' field (first number) [current
2066                          source value]
2067  --with-version-minor    Set version 'MINOR' field (second number) [current
2068                          source value]
2069  --with-version-security Set version 'SECURITY' field (third number) [current
2070                          source value]
2071  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2072                          specified]
2073  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2074  --with-build-jdk        path to JDK of same version as is being built[the
2075                          newly built JDK]
2076  --with-add-source-root  Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-override-source-root
2079                          Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-adds-and-overrides
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-langtools
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-corba   Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-jaxp    Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-jaxws   Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-hotspot Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-nashorn Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jdk     Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-import_hotspot   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-import-modules   import a set of prebuilt modules either as a zip
2102                          file or an exploded directory
2103  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2104                          to show possible values [platform dependent]
2105  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2106  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2107  --with-extra-ldflags    extra flags to be used when linking jdk
2108  --with-toolchain-version
2109                          the version of the toolchain to look for, use
2110                          '--help' to show possible values [platform
2111                          dependent]
2112  --with-build-devkit     Devkit to use for the build platform toolchain
2113  --with-jtreg            Regression Test Harness [probed]
2114  --with-native-debug-symbols
2115                          set the native debug symbol configuration (none,
2116                          internal, external, zipped) [varying]
2117  --with-jvm-features     additional JVM features to enable (separated by
2118                          comma), use '--help' to show possible values [none]
2119  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2120                          compatibility and is ignored
2121  --with-stdc++lib=<static>,<dynamic>,<default>
2122                          force linking of the C++ runtime on Linux to either
2123                          static or dynamic, default is static with dynamic as
2124                          fallback
2125  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2126                          (Windows only) [probed]
2127  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2128                          (Windows only) [probed]
2129  --with-x                use the X Window System
2130  --with-cups             specify prefix directory for the cups package
2131                          (expecting the headers under PATH/include)
2132  --with-cups-include     specify directory for the cups include files
2133  --with-freetype         specify prefix directory for the freetype package
2134                          (expecting the libraries under PATH/lib and the
2135                          headers under PATH/include)
2136  --with-freetype-include specify directory for the freetype include files
2137  --with-freetype-lib     specify directory for the freetype library
2138  --with-freetype-src     specify directory with freetype sources to
2139                          automatically build the library (experimental,
2140                          Windows-only)
2141  --with-alsa             specify prefix directory for the alsa package
2142                          (expecting the libraries under PATH/lib and the
2143                          headers under PATH/include)
2144  --with-alsa-include     specify directory for the alsa include files
2145  --with-alsa-lib         specify directory for the alsa library
2146  --with-libffi           specify prefix directory for the libffi package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-libffi-include   specify directory for the libffi include files
2150  --with-libffi-lib       specify directory for the libffi library
2151  --with-libjpeg          use libjpeg from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-giflib           use giflib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-libpng           use libpng from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-zlib             use zlib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-lcms             use lcms2 from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-dxsdk            Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-dxsdk-include    Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-num-cores        number of cores in the build system, e.g.
2168                          --with-num-cores=8 [probed]
2169  --with-memory-size      memory (in MB) available in the build system, e.g.
2170                          --with-memory-size=1024 [probed]
2171  --with-jobs             number of parallel jobs to let make run [calculated
2172                          based on cores and memory]
2173  --with-test-jobs        number of parallel tests jobs to run [based on build
2174                          jobs]
2175  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2176                          invocations of boot JDK, overriding the default
2177                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2178                          -enableassertions"
2179  --with-sjavac-server-java
2180                          use this java binary for running the sjavac
2181                          background server [Boot JDK java]
2182  --with-ccache-dir       where to store ccache files [~/.ccache]
2183
2184Some influential environment variables:
2185  BASENAME    Override default value for BASENAME
2186  BASH        Override default value for BASH
2187  CAT         Override default value for CAT
2188  CHMOD       Override default value for CHMOD
2189  CMP         Override default value for CMP
2190  COMM        Override default value for COMM
2191  CP          Override default value for CP
2192  CUT         Override default value for CUT
2193  DATE        Override default value for DATE
2194  DIFF        Override default value for DIFF
2195  DIRNAME     Override default value for DIRNAME
2196  ECHO        Override default value for ECHO
2197  EXPR        Override default value for EXPR
2198  FILE        Override default value for FILE
2199  FIND        Override default value for FIND
2200  HEAD        Override default value for HEAD
2201  GUNZIP      Override default value for GUNZIP
2202  GZIP        Override default value for GZIP
2203  LN          Override default value for LN
2204  LS          Override default value for LS
2205  MKDIR       Override default value for MKDIR
2206  MKTEMP      Override default value for MKTEMP
2207  MV          Override default value for MV
2208  NAWK        Override default value for NAWK
2209  PRINTF      Override default value for PRINTF
2210  RM          Override default value for RM
2211  RMDIR       Override default value for RMDIR
2212  SH          Override default value for SH
2213  SORT        Override default value for SORT
2214  TAIL        Override default value for TAIL
2215  TAR         Override default value for TAR
2216  TEE         Override default value for TEE
2217  TOUCH       Override default value for TOUCH
2218  TR          Override default value for TR
2219  UNAME       Override default value for UNAME
2220  UNIQ        Override default value for UNIQ
2221  WC          Override default value for WC
2222  WHICH       Override default value for WHICH
2223  XARGS       Override default value for XARGS
2224  AWK         Override default value for AWK
2225  GREP        Override default value for GREP
2226  EGREP       Override default value for EGREP
2227  FGREP       Override default value for FGREP
2228  SED         Override default value for SED
2229  CYGPATH     Override default value for CYGPATH
2230  READLINK    Override default value for READLINK
2231  DF          Override default value for DF
2232  CPIO        Override default value for CPIO
2233  NICE        Override default value for NICE
2234  MAKE        Override default value for MAKE
2235  UNZIP       Override default value for UNZIP
2236  ZIPEXE      Override default value for ZIPEXE
2237  LDD         Override default value for LDD
2238  OTOOL       Override default value for OTOOL
2239  READELF     Override default value for READELF
2240  HG          Override default value for HG
2241  STAT        Override default value for STAT
2242  TIME        Override default value for TIME
2243  DTRACE      Override default value for DTRACE
2244  PATCH       Override default value for PATCH
2245  DSYMUTIL    Override default value for DSYMUTIL
2246  XATTR       Override default value for XATTR
2247  CODESIGN    Override default value for CODESIGN
2248  SETFILE     Override default value for SETFILE
2249  PKG_CONFIG  path to pkg-config utility
2250  JAVA        Override default value for JAVA
2251  JAVAC       Override default value for JAVAC
2252  JAVAH       Override default value for JAVAH
2253  JAR         Override default value for JAR
2254  JARSIGNER   Override default value for JARSIGNER
2255  CC          C compiler command
2256  CFLAGS      C compiler flags
2257  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2258              nonstandard directory <lib dir>
2259  LIBS        libraries to pass to the linker, e.g. -l<library>
2260  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2261              you have headers in a nonstandard directory <include dir>
2262  CXX         C++ compiler command
2263  CXXFLAGS    C++ compiler flags
2264  CPP         C preprocessor
2265  CXXCPP      C++ preprocessor
2266  AS          Override default value for AS
2267  AR          Override default value for AR
2268  LIPO        Override default value for LIPO
2269  STRIP       Override default value for STRIP
2270  NM          Override default value for NM
2271  GNM         Override default value for GNM
2272  OBJCOPY     Override default value for OBJCOPY
2273  OBJDUMP     Override default value for OBJDUMP
2274  BUILD_CC    Override default value for BUILD_CC
2275  BUILD_CXX   Override default value for BUILD_CXX
2276  BUILD_NM    Override default value for BUILD_NM
2277  BUILD_AR    Override default value for BUILD_AR
2278  BUILD_OBJCOPY
2279              Override default value for BUILD_OBJCOPY
2280  BUILD_STRIP Override default value for BUILD_STRIP
2281  JTREGEXE    Override default value for JTREGEXE
2282  XMKMF       Path to xmkmf, Makefile generator for X Window System
2283  FREETYPE_CFLAGS
2284              C compiler flags for FREETYPE, overriding pkg-config
2285  FREETYPE_LIBS
2286              linker flags for FREETYPE, overriding pkg-config
2287  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2288  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2289  LIBFFI_CFLAGS
2290              C compiler flags for LIBFFI, overriding pkg-config
2291  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2292  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2293  PNG_LIBS    linker flags for PNG, overriding pkg-config
2294  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2295  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2296  ICECC_CMD   Override default value for ICECC_CMD
2297  ICECC_CREATE_ENV
2298              Override default value for ICECC_CREATE_ENV
2299  ICECC_WRAPPER
2300              Override default value for ICECC_WRAPPER
2301  CCACHE      Override default value for CCACHE
2302
2303Use these variables to override the choices made by `configure' or to help
2304it to find libraries and programs with nonstandard names/locations.
2305
2306Report bugs to <build-dev@openjdk.java.net>.
2307OpenJDK home page: <http://openjdk.java.net>.
2308_ACEOF
2309ac_status=$?
2310fi
2311
2312if test "$ac_init_help" = "recursive"; then
2313  # If there are subdirs, report their specific --help.
2314  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2315    test -d "$ac_dir" ||
2316      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2317      continue
2318    ac_builddir=.
2319
2320case "$ac_dir" in
2321.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2322*)
2323  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2324  # A ".." for each directory in $ac_dir_suffix.
2325  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2326  case $ac_top_builddir_sub in
2327  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2328  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2329  esac ;;
2330esac
2331ac_abs_top_builddir=$ac_pwd
2332ac_abs_builddir=$ac_pwd$ac_dir_suffix
2333# for backward compatibility:
2334ac_top_builddir=$ac_top_build_prefix
2335
2336case $srcdir in
2337  .)  # We are building in place.
2338    ac_srcdir=.
2339    ac_top_srcdir=$ac_top_builddir_sub
2340    ac_abs_top_srcdir=$ac_pwd ;;
2341  [\\/]* | ?:[\\/]* )  # Absolute name.
2342    ac_srcdir=$srcdir$ac_dir_suffix;
2343    ac_top_srcdir=$srcdir
2344    ac_abs_top_srcdir=$srcdir ;;
2345  *) # Relative name.
2346    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2347    ac_top_srcdir=$ac_top_build_prefix$srcdir
2348    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2349esac
2350ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2351
2352    cd "$ac_dir" || { ac_status=$?; continue; }
2353    # Check for guested configure.
2354    if test -f "$ac_srcdir/configure.gnu"; then
2355      echo &&
2356      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2357    elif test -f "$ac_srcdir/configure"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure" --help=recursive
2360    else
2361      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2362    fi || ac_status=$?
2363    cd "$ac_pwd" || { ac_status=$?; break; }
2364  done
2365fi
2366
2367test -n "$ac_init_help" && exit $ac_status
2368if $ac_init_version; then
2369  cat <<\_ACEOF
2370OpenJDK configure jdk9
2371generated by GNU Autoconf 2.69
2372
2373Copyright (C) 2012 Free Software Foundation, Inc.
2374This configure script is free software; the Free Software Foundation
2375gives unlimited permission to copy, distribute and modify it.
2376_ACEOF
2377  exit
2378fi
2379
2380## ------------------------ ##
2381## Autoconf initialization. ##
2382## ------------------------ ##
2383
2384# ac_fn_c_try_compile LINENO
2385# --------------------------
2386# Try to compile conftest.$ac_ext, and return whether this succeeded.
2387ac_fn_c_try_compile ()
2388{
2389  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390  rm -f conftest.$ac_objext
2391  if { { ac_try="$ac_compile"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_compile") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } && {
2407	 test -z "$ac_c_werror_flag" ||
2408	 test ! -s conftest.err
2409       } && test -s conftest.$ac_objext; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415	ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_c_try_compile
2421
2422# ac_fn_cxx_try_compile LINENO
2423# ----------------------------
2424# Try to compile conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_cxx_try_compile ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext
2429  if { { ac_try="$ac_compile"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_compile") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_cxx_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest.$ac_objext; then :
2448  ac_retval=0
2449else
2450  $as_echo "$as_me: failed program was:" >&5
2451sed 's/^/| /' conftest.$ac_ext >&5
2452
2453	ac_retval=1
2454fi
2455  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456  as_fn_set_status $ac_retval
2457
2458} # ac_fn_cxx_try_compile
2459
2460# ac_fn_c_try_cpp LINENO
2461# ----------------------
2462# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2463ac_fn_c_try_cpp ()
2464{
2465  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2466  if { { ac_try="$ac_cpp conftest.$ac_ext"
2467case "(($ac_try" in
2468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2469  *) ac_try_echo=$ac_try;;
2470esac
2471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2472$as_echo "$ac_try_echo"; } >&5
2473  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2474  ac_status=$?
2475  if test -s conftest.err; then
2476    grep -v '^ *+' conftest.err >conftest.er1
2477    cat conftest.er1 >&5
2478    mv -f conftest.er1 conftest.err
2479  fi
2480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2481  test $ac_status = 0; } > conftest.i && {
2482	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2483	 test ! -s conftest.err
2484       }; then :
2485  ac_retval=0
2486else
2487  $as_echo "$as_me: failed program was:" >&5
2488sed 's/^/| /' conftest.$ac_ext >&5
2489
2490    ac_retval=1
2491fi
2492  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2493  as_fn_set_status $ac_retval
2494
2495} # ac_fn_c_try_cpp
2496
2497# ac_fn_cxx_try_cpp LINENO
2498# ------------------------
2499# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2500ac_fn_cxx_try_cpp ()
2501{
2502  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2503  if { { ac_try="$ac_cpp conftest.$ac_ext"
2504case "(($ac_try" in
2505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506  *) ac_try_echo=$ac_try;;
2507esac
2508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509$as_echo "$ac_try_echo"; } >&5
2510  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2511  ac_status=$?
2512  if test -s conftest.err; then
2513    grep -v '^ *+' conftest.err >conftest.er1
2514    cat conftest.er1 >&5
2515    mv -f conftest.er1 conftest.err
2516  fi
2517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518  test $ac_status = 0; } > conftest.i && {
2519	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2520	 test ! -s conftest.err
2521       }; then :
2522  ac_retval=0
2523else
2524  $as_echo "$as_me: failed program was:" >&5
2525sed 's/^/| /' conftest.$ac_ext >&5
2526
2527    ac_retval=1
2528fi
2529  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2530  as_fn_set_status $ac_retval
2531
2532} # ac_fn_cxx_try_cpp
2533
2534# ac_fn_c_try_link LINENO
2535# -----------------------
2536# Try to link conftest.$ac_ext, and return whether this succeeded.
2537ac_fn_c_try_link ()
2538{
2539  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540  rm -f conftest.$ac_objext conftest$ac_exeext
2541  if { { ac_try="$ac_link"
2542case "(($ac_try" in
2543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2544  *) ac_try_echo=$ac_try;;
2545esac
2546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2547$as_echo "$ac_try_echo"; } >&5
2548  (eval "$ac_link") 2>conftest.err
2549  ac_status=$?
2550  if test -s conftest.err; then
2551    grep -v '^ *+' conftest.err >conftest.er1
2552    cat conftest.er1 >&5
2553    mv -f conftest.er1 conftest.err
2554  fi
2555  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2556  test $ac_status = 0; } && {
2557	 test -z "$ac_c_werror_flag" ||
2558	 test ! -s conftest.err
2559       } && test -s conftest$ac_exeext && {
2560	 test "$cross_compiling" = yes ||
2561	 test -x conftest$ac_exeext
2562       }; then :
2563  ac_retval=0
2564else
2565  $as_echo "$as_me: failed program was:" >&5
2566sed 's/^/| /' conftest.$ac_ext >&5
2567
2568	ac_retval=1
2569fi
2570  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2571  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2572  # interfere with the next link command; also delete a directory that is
2573  # left behind by Apple's compiler.  We do this before executing the actions.
2574  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576  as_fn_set_status $ac_retval
2577
2578} # ac_fn_c_try_link
2579
2580# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2581# ---------------------------------------------------------
2582# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2583# the include files in INCLUDES and setting the cache variable VAR
2584# accordingly.
2585ac_fn_cxx_check_header_mongrel ()
2586{
2587  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588  if eval \${$3+:} false; then :
2589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2590$as_echo_n "checking for $2... " >&6; }
2591if eval \${$3+:} false; then :
2592  $as_echo_n "(cached) " >&6
2593fi
2594eval ac_res=\$$3
2595	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2596$as_echo "$ac_res" >&6; }
2597else
2598  # Is the header compilable?
2599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2600$as_echo_n "checking $2 usability... " >&6; }
2601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604#include <$2>
2605_ACEOF
2606if ac_fn_cxx_try_compile "$LINENO"; then :
2607  ac_header_compiler=yes
2608else
2609  ac_header_compiler=no
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2613$as_echo "$ac_header_compiler" >&6; }
2614
2615# Is the header present?
2616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2617$as_echo_n "checking $2 presence... " >&6; }
2618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620#include <$2>
2621_ACEOF
2622if ac_fn_cxx_try_cpp "$LINENO"; then :
2623  ac_header_preproc=yes
2624else
2625  ac_header_preproc=no
2626fi
2627rm -f conftest.err conftest.i conftest.$ac_ext
2628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2629$as_echo "$ac_header_preproc" >&6; }
2630
2631# So?  What about this header?
2632case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2633  yes:no: )
2634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2635$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2637$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2638    ;;
2639  no:yes:* )
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2641$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2643$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2645$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2647$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2650( $as_echo "## ----------------------------------------- ##
2651## Report this to build-dev@openjdk.java.net ##
2652## ----------------------------------------- ##"
2653     ) | sed "s/^/$as_me: WARNING:     /" >&2
2654    ;;
2655esac
2656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2657$as_echo_n "checking for $2... " >&6; }
2658if eval \${$3+:} false; then :
2659  $as_echo_n "(cached) " >&6
2660else
2661  eval "$3=\$ac_header_compiler"
2662fi
2663eval ac_res=\$$3
2664	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2665$as_echo "$ac_res" >&6; }
2666fi
2667  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2668
2669} # ac_fn_cxx_check_header_mongrel
2670
2671# ac_fn_cxx_try_run LINENO
2672# ------------------------
2673# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2674# that executables *can* be run.
2675ac_fn_cxx_try_run ()
2676{
2677  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2678  if { { ac_try="$ac_link"
2679case "(($ac_try" in
2680  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2681  *) ac_try_echo=$ac_try;;
2682esac
2683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2684$as_echo "$ac_try_echo"; } >&5
2685  (eval "$ac_link") 2>&5
2686  ac_status=$?
2687  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2688  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2689  { { case "(($ac_try" in
2690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691  *) ac_try_echo=$ac_try;;
2692esac
2693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694$as_echo "$ac_try_echo"; } >&5
2695  (eval "$ac_try") 2>&5
2696  ac_status=$?
2697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2698  test $ac_status = 0; }; }; then :
2699  ac_retval=0
2700else
2701  $as_echo "$as_me: program exited with status $ac_status" >&5
2702       $as_echo "$as_me: failed program was:" >&5
2703sed 's/^/| /' conftest.$ac_ext >&5
2704
2705       ac_retval=$ac_status
2706fi
2707  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2708  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2709  as_fn_set_status $ac_retval
2710
2711} # ac_fn_cxx_try_run
2712
2713# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2714# ---------------------------------------------------------
2715# Tests whether HEADER exists and can be compiled using the include files in
2716# INCLUDES, setting the cache variable VAR accordingly.
2717ac_fn_cxx_check_header_compile ()
2718{
2719  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2721$as_echo_n "checking for $2... " >&6; }
2722if eval \${$3+:} false; then :
2723  $as_echo_n "(cached) " >&6
2724else
2725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2726/* end confdefs.h.  */
2727$4
2728#include <$2>
2729_ACEOF
2730if ac_fn_cxx_try_compile "$LINENO"; then :
2731  eval "$3=yes"
2732else
2733  eval "$3=no"
2734fi
2735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2736fi
2737eval ac_res=\$$3
2738	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2739$as_echo "$ac_res" >&6; }
2740  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2741
2742} # ac_fn_cxx_check_header_compile
2743
2744# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2745# ----------------------------------------------
2746# Tries to find the compile-time value of EXPR in a program that includes
2747# INCLUDES, setting VAR accordingly. Returns whether the value could be
2748# computed
2749ac_fn_cxx_compute_int ()
2750{
2751  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2752  if test "$cross_compiling" = yes; then
2753    # Depending upon the size, compute the lo and hi bounds.
2754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2755/* end confdefs.h.  */
2756$4
2757int
2758main ()
2759{
2760static int test_array [1 - 2 * !(($2) >= 0)];
2761test_array [0] = 0;
2762return test_array [0];
2763
2764  ;
2765  return 0;
2766}
2767_ACEOF
2768if ac_fn_cxx_try_compile "$LINENO"; then :
2769  ac_lo=0 ac_mid=0
2770  while :; do
2771    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2772/* end confdefs.h.  */
2773$4
2774int
2775main ()
2776{
2777static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2778test_array [0] = 0;
2779return test_array [0];
2780
2781  ;
2782  return 0;
2783}
2784_ACEOF
2785if ac_fn_cxx_try_compile "$LINENO"; then :
2786  ac_hi=$ac_mid; break
2787else
2788  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2789			if test $ac_lo -le $ac_mid; then
2790			  ac_lo= ac_hi=
2791			  break
2792			fi
2793			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2794fi
2795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2796  done
2797else
2798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2799/* end confdefs.h.  */
2800$4
2801int
2802main ()
2803{
2804static int test_array [1 - 2 * !(($2) < 0)];
2805test_array [0] = 0;
2806return test_array [0];
2807
2808  ;
2809  return 0;
2810}
2811_ACEOF
2812if ac_fn_cxx_try_compile "$LINENO"; then :
2813  ac_hi=-1 ac_mid=-1
2814  while :; do
2815    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816/* end confdefs.h.  */
2817$4
2818int
2819main ()
2820{
2821static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2822test_array [0] = 0;
2823return test_array [0];
2824
2825  ;
2826  return 0;
2827}
2828_ACEOF
2829if ac_fn_cxx_try_compile "$LINENO"; then :
2830  ac_lo=$ac_mid; break
2831else
2832  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2833			if test $ac_mid -le $ac_hi; then
2834			  ac_lo= ac_hi=
2835			  break
2836			fi
2837			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2838fi
2839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2840  done
2841else
2842  ac_lo= ac_hi=
2843fi
2844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847# Binary search between lo and hi bounds.
2848while test "x$ac_lo" != "x$ac_hi"; do
2849  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2851/* end confdefs.h.  */
2852$4
2853int
2854main ()
2855{
2856static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2857test_array [0] = 0;
2858return test_array [0];
2859
2860  ;
2861  return 0;
2862}
2863_ACEOF
2864if ac_fn_cxx_try_compile "$LINENO"; then :
2865  ac_hi=$ac_mid
2866else
2867  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870done
2871case $ac_lo in #((
2872?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2873'') ac_retval=1 ;;
2874esac
2875  else
2876    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877/* end confdefs.h.  */
2878$4
2879static long int longval () { return $2; }
2880static unsigned long int ulongval () { return $2; }
2881#include <stdio.h>
2882#include <stdlib.h>
2883int
2884main ()
2885{
2886
2887  FILE *f = fopen ("conftest.val", "w");
2888  if (! f)
2889    return 1;
2890  if (($2) < 0)
2891    {
2892      long int i = longval ();
2893      if (i != ($2))
2894	return 1;
2895      fprintf (f, "%ld", i);
2896    }
2897  else
2898    {
2899      unsigned long int i = ulongval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%lu", i);
2903    }
2904  /* Do not output a trailing newline, as this causes \r\n confusion
2905     on some platforms.  */
2906  return ferror (f) || fclose (f) != 0;
2907
2908  ;
2909  return 0;
2910}
2911_ACEOF
2912if ac_fn_cxx_try_run "$LINENO"; then :
2913  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2914else
2915  ac_retval=1
2916fi
2917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2918  conftest.$ac_objext conftest.beam conftest.$ac_ext
2919rm -f conftest.val
2920
2921  fi
2922  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2923  as_fn_set_status $ac_retval
2924
2925} # ac_fn_cxx_compute_int
2926
2927# ac_fn_cxx_try_link LINENO
2928# -------------------------
2929# Try to link conftest.$ac_ext, and return whether this succeeded.
2930ac_fn_cxx_try_link ()
2931{
2932  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2933  rm -f conftest.$ac_objext conftest$ac_exeext
2934  if { { ac_try="$ac_link"
2935case "(($ac_try" in
2936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2937  *) ac_try_echo=$ac_try;;
2938esac
2939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2940$as_echo "$ac_try_echo"; } >&5
2941  (eval "$ac_link") 2>conftest.err
2942  ac_status=$?
2943  if test -s conftest.err; then
2944    grep -v '^ *+' conftest.err >conftest.er1
2945    cat conftest.er1 >&5
2946    mv -f conftest.er1 conftest.err
2947  fi
2948  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2949  test $ac_status = 0; } && {
2950	 test -z "$ac_cxx_werror_flag" ||
2951	 test ! -s conftest.err
2952       } && test -s conftest$ac_exeext && {
2953	 test "$cross_compiling" = yes ||
2954	 test -x conftest$ac_exeext
2955       }; then :
2956  ac_retval=0
2957else
2958  $as_echo "$as_me: failed program was:" >&5
2959sed 's/^/| /' conftest.$ac_ext >&5
2960
2961	ac_retval=1
2962fi
2963  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2964  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2965  # interfere with the next link command; also delete a directory that is
2966  # left behind by Apple's compiler.  We do this before executing the actions.
2967  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2968  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2969  as_fn_set_status $ac_retval
2970
2971} # ac_fn_cxx_try_link
2972
2973# ac_fn_cxx_check_func LINENO FUNC VAR
2974# ------------------------------------
2975# Tests whether FUNC exists, setting the cache variable VAR accordingly
2976ac_fn_cxx_check_func ()
2977{
2978  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2980$as_echo_n "checking for $2... " >&6; }
2981if eval \${$3+:} false; then :
2982  $as_echo_n "(cached) " >&6
2983else
2984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985/* end confdefs.h.  */
2986/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2987   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2988#define $2 innocuous_$2
2989
2990/* System header to define __stub macros and hopefully few prototypes,
2991    which can conflict with char $2 (); below.
2992    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2993    <limits.h> exists even on freestanding compilers.  */
2994
2995#ifdef __STDC__
2996# include <limits.h>
2997#else
2998# include <assert.h>
2999#endif
3000
3001#undef $2
3002
3003/* Override any GCC internal prototype to avoid an error.
3004   Use char because int might match the return type of a GCC
3005   builtin and then its argument prototype would still apply.  */
3006#ifdef __cplusplus
3007extern "C"
3008#endif
3009char $2 ();
3010/* The GNU C library defines this for functions which it implements
3011    to always fail with ENOSYS.  Some functions are actually named
3012    something starting with __ and the normal name is an alias.  */
3013#if defined __stub_$2 || defined __stub___$2
3014choke me
3015#endif
3016
3017int
3018main ()
3019{
3020return $2 ();
3021  ;
3022  return 0;
3023}
3024_ACEOF
3025if ac_fn_cxx_try_link "$LINENO"; then :
3026  eval "$3=yes"
3027else
3028  eval "$3=no"
3029fi
3030rm -f core conftest.err conftest.$ac_objext \
3031    conftest$ac_exeext conftest.$ac_ext
3032fi
3033eval ac_res=\$$3
3034	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3035$as_echo "$ac_res" >&6; }
3036  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3037
3038} # ac_fn_cxx_check_func
3039
3040# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3041# -------------------------------------------------------
3042# Tests whether HEADER exists and can be compiled using the include files in
3043# INCLUDES, setting the cache variable VAR accordingly.
3044ac_fn_c_check_header_compile ()
3045{
3046  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3048$as_echo_n "checking for $2... " >&6; }
3049if eval \${$3+:} false; then :
3050  $as_echo_n "(cached) " >&6
3051else
3052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3053/* end confdefs.h.  */
3054$4
3055#include <$2>
3056_ACEOF
3057if ac_fn_c_try_compile "$LINENO"; then :
3058  eval "$3=yes"
3059else
3060  eval "$3=no"
3061fi
3062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3063fi
3064eval ac_res=\$$3
3065	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3066$as_echo "$ac_res" >&6; }
3067  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3068
3069} # ac_fn_c_check_header_compile
3070cat >config.log <<_ACEOF
3071This file contains any messages produced by compilers while
3072running configure, to aid debugging if configure makes a mistake.
3073
3074It was created by OpenJDK $as_me jdk9, which was
3075generated by GNU Autoconf 2.69.  Invocation command line was
3076
3077  $ $0 $@
3078
3079_ACEOF
3080exec 5>>config.log
3081{
3082cat <<_ASUNAME
3083## --------- ##
3084## Platform. ##
3085## --------- ##
3086
3087hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3088uname -m = `(uname -m) 2>/dev/null || echo unknown`
3089uname -r = `(uname -r) 2>/dev/null || echo unknown`
3090uname -s = `(uname -s) 2>/dev/null || echo unknown`
3091uname -v = `(uname -v) 2>/dev/null || echo unknown`
3092
3093/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3094/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3095
3096/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3097/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3098/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3099/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3100/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3101/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3102/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3103
3104_ASUNAME
3105
3106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3107for as_dir in $PATH
3108do
3109  IFS=$as_save_IFS
3110  test -z "$as_dir" && as_dir=.
3111    $as_echo "PATH: $as_dir"
3112  done
3113IFS=$as_save_IFS
3114
3115} >&5
3116
3117cat >&5 <<_ACEOF
3118
3119
3120## ----------- ##
3121## Core tests. ##
3122## ----------- ##
3123
3124_ACEOF
3125
3126
3127# Keep a trace of the command line.
3128# Strip out --no-create and --no-recursion so they do not pile up.
3129# Strip out --silent because we don't want to record it for future runs.
3130# Also quote any args containing shell meta-characters.
3131# Make two passes to allow for proper duplicate-argument suppression.
3132ac_configure_args=
3133ac_configure_args0=
3134ac_configure_args1=
3135ac_must_keep_next=false
3136for ac_pass in 1 2
3137do
3138  for ac_arg
3139  do
3140    case $ac_arg in
3141    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3142    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3143    | -silent | --silent | --silen | --sile | --sil)
3144      continue ;;
3145    *\'*)
3146      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3147    esac
3148    case $ac_pass in
3149    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3150    2)
3151      as_fn_append ac_configure_args1 " '$ac_arg'"
3152      if test $ac_must_keep_next = true; then
3153	ac_must_keep_next=false # Got value, back to normal.
3154      else
3155	case $ac_arg in
3156	  *=* | --config-cache | -C | -disable-* | --disable-* \
3157	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3158	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3159	  | -with-* | --with-* | -without-* | --without-* | --x)
3160	    case "$ac_configure_args0 " in
3161	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3162	    esac
3163	    ;;
3164	  -* ) ac_must_keep_next=true ;;
3165	esac
3166      fi
3167      as_fn_append ac_configure_args " '$ac_arg'"
3168      ;;
3169    esac
3170  done
3171done
3172{ ac_configure_args0=; unset ac_configure_args0;}
3173{ ac_configure_args1=; unset ac_configure_args1;}
3174
3175# When interrupted or exit'd, cleanup temporary files, and complete
3176# config.log.  We remove comments because anyway the quotes in there
3177# would cause problems or look ugly.
3178# WARNING: Use '\'' to represent an apostrophe within the trap.
3179# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3180trap 'exit_status=$?
3181  # Save into config.log some information that might help in debugging.
3182  {
3183    echo
3184
3185    $as_echo "## ---------------- ##
3186## Cache variables. ##
3187## ---------------- ##"
3188    echo
3189    # The following way of writing the cache mishandles newlines in values,
3190(
3191  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3192    eval ac_val=\$$ac_var
3193    case $ac_val in #(
3194    *${as_nl}*)
3195      case $ac_var in #(
3196      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3197$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3198      esac
3199      case $ac_var in #(
3200      _ | IFS | as_nl) ;; #(
3201      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3202      *) { eval $ac_var=; unset $ac_var;} ;;
3203      esac ;;
3204    esac
3205  done
3206  (set) 2>&1 |
3207    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3208    *${as_nl}ac_space=\ *)
3209      sed -n \
3210	"s/'\''/'\''\\\\'\'''\''/g;
3211	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3212      ;; #(
3213    *)
3214      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3215      ;;
3216    esac |
3217    sort
3218)
3219    echo
3220
3221    $as_echo "## ----------------- ##
3222## Output variables. ##
3223## ----------------- ##"
3224    echo
3225    for ac_var in $ac_subst_vars
3226    do
3227      eval ac_val=\$$ac_var
3228      case $ac_val in
3229      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3230      esac
3231      $as_echo "$ac_var='\''$ac_val'\''"
3232    done | sort
3233    echo
3234
3235    if test -n "$ac_subst_files"; then
3236      $as_echo "## ------------------- ##
3237## File substitutions. ##
3238## ------------------- ##"
3239      echo
3240      for ac_var in $ac_subst_files
3241      do
3242	eval ac_val=\$$ac_var
3243	case $ac_val in
3244	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3245	esac
3246	$as_echo "$ac_var='\''$ac_val'\''"
3247      done | sort
3248      echo
3249    fi
3250
3251    if test -s confdefs.h; then
3252      $as_echo "## ----------- ##
3253## confdefs.h. ##
3254## ----------- ##"
3255      echo
3256      cat confdefs.h
3257      echo
3258    fi
3259    test "$ac_signal" != 0 &&
3260      $as_echo "$as_me: caught signal $ac_signal"
3261    $as_echo "$as_me: exit $exit_status"
3262  } >&5
3263  rm -f core *.core core.conftest.* &&
3264    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3265    exit $exit_status
3266' 0
3267for ac_signal in 1 2 13 15; do
3268  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3269done
3270ac_signal=0
3271
3272# confdefs.h avoids OS command line length limits that DEFS can exceed.
3273rm -f -r conftest* confdefs.h
3274
3275$as_echo "/* confdefs.h */" > confdefs.h
3276
3277# Predefined preprocessor variables.
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_NAME "$PACKAGE_NAME"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_VERSION "$PACKAGE_VERSION"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_STRING "$PACKAGE_STRING"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3297_ACEOF
3298
3299cat >>confdefs.h <<_ACEOF
3300#define PACKAGE_URL "$PACKAGE_URL"
3301_ACEOF
3302
3303
3304# Let the site file select an alternate cache file if it wants to.
3305# Prefer an explicitly selected file to automatically selected ones.
3306ac_site_file1=NONE
3307ac_site_file2=NONE
3308if test -n "$CONFIG_SITE"; then
3309  # We do not want a PATH search for config.site.
3310  case $CONFIG_SITE in #((
3311    -*)  ac_site_file1=./$CONFIG_SITE;;
3312    */*) ac_site_file1=$CONFIG_SITE;;
3313    *)   ac_site_file1=./$CONFIG_SITE;;
3314  esac
3315elif test "x$prefix" != xNONE; then
3316  ac_site_file1=$prefix/share/config.site
3317  ac_site_file2=$prefix/etc/config.site
3318else
3319  ac_site_file1=$ac_default_prefix/share/config.site
3320  ac_site_file2=$ac_default_prefix/etc/config.site
3321fi
3322for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3323do
3324  test "x$ac_site_file" = xNONE && continue
3325  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3326    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3327$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3328    sed 's/^/| /' "$ac_site_file" >&5
3329    . "$ac_site_file" \
3330      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3332as_fn_error $? "failed to load site script $ac_site_file
3333See \`config.log' for more details" "$LINENO" 5; }
3334  fi
3335done
3336
3337if test -r "$cache_file"; then
3338  # Some versions of bash will fail to source /dev/null (special files
3339  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3340  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3341    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3342$as_echo "$as_me: loading cache $cache_file" >&6;}
3343    case $cache_file in
3344      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3345      *)                      . "./$cache_file";;
3346    esac
3347  fi
3348else
3349  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3350$as_echo "$as_me: creating cache $cache_file" >&6;}
3351  >$cache_file
3352fi
3353
3354# Check that the precious variables saved in the cache have kept the same
3355# value.
3356ac_cache_corrupted=false
3357for ac_var in $ac_precious_vars; do
3358  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3359  eval ac_new_set=\$ac_env_${ac_var}_set
3360  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3361  eval ac_new_val=\$ac_env_${ac_var}_value
3362  case $ac_old_set,$ac_new_set in
3363    set,)
3364      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3365$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3366      ac_cache_corrupted=: ;;
3367    ,set)
3368      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3369$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3370      ac_cache_corrupted=: ;;
3371    ,);;
3372    *)
3373      if test "x$ac_old_val" != "x$ac_new_val"; then
3374	# differences in whitespace do not lead to failure.
3375	ac_old_val_w=`echo x $ac_old_val`
3376	ac_new_val_w=`echo x $ac_new_val`
3377	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3378	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3379$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3380	  ac_cache_corrupted=:
3381	else
3382	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3383$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3384	  eval $ac_var=\$ac_old_val
3385	fi
3386	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3387$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3388	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3389$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3390      fi;;
3391  esac
3392  # Pass precious variables to config.status.
3393  if test "$ac_new_set" = set; then
3394    case $ac_new_val in
3395    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3396    *) ac_arg=$ac_var=$ac_new_val ;;
3397    esac
3398    case " $ac_configure_args " in
3399      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3400      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3401    esac
3402  fi
3403done
3404if $ac_cache_corrupted; then
3405  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3407  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3408$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3409  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3410fi
3411## -------------------- ##
3412## Main body of script. ##
3413## -------------------- ##
3414
3415ac_ext=c
3416ac_cpp='$CPP $CPPFLAGS'
3417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3419ac_compiler_gnu=$ac_cv_c_compiler_gnu
3420
3421
3422
3423ac_aux_dir=
3424for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3425  if test -f "$ac_dir/install-sh"; then
3426    ac_aux_dir=$ac_dir
3427    ac_install_sh="$ac_aux_dir/install-sh -c"
3428    break
3429  elif test -f "$ac_dir/install.sh"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/install.sh -c"
3432    break
3433  elif test -f "$ac_dir/shtool"; then
3434    ac_aux_dir=$ac_dir
3435    ac_install_sh="$ac_aux_dir/shtool install -c"
3436    break
3437  fi
3438done
3439if test -z "$ac_aux_dir"; then
3440  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
3441fi
3442
3443# These three variables are undocumented and unsupported,
3444# and are intended to be withdrawn in a future Autoconf release.
3445# They can cause serious problems if a builder's source tree is in a directory
3446# whose full name contains unusual characters.
3447ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3448ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3449ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3450
3451
3452# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3453
3454#
3455# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3456# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3457#
3458# This code is free software; you can redistribute it and/or modify it
3459# under the terms of the GNU General Public License version 2 only, as
3460# published by the Free Software Foundation.  Oracle designates this
3461# particular file as subject to the "Classpath" exception as provided
3462# by Oracle in the LICENSE file that accompanied this code.
3463#
3464# This code is distributed in the hope that it will be useful, but WITHOUT
3465# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3466# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3467# version 2 for more details (a copy is included in the LICENSE file that
3468# accompanied this code).
3469#
3470# You should have received a copy of the GNU General Public License version
3471# 2 along with this work; if not, write to the Free Software Foundation,
3472# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3473#
3474# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3475# or visit www.oracle.com if you need additional information or have any
3476# questions.
3477#
3478
3479#
3480# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3481#
3482# This program is free software; you can redistribute it and/or modify
3483# it under the terms of the GNU General Public License as published by
3484# the Free Software Foundation; either version 2 of the License, or
3485# (at your option) any later version.
3486#
3487# This program is distributed in the hope that it will be useful, but
3488# WITHOUT ANY WARRANTY; without even the implied warranty of
3489# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3490# General Public License for more details.
3491#
3492# You should have received a copy of the GNU General Public License
3493# along with this program; if not, write to the Free Software
3494# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3495#
3496# As a special exception to the GNU General Public License, if you
3497# distribute this file as part of a program that contains a
3498# configuration script generated by Autoconf, you may include it under
3499# the same distribution terms that you use for the rest of that program.
3500
3501# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3502# ----------------------------------
3503# PKG_PROG_PKG_CONFIG
3504
3505# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3506#
3507# Check to see whether a particular set of modules exists.  Similar
3508# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3509#
3510#
3511# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3512# this or PKG_CHECK_MODULES is called, or make sure to call
3513# PKG_CHECK_EXISTS manually
3514# --------------------------------------------------------------
3515
3516
3517
3518# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3519# ---------------------------------------------
3520# _PKG_CONFIG
3521
3522# _PKG_SHORT_ERRORS_SUPPORTED
3523# -----------------------------
3524# _PKG_SHORT_ERRORS_SUPPORTED
3525
3526
3527# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3528# [ACTION-IF-NOT-FOUND])
3529#
3530#
3531# Note that if there is a possibility the first call to
3532# PKG_CHECK_MODULES might not happen, you should be sure to include an
3533# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3534#
3535#
3536# --------------------------------------------------------------
3537# PKG_CHECK_MODULES
3538
3539
3540# Include these first...
3541#
3542# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566# Create a function/macro that takes a series of named arguments. The call is
3567# similar to AC_DEFUN, but the setup of the function looks like this:
3568# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3569# ... do something
3570#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3571# ])
3572# A star (*) in front of a named argument means that it is required and it's
3573# presence will be verified. To pass e.g. the first value as a normal indexed
3574# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3575# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3576# "ARG_FOO".
3577#
3578# The generated function can be called like this:
3579# MYFUNC(FOO: [foo-val],
3580#     BAR: [
3581#         $ECHO hello world
3582#     ])
3583# Note that the argument value must start on the same line as the argument name.
3584#
3585# Argument 1: Name of the function to define
3586# Argument 2: List of legal named arguments, with a * prefix for required arguments
3587# Argument 3: Argument array to treat as named, typically $@
3588# Argument 4: The main function body
3589
3590
3591# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3592# If so, then append $1 to $2 \
3593# Also set JVM_ARG_OK to true/false depending on outcome.
3594
3595
3596# Appends a string to a path variable, only adding the : when needed.
3597
3598
3599# Prepends a string to a path variable, only adding the : when needed.
3600
3601
3602# This will make sure the given variable points to a full and proper
3603# path. This means:
3604# 1) There will be no spaces in the path. On unix platforms,
3605#    spaces in the path will result in an error. On Windows,
3606#    the path will be rewritten using short-style to be space-free.
3607# 2) The path will be absolute, and it will be in unix-style (on
3608#     cygwin).
3609# $1: The name of the variable to fix
3610
3611
3612# This will make sure the given variable points to a executable
3613# with a full and proper path. This means:
3614# 1) There will be no spaces in the path. On unix platforms,
3615#    spaces in the path will result in an error. On Windows,
3616#    the path will be rewritten using short-style to be space-free.
3617# 2) The path will be absolute, and it will be in unix-style (on
3618#     cygwin).
3619# Any arguments given to the executable is preserved.
3620# If the input variable does not have a directory specification, then
3621# it need to be in the PATH.
3622# $1: The name of the variable to fix
3623
3624
3625
3626
3627# Register a --with argument but mark it as deprecated
3628# $1: The name of the with argument to deprecate, not including --with-
3629
3630
3631# Register a --enable argument but mark it as deprecated
3632# $1: The name of the with argument to deprecate, not including --enable-
3633# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3634# $3: Messages to user.
3635
3636
3637
3638
3639# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3640# $1: variable to check
3641
3642
3643# Check that there are no unprocessed overridden variables left.
3644# If so, they are an incorrect argument and we will exit with an error.
3645
3646
3647# Setup a tool for the given variable. If correctly specified by the user,
3648# use that value, otherwise search for the tool using the supplied code snippet.
3649# $1: variable to set
3650# $2: code snippet to call to look for the tool
3651# $3: code snippet to call if variable was used to find tool
3652
3653
3654# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3655# $1: variable to set
3656# $2: executable name (or list of names) to look for
3657# $3: [path]
3658
3659
3660# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3661# $1: variable to set
3662# $2: executable name (or list of names) to look for
3663
3664
3665# Like BASIC_PATH_PROGS but fails if no tool was found.
3666# $1: variable to set
3667# $2: executable name (or list of names) to look for
3668# $3: [path]
3669
3670
3671# Like BASIC_SETUP_TOOL but fails if no tool was found.
3672# $1: variable to set
3673# $2: autoconf macro to call to look for the special tool
3674
3675
3676# Setup the most fundamental tools that relies on not much else to set up,
3677# but is used by much of the early bootstrap code.
3678
3679
3680# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3681
3682
3683# Evaluates platform specific overrides for devkit variables.
3684# $1: Name of variable
3685
3686
3687
3688
3689
3690
3691#%%% Simple tools %%%
3692
3693# Check if we have found a usable version of make
3694# $1: the path to a potential make binary (or empty)
3695# $2: the description on how we found this
3696
3697
3698
3699
3700# Goes looking for a usable version of GNU make.
3701
3702
3703
3704
3705
3706
3707
3708
3709# Check if build directory is on local disk. If not possible to determine,
3710# we prefer to claim it's local.
3711# Argument 1: directory to test
3712# Argument 2: what to do if it is on local disk
3713# Argument 3: what to do otherwise (remote disk or failure)
3714
3715
3716# Check that source files have basic read permissions set. This might
3717# not be the case in cygwin in certain conditions.
3718
3719
3720
3721
3722# Check for support for specific options in bash
3723
3724
3725################################################################################
3726#
3727# Default make target
3728#
3729
3730
3731# Code to run after AC_OUTPUT
3732
3733
3734#
3735# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3736# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3737#
3738# This code is free software; you can redistribute it and/or modify it
3739# under the terms of the GNU General Public License version 2 only, as
3740# published by the Free Software Foundation.  Oracle designates this
3741# particular file as subject to the "Classpath" exception as provided
3742# by Oracle in the LICENSE file that accompanied this code.
3743#
3744# This code is distributed in the hope that it will be useful, but WITHOUT
3745# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3746# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3747# version 2 for more details (a copy is included in the LICENSE file that
3748# accompanied this code).
3749#
3750# You should have received a copy of the GNU General Public License version
3751# 2 along with this work; if not, write to the Free Software Foundation,
3752# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3753#
3754# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3755# or visit www.oracle.com if you need additional information or have any
3756# questions.
3757#
3758
3759
3760
3761
3762
3763# Helper function which possibly converts a path using DOS-style short mode.
3764# If so, the updated path is stored in $new_path.
3765# $1: The path to check
3766
3767
3768# Helper function which possibly converts a path using DOS-style short mode.
3769# If so, the updated path is stored in $new_path.
3770# $1: The path to check
3771
3772
3773# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3774# and could probably be heavily simplified. However, all changes in this
3775# area tend to need lot of testing in different scenarios, and in lack of
3776# proper unit testing, cleaning this up has not been deemed worth the effort
3777# at the moment.
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3788
3789
3790
3791
3792# ... then the rest
3793#
3794# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3795# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3796#
3797# This code is free software; you can redistribute it and/or modify it
3798# under the terms of the GNU General Public License version 2 only, as
3799# published by the Free Software Foundation.  Oracle designates this
3800# particular file as subject to the "Classpath" exception as provided
3801# by Oracle in the LICENSE file that accompanied this code.
3802#
3803# This code is distributed in the hope that it will be useful, but WITHOUT
3804# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3805# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3806# version 2 for more details (a copy is included in the LICENSE file that
3807# accompanied this code).
3808#
3809# You should have received a copy of the GNU General Public License version
3810# 2 along with this work; if not, write to the Free Software Foundation,
3811# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3812#
3813# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3814# or visit www.oracle.com if you need additional information or have any
3815# questions.
3816#
3817
3818########################################################################
3819# This file handles detection of the Boot JDK. The Boot JDK detection
3820# process has been developed as a response to solve a complex real-world
3821# problem. Initially, it was simple, but it has grown as platform after
3822# platform, idiosyncracy after idiosyncracy has been supported.
3823#
3824# The basic idea is this:
3825# 1) You need an acceptable *) JDK to use as a Boot JDK
3826# 2) There are several ways to locate a JDK, that are mostly platform
3827#    dependent **)
3828# 3) You can have multiple JDKs installed
3829# 4) If possible, configure should try to dig out an acceptable JDK
3830#    automatically, without having to resort to command-line options
3831#
3832# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3833#     javac) and not a JRE, etc.
3834#
3835# **) On Windows we typically use a well-known path.
3836#     On MacOSX we typically use the tool java_home.
3837#     On Linux we typically find javac in the $PATH, and then follow a
3838#     chain of symlinks that often ends up in a real JDK.
3839#
3840# This leads to the code where we check in different ways to locate a
3841# JDK, and if one is found, check if it is acceptable. If not, we print
3842# our reasons for rejecting it (useful when debugging non-working
3843# configure situations) and continue checking the next one.
3844########################################################################
3845
3846# Execute the check given as argument, and verify the result
3847# If the Boot JDK was previously found, do nothing
3848# $1 A command line (typically autoconf macro) to execute
3849
3850
3851# Test: Is bootjdk explicitly set by command line arguments?
3852
3853
3854# Test: Is $JAVA_HOME set?
3855
3856
3857# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3858
3859
3860# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3861# $1: Argument to the java_home binary (optional)
3862
3863
3864# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3865
3866
3867# Look for a jdk in the given path. If there are multiple, try to select the newest.
3868# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3869# $1 = Path to directory containing jdk installations.
3870# $2 = String to append to the found JDK directory to get the proper JDK home
3871
3872
3873# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3874# environmental variable as base for where to look.
3875# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3876
3877
3878# Test: Is there a JDK installed in default, well-known locations?
3879
3880
3881# Check that a command-line tool in the Boot JDK is correct
3882# $1 = name of variable to assign
3883# $2 = name of binary
3884
3885
3886###############################################################################
3887#
3888# We need a Boot JDK to bootstrap the build.
3889#
3890
3891
3892
3893
3894
3895# BUILD_JDK: the location of the latest JDK that can run
3896#   on the host system and supports the target class file version
3897#   generated in this JDK build.  This variable should only be
3898#   used after the launchers are built.
3899#
3900
3901# Execute the check given as argument, and verify the result.
3902# If the JDK was previously found, do nothing.
3903# $1 A command line (typically autoconf macro) to execute
3904
3905
3906# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3907# is different than the host system doing the build (e.g. cross-compilation),
3908# a special BUILD_JDK is built as part of the build process.  An external
3909# prebuilt BUILD_JDK can also be supplied.
3910
3911
3912#
3913# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3914# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3915#
3916# This code is free software; you can redistribute it and/or modify it
3917# under the terms of the GNU General Public License version 2 only, as
3918# published by the Free Software Foundation.  Oracle designates this
3919# particular file as subject to the "Classpath" exception as provided
3920# by Oracle in the LICENSE file that accompanied this code.
3921#
3922# This code is distributed in the hope that it will be useful, but WITHOUT
3923# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3924# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3925# version 2 for more details (a copy is included in the LICENSE file that
3926# accompanied this code).
3927#
3928# You should have received a copy of the GNU General Public License version
3929# 2 along with this work; if not, write to the Free Software Foundation,
3930# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3931#
3932# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3933# or visit www.oracle.com if you need additional information or have any
3934# questions.
3935#
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953################################################################################
3954#
3955# Runs icecc-create-env once and prints the error if it fails
3956#
3957# $1: arguments to icecc-create-env
3958# $2: log file
3959#
3960
3961
3962################################################################################
3963#
3964# Optionally enable distributed compilation of native code using icecc/icecream
3965#
3966
3967
3968
3969
3970
3971
3972
3973#
3974# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3975# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3976#
3977# This code is free software; you can redistribute it and/or modify it
3978# under the terms of the GNU General Public License version 2 only, as
3979# published by the Free Software Foundation.  Oracle designates this
3980# particular file as subject to the "Classpath" exception as provided
3981# by Oracle in the LICENSE file that accompanied this code.
3982#
3983# This code is distributed in the hope that it will be useful, but WITHOUT
3984# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3985# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3986# version 2 for more details (a copy is included in the LICENSE file that
3987# accompanied this code).
3988#
3989# You should have received a copy of the GNU General Public License version
3990# 2 along with this work; if not, write to the Free Software Foundation,
3991# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3992#
3993# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3994# or visit www.oracle.com if you need additional information or have any
3995# questions.
3996#
3997
3998# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3999# corresponding configure arguments instead
4000
4001
4002# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4003# that configure can use them while detecting compilers.
4004# TOOLCHAIN_TYPE is available here.
4005# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4006
4007
4008
4009
4010
4011
4012# Documentation on common flags used for solstudio in HIGHEST.
4013#
4014# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4015#          done with care, there are some assumptions below that need to
4016#          be understood about the use of pointers, and IEEE behavior.
4017#
4018# -fns: Use non-standard floating point mode (not IEEE 754)
4019# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4020# -fsingle: Use single precision floating point with 'float'
4021# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4022#   (Source with excessing pointer casting and data access with mixed
4023#    pointer types are not recommended)
4024# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4025#   (If you expect perfect errno behavior, do not use this)
4026# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4027# -xrestrict: Pointer parameters to functions do not overlap
4028#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4029#    If you pass in multiple pointers to the same data, do not use this)
4030# -xlibmil: Inline some library routines
4031#   (If you expect perfect errno behavior, do not use this)
4032# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4033#   (If you expect perfect errno behavior, do not use this)
4034#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4035
4036    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4037    # Bug?
4038    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4039    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4040    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4041    #fi
4042
4043
4044
4045
4046
4047
4048################################################################################
4049# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4050#      conditionals against.
4051# $2 - Optional prefix for each variable defined.
4052
4053
4054# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4055#                                  IF_FALSE: [RUN-IF-FALSE])
4056# ------------------------------------------------------------
4057# Check that the C compiler supports an argument
4058
4059
4060
4061
4062# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4063#                                    IF_FALSE: [RUN-IF-FALSE])
4064# ------------------------------------------------------------
4065# Check that the C++ compiler supports an argument
4066
4067
4068
4069
4070# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4071#                                IF_FALSE: [RUN-IF-FALSE])
4072# ------------------------------------------------------------
4073# Check that the C and C++ compilers support an argument
4074
4075
4076
4077
4078# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4079#                                   IF_FALSE: [RUN-IF-FALSE])
4080# ------------------------------------------------------------
4081# Check that the linker support an argument
4082
4083
4084
4085
4086
4087
4088# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4089# Arguments:
4090# $1 - Optional prefix for each variable defined.
4091
4092
4093#
4094# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4095# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4096#
4097# This code is free software; you can redistribute it and/or modify it
4098# under the terms of the GNU General Public License version 2 only, as
4099# published by the Free Software Foundation.  Oracle designates this
4100# particular file as subject to the "Classpath" exception as provided
4101# by Oracle in the LICENSE file that accompanied this code.
4102#
4103# This code is distributed in the hope that it will be useful, but WITHOUT
4104# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4105# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4106# version 2 for more details (a copy is included in the LICENSE file that
4107# accompanied this code).
4108#
4109# You should have received a copy of the GNU General Public License version
4110# 2 along with this work; if not, write to the Free Software Foundation,
4111# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4112#
4113# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4114# or visit www.oracle.com if you need additional information or have any
4115# questions.
4116#
4117
4118
4119
4120
4121
4122cygwin_help() {
4123  case $1 in
4124    unzip)
4125      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4127      ;;
4128    zip)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    make)
4133      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4135      ;;
4136    freetype)
4137      HELP_MSG="
4138The freetype library can now be build during the configure process.
4139Download the freetype sources and unpack them into an arbitrary directory:
4140
4141wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4142tar -xzf freetype-2.5.3.tar.gz
4143
4144Then run configure with '--with-freetype-src=<freetype_src>'. This will
4145automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4146builds or into '<freetype_src>/lib32' for 32-bit builds.
4147Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4148and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4149
4150Alternatively you can unpack the sources like this to use the default directory:
4151
4152tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4153      ;;
4154  esac
4155}
4156
4157msys_help() {
4158  PKGHANDLER_COMMAND=""
4159}
4160
4161apt_help() {
4162  case $1 in
4163    reduced)
4164      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4165    devkit)
4166      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4167    openjdk)
4168      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4169    alsa)
4170      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4171    cups)
4172      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4173    freetype)
4174      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4175    ffi)
4176      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4177    x11)
4178      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4179    ccache)
4180      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4181    dtrace)
4182      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4183  esac
4184}
4185
4186yum_help() {
4187  case $1 in
4188    devkit)
4189      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4190    openjdk)
4191      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4192    alsa)
4193      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4194    cups)
4195      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4196    freetype)
4197      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4198    x11)
4199      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4200    ccache)
4201      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4202  esac
4203}
4204
4205port_help() {
4206  PKGHANDLER_COMMAND=""
4207}
4208
4209pkgutil_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213pkgadd_help() {
4214  PKGHANDLER_COMMAND=""
4215}
4216
4217# This function will check if we're called from the "configure" wrapper while
4218# printing --help. If so, we will print out additional information that can
4219# only be extracted within the autoconf script, and then exit. This must be
4220# called at the very beginning in configure.ac.
4221
4222
4223
4224
4225
4226
4227#
4228# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4229# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4230#
4231# This code is free software; you can redistribute it and/or modify it
4232# under the terms of the GNU General Public License version 2 only, as
4233# published by the Free Software Foundation.  Oracle designates this
4234# particular file as subject to the "Classpath" exception as provided
4235# by Oracle in the LICENSE file that accompanied this code.
4236#
4237# This code is distributed in the hope that it will be useful, but WITHOUT
4238# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4239# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4240# version 2 for more details (a copy is included in the LICENSE file that
4241# accompanied this code).
4242#
4243# You should have received a copy of the GNU General Public License version
4244# 2 along with this work; if not, write to the Free Software Foundation,
4245# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4246#
4247# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4248# or visit www.oracle.com if you need additional information or have any
4249# questions.
4250#
4251
4252# All valid JVM features, regardless of platform
4253VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4254    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4255
4256# All valid JVM variants
4257VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4258
4259###############################################################################
4260# Check if the specified JVM variant should be built. To be used in shell if
4261# constructs, like this:
4262# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4263#
4264# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4265
4266# Definition kept in one line to allow inlining in if statements.
4267# Additional [] needed to keep m4 from mangling shell constructs.
4268
4269
4270###############################################################################
4271# Check if the specified JVM features are explicitly enabled. To be used in
4272# shell if constructs, like this:
4273# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4274#
4275# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4276
4277# Definition kept in one line to allow inlining in if statements.
4278# Additional [] needed to keep m4 from mangling shell constructs.
4279
4280
4281###############################################################################
4282# Check which variants of the JVM that we want to build. Available variants are:
4283#   server: normal interpreter, and a tiered C1/C2 compiler
4284#   client: normal interpreter, and C1 (no C2 compiler)
4285#   minimal: reduced form of client with optional features stripped out
4286#   core: normal interpreter only, no compiler
4287#   zero: C++ based interpreter only, no compiler
4288#   zeroshark: C++ based interpreter, and a llvm-based compiler
4289#   custom: baseline JVM with no default features
4290#
4291
4292
4293###############################################################################
4294# Check if dtrace should be enabled and has all prerequisites present.
4295#
4296
4297
4298###############################################################################
4299# Set up all JVM features for each JVM variant.
4300#
4301
4302
4303###############################################################################
4304# Validate JVM features once all setup is complete, including custom setup.
4305#
4306
4307
4308################################################################################
4309# Check if gtest should be built
4310#
4311
4312
4313#
4314# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4315# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4316#
4317# This code is free software; you can redistribute it and/or modify it
4318# under the terms of the GNU General Public License version 2 only, as
4319# published by the Free Software Foundation.  Oracle designates this
4320# particular file as subject to the "Classpath" exception as provided
4321# by Oracle in the LICENSE file that accompanied this code.
4322#
4323# This code is distributed in the hope that it will be useful, but WITHOUT
4324# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4325# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4326# version 2 for more details (a copy is included in the LICENSE file that
4327# accompanied this code).
4328#
4329# You should have received a copy of the GNU General Public License version
4330# 2 along with this work; if not, write to the Free Software Foundation,
4331# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4332#
4333# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4334# or visit www.oracle.com if you need additional information or have any
4335# questions.
4336#
4337
4338###############################################################################
4339# Check which variant of the JDK that we want to build.
4340# Currently we have:
4341#    normal:   standard edition
4342# but the custom make system may add other variants
4343#
4344# Effectively the JDK variant gives a name to a specific set of
4345# modules to compile into the JDK.
4346
4347
4348###############################################################################
4349# Set the debug level
4350#    release: no debug information, all optimizations, no asserts.
4351#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4352#    fastdebug: debug information (-g), all optimizations, all asserts
4353#    slowdebug: debug information (-g), no optimizations, all asserts
4354
4355
4356###############################################################################
4357#
4358# Should we build only OpenJDK even if closed sources are present?
4359#
4360
4361
4362
4363
4364###############################################################################
4365#
4366# Enable or disable the elliptic curve crypto implementation
4367#
4368
4369
4370
4371
4372################################################################################
4373#
4374# Gcov coverage data for hotspot
4375#
4376
4377
4378################################################################################
4379#
4380# Static build support.  When enabled will generate static
4381# libraries instead of shared libraries for all JDK libs.
4382#
4383
4384
4385################################################################################
4386#
4387# jlink options.
4388# We always keep packaged modules in JDK image.
4389#
4390
4391
4392################################################################################
4393#
4394# Check if building of the jtreg failure handler should be enabled.
4395#
4396
4397
4398################################################################################
4399#
4400# Enable or disable generation of the classlist at build time
4401#
4402
4403
4404#
4405# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4406# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4407#
4408# This code is free software; you can redistribute it and/or modify it
4409# under the terms of the GNU General Public License version 2 only, as
4410# published by the Free Software Foundation.  Oracle designates this
4411# particular file as subject to the "Classpath" exception as provided
4412# by Oracle in the LICENSE file that accompanied this code.
4413#
4414# This code is distributed in the hope that it will be useful, but WITHOUT
4415# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4416# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4417# version 2 for more details (a copy is included in the LICENSE file that
4418# accompanied this code).
4419#
4420# You should have received a copy of the GNU General Public License version
4421# 2 along with this work; if not, write to the Free Software Foundation,
4422# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4423#
4424# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4425# or visit www.oracle.com if you need additional information or have any
4426# questions.
4427#
4428
4429###############################################################################
4430#
4431# Setup version numbers
4432#
4433
4434# Verify that a given string represents a valid version number, and assign it
4435# to a variable.
4436
4437# Argument 1: the variable to assign to
4438# Argument 2: the value given by the user
4439
4440
4441
4442
4443#
4444# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4445# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4446#
4447# This code is free software; you can redistribute it and/or modify it
4448# under the terms of the GNU General Public License version 2 only, as
4449# published by the Free Software Foundation.  Oracle designates this
4450# particular file as subject to the "Classpath" exception as provided
4451# by Oracle in the LICENSE file that accompanied this code.
4452#
4453# This code is distributed in the hope that it will be useful, but WITHOUT
4454# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4455# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4456# version 2 for more details (a copy is included in the LICENSE file that
4457# accompanied this code).
4458#
4459# You should have received a copy of the GNU General Public License version
4460# 2 along with this work; if not, write to the Free Software Foundation,
4461# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4462#
4463# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4464# or visit www.oracle.com if you need additional information or have any
4465# questions.
4466#
4467
4468# Major library component reside in separate files.
4469#
4470# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4472#
4473# This code is free software; you can redistribute it and/or modify it
4474# under the terms of the GNU General Public License version 2 only, as
4475# published by the Free Software Foundation.  Oracle designates this
4476# particular file as subject to the "Classpath" exception as provided
4477# by Oracle in the LICENSE file that accompanied this code.
4478#
4479# This code is distributed in the hope that it will be useful, but WITHOUT
4480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4482# version 2 for more details (a copy is included in the LICENSE file that
4483# accompanied this code).
4484#
4485# You should have received a copy of the GNU General Public License version
4486# 2 along with this work; if not, write to the Free Software Foundation,
4487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4488#
4489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4490# or visit www.oracle.com if you need additional information or have any
4491# questions.
4492#
4493
4494################################################################################
4495# Setup alsa (Advanced Linux Sound Architecture)
4496################################################################################
4497
4498
4499#
4500# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4501# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4502#
4503# This code is free software; you can redistribute it and/or modify it
4504# under the terms of the GNU General Public License version 2 only, as
4505# published by the Free Software Foundation.  Oracle designates this
4506# particular file as subject to the "Classpath" exception as provided
4507# by Oracle in the LICENSE file that accompanied this code.
4508#
4509# This code is distributed in the hope that it will be useful, but WITHOUT
4510# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4511# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4512# version 2 for more details (a copy is included in the LICENSE file that
4513# accompanied this code).
4514#
4515# You should have received a copy of the GNU General Public License version
4516# 2 along with this work; if not, write to the Free Software Foundation,
4517# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4518#
4519# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4520# or visit www.oracle.com if you need additional information or have any
4521# questions.
4522#
4523
4524################################################################################
4525# Setup bundled libraries.
4526#
4527# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4528# OpenJDK repository. Default is to use these libraries as bundled, but they
4529# might be replaced by en external version by the user.
4530################################################################################
4531
4532
4533################################################################################
4534# Setup libjpeg
4535################################################################################
4536
4537
4538################################################################################
4539# Setup giflib
4540################################################################################
4541
4542
4543################################################################################
4544# Setup libpng
4545################################################################################
4546
4547
4548################################################################################
4549# Setup zlib
4550################################################################################
4551
4552
4553################################################################################
4554# Setup lcms (Little CMS)
4555################################################################################
4556
4557
4558#
4559# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4560# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4561#
4562# This code is free software; you can redistribute it and/or modify it
4563# under the terms of the GNU General Public License version 2 only, as
4564# published by the Free Software Foundation.  Oracle designates this
4565# particular file as subject to the "Classpath" exception as provided
4566# by Oracle in the LICENSE file that accompanied this code.
4567#
4568# This code is distributed in the hope that it will be useful, but WITHOUT
4569# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4570# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4571# version 2 for more details (a copy is included in the LICENSE file that
4572# accompanied this code).
4573#
4574# You should have received a copy of the GNU General Public License version
4575# 2 along with this work; if not, write to the Free Software Foundation,
4576# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4577#
4578# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4579# or visit www.oracle.com if you need additional information or have any
4580# questions.
4581#
4582
4583################################################################################
4584# Setup cups (Common Unix Printing System)
4585################################################################################
4586
4587
4588#
4589# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4590# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4591#
4592# This code is free software; you can redistribute it and/or modify it
4593# under the terms of the GNU General Public License version 2 only, as
4594# published by the Free Software Foundation.  Oracle designates this
4595# particular file as subject to the "Classpath" exception as provided
4596# by Oracle in the LICENSE file that accompanied this code.
4597#
4598# This code is distributed in the hope that it will be useful, but WITHOUT
4599# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4600# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4601# version 2 for more details (a copy is included in the LICENSE file that
4602# accompanied this code).
4603#
4604# You should have received a copy of the GNU General Public License version
4605# 2 along with this work; if not, write to the Free Software Foundation,
4606# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4607#
4608# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4609# or visit www.oracle.com if you need additional information or have any
4610# questions.
4611#
4612
4613################################################################################
4614# Setup libffi (Foreign Function Interface)
4615################################################################################
4616
4617
4618#
4619# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4621#
4622# This code is free software; you can redistribute it and/or modify it
4623# under the terms of the GNU General Public License version 2 only, as
4624# published by the Free Software Foundation.  Oracle designates this
4625# particular file as subject to the "Classpath" exception as provided
4626# by Oracle in the LICENSE file that accompanied this code.
4627#
4628# This code is distributed in the hope that it will be useful, but WITHOUT
4629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4631# version 2 for more details (a copy is included in the LICENSE file that
4632# accompanied this code).
4633#
4634# You should have received a copy of the GNU General Public License version
4635# 2 along with this work; if not, write to the Free Software Foundation,
4636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4637#
4638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639# or visit www.oracle.com if you need additional information or have any
4640# questions.
4641#
4642
4643################################################################################
4644# Build the freetype lib from source
4645################################################################################
4646
4647
4648################################################################################
4649# Check if a potential freeype library match is correct and usable
4650################################################################################
4651
4652
4653################################################################################
4654# Setup freetype (The FreeType2 font rendering library)
4655################################################################################
4656
4657
4658#
4659# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4660# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4661#
4662# This code is free software; you can redistribute it and/or modify it
4663# under the terms of the GNU General Public License version 2 only, as
4664# published by the Free Software Foundation.  Oracle designates this
4665# particular file as subject to the "Classpath" exception as provided
4666# by Oracle in the LICENSE file that accompanied this code.
4667#
4668# This code is distributed in the hope that it will be useful, but WITHOUT
4669# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4670# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4671# version 2 for more details (a copy is included in the LICENSE file that
4672# accompanied this code).
4673#
4674# You should have received a copy of the GNU General Public License version
4675# 2 along with this work; if not, write to the Free Software Foundation,
4676# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4677#
4678# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4679# or visit www.oracle.com if you need additional information or have any
4680# questions.
4681#
4682
4683################################################################################
4684# Setup the standard C/C++ runtime libraries.
4685#
4686# Most importantly, determine if stdc++ should be linked statically or
4687# dynamically.
4688################################################################################
4689
4690
4691#
4692# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4693# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4694#
4695# This code is free software; you can redistribute it and/or modify it
4696# under the terms of the GNU General Public License version 2 only, as
4697# published by the Free Software Foundation.  Oracle designates this
4698# particular file as subject to the "Classpath" exception as provided
4699# by Oracle in the LICENSE file that accompanied this code.
4700#
4701# This code is distributed in the hope that it will be useful, but WITHOUT
4702# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4703# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4704# version 2 for more details (a copy is included in the LICENSE file that
4705# accompanied this code).
4706#
4707# You should have received a copy of the GNU General Public License version
4708# 2 along with this work; if not, write to the Free Software Foundation,
4709# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4710#
4711# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4712# or visit www.oracle.com if you need additional information or have any
4713# questions.
4714#
4715
4716################################################################################
4717# Setup X11 Windows system
4718################################################################################
4719
4720
4721
4722################################################################################
4723# Determine which libraries are needed for this configuration
4724################################################################################
4725
4726
4727################################################################################
4728# Parse library options, and setup needed libraries
4729################################################################################
4730
4731
4732################################################################################
4733# Setup llvm (Low-Level VM)
4734################################################################################
4735
4736
4737################################################################################
4738# Setup various libraries, typically small system libraries
4739################################################################################
4740
4741
4742################################################################################
4743# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4744# redistribute it in the test image.
4745################################################################################
4746
4747
4748
4749#
4750# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4751# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4752#
4753# This code is free software; you can redistribute it and/or modify it
4754# under the terms of the GNU General Public License version 2 only, as
4755# published by the Free Software Foundation.  Oracle designates this
4756# particular file as subject to the "Classpath" exception as provided
4757# by Oracle in the LICENSE file that accompanied this code.
4758#
4759# This code is distributed in the hope that it will be useful, but WITHOUT
4760# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4761# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4762# version 2 for more details (a copy is included in the LICENSE file that
4763# accompanied this code).
4764#
4765# You should have received a copy of the GNU General Public License version
4766# 2 along with this work; if not, write to the Free Software Foundation,
4767# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4768#
4769# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4770# or visit www.oracle.com if you need additional information or have any
4771# questions.
4772#
4773
4774# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4775# Converts autoconf style CPU name to OpenJDK style, into
4776# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4777
4778
4779# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4780# Converts autoconf style OS name to OpenJDK style, into
4781# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4782
4783
4784# Expects $host_os $host_cpu $build_os and $build_cpu
4785# and $with_target_bits to have been setup!
4786#
4787# Translate the standard triplet(quadruplet) definition
4788# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4789# OPENJDK_BUILD_OS, etc.
4790
4791
4792# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4793# accordingly. Must be done after setting up build and target system, but before
4794# doing anything else with these values.
4795
4796
4797# Setup the legacy variables, for controlling the old makefiles.
4798#
4799
4800
4801# $1 - Either TARGET or BUILD to setup the variables for.
4802
4803
4804
4805
4806#%%% Build and target systems %%%
4807
4808
4809
4810
4811# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4812# Add -mX to various FLAGS variables.
4813
4814
4815
4816
4817
4818
4819#
4820# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4821# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4822#
4823# This code is free software; you can redistribute it and/or modify it
4824# under the terms of the GNU General Public License version 2 only, as
4825# published by the Free Software Foundation.  Oracle designates this
4826# particular file as subject to the "Classpath" exception as provided
4827# by Oracle in the LICENSE file that accompanied this code.
4828#
4829# This code is distributed in the hope that it will be useful, but WITHOUT
4830# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4831# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4832# version 2 for more details (a copy is included in the LICENSE file that
4833# accompanied this code).
4834#
4835# You should have received a copy of the GNU General Public License version
4836# 2 along with this work; if not, write to the Free Software Foundation,
4837# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4838#
4839# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4840# or visit www.oracle.com if you need additional information or have any
4841# questions.
4842#
4843
4844
4845
4846
4847
4848
4849
4850################################################################################
4851# Define a mechanism for importing extra prebuilt modules
4852#
4853
4854
4855
4856#
4857# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4858# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4859#
4860# This code is free software; you can redistribute it and/or modify it
4861# under the terms of the GNU General Public License version 2 only, as
4862# published by the Free Software Foundation.  Oracle designates this
4863# particular file as subject to the "Classpath" exception as provided
4864# by Oracle in the LICENSE file that accompanied this code.
4865#
4866# This code is distributed in the hope that it will be useful, but WITHOUT
4867# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4868# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4869# version 2 for more details (a copy is included in the LICENSE file that
4870# accompanied this code).
4871#
4872# You should have received a copy of the GNU General Public License version
4873# 2 along with this work; if not, write to the Free Software Foundation,
4874# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4875#
4876# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4877# or visit www.oracle.com if you need additional information or have any
4878# questions.
4879#
4880
4881########################################################################
4882# This file is responsible for detecting, verifying and setting up the
4883# toolchain, i.e. the compiler, linker and related utilities. It will setup
4884# proper paths to the binaries, but it will not setup any flags.
4885#
4886# The binaries used is determined by the toolchain type, which is the family of
4887# compilers and related tools that are used.
4888########################################################################
4889
4890
4891# All valid toolchains, regardless of platform (used by help.m4)
4892VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4893
4894# These toolchains are valid on different platforms
4895VALID_TOOLCHAINS_linux="gcc clang"
4896VALID_TOOLCHAINS_solaris="solstudio"
4897VALID_TOOLCHAINS_macosx="gcc clang"
4898VALID_TOOLCHAINS_aix="xlc"
4899VALID_TOOLCHAINS_windows="microsoft"
4900
4901# Toolchain descriptions
4902TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4903TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4904TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4905TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4906TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4907
4908# Minimum supported versions, empty means unspecified
4909TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4910TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4911TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4912TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4913TOOLCHAIN_MINIMUM_VERSION_xlc=""
4914
4915# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4916# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4917# $1 - optional variable prefix for compiler and version variables (BUILD_)
4918# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4919
4920
4921# Check if the configured compiler (C and C++) is of a specific version or
4922# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4923#
4924# Arguments:
4925#   VERSION:   The version string to check against the found version
4926#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4927#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4928#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4929
4930
4931
4932
4933# Setup a number of variables describing how native output files are
4934# named on this platform/toolchain.
4935
4936
4937# Determine which toolchain type to use, and make sure it is valid for this
4938# platform. Setup various information about the selected toolchain.
4939
4940
4941# Before we start detecting the toolchain executables, we might need some
4942# special setup, e.g. additional paths etc.
4943
4944
4945# Restore path, etc
4946
4947
4948# Check if a compiler is of the toolchain type we expect, and save the version
4949# information from it. If the compiler does not match the expected type,
4950# this function will abort using AC_MSG_ERROR. If it matches, the version will
4951# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4952# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4953#
4954# $1 = compiler to test (CC or CXX)
4955# $2 = human readable name of compiler (C or C++)
4956
4957
4958# Try to locate the given C or C++ compiler in the path, or otherwise.
4959#
4960# $1 = compiler to test (CC or CXX)
4961# $2 = human readable name of compiler (C or C++)
4962# $3 = list of compiler names to search for
4963
4964
4965# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4966# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4967# archiver (AR). Verify that the compilers are correct according to the
4968# toolchain type.
4969
4970
4971# Setup additional tools that is considered a part of the toolchain, but not the
4972# core part. Many of these are highly platform-specific and do not exist,
4973# and/or are not needed on all platforms.
4974
4975
4976# Setup the build tools (i.e, the compiler and linker used to build programs
4977# that should be run on the build platform, not the target platform, as a build
4978# helper). Since the non-cross-compile case uses the normal, target compilers
4979# for this, we can only do this after these have been setup.
4980
4981
4982# Do some additional checks on the detected tools.
4983
4984
4985# Setup the JTReg Regression Test Harness.
4986
4987
4988#
4989# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4990# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4991#
4992# This code is free software; you can redistribute it and/or modify it
4993# under the terms of the GNU General Public License version 2 only, as
4994# published by the Free Software Foundation.  Oracle designates this
4995# particular file as subject to the "Classpath" exception as provided
4996# by Oracle in the LICENSE file that accompanied this code.
4997#
4998# This code is distributed in the hope that it will be useful, but WITHOUT
4999# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5000# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5001# version 2 for more details (a copy is included in the LICENSE file that
5002# accompanied this code).
5003#
5004# You should have received a copy of the GNU General Public License version
5005# 2 along with this work; if not, write to the Free Software Foundation,
5006# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5007#
5008# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5009# or visit www.oracle.com if you need additional information or have any
5010# questions.
5011#
5012
5013################################################################################
5014# The order of these defines the priority by which we try to find them.
5015VALID_VS_VERSIONS="2013 2012 2010"
5016
5017VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5018VS_VERSION_INTERNAL_2010=100
5019VS_MSVCR_2010=msvcr100.dll
5020# We don't use msvcp on Visual Studio 2010
5021#VS_MSVCP_2010=msvcp100.dll
5022VS_ENVVAR_2010="VS100COMNTOOLS"
5023VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5024VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5025VS_VS_PLATFORM_NAME_2010="v100"
5026VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5027
5028VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5029VS_VERSION_INTERNAL_2012=110
5030VS_MSVCR_2012=msvcr110.dll
5031VS_MSVCP_2012=msvcp110.dll
5032VS_ENVVAR_2012="VS110COMNTOOLS"
5033VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5034VS_SDK_INSTALLDIR_2012=
5035VS_VS_PLATFORM_NAME_2012="v110"
5036VS_SDK_PLATFORM_NAME_2012=
5037
5038VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5039VS_VERSION_INTERNAL_2013=120
5040VS_MSVCR_2013=msvcr120.dll
5041VS_MSVCP_2013=msvcp120.dll
5042VS_ENVVAR_2013="VS120COMNTOOLS"
5043VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5044VS_SDK_INSTALLDIR_2013=
5045VS_VS_PLATFORM_NAME_2013="v120"
5046VS_SDK_PLATFORM_NAME_2013=
5047
5048################################################################################
5049
5050
5051
5052################################################################################
5053
5054
5055
5056################################################################################
5057# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5058# build environment and assigns it to VS_ENV_CMD
5059
5060
5061################################################################################
5062
5063
5064
5065################################################################################
5066# Check if the VS env variables were setup prior to running configure.
5067# If not, then find vcvarsall.bat and run it automatically, and integrate
5068# the set env variables into the spec file.
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083# This line needs to be here, verbatim, after all includes and the dummy hook
5084# definitions. It is replaced with custom functionality when building
5085# custom sources.
5086#CUSTOM_AUTOCONF_INCLUDE
5087
5088# Do not change or remove the following line, it is needed for consistency checks:
5089DATE_WHEN_GENERATED=1481663811
5090
5091###############################################################################
5092#
5093# Initialization / Boot-strapping
5094#
5095# The bootstrapping process needs to solve the "chicken or the egg" problem,
5096# thus it jumps back and forth, each time gaining something needed later on.
5097#
5098###############################################################################
5099
5100# If we are requested to print additional help, do that and then exit.
5101# This must be the very first call.
5102
5103  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5104
5105    # Print available toolchains
5106    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5107    $PRINTF "Which are valid to use depends on the build platform.\n"
5108    for toolchain in $VALID_TOOLCHAINS_all; do
5109      # Use indirect variable referencing
5110      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5111      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5112      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5113    done
5114    $PRINTF "\n"
5115
5116    # Print available jvm features
5117    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5118    $PRINTF "Which are valid to use depends on the target platform.\n  "
5119    $PRINTF "%s " $VALID_JVM_FEATURES
5120    $PRINTF "\n"
5121
5122    # And now exit directly
5123    exit 0
5124  fi
5125
5126
5127# Basic initialization that must happen first of all in the normal process.
5128
5129  # Save the original command line. This is passed to us by the wrapper configure script.
5130
5131  # Save the path variable before it gets changed
5132  ORIGINAL_PATH="$PATH"
5133
5134  DATE_WHEN_CONFIGURED=`LANG=C date`
5135
5136  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5137$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5138  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5139$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5140
5141
5142  # Start with tools that do not need have cross compilation support
5143  # and can be expected to be found in the default PATH. These tools are
5144  # used by configure.
5145
5146  # First are all the simple required tools.
5147
5148
5149
5150  # Publish this variable in the help.
5151
5152
5153  if [ -z "${BASENAME+x}" ]; then
5154    # The variable is not set by user, try to locate tool using the code snippet
5155    for ac_prog in basename
5156do
5157  # Extract the first word of "$ac_prog", so it can be a program name with args.
5158set dummy $ac_prog; ac_word=$2
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5160$as_echo_n "checking for $ac_word... " >&6; }
5161if ${ac_cv_path_BASENAME+:} false; then :
5162  $as_echo_n "(cached) " >&6
5163else
5164  case $BASENAME in
5165  [\\/]* | ?:[\\/]*)
5166  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5167  ;;
5168  *)
5169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5170for as_dir in $PATH
5171do
5172  IFS=$as_save_IFS
5173  test -z "$as_dir" && as_dir=.
5174    for ac_exec_ext in '' $ac_executable_extensions; do
5175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5176    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5178    break 2
5179  fi
5180done
5181  done
5182IFS=$as_save_IFS
5183
5184  ;;
5185esac
5186fi
5187BASENAME=$ac_cv_path_BASENAME
5188if test -n "$BASENAME"; then
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5190$as_echo "$BASENAME" >&6; }
5191else
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5193$as_echo "no" >&6; }
5194fi
5195
5196
5197  test -n "$BASENAME" && break
5198done
5199
5200  else
5201    # The variable is set, but is it from the command line or the environment?
5202
5203    # Try to remove the string !BASENAME! from our list.
5204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5206      # If it failed, the variable was not from the command line. Ignore it,
5207      # but warn the user (except for BASH, which is always set by the calling BASH).
5208      if test "xBASENAME" != xBASH; then
5209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5210$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5211      fi
5212      # Try to locate tool using the code snippet
5213      for ac_prog in basename
5214do
5215  # Extract the first word of "$ac_prog", so it can be a program name with args.
5216set dummy $ac_prog; ac_word=$2
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5218$as_echo_n "checking for $ac_word... " >&6; }
5219if ${ac_cv_path_BASENAME+:} false; then :
5220  $as_echo_n "(cached) " >&6
5221else
5222  case $BASENAME in
5223  [\\/]* | ?:[\\/]*)
5224  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5225  ;;
5226  *)
5227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5228for as_dir in $PATH
5229do
5230  IFS=$as_save_IFS
5231  test -z "$as_dir" && as_dir=.
5232    for ac_exec_ext in '' $ac_executable_extensions; do
5233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5234    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5236    break 2
5237  fi
5238done
5239  done
5240IFS=$as_save_IFS
5241
5242  ;;
5243esac
5244fi
5245BASENAME=$ac_cv_path_BASENAME
5246if test -n "$BASENAME"; then
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5248$as_echo "$BASENAME" >&6; }
5249else
5250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251$as_echo "no" >&6; }
5252fi
5253
5254
5255  test -n "$BASENAME" && break
5256done
5257
5258    else
5259      # If it succeeded, then it was overridden by the user. We will use it
5260      # for the tool.
5261
5262      # First remove it from the list of overridden variables, so we can test
5263      # for unknown variables in the end.
5264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5265
5266      # Check if we try to supply an empty value
5267      if test "x$BASENAME" = x; then
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5269$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5271$as_echo_n "checking for BASENAME... " >&6; }
5272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5273$as_echo "disabled" >&6; }
5274      else
5275        # Check if the provided tool contains a complete path.
5276        tool_specified="$BASENAME"
5277        tool_basename="${tool_specified##*/}"
5278        if test "x$tool_basename" = "x$tool_specified"; then
5279          # A command without a complete path is provided, search $PATH.
5280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5281$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5282          # Extract the first word of "$tool_basename", so it can be a program name with args.
5283set dummy $tool_basename; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5285$as_echo_n "checking for $ac_word... " >&6; }
5286if ${ac_cv_path_BASENAME+:} false; then :
5287  $as_echo_n "(cached) " >&6
5288else
5289  case $BASENAME in
5290  [\\/]* | ?:[\\/]*)
5291  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5292  ;;
5293  *)
5294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297  IFS=$as_save_IFS
5298  test -z "$as_dir" && as_dir=.
5299    for ac_exec_ext in '' $ac_executable_extensions; do
5300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5301    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5303    break 2
5304  fi
5305done
5306  done
5307IFS=$as_save_IFS
5308
5309  ;;
5310esac
5311fi
5312BASENAME=$ac_cv_path_BASENAME
5313if test -n "$BASENAME"; then
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5315$as_echo "$BASENAME" >&6; }
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320
5321
5322          if test "x$BASENAME" = x; then
5323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5324          fi
5325        else
5326          # Otherwise we believe it is a complete path. Use it as it is.
5327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5328$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5330$as_echo_n "checking for BASENAME... " >&6; }
5331          if test ! -x "$tool_specified"; then
5332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5333$as_echo "not found" >&6; }
5334            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5335          fi
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5337$as_echo "$tool_specified" >&6; }
5338        fi
5339      fi
5340    fi
5341
5342  fi
5343
5344
5345
5346  if test "x$BASENAME" = x; then
5347    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5348  fi
5349
5350
5351
5352
5353
5354  # Publish this variable in the help.
5355
5356
5357  if [ -z "${BASH+x}" ]; then
5358    # The variable is not set by user, try to locate tool using the code snippet
5359    for ac_prog in bash
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if ${ac_cv_path_BASH+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $BASH in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5380    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391BASH=$ac_cv_path_BASH
5392if test -n "$BASH"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5394$as_echo "$BASH" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$BASH" && break
5402done
5403
5404  else
5405    # The variable is set, but is it from the command line or the environment?
5406
5407    # Try to remove the string !BASH! from our list.
5408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5410      # If it failed, the variable was not from the command line. Ignore it,
5411      # but warn the user (except for BASH, which is always set by the calling BASH).
5412      if test "xBASH" != xBASH; then
5413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5414$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5415      fi
5416      # Try to locate tool using the code snippet
5417      for ac_prog in bash
5418do
5419  # Extract the first word of "$ac_prog", so it can be a program name with args.
5420set dummy $ac_prog; ac_word=$2
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5422$as_echo_n "checking for $ac_word... " >&6; }
5423if ${ac_cv_path_BASH+:} false; then :
5424  $as_echo_n "(cached) " >&6
5425else
5426  case $BASH in
5427  [\\/]* | ?:[\\/]*)
5428  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5429  ;;
5430  *)
5431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5432for as_dir in $PATH
5433do
5434  IFS=$as_save_IFS
5435  test -z "$as_dir" && as_dir=.
5436    for ac_exec_ext in '' $ac_executable_extensions; do
5437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5438    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5440    break 2
5441  fi
5442done
5443  done
5444IFS=$as_save_IFS
5445
5446  ;;
5447esac
5448fi
5449BASH=$ac_cv_path_BASH
5450if test -n "$BASH"; then
5451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5452$as_echo "$BASH" >&6; }
5453else
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5455$as_echo "no" >&6; }
5456fi
5457
5458
5459  test -n "$BASH" && break
5460done
5461
5462    else
5463      # If it succeeded, then it was overridden by the user. We will use it
5464      # for the tool.
5465
5466      # First remove it from the list of overridden variables, so we can test
5467      # for unknown variables in the end.
5468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5469
5470      # Check if we try to supply an empty value
5471      if test "x$BASH" = x; then
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5473$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5475$as_echo_n "checking for BASH... " >&6; }
5476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5477$as_echo "disabled" >&6; }
5478      else
5479        # Check if the provided tool contains a complete path.
5480        tool_specified="$BASH"
5481        tool_basename="${tool_specified##*/}"
5482        if test "x$tool_basename" = "x$tool_specified"; then
5483          # A command without a complete path is provided, search $PATH.
5484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5485$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5486          # Extract the first word of "$tool_basename", so it can be a program name with args.
5487set dummy $tool_basename; ac_word=$2
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489$as_echo_n "checking for $ac_word... " >&6; }
5490if ${ac_cv_path_BASH+:} false; then :
5491  $as_echo_n "(cached) " >&6
5492else
5493  case $BASH in
5494  [\\/]* | ?:[\\/]*)
5495  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5496  ;;
5497  *)
5498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499for as_dir in $PATH
5500do
5501  IFS=$as_save_IFS
5502  test -z "$as_dir" && as_dir=.
5503    for ac_exec_ext in '' $ac_executable_extensions; do
5504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5505    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5507    break 2
5508  fi
5509done
5510  done
5511IFS=$as_save_IFS
5512
5513  ;;
5514esac
5515fi
5516BASH=$ac_cv_path_BASH
5517if test -n "$BASH"; then
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5519$as_echo "$BASH" >&6; }
5520else
5521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522$as_echo "no" >&6; }
5523fi
5524
5525
5526          if test "x$BASH" = x; then
5527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5528          fi
5529        else
5530          # Otherwise we believe it is a complete path. Use it as it is.
5531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5532$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5534$as_echo_n "checking for BASH... " >&6; }
5535          if test ! -x "$tool_specified"; then
5536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5537$as_echo "not found" >&6; }
5538            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5539          fi
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5541$as_echo "$tool_specified" >&6; }
5542        fi
5543      fi
5544    fi
5545
5546  fi
5547
5548
5549
5550  if test "x$BASH" = x; then
5551    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5552  fi
5553
5554
5555
5556
5557
5558  # Publish this variable in the help.
5559
5560
5561  if [ -z "${CAT+x}" ]; then
5562    # The variable is not set by user, try to locate tool using the code snippet
5563    for ac_prog in cat
5564do
5565  # Extract the first word of "$ac_prog", so it can be a program name with args.
5566set dummy $ac_prog; ac_word=$2
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568$as_echo_n "checking for $ac_word... " >&6; }
5569if ${ac_cv_path_CAT+:} false; then :
5570  $as_echo_n "(cached) " >&6
5571else
5572  case $CAT in
5573  [\\/]* | ?:[\\/]*)
5574  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5575  ;;
5576  *)
5577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578for as_dir in $PATH
5579do
5580  IFS=$as_save_IFS
5581  test -z "$as_dir" && as_dir=.
5582    for ac_exec_ext in '' $ac_executable_extensions; do
5583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5584    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5586    break 2
5587  fi
5588done
5589  done
5590IFS=$as_save_IFS
5591
5592  ;;
5593esac
5594fi
5595CAT=$ac_cv_path_CAT
5596if test -n "$CAT"; then
5597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5598$as_echo "$CAT" >&6; }
5599else
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601$as_echo "no" >&6; }
5602fi
5603
5604
5605  test -n "$CAT" && break
5606done
5607
5608  else
5609    # The variable is set, but is it from the command line or the environment?
5610
5611    # Try to remove the string !CAT! from our list.
5612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5614      # If it failed, the variable was not from the command line. Ignore it,
5615      # but warn the user (except for BASH, which is always set by the calling BASH).
5616      if test "xCAT" != xBASH; then
5617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5618$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5619      fi
5620      # Try to locate tool using the code snippet
5621      for ac_prog in cat
5622do
5623  # Extract the first word of "$ac_prog", so it can be a program name with args.
5624set dummy $ac_prog; ac_word=$2
5625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5626$as_echo_n "checking for $ac_word... " >&6; }
5627if ${ac_cv_path_CAT+:} false; then :
5628  $as_echo_n "(cached) " >&6
5629else
5630  case $CAT in
5631  [\\/]* | ?:[\\/]*)
5632  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5633  ;;
5634  *)
5635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636for as_dir in $PATH
5637do
5638  IFS=$as_save_IFS
5639  test -z "$as_dir" && as_dir=.
5640    for ac_exec_ext in '' $ac_executable_extensions; do
5641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5642    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644    break 2
5645  fi
5646done
5647  done
5648IFS=$as_save_IFS
5649
5650  ;;
5651esac
5652fi
5653CAT=$ac_cv_path_CAT
5654if test -n "$CAT"; then
5655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5656$as_echo "$CAT" >&6; }
5657else
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
5660fi
5661
5662
5663  test -n "$CAT" && break
5664done
5665
5666    else
5667      # If it succeeded, then it was overridden by the user. We will use it
5668      # for the tool.
5669
5670      # First remove it from the list of overridden variables, so we can test
5671      # for unknown variables in the end.
5672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5673
5674      # Check if we try to supply an empty value
5675      if test "x$CAT" = x; then
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5677$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5679$as_echo_n "checking for CAT... " >&6; }
5680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5681$as_echo "disabled" >&6; }
5682      else
5683        # Check if the provided tool contains a complete path.
5684        tool_specified="$CAT"
5685        tool_basename="${tool_specified##*/}"
5686        if test "x$tool_basename" = "x$tool_specified"; then
5687          # A command without a complete path is provided, search $PATH.
5688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5689$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5690          # Extract the first word of "$tool_basename", so it can be a program name with args.
5691set dummy $tool_basename; ac_word=$2
5692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5693$as_echo_n "checking for $ac_word... " >&6; }
5694if ${ac_cv_path_CAT+:} false; then :
5695  $as_echo_n "(cached) " >&6
5696else
5697  case $CAT in
5698  [\\/]* | ?:[\\/]*)
5699  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5700  ;;
5701  *)
5702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705  IFS=$as_save_IFS
5706  test -z "$as_dir" && as_dir=.
5707    for ac_exec_ext in '' $ac_executable_extensions; do
5708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5709    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5711    break 2
5712  fi
5713done
5714  done
5715IFS=$as_save_IFS
5716
5717  ;;
5718esac
5719fi
5720CAT=$ac_cv_path_CAT
5721if test -n "$CAT"; then
5722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5723$as_echo "$CAT" >&6; }
5724else
5725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5726$as_echo "no" >&6; }
5727fi
5728
5729
5730          if test "x$CAT" = x; then
5731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5732          fi
5733        else
5734          # Otherwise we believe it is a complete path. Use it as it is.
5735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5736$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5738$as_echo_n "checking for CAT... " >&6; }
5739          if test ! -x "$tool_specified"; then
5740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5741$as_echo "not found" >&6; }
5742            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5743          fi
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5745$as_echo "$tool_specified" >&6; }
5746        fi
5747      fi
5748    fi
5749
5750  fi
5751
5752
5753
5754  if test "x$CAT" = x; then
5755    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5756  fi
5757
5758
5759
5760
5761
5762  # Publish this variable in the help.
5763
5764
5765  if [ -z "${CHMOD+x}" ]; then
5766    # The variable is not set by user, try to locate tool using the code snippet
5767    for ac_prog in chmod
5768do
5769  # Extract the first word of "$ac_prog", so it can be a program name with args.
5770set dummy $ac_prog; ac_word=$2
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5772$as_echo_n "checking for $ac_word... " >&6; }
5773if ${ac_cv_path_CHMOD+:} false; then :
5774  $as_echo_n "(cached) " >&6
5775else
5776  case $CHMOD in
5777  [\\/]* | ?:[\\/]*)
5778  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5779  ;;
5780  *)
5781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782for as_dir in $PATH
5783do
5784  IFS=$as_save_IFS
5785  test -z "$as_dir" && as_dir=.
5786    for ac_exec_ext in '' $ac_executable_extensions; do
5787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790    break 2
5791  fi
5792done
5793  done
5794IFS=$as_save_IFS
5795
5796  ;;
5797esac
5798fi
5799CHMOD=$ac_cv_path_CHMOD
5800if test -n "$CHMOD"; then
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5802$as_echo "$CHMOD" >&6; }
5803else
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805$as_echo "no" >&6; }
5806fi
5807
5808
5809  test -n "$CHMOD" && break
5810done
5811
5812  else
5813    # The variable is set, but is it from the command line or the environment?
5814
5815    # Try to remove the string !CHMOD! from our list.
5816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5818      # If it failed, the variable was not from the command line. Ignore it,
5819      # but warn the user (except for BASH, which is always set by the calling BASH).
5820      if test "xCHMOD" != xBASH; then
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5822$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5823      fi
5824      # Try to locate tool using the code snippet
5825      for ac_prog in chmod
5826do
5827  # Extract the first word of "$ac_prog", so it can be a program name with args.
5828set dummy $ac_prog; ac_word=$2
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5830$as_echo_n "checking for $ac_word... " >&6; }
5831if ${ac_cv_path_CHMOD+:} false; then :
5832  $as_echo_n "(cached) " >&6
5833else
5834  case $CHMOD in
5835  [\\/]* | ?:[\\/]*)
5836  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5837  ;;
5838  *)
5839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5840for as_dir in $PATH
5841do
5842  IFS=$as_save_IFS
5843  test -z "$as_dir" && as_dir=.
5844    for ac_exec_ext in '' $ac_executable_extensions; do
5845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5846    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5848    break 2
5849  fi
5850done
5851  done
5852IFS=$as_save_IFS
5853
5854  ;;
5855esac
5856fi
5857CHMOD=$ac_cv_path_CHMOD
5858if test -n "$CHMOD"; then
5859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5860$as_echo "$CHMOD" >&6; }
5861else
5862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863$as_echo "no" >&6; }
5864fi
5865
5866
5867  test -n "$CHMOD" && break
5868done
5869
5870    else
5871      # If it succeeded, then it was overridden by the user. We will use it
5872      # for the tool.
5873
5874      # First remove it from the list of overridden variables, so we can test
5875      # for unknown variables in the end.
5876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5877
5878      # Check if we try to supply an empty value
5879      if test "x$CHMOD" = x; then
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5881$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5883$as_echo_n "checking for CHMOD... " >&6; }
5884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5885$as_echo "disabled" >&6; }
5886      else
5887        # Check if the provided tool contains a complete path.
5888        tool_specified="$CHMOD"
5889        tool_basename="${tool_specified##*/}"
5890        if test "x$tool_basename" = "x$tool_specified"; then
5891          # A command without a complete path is provided, search $PATH.
5892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5893$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5894          # Extract the first word of "$tool_basename", so it can be a program name with args.
5895set dummy $tool_basename; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_path_CHMOD+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  case $CHMOD in
5902  [\\/]* | ?:[\\/]*)
5903  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5904  ;;
5905  *)
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_exec_ext in '' $ac_executable_extensions; do
5912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5913    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915    break 2
5916  fi
5917done
5918  done
5919IFS=$as_save_IFS
5920
5921  ;;
5922esac
5923fi
5924CHMOD=$ac_cv_path_CHMOD
5925if test -n "$CHMOD"; then
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5927$as_echo "$CHMOD" >&6; }
5928else
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }
5931fi
5932
5933
5934          if test "x$CHMOD" = x; then
5935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5936          fi
5937        else
5938          # Otherwise we believe it is a complete path. Use it as it is.
5939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5940$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5942$as_echo_n "checking for CHMOD... " >&6; }
5943          if test ! -x "$tool_specified"; then
5944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5945$as_echo "not found" >&6; }
5946            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5947          fi
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5949$as_echo "$tool_specified" >&6; }
5950        fi
5951      fi
5952    fi
5953
5954  fi
5955
5956
5957
5958  if test "x$CHMOD" = x; then
5959    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5960  fi
5961
5962
5963
5964
5965
5966  # Publish this variable in the help.
5967
5968
5969  if [ -z "${CMP+x}" ]; then
5970    # The variable is not set by user, try to locate tool using the code snippet
5971    for ac_prog in cmp
5972do
5973  # Extract the first word of "$ac_prog", so it can be a program name with args.
5974set dummy $ac_prog; ac_word=$2
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
5977if ${ac_cv_path_CMP+:} false; then :
5978  $as_echo_n "(cached) " >&6
5979else
5980  case $CMP in
5981  [\\/]* | ?:[\\/]*)
5982  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5983  ;;
5984  *)
5985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988  IFS=$as_save_IFS
5989  test -z "$as_dir" && as_dir=.
5990    for ac_exec_ext in '' $ac_executable_extensions; do
5991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5992    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5994    break 2
5995  fi
5996done
5997  done
5998IFS=$as_save_IFS
5999
6000  ;;
6001esac
6002fi
6003CMP=$ac_cv_path_CMP
6004if test -n "$CMP"; then
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6006$as_echo "$CMP" >&6; }
6007else
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
6010fi
6011
6012
6013  test -n "$CMP" && break
6014done
6015
6016  else
6017    # The variable is set, but is it from the command line or the environment?
6018
6019    # Try to remove the string !CMP! from our list.
6020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6022      # If it failed, the variable was not from the command line. Ignore it,
6023      # but warn the user (except for BASH, which is always set by the calling BASH).
6024      if test "xCMP" != xBASH; then
6025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6026$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6027      fi
6028      # Try to locate tool using the code snippet
6029      for ac_prog in cmp
6030do
6031  # Extract the first word of "$ac_prog", so it can be a program name with args.
6032set dummy $ac_prog; ac_word=$2
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
6035if ${ac_cv_path_CMP+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  case $CMP in
6039  [\\/]* | ?:[\\/]*)
6040  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6041  ;;
6042  *)
6043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046  IFS=$as_save_IFS
6047  test -z "$as_dir" && as_dir=.
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052    break 2
6053  fi
6054done
6055  done
6056IFS=$as_save_IFS
6057
6058  ;;
6059esac
6060fi
6061CMP=$ac_cv_path_CMP
6062if test -n "$CMP"; then
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6064$as_echo "$CMP" >&6; }
6065else
6066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071  test -n "$CMP" && break
6072done
6073
6074    else
6075      # If it succeeded, then it was overridden by the user. We will use it
6076      # for the tool.
6077
6078      # First remove it from the list of overridden variables, so we can test
6079      # for unknown variables in the end.
6080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6081
6082      # Check if we try to supply an empty value
6083      if test "x$CMP" = x; then
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6085$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6087$as_echo_n "checking for CMP... " >&6; }
6088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6089$as_echo "disabled" >&6; }
6090      else
6091        # Check if the provided tool contains a complete path.
6092        tool_specified="$CMP"
6093        tool_basename="${tool_specified##*/}"
6094        if test "x$tool_basename" = "x$tool_specified"; then
6095          # A command without a complete path is provided, search $PATH.
6096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6097$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6098          # Extract the first word of "$tool_basename", so it can be a program name with args.
6099set dummy $tool_basename; ac_word=$2
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6101$as_echo_n "checking for $ac_word... " >&6; }
6102if ${ac_cv_path_CMP+:} false; then :
6103  $as_echo_n "(cached) " >&6
6104else
6105  case $CMP in
6106  [\\/]* | ?:[\\/]*)
6107  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6108  ;;
6109  *)
6110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6111for as_dir in $PATH
6112do
6113  IFS=$as_save_IFS
6114  test -z "$as_dir" && as_dir=.
6115    for ac_exec_ext in '' $ac_executable_extensions; do
6116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6117    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6119    break 2
6120  fi
6121done
6122  done
6123IFS=$as_save_IFS
6124
6125  ;;
6126esac
6127fi
6128CMP=$ac_cv_path_CMP
6129if test -n "$CMP"; then
6130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6131$as_echo "$CMP" >&6; }
6132else
6133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138          if test "x$CMP" = x; then
6139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6140          fi
6141        else
6142          # Otherwise we believe it is a complete path. Use it as it is.
6143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6144$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6146$as_echo_n "checking for CMP... " >&6; }
6147          if test ! -x "$tool_specified"; then
6148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6149$as_echo "not found" >&6; }
6150            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6151          fi
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6153$as_echo "$tool_specified" >&6; }
6154        fi
6155      fi
6156    fi
6157
6158  fi
6159
6160
6161
6162  if test "x$CMP" = x; then
6163    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6164  fi
6165
6166
6167
6168
6169
6170  # Publish this variable in the help.
6171
6172
6173  if [ -z "${COMM+x}" ]; then
6174    # The variable is not set by user, try to locate tool using the code snippet
6175    for ac_prog in comm
6176do
6177  # Extract the first word of "$ac_prog", so it can be a program name with args.
6178set dummy $ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_path_COMM+:} false; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  case $COMM in
6185  [\\/]* | ?:[\\/]*)
6186  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6187  ;;
6188  *)
6189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192  IFS=$as_save_IFS
6193  test -z "$as_dir" && as_dir=.
6194    for ac_exec_ext in '' $ac_executable_extensions; do
6195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6196    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198    break 2
6199  fi
6200done
6201  done
6202IFS=$as_save_IFS
6203
6204  ;;
6205esac
6206fi
6207COMM=$ac_cv_path_COMM
6208if test -n "$COMM"; then
6209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6210$as_echo "$COMM" >&6; }
6211else
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6213$as_echo "no" >&6; }
6214fi
6215
6216
6217  test -n "$COMM" && break
6218done
6219
6220  else
6221    # The variable is set, but is it from the command line or the environment?
6222
6223    # Try to remove the string !COMM! from our list.
6224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6226      # If it failed, the variable was not from the command line. Ignore it,
6227      # but warn the user (except for BASH, which is always set by the calling BASH).
6228      if test "xCOMM" != xBASH; then
6229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6230$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6231      fi
6232      # Try to locate tool using the code snippet
6233      for ac_prog in comm
6234do
6235  # Extract the first word of "$ac_prog", so it can be a program name with args.
6236set dummy $ac_prog; ac_word=$2
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6238$as_echo_n "checking for $ac_word... " >&6; }
6239if ${ac_cv_path_COMM+:} false; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242  case $COMM in
6243  [\\/]* | ?:[\\/]*)
6244  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6245  ;;
6246  *)
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_exec_ext in '' $ac_executable_extensions; do
6253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6254    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6256    break 2
6257  fi
6258done
6259  done
6260IFS=$as_save_IFS
6261
6262  ;;
6263esac
6264fi
6265COMM=$ac_cv_path_COMM
6266if test -n "$COMM"; then
6267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6268$as_echo "$COMM" >&6; }
6269else
6270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275  test -n "$COMM" && break
6276done
6277
6278    else
6279      # If it succeeded, then it was overridden by the user. We will use it
6280      # for the tool.
6281
6282      # First remove it from the list of overridden variables, so we can test
6283      # for unknown variables in the end.
6284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6285
6286      # Check if we try to supply an empty value
6287      if test "x$COMM" = x; then
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6289$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6291$as_echo_n "checking for COMM... " >&6; }
6292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6293$as_echo "disabled" >&6; }
6294      else
6295        # Check if the provided tool contains a complete path.
6296        tool_specified="$COMM"
6297        tool_basename="${tool_specified##*/}"
6298        if test "x$tool_basename" = "x$tool_specified"; then
6299          # A command without a complete path is provided, search $PATH.
6300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6301$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6302          # Extract the first word of "$tool_basename", so it can be a program name with args.
6303set dummy $tool_basename; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_path_COMM+:} false; then :
6307  $as_echo_n "(cached) " >&6
6308else
6309  case $COMM in
6310  [\\/]* | ?:[\\/]*)
6311  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6312  ;;
6313  *)
6314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315for as_dir in $PATH
6316do
6317  IFS=$as_save_IFS
6318  test -z "$as_dir" && as_dir=.
6319    for ac_exec_ext in '' $ac_executable_extensions; do
6320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6321    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6323    break 2
6324  fi
6325done
6326  done
6327IFS=$as_save_IFS
6328
6329  ;;
6330esac
6331fi
6332COMM=$ac_cv_path_COMM
6333if test -n "$COMM"; then
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6335$as_echo "$COMM" >&6; }
6336else
6337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
6339fi
6340
6341
6342          if test "x$COMM" = x; then
6343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6344          fi
6345        else
6346          # Otherwise we believe it is a complete path. Use it as it is.
6347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6348$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6350$as_echo_n "checking for COMM... " >&6; }
6351          if test ! -x "$tool_specified"; then
6352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6353$as_echo "not found" >&6; }
6354            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6355          fi
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6357$as_echo "$tool_specified" >&6; }
6358        fi
6359      fi
6360    fi
6361
6362  fi
6363
6364
6365
6366  if test "x$COMM" = x; then
6367    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6368  fi
6369
6370
6371
6372
6373
6374  # Publish this variable in the help.
6375
6376
6377  if [ -z "${CP+x}" ]; then
6378    # The variable is not set by user, try to locate tool using the code snippet
6379    for ac_prog in cp
6380do
6381  # Extract the first word of "$ac_prog", so it can be a program name with args.
6382set dummy $ac_prog; ac_word=$2
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384$as_echo_n "checking for $ac_word... " >&6; }
6385if ${ac_cv_path_CP+:} false; then :
6386  $as_echo_n "(cached) " >&6
6387else
6388  case $CP in
6389  [\\/]* | ?:[\\/]*)
6390  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6391  ;;
6392  *)
6393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396  IFS=$as_save_IFS
6397  test -z "$as_dir" && as_dir=.
6398    for ac_exec_ext in '' $ac_executable_extensions; do
6399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6400    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402    break 2
6403  fi
6404done
6405  done
6406IFS=$as_save_IFS
6407
6408  ;;
6409esac
6410fi
6411CP=$ac_cv_path_CP
6412if test -n "$CP"; then
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6414$as_echo "$CP" >&6; }
6415else
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421  test -n "$CP" && break
6422done
6423
6424  else
6425    # The variable is set, but is it from the command line or the environment?
6426
6427    # Try to remove the string !CP! from our list.
6428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6430      # If it failed, the variable was not from the command line. Ignore it,
6431      # but warn the user (except for BASH, which is always set by the calling BASH).
6432      if test "xCP" != xBASH; then
6433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6434$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6435      fi
6436      # Try to locate tool using the code snippet
6437      for ac_prog in cp
6438do
6439  # Extract the first word of "$ac_prog", so it can be a program name with args.
6440set dummy $ac_prog; ac_word=$2
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if ${ac_cv_path_CP+:} false; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  case $CP in
6447  [\\/]* | ?:[\\/]*)
6448  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6449  ;;
6450  *)
6451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454  IFS=$as_save_IFS
6455  test -z "$as_dir" && as_dir=.
6456    for ac_exec_ext in '' $ac_executable_extensions; do
6457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6458    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460    break 2
6461  fi
6462done
6463  done
6464IFS=$as_save_IFS
6465
6466  ;;
6467esac
6468fi
6469CP=$ac_cv_path_CP
6470if test -n "$CP"; then
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6472$as_echo "$CP" >&6; }
6473else
6474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }
6476fi
6477
6478
6479  test -n "$CP" && break
6480done
6481
6482    else
6483      # If it succeeded, then it was overridden by the user. We will use it
6484      # for the tool.
6485
6486      # First remove it from the list of overridden variables, so we can test
6487      # for unknown variables in the end.
6488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6489
6490      # Check if we try to supply an empty value
6491      if test "x$CP" = x; then
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6493$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6495$as_echo_n "checking for CP... " >&6; }
6496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6497$as_echo "disabled" >&6; }
6498      else
6499        # Check if the provided tool contains a complete path.
6500        tool_specified="$CP"
6501        tool_basename="${tool_specified##*/}"
6502        if test "x$tool_basename" = "x$tool_specified"; then
6503          # A command without a complete path is provided, search $PATH.
6504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6505$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6506          # Extract the first word of "$tool_basename", so it can be a program name with args.
6507set dummy $tool_basename; ac_word=$2
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6509$as_echo_n "checking for $ac_word... " >&6; }
6510if ${ac_cv_path_CP+:} false; then :
6511  $as_echo_n "(cached) " >&6
6512else
6513  case $CP in
6514  [\\/]* | ?:[\\/]*)
6515  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6516  ;;
6517  *)
6518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6519for as_dir in $PATH
6520do
6521  IFS=$as_save_IFS
6522  test -z "$as_dir" && as_dir=.
6523    for ac_exec_ext in '' $ac_executable_extensions; do
6524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6525    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6527    break 2
6528  fi
6529done
6530  done
6531IFS=$as_save_IFS
6532
6533  ;;
6534esac
6535fi
6536CP=$ac_cv_path_CP
6537if test -n "$CP"; then
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6539$as_echo "$CP" >&6; }
6540else
6541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542$as_echo "no" >&6; }
6543fi
6544
6545
6546          if test "x$CP" = x; then
6547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6548          fi
6549        else
6550          # Otherwise we believe it is a complete path. Use it as it is.
6551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6552$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6554$as_echo_n "checking for CP... " >&6; }
6555          if test ! -x "$tool_specified"; then
6556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6557$as_echo "not found" >&6; }
6558            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6559          fi
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6561$as_echo "$tool_specified" >&6; }
6562        fi
6563      fi
6564    fi
6565
6566  fi
6567
6568
6569
6570  if test "x$CP" = x; then
6571    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6572  fi
6573
6574
6575
6576
6577
6578  # Publish this variable in the help.
6579
6580
6581  if [ -z "${CUT+x}" ]; then
6582    # The variable is not set by user, try to locate tool using the code snippet
6583    for ac_prog in cut
6584do
6585  # Extract the first word of "$ac_prog", so it can be a program name with args.
6586set dummy $ac_prog; ac_word=$2
6587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6588$as_echo_n "checking for $ac_word... " >&6; }
6589if ${ac_cv_path_CUT+:} false; then :
6590  $as_echo_n "(cached) " >&6
6591else
6592  case $CUT in
6593  [\\/]* | ?:[\\/]*)
6594  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6595  ;;
6596  *)
6597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6598for as_dir in $PATH
6599do
6600  IFS=$as_save_IFS
6601  test -z "$as_dir" && as_dir=.
6602    for ac_exec_ext in '' $ac_executable_extensions; do
6603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6604    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6606    break 2
6607  fi
6608done
6609  done
6610IFS=$as_save_IFS
6611
6612  ;;
6613esac
6614fi
6615CUT=$ac_cv_path_CUT
6616if test -n "$CUT"; then
6617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6618$as_echo "$CUT" >&6; }
6619else
6620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6621$as_echo "no" >&6; }
6622fi
6623
6624
6625  test -n "$CUT" && break
6626done
6627
6628  else
6629    # The variable is set, but is it from the command line or the environment?
6630
6631    # Try to remove the string !CUT! from our list.
6632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6634      # If it failed, the variable was not from the command line. Ignore it,
6635      # but warn the user (except for BASH, which is always set by the calling BASH).
6636      if test "xCUT" != xBASH; then
6637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6638$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6639      fi
6640      # Try to locate tool using the code snippet
6641      for ac_prog in cut
6642do
6643  # Extract the first word of "$ac_prog", so it can be a program name with args.
6644set dummy $ac_prog; ac_word=$2
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6646$as_echo_n "checking for $ac_word... " >&6; }
6647if ${ac_cv_path_CUT+:} false; then :
6648  $as_echo_n "(cached) " >&6
6649else
6650  case $CUT in
6651  [\\/]* | ?:[\\/]*)
6652  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6653  ;;
6654  *)
6655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656for as_dir in $PATH
6657do
6658  IFS=$as_save_IFS
6659  test -z "$as_dir" && as_dir=.
6660    for ac_exec_ext in '' $ac_executable_extensions; do
6661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6662    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6664    break 2
6665  fi
6666done
6667  done
6668IFS=$as_save_IFS
6669
6670  ;;
6671esac
6672fi
6673CUT=$ac_cv_path_CUT
6674if test -n "$CUT"; then
6675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6676$as_echo "$CUT" >&6; }
6677else
6678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679$as_echo "no" >&6; }
6680fi
6681
6682
6683  test -n "$CUT" && break
6684done
6685
6686    else
6687      # If it succeeded, then it was overridden by the user. We will use it
6688      # for the tool.
6689
6690      # First remove it from the list of overridden variables, so we can test
6691      # for unknown variables in the end.
6692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6693
6694      # Check if we try to supply an empty value
6695      if test "x$CUT" = x; then
6696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6697$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6699$as_echo_n "checking for CUT... " >&6; }
6700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6701$as_echo "disabled" >&6; }
6702      else
6703        # Check if the provided tool contains a complete path.
6704        tool_specified="$CUT"
6705        tool_basename="${tool_specified##*/}"
6706        if test "x$tool_basename" = "x$tool_specified"; then
6707          # A command without a complete path is provided, search $PATH.
6708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6709$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6710          # Extract the first word of "$tool_basename", so it can be a program name with args.
6711set dummy $tool_basename; ac_word=$2
6712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6713$as_echo_n "checking for $ac_word... " >&6; }
6714if ${ac_cv_path_CUT+:} false; then :
6715  $as_echo_n "(cached) " >&6
6716else
6717  case $CUT in
6718  [\\/]* | ?:[\\/]*)
6719  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6720  ;;
6721  *)
6722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6723for as_dir in $PATH
6724do
6725  IFS=$as_save_IFS
6726  test -z "$as_dir" && as_dir=.
6727    for ac_exec_ext in '' $ac_executable_extensions; do
6728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6729    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6731    break 2
6732  fi
6733done
6734  done
6735IFS=$as_save_IFS
6736
6737  ;;
6738esac
6739fi
6740CUT=$ac_cv_path_CUT
6741if test -n "$CUT"; then
6742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6743$as_echo "$CUT" >&6; }
6744else
6745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749
6750          if test "x$CUT" = x; then
6751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6752          fi
6753        else
6754          # Otherwise we believe it is a complete path. Use it as it is.
6755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6756$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6758$as_echo_n "checking for CUT... " >&6; }
6759          if test ! -x "$tool_specified"; then
6760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6761$as_echo "not found" >&6; }
6762            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6763          fi
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6765$as_echo "$tool_specified" >&6; }
6766        fi
6767      fi
6768    fi
6769
6770  fi
6771
6772
6773
6774  if test "x$CUT" = x; then
6775    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6776  fi
6777
6778
6779
6780
6781
6782  # Publish this variable in the help.
6783
6784
6785  if [ -z "${DATE+x}" ]; then
6786    # The variable is not set by user, try to locate tool using the code snippet
6787    for ac_prog in date
6788do
6789  # Extract the first word of "$ac_prog", so it can be a program name with args.
6790set dummy $ac_prog; ac_word=$2
6791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6792$as_echo_n "checking for $ac_word... " >&6; }
6793if ${ac_cv_path_DATE+:} false; then :
6794  $as_echo_n "(cached) " >&6
6795else
6796  case $DATE in
6797  [\\/]* | ?:[\\/]*)
6798  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6799  ;;
6800  *)
6801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6802for as_dir in $PATH
6803do
6804  IFS=$as_save_IFS
6805  test -z "$as_dir" && as_dir=.
6806    for ac_exec_ext in '' $ac_executable_extensions; do
6807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6808    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6810    break 2
6811  fi
6812done
6813  done
6814IFS=$as_save_IFS
6815
6816  ;;
6817esac
6818fi
6819DATE=$ac_cv_path_DATE
6820if test -n "$DATE"; then
6821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6822$as_echo "$DATE" >&6; }
6823else
6824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6825$as_echo "no" >&6; }
6826fi
6827
6828
6829  test -n "$DATE" && break
6830done
6831
6832  else
6833    # The variable is set, but is it from the command line or the environment?
6834
6835    # Try to remove the string !DATE! from our list.
6836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6838      # If it failed, the variable was not from the command line. Ignore it,
6839      # but warn the user (except for BASH, which is always set by the calling BASH).
6840      if test "xDATE" != xBASH; then
6841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6842$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6843      fi
6844      # Try to locate tool using the code snippet
6845      for ac_prog in date
6846do
6847  # Extract the first word of "$ac_prog", so it can be a program name with args.
6848set dummy $ac_prog; ac_word=$2
6849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6850$as_echo_n "checking for $ac_word... " >&6; }
6851if ${ac_cv_path_DATE+:} false; then :
6852  $as_echo_n "(cached) " >&6
6853else
6854  case $DATE in
6855  [\\/]* | ?:[\\/]*)
6856  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6857  ;;
6858  *)
6859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6860for as_dir in $PATH
6861do
6862  IFS=$as_save_IFS
6863  test -z "$as_dir" && as_dir=.
6864    for ac_exec_ext in '' $ac_executable_extensions; do
6865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6866    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6868    break 2
6869  fi
6870done
6871  done
6872IFS=$as_save_IFS
6873
6874  ;;
6875esac
6876fi
6877DATE=$ac_cv_path_DATE
6878if test -n "$DATE"; then
6879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6880$as_echo "$DATE" >&6; }
6881else
6882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6883$as_echo "no" >&6; }
6884fi
6885
6886
6887  test -n "$DATE" && break
6888done
6889
6890    else
6891      # If it succeeded, then it was overridden by the user. We will use it
6892      # for the tool.
6893
6894      # First remove it from the list of overridden variables, so we can test
6895      # for unknown variables in the end.
6896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6897
6898      # Check if we try to supply an empty value
6899      if test "x$DATE" = x; then
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6901$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6903$as_echo_n "checking for DATE... " >&6; }
6904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6905$as_echo "disabled" >&6; }
6906      else
6907        # Check if the provided tool contains a complete path.
6908        tool_specified="$DATE"
6909        tool_basename="${tool_specified##*/}"
6910        if test "x$tool_basename" = "x$tool_specified"; then
6911          # A command without a complete path is provided, search $PATH.
6912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6913$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6914          # Extract the first word of "$tool_basename", so it can be a program name with args.
6915set dummy $tool_basename; ac_word=$2
6916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6917$as_echo_n "checking for $ac_word... " >&6; }
6918if ${ac_cv_path_DATE+:} false; then :
6919  $as_echo_n "(cached) " >&6
6920else
6921  case $DATE in
6922  [\\/]* | ?:[\\/]*)
6923  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6924  ;;
6925  *)
6926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6927for as_dir in $PATH
6928do
6929  IFS=$as_save_IFS
6930  test -z "$as_dir" && as_dir=.
6931    for ac_exec_ext in '' $ac_executable_extensions; do
6932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6933    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6935    break 2
6936  fi
6937done
6938  done
6939IFS=$as_save_IFS
6940
6941  ;;
6942esac
6943fi
6944DATE=$ac_cv_path_DATE
6945if test -n "$DATE"; then
6946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6947$as_echo "$DATE" >&6; }
6948else
6949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6950$as_echo "no" >&6; }
6951fi
6952
6953
6954          if test "x$DATE" = x; then
6955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6956          fi
6957        else
6958          # Otherwise we believe it is a complete path. Use it as it is.
6959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6960$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6962$as_echo_n "checking for DATE... " >&6; }
6963          if test ! -x "$tool_specified"; then
6964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6965$as_echo "not found" >&6; }
6966            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6967          fi
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6969$as_echo "$tool_specified" >&6; }
6970        fi
6971      fi
6972    fi
6973
6974  fi
6975
6976
6977
6978  if test "x$DATE" = x; then
6979    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6980  fi
6981
6982
6983
6984
6985
6986  # Publish this variable in the help.
6987
6988
6989  if [ -z "${DIFF+x}" ]; then
6990    # The variable is not set by user, try to locate tool using the code snippet
6991    for ac_prog in gdiff diff
6992do
6993  # Extract the first word of "$ac_prog", so it can be a program name with args.
6994set dummy $ac_prog; ac_word=$2
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6996$as_echo_n "checking for $ac_word... " >&6; }
6997if ${ac_cv_path_DIFF+:} false; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  case $DIFF in
7001  [\\/]* | ?:[\\/]*)
7002  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7003  ;;
7004  *)
7005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006for as_dir in $PATH
7007do
7008  IFS=$as_save_IFS
7009  test -z "$as_dir" && as_dir=.
7010    for ac_exec_ext in '' $ac_executable_extensions; do
7011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014    break 2
7015  fi
7016done
7017  done
7018IFS=$as_save_IFS
7019
7020  ;;
7021esac
7022fi
7023DIFF=$ac_cv_path_DIFF
7024if test -n "$DIFF"; then
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7026$as_echo "$DIFF" >&6; }
7027else
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029$as_echo "no" >&6; }
7030fi
7031
7032
7033  test -n "$DIFF" && break
7034done
7035
7036  else
7037    # The variable is set, but is it from the command line or the environment?
7038
7039    # Try to remove the string !DIFF! from our list.
7040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7042      # If it failed, the variable was not from the command line. Ignore it,
7043      # but warn the user (except for BASH, which is always set by the calling BASH).
7044      if test "xDIFF" != xBASH; then
7045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7046$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7047      fi
7048      # Try to locate tool using the code snippet
7049      for ac_prog in gdiff diff
7050do
7051  # Extract the first word of "$ac_prog", so it can be a program name with args.
7052set dummy $ac_prog; ac_word=$2
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7054$as_echo_n "checking for $ac_word... " >&6; }
7055if ${ac_cv_path_DIFF+:} false; then :
7056  $as_echo_n "(cached) " >&6
7057else
7058  case $DIFF in
7059  [\\/]* | ?:[\\/]*)
7060  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7061  ;;
7062  *)
7063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078  ;;
7079esac
7080fi
7081DIFF=$ac_cv_path_DIFF
7082if test -n "$DIFF"; then
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7084$as_echo "$DIFF" >&6; }
7085else
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087$as_echo "no" >&6; }
7088fi
7089
7090
7091  test -n "$DIFF" && break
7092done
7093
7094    else
7095      # If it succeeded, then it was overridden by the user. We will use it
7096      # for the tool.
7097
7098      # First remove it from the list of overridden variables, so we can test
7099      # for unknown variables in the end.
7100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7101
7102      # Check if we try to supply an empty value
7103      if test "x$DIFF" = x; then
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7105$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7107$as_echo_n "checking for DIFF... " >&6; }
7108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7109$as_echo "disabled" >&6; }
7110      else
7111        # Check if the provided tool contains a complete path.
7112        tool_specified="$DIFF"
7113        tool_basename="${tool_specified##*/}"
7114        if test "x$tool_basename" = "x$tool_specified"; then
7115          # A command without a complete path is provided, search $PATH.
7116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7117$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7118          # Extract the first word of "$tool_basename", so it can be a program name with args.
7119set dummy $tool_basename; ac_word=$2
7120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7121$as_echo_n "checking for $ac_word... " >&6; }
7122if ${ac_cv_path_DIFF+:} false; then :
7123  $as_echo_n "(cached) " >&6
7124else
7125  case $DIFF in
7126  [\\/]* | ?:[\\/]*)
7127  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7128  ;;
7129  *)
7130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131for as_dir in $PATH
7132do
7133  IFS=$as_save_IFS
7134  test -z "$as_dir" && as_dir=.
7135    for ac_exec_ext in '' $ac_executable_extensions; do
7136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139    break 2
7140  fi
7141done
7142  done
7143IFS=$as_save_IFS
7144
7145  ;;
7146esac
7147fi
7148DIFF=$ac_cv_path_DIFF
7149if test -n "$DIFF"; then
7150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7151$as_echo "$DIFF" >&6; }
7152else
7153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154$as_echo "no" >&6; }
7155fi
7156
7157
7158          if test "x$DIFF" = x; then
7159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7160          fi
7161        else
7162          # Otherwise we believe it is a complete path. Use it as it is.
7163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7164$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7166$as_echo_n "checking for DIFF... " >&6; }
7167          if test ! -x "$tool_specified"; then
7168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7169$as_echo "not found" >&6; }
7170            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7171          fi
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7173$as_echo "$tool_specified" >&6; }
7174        fi
7175      fi
7176    fi
7177
7178  fi
7179
7180
7181
7182  if test "x$DIFF" = x; then
7183    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7184  fi
7185
7186
7187
7188
7189
7190  # Publish this variable in the help.
7191
7192
7193  if [ -z "${DIRNAME+x}" ]; then
7194    # The variable is not set by user, try to locate tool using the code snippet
7195    for ac_prog in dirname
7196do
7197  # Extract the first word of "$ac_prog", so it can be a program name with args.
7198set dummy $ac_prog; ac_word=$2
7199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7200$as_echo_n "checking for $ac_word... " >&6; }
7201if ${ac_cv_path_DIRNAME+:} false; then :
7202  $as_echo_n "(cached) " >&6
7203else
7204  case $DIRNAME in
7205  [\\/]* | ?:[\\/]*)
7206  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7207  ;;
7208  *)
7209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7210for as_dir in $PATH
7211do
7212  IFS=$as_save_IFS
7213  test -z "$as_dir" && as_dir=.
7214    for ac_exec_ext in '' $ac_executable_extensions; do
7215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7216    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7218    break 2
7219  fi
7220done
7221  done
7222IFS=$as_save_IFS
7223
7224  ;;
7225esac
7226fi
7227DIRNAME=$ac_cv_path_DIRNAME
7228if test -n "$DIRNAME"; then
7229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7230$as_echo "$DIRNAME" >&6; }
7231else
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7233$as_echo "no" >&6; }
7234fi
7235
7236
7237  test -n "$DIRNAME" && break
7238done
7239
7240  else
7241    # The variable is set, but is it from the command line or the environment?
7242
7243    # Try to remove the string !DIRNAME! from our list.
7244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7246      # If it failed, the variable was not from the command line. Ignore it,
7247      # but warn the user (except for BASH, which is always set by the calling BASH).
7248      if test "xDIRNAME" != xBASH; then
7249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7250$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7251      fi
7252      # Try to locate tool using the code snippet
7253      for ac_prog in dirname
7254do
7255  # Extract the first word of "$ac_prog", so it can be a program name with args.
7256set dummy $ac_prog; ac_word=$2
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7258$as_echo_n "checking for $ac_word... " >&6; }
7259if ${ac_cv_path_DIRNAME+:} false; then :
7260  $as_echo_n "(cached) " >&6
7261else
7262  case $DIRNAME in
7263  [\\/]* | ?:[\\/]*)
7264  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7265  ;;
7266  *)
7267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7268for as_dir in $PATH
7269do
7270  IFS=$as_save_IFS
7271  test -z "$as_dir" && as_dir=.
7272    for ac_exec_ext in '' $ac_executable_extensions; do
7273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7274    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7276    break 2
7277  fi
7278done
7279  done
7280IFS=$as_save_IFS
7281
7282  ;;
7283esac
7284fi
7285DIRNAME=$ac_cv_path_DIRNAME
7286if test -n "$DIRNAME"; then
7287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7288$as_echo "$DIRNAME" >&6; }
7289else
7290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7291$as_echo "no" >&6; }
7292fi
7293
7294
7295  test -n "$DIRNAME" && break
7296done
7297
7298    else
7299      # If it succeeded, then it was overridden by the user. We will use it
7300      # for the tool.
7301
7302      # First remove it from the list of overridden variables, so we can test
7303      # for unknown variables in the end.
7304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7305
7306      # Check if we try to supply an empty value
7307      if test "x$DIRNAME" = x; then
7308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7309$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7311$as_echo_n "checking for DIRNAME... " >&6; }
7312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7313$as_echo "disabled" >&6; }
7314      else
7315        # Check if the provided tool contains a complete path.
7316        tool_specified="$DIRNAME"
7317        tool_basename="${tool_specified##*/}"
7318        if test "x$tool_basename" = "x$tool_specified"; then
7319          # A command without a complete path is provided, search $PATH.
7320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7321$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7322          # Extract the first word of "$tool_basename", so it can be a program name with args.
7323set dummy $tool_basename; ac_word=$2
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if ${ac_cv_path_DIRNAME+:} false; then :
7327  $as_echo_n "(cached) " >&6
7328else
7329  case $DIRNAME in
7330  [\\/]* | ?:[\\/]*)
7331  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7332  ;;
7333  *)
7334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335for as_dir in $PATH
7336do
7337  IFS=$as_save_IFS
7338  test -z "$as_dir" && as_dir=.
7339    for ac_exec_ext in '' $ac_executable_extensions; do
7340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343    break 2
7344  fi
7345done
7346  done
7347IFS=$as_save_IFS
7348
7349  ;;
7350esac
7351fi
7352DIRNAME=$ac_cv_path_DIRNAME
7353if test -n "$DIRNAME"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7355$as_echo "$DIRNAME" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362          if test "x$DIRNAME" = x; then
7363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7364          fi
7365        else
7366          # Otherwise we believe it is a complete path. Use it as it is.
7367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7368$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7370$as_echo_n "checking for DIRNAME... " >&6; }
7371          if test ! -x "$tool_specified"; then
7372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7373$as_echo "not found" >&6; }
7374            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7375          fi
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7377$as_echo "$tool_specified" >&6; }
7378        fi
7379      fi
7380    fi
7381
7382  fi
7383
7384
7385
7386  if test "x$DIRNAME" = x; then
7387    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7388  fi
7389
7390
7391
7392
7393
7394  # Publish this variable in the help.
7395
7396
7397  if [ -z "${ECHO+x}" ]; then
7398    # The variable is not set by user, try to locate tool using the code snippet
7399    for ac_prog in echo
7400do
7401  # Extract the first word of "$ac_prog", so it can be a program name with args.
7402set dummy $ac_prog; ac_word=$2
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
7405if ${ac_cv_path_ECHO+:} false; then :
7406  $as_echo_n "(cached) " >&6
7407else
7408  case $ECHO in
7409  [\\/]* | ?:[\\/]*)
7410  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7411  ;;
7412  *)
7413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414for as_dir in $PATH
7415do
7416  IFS=$as_save_IFS
7417  test -z "$as_dir" && as_dir=.
7418    for ac_exec_ext in '' $ac_executable_extensions; do
7419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422    break 2
7423  fi
7424done
7425  done
7426IFS=$as_save_IFS
7427
7428  ;;
7429esac
7430fi
7431ECHO=$ac_cv_path_ECHO
7432if test -n "$ECHO"; then
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7434$as_echo "$ECHO" >&6; }
7435else
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438fi
7439
7440
7441  test -n "$ECHO" && break
7442done
7443
7444  else
7445    # The variable is set, but is it from the command line or the environment?
7446
7447    # Try to remove the string !ECHO! from our list.
7448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7450      # If it failed, the variable was not from the command line. Ignore it,
7451      # but warn the user (except for BASH, which is always set by the calling BASH).
7452      if test "xECHO" != xBASH; then
7453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7454$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7455      fi
7456      # Try to locate tool using the code snippet
7457      for ac_prog in echo
7458do
7459  # Extract the first word of "$ac_prog", so it can be a program name with args.
7460set dummy $ac_prog; ac_word=$2
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462$as_echo_n "checking for $ac_word... " >&6; }
7463if ${ac_cv_path_ECHO+:} false; then :
7464  $as_echo_n "(cached) " >&6
7465else
7466  case $ECHO in
7467  [\\/]* | ?:[\\/]*)
7468  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7469  ;;
7470  *)
7471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7472for as_dir in $PATH
7473do
7474  IFS=$as_save_IFS
7475  test -z "$as_dir" && as_dir=.
7476    for ac_exec_ext in '' $ac_executable_extensions; do
7477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7478    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7480    break 2
7481  fi
7482done
7483  done
7484IFS=$as_save_IFS
7485
7486  ;;
7487esac
7488fi
7489ECHO=$ac_cv_path_ECHO
7490if test -n "$ECHO"; then
7491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7492$as_echo "$ECHO" >&6; }
7493else
7494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495$as_echo "no" >&6; }
7496fi
7497
7498
7499  test -n "$ECHO" && break
7500done
7501
7502    else
7503      # If it succeeded, then it was overridden by the user. We will use it
7504      # for the tool.
7505
7506      # First remove it from the list of overridden variables, so we can test
7507      # for unknown variables in the end.
7508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7509
7510      # Check if we try to supply an empty value
7511      if test "x$ECHO" = x; then
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7513$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7515$as_echo_n "checking for ECHO... " >&6; }
7516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7517$as_echo "disabled" >&6; }
7518      else
7519        # Check if the provided tool contains a complete path.
7520        tool_specified="$ECHO"
7521        tool_basename="${tool_specified##*/}"
7522        if test "x$tool_basename" = "x$tool_specified"; then
7523          # A command without a complete path is provided, search $PATH.
7524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7525$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7526          # Extract the first word of "$tool_basename", so it can be a program name with args.
7527set dummy $tool_basename; ac_word=$2
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7529$as_echo_n "checking for $ac_word... " >&6; }
7530if ${ac_cv_path_ECHO+:} false; then :
7531  $as_echo_n "(cached) " >&6
7532else
7533  case $ECHO in
7534  [\\/]* | ?:[\\/]*)
7535  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7536  ;;
7537  *)
7538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541  IFS=$as_save_IFS
7542  test -z "$as_dir" && as_dir=.
7543    for ac_exec_ext in '' $ac_executable_extensions; do
7544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7545    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7547    break 2
7548  fi
7549done
7550  done
7551IFS=$as_save_IFS
7552
7553  ;;
7554esac
7555fi
7556ECHO=$ac_cv_path_ECHO
7557if test -n "$ECHO"; then
7558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7559$as_echo "$ECHO" >&6; }
7560else
7561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7562$as_echo "no" >&6; }
7563fi
7564
7565
7566          if test "x$ECHO" = x; then
7567            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7568          fi
7569        else
7570          # Otherwise we believe it is a complete path. Use it as it is.
7571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7572$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7573          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7574$as_echo_n "checking for ECHO... " >&6; }
7575          if test ! -x "$tool_specified"; then
7576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7577$as_echo "not found" >&6; }
7578            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7579          fi
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7581$as_echo "$tool_specified" >&6; }
7582        fi
7583      fi
7584    fi
7585
7586  fi
7587
7588
7589
7590  if test "x$ECHO" = x; then
7591    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7592  fi
7593
7594
7595
7596
7597
7598  # Publish this variable in the help.
7599
7600
7601  if [ -z "${EXPR+x}" ]; then
7602    # The variable is not set by user, try to locate tool using the code snippet
7603    for ac_prog in expr
7604do
7605  # Extract the first word of "$ac_prog", so it can be a program name with args.
7606set dummy $ac_prog; ac_word=$2
7607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7608$as_echo_n "checking for $ac_word... " >&6; }
7609if ${ac_cv_path_EXPR+:} false; then :
7610  $as_echo_n "(cached) " >&6
7611else
7612  case $EXPR in
7613  [\\/]* | ?:[\\/]*)
7614  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7615  ;;
7616  *)
7617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7618for as_dir in $PATH
7619do
7620  IFS=$as_save_IFS
7621  test -z "$as_dir" && as_dir=.
7622    for ac_exec_ext in '' $ac_executable_extensions; do
7623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7624    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7626    break 2
7627  fi
7628done
7629  done
7630IFS=$as_save_IFS
7631
7632  ;;
7633esac
7634fi
7635EXPR=$ac_cv_path_EXPR
7636if test -n "$EXPR"; then
7637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7638$as_echo "$EXPR" >&6; }
7639else
7640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641$as_echo "no" >&6; }
7642fi
7643
7644
7645  test -n "$EXPR" && break
7646done
7647
7648  else
7649    # The variable is set, but is it from the command line or the environment?
7650
7651    # Try to remove the string !EXPR! from our list.
7652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7654      # If it failed, the variable was not from the command line. Ignore it,
7655      # but warn the user (except for BASH, which is always set by the calling BASH).
7656      if test "xEXPR" != xBASH; then
7657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7658$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7659      fi
7660      # Try to locate tool using the code snippet
7661      for ac_prog in expr
7662do
7663  # Extract the first word of "$ac_prog", so it can be a program name with args.
7664set dummy $ac_prog; ac_word=$2
7665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7666$as_echo_n "checking for $ac_word... " >&6; }
7667if ${ac_cv_path_EXPR+:} false; then :
7668  $as_echo_n "(cached) " >&6
7669else
7670  case $EXPR in
7671  [\\/]* | ?:[\\/]*)
7672  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7673  ;;
7674  *)
7675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7676for as_dir in $PATH
7677do
7678  IFS=$as_save_IFS
7679  test -z "$as_dir" && as_dir=.
7680    for ac_exec_ext in '' $ac_executable_extensions; do
7681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7682    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7684    break 2
7685  fi
7686done
7687  done
7688IFS=$as_save_IFS
7689
7690  ;;
7691esac
7692fi
7693EXPR=$ac_cv_path_EXPR
7694if test -n "$EXPR"; then
7695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7696$as_echo "$EXPR" >&6; }
7697else
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7699$as_echo "no" >&6; }
7700fi
7701
7702
7703  test -n "$EXPR" && break
7704done
7705
7706    else
7707      # If it succeeded, then it was overridden by the user. We will use it
7708      # for the tool.
7709
7710      # First remove it from the list of overridden variables, so we can test
7711      # for unknown variables in the end.
7712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7713
7714      # Check if we try to supply an empty value
7715      if test "x$EXPR" = x; then
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7717$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7719$as_echo_n "checking for EXPR... " >&6; }
7720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7721$as_echo "disabled" >&6; }
7722      else
7723        # Check if the provided tool contains a complete path.
7724        tool_specified="$EXPR"
7725        tool_basename="${tool_specified##*/}"
7726        if test "x$tool_basename" = "x$tool_specified"; then
7727          # A command without a complete path is provided, search $PATH.
7728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7729$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7730          # Extract the first word of "$tool_basename", so it can be a program name with args.
7731set dummy $tool_basename; ac_word=$2
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7733$as_echo_n "checking for $ac_word... " >&6; }
7734if ${ac_cv_path_EXPR+:} false; then :
7735  $as_echo_n "(cached) " >&6
7736else
7737  case $EXPR in
7738  [\\/]* | ?:[\\/]*)
7739  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7740  ;;
7741  *)
7742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7743for as_dir in $PATH
7744do
7745  IFS=$as_save_IFS
7746  test -z "$as_dir" && as_dir=.
7747    for ac_exec_ext in '' $ac_executable_extensions; do
7748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7749    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7751    break 2
7752  fi
7753done
7754  done
7755IFS=$as_save_IFS
7756
7757  ;;
7758esac
7759fi
7760EXPR=$ac_cv_path_EXPR
7761if test -n "$EXPR"; then
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7763$as_echo "$EXPR" >&6; }
7764else
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7766$as_echo "no" >&6; }
7767fi
7768
7769
7770          if test "x$EXPR" = x; then
7771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7772          fi
7773        else
7774          # Otherwise we believe it is a complete path. Use it as it is.
7775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7776$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7778$as_echo_n "checking for EXPR... " >&6; }
7779          if test ! -x "$tool_specified"; then
7780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7781$as_echo "not found" >&6; }
7782            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7783          fi
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7785$as_echo "$tool_specified" >&6; }
7786        fi
7787      fi
7788    fi
7789
7790  fi
7791
7792
7793
7794  if test "x$EXPR" = x; then
7795    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7796  fi
7797
7798
7799
7800
7801
7802  # Publish this variable in the help.
7803
7804
7805  if [ -z "${FILE+x}" ]; then
7806    # The variable is not set by user, try to locate tool using the code snippet
7807    for ac_prog in file
7808do
7809  # Extract the first word of "$ac_prog", so it can be a program name with args.
7810set dummy $ac_prog; ac_word=$2
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7812$as_echo_n "checking for $ac_word... " >&6; }
7813if ${ac_cv_path_FILE+:} false; then :
7814  $as_echo_n "(cached) " >&6
7815else
7816  case $FILE in
7817  [\\/]* | ?:[\\/]*)
7818  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7819  ;;
7820  *)
7821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7822for as_dir in $PATH
7823do
7824  IFS=$as_save_IFS
7825  test -z "$as_dir" && as_dir=.
7826    for ac_exec_ext in '' $ac_executable_extensions; do
7827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7828    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7830    break 2
7831  fi
7832done
7833  done
7834IFS=$as_save_IFS
7835
7836  ;;
7837esac
7838fi
7839FILE=$ac_cv_path_FILE
7840if test -n "$FILE"; then
7841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7842$as_echo "$FILE" >&6; }
7843else
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7845$as_echo "no" >&6; }
7846fi
7847
7848
7849  test -n "$FILE" && break
7850done
7851
7852  else
7853    # The variable is set, but is it from the command line or the environment?
7854
7855    # Try to remove the string !FILE! from our list.
7856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7858      # If it failed, the variable was not from the command line. Ignore it,
7859      # but warn the user (except for BASH, which is always set by the calling BASH).
7860      if test "xFILE" != xBASH; then
7861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7862$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7863      fi
7864      # Try to locate tool using the code snippet
7865      for ac_prog in file
7866do
7867  # Extract the first word of "$ac_prog", so it can be a program name with args.
7868set dummy $ac_prog; ac_word=$2
7869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7870$as_echo_n "checking for $ac_word... " >&6; }
7871if ${ac_cv_path_FILE+:} false; then :
7872  $as_echo_n "(cached) " >&6
7873else
7874  case $FILE in
7875  [\\/]* | ?:[\\/]*)
7876  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7877  ;;
7878  *)
7879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7880for as_dir in $PATH
7881do
7882  IFS=$as_save_IFS
7883  test -z "$as_dir" && as_dir=.
7884    for ac_exec_ext in '' $ac_executable_extensions; do
7885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7886    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7888    break 2
7889  fi
7890done
7891  done
7892IFS=$as_save_IFS
7893
7894  ;;
7895esac
7896fi
7897FILE=$ac_cv_path_FILE
7898if test -n "$FILE"; then
7899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7900$as_echo "$FILE" >&6; }
7901else
7902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7903$as_echo "no" >&6; }
7904fi
7905
7906
7907  test -n "$FILE" && break
7908done
7909
7910    else
7911      # If it succeeded, then it was overridden by the user. We will use it
7912      # for the tool.
7913
7914      # First remove it from the list of overridden variables, so we can test
7915      # for unknown variables in the end.
7916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7917
7918      # Check if we try to supply an empty value
7919      if test "x$FILE" = x; then
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7921$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7923$as_echo_n "checking for FILE... " >&6; }
7924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7925$as_echo "disabled" >&6; }
7926      else
7927        # Check if the provided tool contains a complete path.
7928        tool_specified="$FILE"
7929        tool_basename="${tool_specified##*/}"
7930        if test "x$tool_basename" = "x$tool_specified"; then
7931          # A command without a complete path is provided, search $PATH.
7932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7933$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7934          # Extract the first word of "$tool_basename", so it can be a program name with args.
7935set dummy $tool_basename; ac_word=$2
7936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7937$as_echo_n "checking for $ac_word... " >&6; }
7938if ${ac_cv_path_FILE+:} false; then :
7939  $as_echo_n "(cached) " >&6
7940else
7941  case $FILE in
7942  [\\/]* | ?:[\\/]*)
7943  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7944  ;;
7945  *)
7946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7947for as_dir in $PATH
7948do
7949  IFS=$as_save_IFS
7950  test -z "$as_dir" && as_dir=.
7951    for ac_exec_ext in '' $ac_executable_extensions; do
7952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7953    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7955    break 2
7956  fi
7957done
7958  done
7959IFS=$as_save_IFS
7960
7961  ;;
7962esac
7963fi
7964FILE=$ac_cv_path_FILE
7965if test -n "$FILE"; then
7966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7967$as_echo "$FILE" >&6; }
7968else
7969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7970$as_echo "no" >&6; }
7971fi
7972
7973
7974          if test "x$FILE" = x; then
7975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7976          fi
7977        else
7978          # Otherwise we believe it is a complete path. Use it as it is.
7979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7980$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7982$as_echo_n "checking for FILE... " >&6; }
7983          if test ! -x "$tool_specified"; then
7984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7985$as_echo "not found" >&6; }
7986            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7987          fi
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7989$as_echo "$tool_specified" >&6; }
7990        fi
7991      fi
7992    fi
7993
7994  fi
7995
7996
7997
7998  if test "x$FILE" = x; then
7999    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8000  fi
8001
8002
8003
8004
8005
8006  # Publish this variable in the help.
8007
8008
8009  if [ -z "${FIND+x}" ]; then
8010    # The variable is not set by user, try to locate tool using the code snippet
8011    for ac_prog in find
8012do
8013  # Extract the first word of "$ac_prog", so it can be a program name with args.
8014set dummy $ac_prog; ac_word=$2
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8016$as_echo_n "checking for $ac_word... " >&6; }
8017if ${ac_cv_path_FIND+:} false; then :
8018  $as_echo_n "(cached) " >&6
8019else
8020  case $FIND in
8021  [\\/]* | ?:[\\/]*)
8022  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8023  ;;
8024  *)
8025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8026for as_dir in $PATH
8027do
8028  IFS=$as_save_IFS
8029  test -z "$as_dir" && as_dir=.
8030    for ac_exec_ext in '' $ac_executable_extensions; do
8031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8032    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8034    break 2
8035  fi
8036done
8037  done
8038IFS=$as_save_IFS
8039
8040  ;;
8041esac
8042fi
8043FIND=$ac_cv_path_FIND
8044if test -n "$FIND"; then
8045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8046$as_echo "$FIND" >&6; }
8047else
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049$as_echo "no" >&6; }
8050fi
8051
8052
8053  test -n "$FIND" && break
8054done
8055
8056  else
8057    # The variable is set, but is it from the command line or the environment?
8058
8059    # Try to remove the string !FIND! from our list.
8060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8062      # If it failed, the variable was not from the command line. Ignore it,
8063      # but warn the user (except for BASH, which is always set by the calling BASH).
8064      if test "xFIND" != xBASH; then
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8066$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8067      fi
8068      # Try to locate tool using the code snippet
8069      for ac_prog in find
8070do
8071  # Extract the first word of "$ac_prog", so it can be a program name with args.
8072set dummy $ac_prog; ac_word=$2
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8074$as_echo_n "checking for $ac_word... " >&6; }
8075if ${ac_cv_path_FIND+:} false; then :
8076  $as_echo_n "(cached) " >&6
8077else
8078  case $FIND in
8079  [\\/]* | ?:[\\/]*)
8080  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8081  ;;
8082  *)
8083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8084for as_dir in $PATH
8085do
8086  IFS=$as_save_IFS
8087  test -z "$as_dir" && as_dir=.
8088    for ac_exec_ext in '' $ac_executable_extensions; do
8089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8090    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8092    break 2
8093  fi
8094done
8095  done
8096IFS=$as_save_IFS
8097
8098  ;;
8099esac
8100fi
8101FIND=$ac_cv_path_FIND
8102if test -n "$FIND"; then
8103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8104$as_echo "$FIND" >&6; }
8105else
8106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8107$as_echo "no" >&6; }
8108fi
8109
8110
8111  test -n "$FIND" && break
8112done
8113
8114    else
8115      # If it succeeded, then it was overridden by the user. We will use it
8116      # for the tool.
8117
8118      # First remove it from the list of overridden variables, so we can test
8119      # for unknown variables in the end.
8120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8121
8122      # Check if we try to supply an empty value
8123      if test "x$FIND" = x; then
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8125$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8127$as_echo_n "checking for FIND... " >&6; }
8128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8129$as_echo "disabled" >&6; }
8130      else
8131        # Check if the provided tool contains a complete path.
8132        tool_specified="$FIND"
8133        tool_basename="${tool_specified##*/}"
8134        if test "x$tool_basename" = "x$tool_specified"; then
8135          # A command without a complete path is provided, search $PATH.
8136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8137$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8138          # Extract the first word of "$tool_basename", so it can be a program name with args.
8139set dummy $tool_basename; ac_word=$2
8140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8141$as_echo_n "checking for $ac_word... " >&6; }
8142if ${ac_cv_path_FIND+:} false; then :
8143  $as_echo_n "(cached) " >&6
8144else
8145  case $FIND in
8146  [\\/]* | ?:[\\/]*)
8147  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8148  ;;
8149  *)
8150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8151for as_dir in $PATH
8152do
8153  IFS=$as_save_IFS
8154  test -z "$as_dir" && as_dir=.
8155    for ac_exec_ext in '' $ac_executable_extensions; do
8156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8157    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8159    break 2
8160  fi
8161done
8162  done
8163IFS=$as_save_IFS
8164
8165  ;;
8166esac
8167fi
8168FIND=$ac_cv_path_FIND
8169if test -n "$FIND"; then
8170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8171$as_echo "$FIND" >&6; }
8172else
8173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8174$as_echo "no" >&6; }
8175fi
8176
8177
8178          if test "x$FIND" = x; then
8179            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8180          fi
8181        else
8182          # Otherwise we believe it is a complete path. Use it as it is.
8183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8184$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8186$as_echo_n "checking for FIND... " >&6; }
8187          if test ! -x "$tool_specified"; then
8188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8189$as_echo "not found" >&6; }
8190            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8191          fi
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8193$as_echo "$tool_specified" >&6; }
8194        fi
8195      fi
8196    fi
8197
8198  fi
8199
8200
8201
8202  if test "x$FIND" = x; then
8203    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8204  fi
8205
8206
8207
8208
8209
8210  # Publish this variable in the help.
8211
8212
8213  if [ -z "${HEAD+x}" ]; then
8214    # The variable is not set by user, try to locate tool using the code snippet
8215    for ac_prog in head
8216do
8217  # Extract the first word of "$ac_prog", so it can be a program name with args.
8218set dummy $ac_prog; ac_word=$2
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8220$as_echo_n "checking for $ac_word... " >&6; }
8221if ${ac_cv_path_HEAD+:} false; then :
8222  $as_echo_n "(cached) " >&6
8223else
8224  case $HEAD in
8225  [\\/]* | ?:[\\/]*)
8226  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8227  ;;
8228  *)
8229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8230for as_dir in $PATH
8231do
8232  IFS=$as_save_IFS
8233  test -z "$as_dir" && as_dir=.
8234    for ac_exec_ext in '' $ac_executable_extensions; do
8235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8236    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8238    break 2
8239  fi
8240done
8241  done
8242IFS=$as_save_IFS
8243
8244  ;;
8245esac
8246fi
8247HEAD=$ac_cv_path_HEAD
8248if test -n "$HEAD"; then
8249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8250$as_echo "$HEAD" >&6; }
8251else
8252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8253$as_echo "no" >&6; }
8254fi
8255
8256
8257  test -n "$HEAD" && break
8258done
8259
8260  else
8261    # The variable is set, but is it from the command line or the environment?
8262
8263    # Try to remove the string !HEAD! from our list.
8264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8266      # If it failed, the variable was not from the command line. Ignore it,
8267      # but warn the user (except for BASH, which is always set by the calling BASH).
8268      if test "xHEAD" != xBASH; then
8269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8270$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8271      fi
8272      # Try to locate tool using the code snippet
8273      for ac_prog in head
8274do
8275  # Extract the first word of "$ac_prog", so it can be a program name with args.
8276set dummy $ac_prog; ac_word=$2
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8278$as_echo_n "checking for $ac_word... " >&6; }
8279if ${ac_cv_path_HEAD+:} false; then :
8280  $as_echo_n "(cached) " >&6
8281else
8282  case $HEAD in
8283  [\\/]* | ?:[\\/]*)
8284  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8285  ;;
8286  *)
8287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8288for as_dir in $PATH
8289do
8290  IFS=$as_save_IFS
8291  test -z "$as_dir" && as_dir=.
8292    for ac_exec_ext in '' $ac_executable_extensions; do
8293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8294    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8296    break 2
8297  fi
8298done
8299  done
8300IFS=$as_save_IFS
8301
8302  ;;
8303esac
8304fi
8305HEAD=$ac_cv_path_HEAD
8306if test -n "$HEAD"; then
8307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8308$as_echo "$HEAD" >&6; }
8309else
8310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8311$as_echo "no" >&6; }
8312fi
8313
8314
8315  test -n "$HEAD" && break
8316done
8317
8318    else
8319      # If it succeeded, then it was overridden by the user. We will use it
8320      # for the tool.
8321
8322      # First remove it from the list of overridden variables, so we can test
8323      # for unknown variables in the end.
8324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8325
8326      # Check if we try to supply an empty value
8327      if test "x$HEAD" = x; then
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8329$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8331$as_echo_n "checking for HEAD... " >&6; }
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8333$as_echo "disabled" >&6; }
8334      else
8335        # Check if the provided tool contains a complete path.
8336        tool_specified="$HEAD"
8337        tool_basename="${tool_specified##*/}"
8338        if test "x$tool_basename" = "x$tool_specified"; then
8339          # A command without a complete path is provided, search $PATH.
8340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8341$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8342          # Extract the first word of "$tool_basename", so it can be a program name with args.
8343set dummy $tool_basename; ac_word=$2
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8345$as_echo_n "checking for $ac_word... " >&6; }
8346if ${ac_cv_path_HEAD+:} false; then :
8347  $as_echo_n "(cached) " >&6
8348else
8349  case $HEAD in
8350  [\\/]* | ?:[\\/]*)
8351  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8352  ;;
8353  *)
8354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8355for as_dir in $PATH
8356do
8357  IFS=$as_save_IFS
8358  test -z "$as_dir" && as_dir=.
8359    for ac_exec_ext in '' $ac_executable_extensions; do
8360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8361    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8363    break 2
8364  fi
8365done
8366  done
8367IFS=$as_save_IFS
8368
8369  ;;
8370esac
8371fi
8372HEAD=$ac_cv_path_HEAD
8373if test -n "$HEAD"; then
8374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8375$as_echo "$HEAD" >&6; }
8376else
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8378$as_echo "no" >&6; }
8379fi
8380
8381
8382          if test "x$HEAD" = x; then
8383            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8384          fi
8385        else
8386          # Otherwise we believe it is a complete path. Use it as it is.
8387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8388$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8390$as_echo_n "checking for HEAD... " >&6; }
8391          if test ! -x "$tool_specified"; then
8392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8393$as_echo "not found" >&6; }
8394            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8395          fi
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8397$as_echo "$tool_specified" >&6; }
8398        fi
8399      fi
8400    fi
8401
8402  fi
8403
8404
8405
8406  if test "x$HEAD" = x; then
8407    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8408  fi
8409
8410
8411
8412
8413
8414  # Publish this variable in the help.
8415
8416
8417  if [ -z "${GUNZIP+x}" ]; then
8418    # The variable is not set by user, try to locate tool using the code snippet
8419    for ac_prog in gunzip
8420do
8421  # Extract the first word of "$ac_prog", so it can be a program name with args.
8422set dummy $ac_prog; ac_word=$2
8423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8424$as_echo_n "checking for $ac_word... " >&6; }
8425if ${ac_cv_path_GUNZIP+:} false; then :
8426  $as_echo_n "(cached) " >&6
8427else
8428  case $GUNZIP in
8429  [\\/]* | ?:[\\/]*)
8430  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8431  ;;
8432  *)
8433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8434for as_dir in $PATH
8435do
8436  IFS=$as_save_IFS
8437  test -z "$as_dir" && as_dir=.
8438    for ac_exec_ext in '' $ac_executable_extensions; do
8439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8440    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8442    break 2
8443  fi
8444done
8445  done
8446IFS=$as_save_IFS
8447
8448  ;;
8449esac
8450fi
8451GUNZIP=$ac_cv_path_GUNZIP
8452if test -n "$GUNZIP"; then
8453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8454$as_echo "$GUNZIP" >&6; }
8455else
8456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
8458fi
8459
8460
8461  test -n "$GUNZIP" && break
8462done
8463
8464  else
8465    # The variable is set, but is it from the command line or the environment?
8466
8467    # Try to remove the string !GUNZIP! from our list.
8468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8470      # If it failed, the variable was not from the command line. Ignore it,
8471      # but warn the user (except for BASH, which is always set by the calling BASH).
8472      if test "xGUNZIP" != xBASH; then
8473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8474$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8475      fi
8476      # Try to locate tool using the code snippet
8477      for ac_prog in gunzip
8478do
8479  # Extract the first word of "$ac_prog", so it can be a program name with args.
8480set dummy $ac_prog; ac_word=$2
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
8483if ${ac_cv_path_GUNZIP+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486  case $GUNZIP in
8487  [\\/]* | ?:[\\/]*)
8488  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8489  ;;
8490  *)
8491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  test -z "$as_dir" && as_dir=.
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8498    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8500    break 2
8501  fi
8502done
8503  done
8504IFS=$as_save_IFS
8505
8506  ;;
8507esac
8508fi
8509GUNZIP=$ac_cv_path_GUNZIP
8510if test -n "$GUNZIP"; then
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8512$as_echo "$GUNZIP" >&6; }
8513else
8514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
8516fi
8517
8518
8519  test -n "$GUNZIP" && break
8520done
8521
8522    else
8523      # If it succeeded, then it was overridden by the user. We will use it
8524      # for the tool.
8525
8526      # First remove it from the list of overridden variables, so we can test
8527      # for unknown variables in the end.
8528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8529
8530      # Check if we try to supply an empty value
8531      if test "x$GUNZIP" = x; then
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8533$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8535$as_echo_n "checking for GUNZIP... " >&6; }
8536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8537$as_echo "disabled" >&6; }
8538      else
8539        # Check if the provided tool contains a complete path.
8540        tool_specified="$GUNZIP"
8541        tool_basename="${tool_specified##*/}"
8542        if test "x$tool_basename" = "x$tool_specified"; then
8543          # A command without a complete path is provided, search $PATH.
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8545$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8546          # Extract the first word of "$tool_basename", so it can be a program name with args.
8547set dummy $tool_basename; ac_word=$2
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549$as_echo_n "checking for $ac_word... " >&6; }
8550if ${ac_cv_path_GUNZIP+:} false; then :
8551  $as_echo_n "(cached) " >&6
8552else
8553  case $GUNZIP in
8554  [\\/]* | ?:[\\/]*)
8555  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8556  ;;
8557  *)
8558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8559for as_dir in $PATH
8560do
8561  IFS=$as_save_IFS
8562  test -z "$as_dir" && as_dir=.
8563    for ac_exec_ext in '' $ac_executable_extensions; do
8564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8565    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8567    break 2
8568  fi
8569done
8570  done
8571IFS=$as_save_IFS
8572
8573  ;;
8574esac
8575fi
8576GUNZIP=$ac_cv_path_GUNZIP
8577if test -n "$GUNZIP"; then
8578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8579$as_echo "$GUNZIP" >&6; }
8580else
8581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8582$as_echo "no" >&6; }
8583fi
8584
8585
8586          if test "x$GUNZIP" = x; then
8587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8588          fi
8589        else
8590          # Otherwise we believe it is a complete path. Use it as it is.
8591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8592$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8594$as_echo_n "checking for GUNZIP... " >&6; }
8595          if test ! -x "$tool_specified"; then
8596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8597$as_echo "not found" >&6; }
8598            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8599          fi
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8601$as_echo "$tool_specified" >&6; }
8602        fi
8603      fi
8604    fi
8605
8606  fi
8607
8608
8609
8610  if test "x$GUNZIP" = x; then
8611    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8612  fi
8613
8614
8615
8616
8617
8618  # Publish this variable in the help.
8619
8620
8621  if [ -z "${GZIP+x}" ]; then
8622    # The variable is not set by user, try to locate tool using the code snippet
8623    for ac_prog in pigz gzip
8624do
8625  # Extract the first word of "$ac_prog", so it can be a program name with args.
8626set dummy $ac_prog; ac_word=$2
8627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8628$as_echo_n "checking for $ac_word... " >&6; }
8629if ${ac_cv_path_GZIP+:} false; then :
8630  $as_echo_n "(cached) " >&6
8631else
8632  case $GZIP in
8633  [\\/]* | ?:[\\/]*)
8634  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8635  ;;
8636  *)
8637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8638for as_dir in $PATH
8639do
8640  IFS=$as_save_IFS
8641  test -z "$as_dir" && as_dir=.
8642    for ac_exec_ext in '' $ac_executable_extensions; do
8643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8644    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8646    break 2
8647  fi
8648done
8649  done
8650IFS=$as_save_IFS
8651
8652  ;;
8653esac
8654fi
8655GZIP=$ac_cv_path_GZIP
8656if test -n "$GZIP"; then
8657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8658$as_echo "$GZIP" >&6; }
8659else
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8661$as_echo "no" >&6; }
8662fi
8663
8664
8665  test -n "$GZIP" && break
8666done
8667
8668  else
8669    # The variable is set, but is it from the command line or the environment?
8670
8671    # Try to remove the string !GZIP! from our list.
8672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8674      # If it failed, the variable was not from the command line. Ignore it,
8675      # but warn the user (except for BASH, which is always set by the calling BASH).
8676      if test "xGZIP" != xBASH; then
8677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8678$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8679      fi
8680      # Try to locate tool using the code snippet
8681      for ac_prog in pigz gzip
8682do
8683  # Extract the first word of "$ac_prog", so it can be a program name with args.
8684set dummy $ac_prog; ac_word=$2
8685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8686$as_echo_n "checking for $ac_word... " >&6; }
8687if ${ac_cv_path_GZIP+:} false; then :
8688  $as_echo_n "(cached) " >&6
8689else
8690  case $GZIP in
8691  [\\/]* | ?:[\\/]*)
8692  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8693  ;;
8694  *)
8695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8696for as_dir in $PATH
8697do
8698  IFS=$as_save_IFS
8699  test -z "$as_dir" && as_dir=.
8700    for ac_exec_ext in '' $ac_executable_extensions; do
8701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8702    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8704    break 2
8705  fi
8706done
8707  done
8708IFS=$as_save_IFS
8709
8710  ;;
8711esac
8712fi
8713GZIP=$ac_cv_path_GZIP
8714if test -n "$GZIP"; then
8715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8716$as_echo "$GZIP" >&6; }
8717else
8718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8719$as_echo "no" >&6; }
8720fi
8721
8722
8723  test -n "$GZIP" && break
8724done
8725
8726    else
8727      # If it succeeded, then it was overridden by the user. We will use it
8728      # for the tool.
8729
8730      # First remove it from the list of overridden variables, so we can test
8731      # for unknown variables in the end.
8732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8733
8734      # Check if we try to supply an empty value
8735      if test "x$GZIP" = x; then
8736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8737$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8739$as_echo_n "checking for GZIP... " >&6; }
8740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8741$as_echo "disabled" >&6; }
8742      else
8743        # Check if the provided tool contains a complete path.
8744        tool_specified="$GZIP"
8745        tool_basename="${tool_specified##*/}"
8746        if test "x$tool_basename" = "x$tool_specified"; then
8747          # A command without a complete path is provided, search $PATH.
8748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8749$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8750          # Extract the first word of "$tool_basename", so it can be a program name with args.
8751set dummy $tool_basename; ac_word=$2
8752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8753$as_echo_n "checking for $ac_word... " >&6; }
8754if ${ac_cv_path_GZIP+:} false; then :
8755  $as_echo_n "(cached) " >&6
8756else
8757  case $GZIP in
8758  [\\/]* | ?:[\\/]*)
8759  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8760  ;;
8761  *)
8762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8763for as_dir in $PATH
8764do
8765  IFS=$as_save_IFS
8766  test -z "$as_dir" && as_dir=.
8767    for ac_exec_ext in '' $ac_executable_extensions; do
8768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8769    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8771    break 2
8772  fi
8773done
8774  done
8775IFS=$as_save_IFS
8776
8777  ;;
8778esac
8779fi
8780GZIP=$ac_cv_path_GZIP
8781if test -n "$GZIP"; then
8782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8783$as_echo "$GZIP" >&6; }
8784else
8785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8786$as_echo "no" >&6; }
8787fi
8788
8789
8790          if test "x$GZIP" = x; then
8791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8792          fi
8793        else
8794          # Otherwise we believe it is a complete path. Use it as it is.
8795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8796$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8798$as_echo_n "checking for GZIP... " >&6; }
8799          if test ! -x "$tool_specified"; then
8800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8801$as_echo "not found" >&6; }
8802            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8803          fi
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8805$as_echo "$tool_specified" >&6; }
8806        fi
8807      fi
8808    fi
8809
8810  fi
8811
8812
8813
8814  if test "x$GZIP" = x; then
8815    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8816  fi
8817
8818
8819
8820
8821
8822  # Publish this variable in the help.
8823
8824
8825  if [ -z "${LN+x}" ]; then
8826    # The variable is not set by user, try to locate tool using the code snippet
8827    for ac_prog in ln
8828do
8829  # Extract the first word of "$ac_prog", so it can be a program name with args.
8830set dummy $ac_prog; ac_word=$2
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832$as_echo_n "checking for $ac_word... " >&6; }
8833if ${ac_cv_path_LN+:} false; then :
8834  $as_echo_n "(cached) " >&6
8835else
8836  case $LN in
8837  [\\/]* | ?:[\\/]*)
8838  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8839  ;;
8840  *)
8841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842for as_dir in $PATH
8843do
8844  IFS=$as_save_IFS
8845  test -z "$as_dir" && as_dir=.
8846    for ac_exec_ext in '' $ac_executable_extensions; do
8847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850    break 2
8851  fi
8852done
8853  done
8854IFS=$as_save_IFS
8855
8856  ;;
8857esac
8858fi
8859LN=$ac_cv_path_LN
8860if test -n "$LN"; then
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8862$as_echo "$LN" >&6; }
8863else
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865$as_echo "no" >&6; }
8866fi
8867
8868
8869  test -n "$LN" && break
8870done
8871
8872  else
8873    # The variable is set, but is it from the command line or the environment?
8874
8875    # Try to remove the string !LN! from our list.
8876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8878      # If it failed, the variable was not from the command line. Ignore it,
8879      # but warn the user (except for BASH, which is always set by the calling BASH).
8880      if test "xLN" != xBASH; then
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8882$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8883      fi
8884      # Try to locate tool using the code snippet
8885      for ac_prog in ln
8886do
8887  # Extract the first word of "$ac_prog", so it can be a program name with args.
8888set dummy $ac_prog; ac_word=$2
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890$as_echo_n "checking for $ac_word... " >&6; }
8891if ${ac_cv_path_LN+:} false; then :
8892  $as_echo_n "(cached) " >&6
8893else
8894  case $LN in
8895  [\\/]* | ?:[\\/]*)
8896  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8897  ;;
8898  *)
8899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900for as_dir in $PATH
8901do
8902  IFS=$as_save_IFS
8903  test -z "$as_dir" && as_dir=.
8904    for ac_exec_ext in '' $ac_executable_extensions; do
8905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908    break 2
8909  fi
8910done
8911  done
8912IFS=$as_save_IFS
8913
8914  ;;
8915esac
8916fi
8917LN=$ac_cv_path_LN
8918if test -n "$LN"; then
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8920$as_echo "$LN" >&6; }
8921else
8922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
8924fi
8925
8926
8927  test -n "$LN" && break
8928done
8929
8930    else
8931      # If it succeeded, then it was overridden by the user. We will use it
8932      # for the tool.
8933
8934      # First remove it from the list of overridden variables, so we can test
8935      # for unknown variables in the end.
8936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8937
8938      # Check if we try to supply an empty value
8939      if test "x$LN" = x; then
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8941$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8943$as_echo_n "checking for LN... " >&6; }
8944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8945$as_echo "disabled" >&6; }
8946      else
8947        # Check if the provided tool contains a complete path.
8948        tool_specified="$LN"
8949        tool_basename="${tool_specified##*/}"
8950        if test "x$tool_basename" = "x$tool_specified"; then
8951          # A command without a complete path is provided, search $PATH.
8952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8953$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8954          # Extract the first word of "$tool_basename", so it can be a program name with args.
8955set dummy $tool_basename; ac_word=$2
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8957$as_echo_n "checking for $ac_word... " >&6; }
8958if ${ac_cv_path_LN+:} false; then :
8959  $as_echo_n "(cached) " >&6
8960else
8961  case $LN in
8962  [\\/]* | ?:[\\/]*)
8963  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8964  ;;
8965  *)
8966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8967for as_dir in $PATH
8968do
8969  IFS=$as_save_IFS
8970  test -z "$as_dir" && as_dir=.
8971    for ac_exec_ext in '' $ac_executable_extensions; do
8972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8973    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8975    break 2
8976  fi
8977done
8978  done
8979IFS=$as_save_IFS
8980
8981  ;;
8982esac
8983fi
8984LN=$ac_cv_path_LN
8985if test -n "$LN"; then
8986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8987$as_echo "$LN" >&6; }
8988else
8989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990$as_echo "no" >&6; }
8991fi
8992
8993
8994          if test "x$LN" = x; then
8995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8996          fi
8997        else
8998          # Otherwise we believe it is a complete path. Use it as it is.
8999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9000$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9002$as_echo_n "checking for LN... " >&6; }
9003          if test ! -x "$tool_specified"; then
9004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9005$as_echo "not found" >&6; }
9006            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9007          fi
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9009$as_echo "$tool_specified" >&6; }
9010        fi
9011      fi
9012    fi
9013
9014  fi
9015
9016
9017
9018  if test "x$LN" = x; then
9019    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9020  fi
9021
9022
9023
9024
9025
9026  # Publish this variable in the help.
9027
9028
9029  if [ -z "${LS+x}" ]; then
9030    # The variable is not set by user, try to locate tool using the code snippet
9031    for ac_prog in ls
9032do
9033  # Extract the first word of "$ac_prog", so it can be a program name with args.
9034set dummy $ac_prog; ac_word=$2
9035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9036$as_echo_n "checking for $ac_word... " >&6; }
9037if ${ac_cv_path_LS+:} false; then :
9038  $as_echo_n "(cached) " >&6
9039else
9040  case $LS in
9041  [\\/]* | ?:[\\/]*)
9042  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9043  ;;
9044  *)
9045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9046for as_dir in $PATH
9047do
9048  IFS=$as_save_IFS
9049  test -z "$as_dir" && as_dir=.
9050    for ac_exec_ext in '' $ac_executable_extensions; do
9051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9052    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9054    break 2
9055  fi
9056done
9057  done
9058IFS=$as_save_IFS
9059
9060  ;;
9061esac
9062fi
9063LS=$ac_cv_path_LS
9064if test -n "$LS"; then
9065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9066$as_echo "$LS" >&6; }
9067else
9068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
9070fi
9071
9072
9073  test -n "$LS" && break
9074done
9075
9076  else
9077    # The variable is set, but is it from the command line or the environment?
9078
9079    # Try to remove the string !LS! from our list.
9080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9082      # If it failed, the variable was not from the command line. Ignore it,
9083      # but warn the user (except for BASH, which is always set by the calling BASH).
9084      if test "xLS" != xBASH; then
9085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9086$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9087      fi
9088      # Try to locate tool using the code snippet
9089      for ac_prog in ls
9090do
9091  # Extract the first word of "$ac_prog", so it can be a program name with args.
9092set dummy $ac_prog; ac_word=$2
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9094$as_echo_n "checking for $ac_word... " >&6; }
9095if ${ac_cv_path_LS+:} false; then :
9096  $as_echo_n "(cached) " >&6
9097else
9098  case $LS in
9099  [\\/]* | ?:[\\/]*)
9100  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9101  ;;
9102  *)
9103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9104for as_dir in $PATH
9105do
9106  IFS=$as_save_IFS
9107  test -z "$as_dir" && as_dir=.
9108    for ac_exec_ext in '' $ac_executable_extensions; do
9109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9110    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9112    break 2
9113  fi
9114done
9115  done
9116IFS=$as_save_IFS
9117
9118  ;;
9119esac
9120fi
9121LS=$ac_cv_path_LS
9122if test -n "$LS"; then
9123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9124$as_echo "$LS" >&6; }
9125else
9126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9127$as_echo "no" >&6; }
9128fi
9129
9130
9131  test -n "$LS" && break
9132done
9133
9134    else
9135      # If it succeeded, then it was overridden by the user. We will use it
9136      # for the tool.
9137
9138      # First remove it from the list of overridden variables, so we can test
9139      # for unknown variables in the end.
9140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9141
9142      # Check if we try to supply an empty value
9143      if test "x$LS" = x; then
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9145$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9147$as_echo_n "checking for LS... " >&6; }
9148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9149$as_echo "disabled" >&6; }
9150      else
9151        # Check if the provided tool contains a complete path.
9152        tool_specified="$LS"
9153        tool_basename="${tool_specified##*/}"
9154        if test "x$tool_basename" = "x$tool_specified"; then
9155          # A command without a complete path is provided, search $PATH.
9156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9157$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9158          # Extract the first word of "$tool_basename", so it can be a program name with args.
9159set dummy $tool_basename; ac_word=$2
9160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9161$as_echo_n "checking for $ac_word... " >&6; }
9162if ${ac_cv_path_LS+:} false; then :
9163  $as_echo_n "(cached) " >&6
9164else
9165  case $LS in
9166  [\\/]* | ?:[\\/]*)
9167  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9168  ;;
9169  *)
9170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9171for as_dir in $PATH
9172do
9173  IFS=$as_save_IFS
9174  test -z "$as_dir" && as_dir=.
9175    for ac_exec_ext in '' $ac_executable_extensions; do
9176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9177    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9179    break 2
9180  fi
9181done
9182  done
9183IFS=$as_save_IFS
9184
9185  ;;
9186esac
9187fi
9188LS=$ac_cv_path_LS
9189if test -n "$LS"; then
9190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9191$as_echo "$LS" >&6; }
9192else
9193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
9195fi
9196
9197
9198          if test "x$LS" = x; then
9199            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9200          fi
9201        else
9202          # Otherwise we believe it is a complete path. Use it as it is.
9203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9204$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9205          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9206$as_echo_n "checking for LS... " >&6; }
9207          if test ! -x "$tool_specified"; then
9208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9209$as_echo "not found" >&6; }
9210            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9211          fi
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9213$as_echo "$tool_specified" >&6; }
9214        fi
9215      fi
9216    fi
9217
9218  fi
9219
9220
9221
9222  if test "x$LS" = x; then
9223    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9224  fi
9225
9226
9227
9228
9229
9230  # Publish this variable in the help.
9231
9232
9233  if [ -z "${MKDIR+x}" ]; then
9234    # The variable is not set by user, try to locate tool using the code snippet
9235    for ac_prog in mkdir
9236do
9237  # Extract the first word of "$ac_prog", so it can be a program name with args.
9238set dummy $ac_prog; ac_word=$2
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240$as_echo_n "checking for $ac_word... " >&6; }
9241if ${ac_cv_path_MKDIR+:} false; then :
9242  $as_echo_n "(cached) " >&6
9243else
9244  case $MKDIR in
9245  [\\/]* | ?:[\\/]*)
9246  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9247  ;;
9248  *)
9249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9250for as_dir in $PATH
9251do
9252  IFS=$as_save_IFS
9253  test -z "$as_dir" && as_dir=.
9254    for ac_exec_ext in '' $ac_executable_extensions; do
9255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9256    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9258    break 2
9259  fi
9260done
9261  done
9262IFS=$as_save_IFS
9263
9264  ;;
9265esac
9266fi
9267MKDIR=$ac_cv_path_MKDIR
9268if test -n "$MKDIR"; then
9269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9270$as_echo "$MKDIR" >&6; }
9271else
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
9274fi
9275
9276
9277  test -n "$MKDIR" && break
9278done
9279
9280  else
9281    # The variable is set, but is it from the command line or the environment?
9282
9283    # Try to remove the string !MKDIR! from our list.
9284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9286      # If it failed, the variable was not from the command line. Ignore it,
9287      # but warn the user (except for BASH, which is always set by the calling BASH).
9288      if test "xMKDIR" != xBASH; then
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9290$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9291      fi
9292      # Try to locate tool using the code snippet
9293      for ac_prog in mkdir
9294do
9295  # Extract the first word of "$ac_prog", so it can be a program name with args.
9296set dummy $ac_prog; ac_word=$2
9297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9298$as_echo_n "checking for $ac_word... " >&6; }
9299if ${ac_cv_path_MKDIR+:} false; then :
9300  $as_echo_n "(cached) " >&6
9301else
9302  case $MKDIR in
9303  [\\/]* | ?:[\\/]*)
9304  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9305  ;;
9306  *)
9307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9308for as_dir in $PATH
9309do
9310  IFS=$as_save_IFS
9311  test -z "$as_dir" && as_dir=.
9312    for ac_exec_ext in '' $ac_executable_extensions; do
9313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9314    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9316    break 2
9317  fi
9318done
9319  done
9320IFS=$as_save_IFS
9321
9322  ;;
9323esac
9324fi
9325MKDIR=$ac_cv_path_MKDIR
9326if test -n "$MKDIR"; then
9327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9328$as_echo "$MKDIR" >&6; }
9329else
9330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
9332fi
9333
9334
9335  test -n "$MKDIR" && break
9336done
9337
9338    else
9339      # If it succeeded, then it was overridden by the user. We will use it
9340      # for the tool.
9341
9342      # First remove it from the list of overridden variables, so we can test
9343      # for unknown variables in the end.
9344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9345
9346      # Check if we try to supply an empty value
9347      if test "x$MKDIR" = x; then
9348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9349$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9351$as_echo_n "checking for MKDIR... " >&6; }
9352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9353$as_echo "disabled" >&6; }
9354      else
9355        # Check if the provided tool contains a complete path.
9356        tool_specified="$MKDIR"
9357        tool_basename="${tool_specified##*/}"
9358        if test "x$tool_basename" = "x$tool_specified"; then
9359          # A command without a complete path is provided, search $PATH.
9360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9361$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9362          # Extract the first word of "$tool_basename", so it can be a program name with args.
9363set dummy $tool_basename; ac_word=$2
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9365$as_echo_n "checking for $ac_word... " >&6; }
9366if ${ac_cv_path_MKDIR+:} false; then :
9367  $as_echo_n "(cached) " >&6
9368else
9369  case $MKDIR in
9370  [\\/]* | ?:[\\/]*)
9371  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9372  ;;
9373  *)
9374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9375for as_dir in $PATH
9376do
9377  IFS=$as_save_IFS
9378  test -z "$as_dir" && as_dir=.
9379    for ac_exec_ext in '' $ac_executable_extensions; do
9380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9381    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9383    break 2
9384  fi
9385done
9386  done
9387IFS=$as_save_IFS
9388
9389  ;;
9390esac
9391fi
9392MKDIR=$ac_cv_path_MKDIR
9393if test -n "$MKDIR"; then
9394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9395$as_echo "$MKDIR" >&6; }
9396else
9397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398$as_echo "no" >&6; }
9399fi
9400
9401
9402          if test "x$MKDIR" = x; then
9403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9404          fi
9405        else
9406          # Otherwise we believe it is a complete path. Use it as it is.
9407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9408$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9410$as_echo_n "checking for MKDIR... " >&6; }
9411          if test ! -x "$tool_specified"; then
9412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9413$as_echo "not found" >&6; }
9414            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9415          fi
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9417$as_echo "$tool_specified" >&6; }
9418        fi
9419      fi
9420    fi
9421
9422  fi
9423
9424
9425
9426  if test "x$MKDIR" = x; then
9427    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9428  fi
9429
9430
9431
9432
9433
9434  # Publish this variable in the help.
9435
9436
9437  if [ -z "${MKTEMP+x}" ]; then
9438    # The variable is not set by user, try to locate tool using the code snippet
9439    for ac_prog in mktemp
9440do
9441  # Extract the first word of "$ac_prog", so it can be a program name with args.
9442set dummy $ac_prog; ac_word=$2
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444$as_echo_n "checking for $ac_word... " >&6; }
9445if ${ac_cv_path_MKTEMP+:} false; then :
9446  $as_echo_n "(cached) " >&6
9447else
9448  case $MKTEMP in
9449  [\\/]* | ?:[\\/]*)
9450  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9451  ;;
9452  *)
9453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9454for as_dir in $PATH
9455do
9456  IFS=$as_save_IFS
9457  test -z "$as_dir" && as_dir=.
9458    for ac_exec_ext in '' $ac_executable_extensions; do
9459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9460    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9462    break 2
9463  fi
9464done
9465  done
9466IFS=$as_save_IFS
9467
9468  ;;
9469esac
9470fi
9471MKTEMP=$ac_cv_path_MKTEMP
9472if test -n "$MKTEMP"; then
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9474$as_echo "$MKTEMP" >&6; }
9475else
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478fi
9479
9480
9481  test -n "$MKTEMP" && break
9482done
9483
9484  else
9485    # The variable is set, but is it from the command line or the environment?
9486
9487    # Try to remove the string !MKTEMP! from our list.
9488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9490      # If it failed, the variable was not from the command line. Ignore it,
9491      # but warn the user (except for BASH, which is always set by the calling BASH).
9492      if test "xMKTEMP" != xBASH; then
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9494$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9495      fi
9496      # Try to locate tool using the code snippet
9497      for ac_prog in mktemp
9498do
9499  # Extract the first word of "$ac_prog", so it can be a program name with args.
9500set dummy $ac_prog; ac_word=$2
9501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9502$as_echo_n "checking for $ac_word... " >&6; }
9503if ${ac_cv_path_MKTEMP+:} false; then :
9504  $as_echo_n "(cached) " >&6
9505else
9506  case $MKTEMP in
9507  [\\/]* | ?:[\\/]*)
9508  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9509  ;;
9510  *)
9511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  test -z "$as_dir" && as_dir=.
9516    for ac_exec_ext in '' $ac_executable_extensions; do
9517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9518    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9520    break 2
9521  fi
9522done
9523  done
9524IFS=$as_save_IFS
9525
9526  ;;
9527esac
9528fi
9529MKTEMP=$ac_cv_path_MKTEMP
9530if test -n "$MKTEMP"; then
9531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9532$as_echo "$MKTEMP" >&6; }
9533else
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
9536fi
9537
9538
9539  test -n "$MKTEMP" && break
9540done
9541
9542    else
9543      # If it succeeded, then it was overridden by the user. We will use it
9544      # for the tool.
9545
9546      # First remove it from the list of overridden variables, so we can test
9547      # for unknown variables in the end.
9548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9549
9550      # Check if we try to supply an empty value
9551      if test "x$MKTEMP" = x; then
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9553$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9555$as_echo_n "checking for MKTEMP... " >&6; }
9556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9557$as_echo "disabled" >&6; }
9558      else
9559        # Check if the provided tool contains a complete path.
9560        tool_specified="$MKTEMP"
9561        tool_basename="${tool_specified##*/}"
9562        if test "x$tool_basename" = "x$tool_specified"; then
9563          # A command without a complete path is provided, search $PATH.
9564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9565$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9566          # Extract the first word of "$tool_basename", so it can be a program name with args.
9567set dummy $tool_basename; ac_word=$2
9568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9569$as_echo_n "checking for $ac_word... " >&6; }
9570if ${ac_cv_path_MKTEMP+:} false; then :
9571  $as_echo_n "(cached) " >&6
9572else
9573  case $MKTEMP in
9574  [\\/]* | ?:[\\/]*)
9575  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9576  ;;
9577  *)
9578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9579for as_dir in $PATH
9580do
9581  IFS=$as_save_IFS
9582  test -z "$as_dir" && as_dir=.
9583    for ac_exec_ext in '' $ac_executable_extensions; do
9584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9585    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9587    break 2
9588  fi
9589done
9590  done
9591IFS=$as_save_IFS
9592
9593  ;;
9594esac
9595fi
9596MKTEMP=$ac_cv_path_MKTEMP
9597if test -n "$MKTEMP"; then
9598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9599$as_echo "$MKTEMP" >&6; }
9600else
9601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
9603fi
9604
9605
9606          if test "x$MKTEMP" = x; then
9607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9608          fi
9609        else
9610          # Otherwise we believe it is a complete path. Use it as it is.
9611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9612$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9614$as_echo_n "checking for MKTEMP... " >&6; }
9615          if test ! -x "$tool_specified"; then
9616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9617$as_echo "not found" >&6; }
9618            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9619          fi
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9621$as_echo "$tool_specified" >&6; }
9622        fi
9623      fi
9624    fi
9625
9626  fi
9627
9628
9629
9630  if test "x$MKTEMP" = x; then
9631    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9632  fi
9633
9634
9635
9636
9637
9638  # Publish this variable in the help.
9639
9640
9641  if [ -z "${MV+x}" ]; then
9642    # The variable is not set by user, try to locate tool using the code snippet
9643    for ac_prog in mv
9644do
9645  # Extract the first word of "$ac_prog", so it can be a program name with args.
9646set dummy $ac_prog; ac_word=$2
9647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9648$as_echo_n "checking for $ac_word... " >&6; }
9649if ${ac_cv_path_MV+:} false; then :
9650  $as_echo_n "(cached) " >&6
9651else
9652  case $MV in
9653  [\\/]* | ?:[\\/]*)
9654  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9655  ;;
9656  *)
9657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9658for as_dir in $PATH
9659do
9660  IFS=$as_save_IFS
9661  test -z "$as_dir" && as_dir=.
9662    for ac_exec_ext in '' $ac_executable_extensions; do
9663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9664    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9666    break 2
9667  fi
9668done
9669  done
9670IFS=$as_save_IFS
9671
9672  ;;
9673esac
9674fi
9675MV=$ac_cv_path_MV
9676if test -n "$MV"; then
9677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9678$as_echo "$MV" >&6; }
9679else
9680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681$as_echo "no" >&6; }
9682fi
9683
9684
9685  test -n "$MV" && break
9686done
9687
9688  else
9689    # The variable is set, but is it from the command line or the environment?
9690
9691    # Try to remove the string !MV! from our list.
9692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9694      # If it failed, the variable was not from the command line. Ignore it,
9695      # but warn the user (except for BASH, which is always set by the calling BASH).
9696      if test "xMV" != xBASH; then
9697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9698$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9699      fi
9700      # Try to locate tool using the code snippet
9701      for ac_prog in mv
9702do
9703  # Extract the first word of "$ac_prog", so it can be a program name with args.
9704set dummy $ac_prog; ac_word=$2
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9706$as_echo_n "checking for $ac_word... " >&6; }
9707if ${ac_cv_path_MV+:} false; then :
9708  $as_echo_n "(cached) " >&6
9709else
9710  case $MV in
9711  [\\/]* | ?:[\\/]*)
9712  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9713  ;;
9714  *)
9715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9716for as_dir in $PATH
9717do
9718  IFS=$as_save_IFS
9719  test -z "$as_dir" && as_dir=.
9720    for ac_exec_ext in '' $ac_executable_extensions; do
9721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9722    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9724    break 2
9725  fi
9726done
9727  done
9728IFS=$as_save_IFS
9729
9730  ;;
9731esac
9732fi
9733MV=$ac_cv_path_MV
9734if test -n "$MV"; then
9735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9736$as_echo "$MV" >&6; }
9737else
9738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
9740fi
9741
9742
9743  test -n "$MV" && break
9744done
9745
9746    else
9747      # If it succeeded, then it was overridden by the user. We will use it
9748      # for the tool.
9749
9750      # First remove it from the list of overridden variables, so we can test
9751      # for unknown variables in the end.
9752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9753
9754      # Check if we try to supply an empty value
9755      if test "x$MV" = x; then
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9757$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9759$as_echo_n "checking for MV... " >&6; }
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9761$as_echo "disabled" >&6; }
9762      else
9763        # Check if the provided tool contains a complete path.
9764        tool_specified="$MV"
9765        tool_basename="${tool_specified##*/}"
9766        if test "x$tool_basename" = "x$tool_specified"; then
9767          # A command without a complete path is provided, search $PATH.
9768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9769$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9770          # Extract the first word of "$tool_basename", so it can be a program name with args.
9771set dummy $tool_basename; ac_word=$2
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9773$as_echo_n "checking for $ac_word... " >&6; }
9774if ${ac_cv_path_MV+:} false; then :
9775  $as_echo_n "(cached) " >&6
9776else
9777  case $MV in
9778  [\\/]* | ?:[\\/]*)
9779  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9780  ;;
9781  *)
9782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9783for as_dir in $PATH
9784do
9785  IFS=$as_save_IFS
9786  test -z "$as_dir" && as_dir=.
9787    for ac_exec_ext in '' $ac_executable_extensions; do
9788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9789    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9791    break 2
9792  fi
9793done
9794  done
9795IFS=$as_save_IFS
9796
9797  ;;
9798esac
9799fi
9800MV=$ac_cv_path_MV
9801if test -n "$MV"; then
9802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9803$as_echo "$MV" >&6; }
9804else
9805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
9807fi
9808
9809
9810          if test "x$MV" = x; then
9811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9812          fi
9813        else
9814          # Otherwise we believe it is a complete path. Use it as it is.
9815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9816$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9818$as_echo_n "checking for MV... " >&6; }
9819          if test ! -x "$tool_specified"; then
9820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9821$as_echo "not found" >&6; }
9822            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9823          fi
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9825$as_echo "$tool_specified" >&6; }
9826        fi
9827      fi
9828    fi
9829
9830  fi
9831
9832
9833
9834  if test "x$MV" = x; then
9835    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9836  fi
9837
9838
9839
9840
9841
9842  # Publish this variable in the help.
9843
9844
9845  if [ -z "${NAWK+x}" ]; then
9846    # The variable is not set by user, try to locate tool using the code snippet
9847    for ac_prog in nawk gawk awk
9848do
9849  # Extract the first word of "$ac_prog", so it can be a program name with args.
9850set dummy $ac_prog; ac_word=$2
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852$as_echo_n "checking for $ac_word... " >&6; }
9853if ${ac_cv_path_NAWK+:} false; then :
9854  $as_echo_n "(cached) " >&6
9855else
9856  case $NAWK in
9857  [\\/]* | ?:[\\/]*)
9858  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9859  ;;
9860  *)
9861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862for as_dir in $PATH
9863do
9864  IFS=$as_save_IFS
9865  test -z "$as_dir" && as_dir=.
9866    for ac_exec_ext in '' $ac_executable_extensions; do
9867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9868    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870    break 2
9871  fi
9872done
9873  done
9874IFS=$as_save_IFS
9875
9876  ;;
9877esac
9878fi
9879NAWK=$ac_cv_path_NAWK
9880if test -n "$NAWK"; then
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9882$as_echo "$NAWK" >&6; }
9883else
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886fi
9887
9888
9889  test -n "$NAWK" && break
9890done
9891
9892  else
9893    # The variable is set, but is it from the command line or the environment?
9894
9895    # Try to remove the string !NAWK! from our list.
9896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9898      # If it failed, the variable was not from the command line. Ignore it,
9899      # but warn the user (except for BASH, which is always set by the calling BASH).
9900      if test "xNAWK" != xBASH; then
9901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9902$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9903      fi
9904      # Try to locate tool using the code snippet
9905      for ac_prog in nawk gawk awk
9906do
9907  # Extract the first word of "$ac_prog", so it can be a program name with args.
9908set dummy $ac_prog; ac_word=$2
9909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9910$as_echo_n "checking for $ac_word... " >&6; }
9911if ${ac_cv_path_NAWK+:} false; then :
9912  $as_echo_n "(cached) " >&6
9913else
9914  case $NAWK in
9915  [\\/]* | ?:[\\/]*)
9916  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9917  ;;
9918  *)
9919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9920for as_dir in $PATH
9921do
9922  IFS=$as_save_IFS
9923  test -z "$as_dir" && as_dir=.
9924    for ac_exec_ext in '' $ac_executable_extensions; do
9925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9926    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9928    break 2
9929  fi
9930done
9931  done
9932IFS=$as_save_IFS
9933
9934  ;;
9935esac
9936fi
9937NAWK=$ac_cv_path_NAWK
9938if test -n "$NAWK"; then
9939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9940$as_echo "$NAWK" >&6; }
9941else
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; }
9944fi
9945
9946
9947  test -n "$NAWK" && break
9948done
9949
9950    else
9951      # If it succeeded, then it was overridden by the user. We will use it
9952      # for the tool.
9953
9954      # First remove it from the list of overridden variables, so we can test
9955      # for unknown variables in the end.
9956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9957
9958      # Check if we try to supply an empty value
9959      if test "x$NAWK" = x; then
9960        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9961$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9963$as_echo_n "checking for NAWK... " >&6; }
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9965$as_echo "disabled" >&6; }
9966      else
9967        # Check if the provided tool contains a complete path.
9968        tool_specified="$NAWK"
9969        tool_basename="${tool_specified##*/}"
9970        if test "x$tool_basename" = "x$tool_specified"; then
9971          # A command without a complete path is provided, search $PATH.
9972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9973$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9974          # Extract the first word of "$tool_basename", so it can be a program name with args.
9975set dummy $tool_basename; ac_word=$2
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9977$as_echo_n "checking for $ac_word... " >&6; }
9978if ${ac_cv_path_NAWK+:} false; then :
9979  $as_echo_n "(cached) " >&6
9980else
9981  case $NAWK in
9982  [\\/]* | ?:[\\/]*)
9983  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9984  ;;
9985  *)
9986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987for as_dir in $PATH
9988do
9989  IFS=$as_save_IFS
9990  test -z "$as_dir" && as_dir=.
9991    for ac_exec_ext in '' $ac_executable_extensions; do
9992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9993    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995    break 2
9996  fi
9997done
9998  done
9999IFS=$as_save_IFS
10000
10001  ;;
10002esac
10003fi
10004NAWK=$ac_cv_path_NAWK
10005if test -n "$NAWK"; then
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10007$as_echo "$NAWK" >&6; }
10008else
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
10011fi
10012
10013
10014          if test "x$NAWK" = x; then
10015            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10016          fi
10017        else
10018          # Otherwise we believe it is a complete path. Use it as it is.
10019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10020$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10021          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10022$as_echo_n "checking for NAWK... " >&6; }
10023          if test ! -x "$tool_specified"; then
10024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10025$as_echo "not found" >&6; }
10026            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10027          fi
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10029$as_echo "$tool_specified" >&6; }
10030        fi
10031      fi
10032    fi
10033
10034  fi
10035
10036
10037
10038  if test "x$NAWK" = x; then
10039    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10040  fi
10041
10042
10043
10044
10045
10046  # Publish this variable in the help.
10047
10048
10049  if [ -z "${PRINTF+x}" ]; then
10050    # The variable is not set by user, try to locate tool using the code snippet
10051    for ac_prog in printf
10052do
10053  # Extract the first word of "$ac_prog", so it can be a program name with args.
10054set dummy $ac_prog; ac_word=$2
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056$as_echo_n "checking for $ac_word... " >&6; }
10057if ${ac_cv_path_PRINTF+:} false; then :
10058  $as_echo_n "(cached) " >&6
10059else
10060  case $PRINTF in
10061  [\\/]* | ?:[\\/]*)
10062  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10063  ;;
10064  *)
10065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10066for as_dir in $PATH
10067do
10068  IFS=$as_save_IFS
10069  test -z "$as_dir" && as_dir=.
10070    for ac_exec_ext in '' $ac_executable_extensions; do
10071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10072    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10074    break 2
10075  fi
10076done
10077  done
10078IFS=$as_save_IFS
10079
10080  ;;
10081esac
10082fi
10083PRINTF=$ac_cv_path_PRINTF
10084if test -n "$PRINTF"; then
10085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10086$as_echo "$PRINTF" >&6; }
10087else
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
10093  test -n "$PRINTF" && break
10094done
10095
10096  else
10097    # The variable is set, but is it from the command line or the environment?
10098
10099    # Try to remove the string !PRINTF! from our list.
10100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10102      # If it failed, the variable was not from the command line. Ignore it,
10103      # but warn the user (except for BASH, which is always set by the calling BASH).
10104      if test "xPRINTF" != xBASH; then
10105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10106$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10107      fi
10108      # Try to locate tool using the code snippet
10109      for ac_prog in printf
10110do
10111  # Extract the first word of "$ac_prog", so it can be a program name with args.
10112set dummy $ac_prog; ac_word=$2
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10114$as_echo_n "checking for $ac_word... " >&6; }
10115if ${ac_cv_path_PRINTF+:} false; then :
10116  $as_echo_n "(cached) " >&6
10117else
10118  case $PRINTF in
10119  [\\/]* | ?:[\\/]*)
10120  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10121  ;;
10122  *)
10123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10124for as_dir in $PATH
10125do
10126  IFS=$as_save_IFS
10127  test -z "$as_dir" && as_dir=.
10128    for ac_exec_ext in '' $ac_executable_extensions; do
10129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10130    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10132    break 2
10133  fi
10134done
10135  done
10136IFS=$as_save_IFS
10137
10138  ;;
10139esac
10140fi
10141PRINTF=$ac_cv_path_PRINTF
10142if test -n "$PRINTF"; then
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10144$as_echo "$PRINTF" >&6; }
10145else
10146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10147$as_echo "no" >&6; }
10148fi
10149
10150
10151  test -n "$PRINTF" && break
10152done
10153
10154    else
10155      # If it succeeded, then it was overridden by the user. We will use it
10156      # for the tool.
10157
10158      # First remove it from the list of overridden variables, so we can test
10159      # for unknown variables in the end.
10160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10161
10162      # Check if we try to supply an empty value
10163      if test "x$PRINTF" = x; then
10164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10165$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10167$as_echo_n "checking for PRINTF... " >&6; }
10168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10169$as_echo "disabled" >&6; }
10170      else
10171        # Check if the provided tool contains a complete path.
10172        tool_specified="$PRINTF"
10173        tool_basename="${tool_specified##*/}"
10174        if test "x$tool_basename" = "x$tool_specified"; then
10175          # A command without a complete path is provided, search $PATH.
10176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10177$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10178          # Extract the first word of "$tool_basename", so it can be a program name with args.
10179set dummy $tool_basename; ac_word=$2
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10181$as_echo_n "checking for $ac_word... " >&6; }
10182if ${ac_cv_path_PRINTF+:} false; then :
10183  $as_echo_n "(cached) " >&6
10184else
10185  case $PRINTF in
10186  [\\/]* | ?:[\\/]*)
10187  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10188  ;;
10189  *)
10190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10191for as_dir in $PATH
10192do
10193  IFS=$as_save_IFS
10194  test -z "$as_dir" && as_dir=.
10195    for ac_exec_ext in '' $ac_executable_extensions; do
10196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10197    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10199    break 2
10200  fi
10201done
10202  done
10203IFS=$as_save_IFS
10204
10205  ;;
10206esac
10207fi
10208PRINTF=$ac_cv_path_PRINTF
10209if test -n "$PRINTF"; then
10210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10211$as_echo "$PRINTF" >&6; }
10212else
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10214$as_echo "no" >&6; }
10215fi
10216
10217
10218          if test "x$PRINTF" = x; then
10219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10220          fi
10221        else
10222          # Otherwise we believe it is a complete path. Use it as it is.
10223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10224$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10226$as_echo_n "checking for PRINTF... " >&6; }
10227          if test ! -x "$tool_specified"; then
10228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10229$as_echo "not found" >&6; }
10230            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10231          fi
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10233$as_echo "$tool_specified" >&6; }
10234        fi
10235      fi
10236    fi
10237
10238  fi
10239
10240
10241
10242  if test "x$PRINTF" = x; then
10243    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10244  fi
10245
10246
10247
10248
10249
10250  # Publish this variable in the help.
10251
10252
10253  if [ -z "${RM+x}" ]; then
10254    # The variable is not set by user, try to locate tool using the code snippet
10255    for ac_prog in rm
10256do
10257  # Extract the first word of "$ac_prog", so it can be a program name with args.
10258set dummy $ac_prog; ac_word=$2
10259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10260$as_echo_n "checking for $ac_word... " >&6; }
10261if ${ac_cv_path_RM+:} false; then :
10262  $as_echo_n "(cached) " >&6
10263else
10264  case $RM in
10265  [\\/]* | ?:[\\/]*)
10266  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10267  ;;
10268  *)
10269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10270for as_dir in $PATH
10271do
10272  IFS=$as_save_IFS
10273  test -z "$as_dir" && as_dir=.
10274    for ac_exec_ext in '' $ac_executable_extensions; do
10275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10276    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10278    break 2
10279  fi
10280done
10281  done
10282IFS=$as_save_IFS
10283
10284  ;;
10285esac
10286fi
10287RM=$ac_cv_path_RM
10288if test -n "$RM"; then
10289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10290$as_echo "$RM" >&6; }
10291else
10292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10293$as_echo "no" >&6; }
10294fi
10295
10296
10297  test -n "$RM" && break
10298done
10299
10300  else
10301    # The variable is set, but is it from the command line or the environment?
10302
10303    # Try to remove the string !RM! from our list.
10304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10306      # If it failed, the variable was not from the command line. Ignore it,
10307      # but warn the user (except for BASH, which is always set by the calling BASH).
10308      if test "xRM" != xBASH; then
10309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10310$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10311      fi
10312      # Try to locate tool using the code snippet
10313      for ac_prog in rm
10314do
10315  # Extract the first word of "$ac_prog", so it can be a program name with args.
10316set dummy $ac_prog; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if ${ac_cv_path_RM+:} false; then :
10320  $as_echo_n "(cached) " >&6
10321else
10322  case $RM in
10323  [\\/]* | ?:[\\/]*)
10324  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10325  ;;
10326  *)
10327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330  IFS=$as_save_IFS
10331  test -z "$as_dir" && as_dir=.
10332    for ac_exec_ext in '' $ac_executable_extensions; do
10333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10334    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336    break 2
10337  fi
10338done
10339  done
10340IFS=$as_save_IFS
10341
10342  ;;
10343esac
10344fi
10345RM=$ac_cv_path_RM
10346if test -n "$RM"; then
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10348$as_echo "$RM" >&6; }
10349else
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
10352fi
10353
10354
10355  test -n "$RM" && break
10356done
10357
10358    else
10359      # If it succeeded, then it was overridden by the user. We will use it
10360      # for the tool.
10361
10362      # First remove it from the list of overridden variables, so we can test
10363      # for unknown variables in the end.
10364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10365
10366      # Check if we try to supply an empty value
10367      if test "x$RM" = x; then
10368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10369$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10371$as_echo_n "checking for RM... " >&6; }
10372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10373$as_echo "disabled" >&6; }
10374      else
10375        # Check if the provided tool contains a complete path.
10376        tool_specified="$RM"
10377        tool_basename="${tool_specified##*/}"
10378        if test "x$tool_basename" = "x$tool_specified"; then
10379          # A command without a complete path is provided, search $PATH.
10380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10381$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10382          # Extract the first word of "$tool_basename", so it can be a program name with args.
10383set dummy $tool_basename; ac_word=$2
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10385$as_echo_n "checking for $ac_word... " >&6; }
10386if ${ac_cv_path_RM+:} false; then :
10387  $as_echo_n "(cached) " >&6
10388else
10389  case $RM in
10390  [\\/]* | ?:[\\/]*)
10391  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10392  ;;
10393  *)
10394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10395for as_dir in $PATH
10396do
10397  IFS=$as_save_IFS
10398  test -z "$as_dir" && as_dir=.
10399    for ac_exec_ext in '' $ac_executable_extensions; do
10400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10401    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10403    break 2
10404  fi
10405done
10406  done
10407IFS=$as_save_IFS
10408
10409  ;;
10410esac
10411fi
10412RM=$ac_cv_path_RM
10413if test -n "$RM"; then
10414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10415$as_echo "$RM" >&6; }
10416else
10417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419fi
10420
10421
10422          if test "x$RM" = x; then
10423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10424          fi
10425        else
10426          # Otherwise we believe it is a complete path. Use it as it is.
10427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10428$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10430$as_echo_n "checking for RM... " >&6; }
10431          if test ! -x "$tool_specified"; then
10432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10433$as_echo "not found" >&6; }
10434            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10435          fi
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10437$as_echo "$tool_specified" >&6; }
10438        fi
10439      fi
10440    fi
10441
10442  fi
10443
10444
10445
10446  if test "x$RM" = x; then
10447    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10448  fi
10449
10450
10451
10452
10453
10454  # Publish this variable in the help.
10455
10456
10457  if [ -z "${RMDIR+x}" ]; then
10458    # The variable is not set by user, try to locate tool using the code snippet
10459    for ac_prog in rmdir
10460do
10461  # Extract the first word of "$ac_prog", so it can be a program name with args.
10462set dummy $ac_prog; ac_word=$2
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10464$as_echo_n "checking for $ac_word... " >&6; }
10465if ${ac_cv_path_RMDIR+:} false; then :
10466  $as_echo_n "(cached) " >&6
10467else
10468  case $RMDIR in
10469  [\\/]* | ?:[\\/]*)
10470  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10471  ;;
10472  *)
10473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10474for as_dir in $PATH
10475do
10476  IFS=$as_save_IFS
10477  test -z "$as_dir" && as_dir=.
10478    for ac_exec_ext in '' $ac_executable_extensions; do
10479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10480    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10482    break 2
10483  fi
10484done
10485  done
10486IFS=$as_save_IFS
10487
10488  ;;
10489esac
10490fi
10491RMDIR=$ac_cv_path_RMDIR
10492if test -n "$RMDIR"; then
10493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10494$as_echo "$RMDIR" >&6; }
10495else
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
10498fi
10499
10500
10501  test -n "$RMDIR" && break
10502done
10503
10504  else
10505    # The variable is set, but is it from the command line or the environment?
10506
10507    # Try to remove the string !RMDIR! from our list.
10508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10510      # If it failed, the variable was not from the command line. Ignore it,
10511      # but warn the user (except for BASH, which is always set by the calling BASH).
10512      if test "xRMDIR" != xBASH; then
10513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10514$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10515      fi
10516      # Try to locate tool using the code snippet
10517      for ac_prog in rmdir
10518do
10519  # Extract the first word of "$ac_prog", so it can be a program name with args.
10520set dummy $ac_prog; ac_word=$2
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10522$as_echo_n "checking for $ac_word... " >&6; }
10523if ${ac_cv_path_RMDIR+:} false; then :
10524  $as_echo_n "(cached) " >&6
10525else
10526  case $RMDIR in
10527  [\\/]* | ?:[\\/]*)
10528  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10529  ;;
10530  *)
10531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10532for as_dir in $PATH
10533do
10534  IFS=$as_save_IFS
10535  test -z "$as_dir" && as_dir=.
10536    for ac_exec_ext in '' $ac_executable_extensions; do
10537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10538    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10540    break 2
10541  fi
10542done
10543  done
10544IFS=$as_save_IFS
10545
10546  ;;
10547esac
10548fi
10549RMDIR=$ac_cv_path_RMDIR
10550if test -n "$RMDIR"; then
10551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10552$as_echo "$RMDIR" >&6; }
10553else
10554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10555$as_echo "no" >&6; }
10556fi
10557
10558
10559  test -n "$RMDIR" && break
10560done
10561
10562    else
10563      # If it succeeded, then it was overridden by the user. We will use it
10564      # for the tool.
10565
10566      # First remove it from the list of overridden variables, so we can test
10567      # for unknown variables in the end.
10568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10569
10570      # Check if we try to supply an empty value
10571      if test "x$RMDIR" = x; then
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10573$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10575$as_echo_n "checking for RMDIR... " >&6; }
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10577$as_echo "disabled" >&6; }
10578      else
10579        # Check if the provided tool contains a complete path.
10580        tool_specified="$RMDIR"
10581        tool_basename="${tool_specified##*/}"
10582        if test "x$tool_basename" = "x$tool_specified"; then
10583          # A command without a complete path is provided, search $PATH.
10584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10585$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10586          # Extract the first word of "$tool_basename", so it can be a program name with args.
10587set dummy $tool_basename; ac_word=$2
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10589$as_echo_n "checking for $ac_word... " >&6; }
10590if ${ac_cv_path_RMDIR+:} false; then :
10591  $as_echo_n "(cached) " >&6
10592else
10593  case $RMDIR in
10594  [\\/]* | ?:[\\/]*)
10595  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10596  ;;
10597  *)
10598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10599for as_dir in $PATH
10600do
10601  IFS=$as_save_IFS
10602  test -z "$as_dir" && as_dir=.
10603    for ac_exec_ext in '' $ac_executable_extensions; do
10604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10605    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10607    break 2
10608  fi
10609done
10610  done
10611IFS=$as_save_IFS
10612
10613  ;;
10614esac
10615fi
10616RMDIR=$ac_cv_path_RMDIR
10617if test -n "$RMDIR"; then
10618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10619$as_echo "$RMDIR" >&6; }
10620else
10621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
10623fi
10624
10625
10626          if test "x$RMDIR" = x; then
10627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10628          fi
10629        else
10630          # Otherwise we believe it is a complete path. Use it as it is.
10631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10632$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10634$as_echo_n "checking for RMDIR... " >&6; }
10635          if test ! -x "$tool_specified"; then
10636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10637$as_echo "not found" >&6; }
10638            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10639          fi
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10641$as_echo "$tool_specified" >&6; }
10642        fi
10643      fi
10644    fi
10645
10646  fi
10647
10648
10649
10650  if test "x$RMDIR" = x; then
10651    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10652  fi
10653
10654
10655
10656
10657
10658  # Publish this variable in the help.
10659
10660
10661  if [ -z "${SH+x}" ]; then
10662    # The variable is not set by user, try to locate tool using the code snippet
10663    for ac_prog in sh
10664do
10665  # Extract the first word of "$ac_prog", so it can be a program name with args.
10666set dummy $ac_prog; ac_word=$2
10667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10668$as_echo_n "checking for $ac_word... " >&6; }
10669if ${ac_cv_path_SH+:} false; then :
10670  $as_echo_n "(cached) " >&6
10671else
10672  case $SH in
10673  [\\/]* | ?:[\\/]*)
10674  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10675  ;;
10676  *)
10677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10678for as_dir in $PATH
10679do
10680  IFS=$as_save_IFS
10681  test -z "$as_dir" && as_dir=.
10682    for ac_exec_ext in '' $ac_executable_extensions; do
10683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10684    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10686    break 2
10687  fi
10688done
10689  done
10690IFS=$as_save_IFS
10691
10692  ;;
10693esac
10694fi
10695SH=$ac_cv_path_SH
10696if test -n "$SH"; then
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10698$as_echo "$SH" >&6; }
10699else
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10701$as_echo "no" >&6; }
10702fi
10703
10704
10705  test -n "$SH" && break
10706done
10707
10708  else
10709    # The variable is set, but is it from the command line or the environment?
10710
10711    # Try to remove the string !SH! from our list.
10712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10714      # If it failed, the variable was not from the command line. Ignore it,
10715      # but warn the user (except for BASH, which is always set by the calling BASH).
10716      if test "xSH" != xBASH; then
10717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10718$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10719      fi
10720      # Try to locate tool using the code snippet
10721      for ac_prog in sh
10722do
10723  # Extract the first word of "$ac_prog", so it can be a program name with args.
10724set dummy $ac_prog; ac_word=$2
10725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10726$as_echo_n "checking for $ac_word... " >&6; }
10727if ${ac_cv_path_SH+:} false; then :
10728  $as_echo_n "(cached) " >&6
10729else
10730  case $SH in
10731  [\\/]* | ?:[\\/]*)
10732  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10733  ;;
10734  *)
10735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10736for as_dir in $PATH
10737do
10738  IFS=$as_save_IFS
10739  test -z "$as_dir" && as_dir=.
10740    for ac_exec_ext in '' $ac_executable_extensions; do
10741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10742    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10744    break 2
10745  fi
10746done
10747  done
10748IFS=$as_save_IFS
10749
10750  ;;
10751esac
10752fi
10753SH=$ac_cv_path_SH
10754if test -n "$SH"; then
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10756$as_echo "$SH" >&6; }
10757else
10758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759$as_echo "no" >&6; }
10760fi
10761
10762
10763  test -n "$SH" && break
10764done
10765
10766    else
10767      # If it succeeded, then it was overridden by the user. We will use it
10768      # for the tool.
10769
10770      # First remove it from the list of overridden variables, so we can test
10771      # for unknown variables in the end.
10772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10773
10774      # Check if we try to supply an empty value
10775      if test "x$SH" = x; then
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10777$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10779$as_echo_n "checking for SH... " >&6; }
10780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10781$as_echo "disabled" >&6; }
10782      else
10783        # Check if the provided tool contains a complete path.
10784        tool_specified="$SH"
10785        tool_basename="${tool_specified##*/}"
10786        if test "x$tool_basename" = "x$tool_specified"; then
10787          # A command without a complete path is provided, search $PATH.
10788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10789$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10790          # Extract the first word of "$tool_basename", so it can be a program name with args.
10791set dummy $tool_basename; ac_word=$2
10792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10793$as_echo_n "checking for $ac_word... " >&6; }
10794if ${ac_cv_path_SH+:} false; then :
10795  $as_echo_n "(cached) " >&6
10796else
10797  case $SH in
10798  [\\/]* | ?:[\\/]*)
10799  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10800  ;;
10801  *)
10802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10803for as_dir in $PATH
10804do
10805  IFS=$as_save_IFS
10806  test -z "$as_dir" && as_dir=.
10807    for ac_exec_ext in '' $ac_executable_extensions; do
10808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10809    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10811    break 2
10812  fi
10813done
10814  done
10815IFS=$as_save_IFS
10816
10817  ;;
10818esac
10819fi
10820SH=$ac_cv_path_SH
10821if test -n "$SH"; then
10822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10823$as_echo "$SH" >&6; }
10824else
10825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826$as_echo "no" >&6; }
10827fi
10828
10829
10830          if test "x$SH" = x; then
10831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10832          fi
10833        else
10834          # Otherwise we believe it is a complete path. Use it as it is.
10835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10836$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10838$as_echo_n "checking for SH... " >&6; }
10839          if test ! -x "$tool_specified"; then
10840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10841$as_echo "not found" >&6; }
10842            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10843          fi
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10845$as_echo "$tool_specified" >&6; }
10846        fi
10847      fi
10848    fi
10849
10850  fi
10851
10852
10853
10854  if test "x$SH" = x; then
10855    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10856  fi
10857
10858
10859
10860
10861
10862  # Publish this variable in the help.
10863
10864
10865  if [ -z "${SORT+x}" ]; then
10866    # The variable is not set by user, try to locate tool using the code snippet
10867    for ac_prog in sort
10868do
10869  # Extract the first word of "$ac_prog", so it can be a program name with args.
10870set dummy $ac_prog; ac_word=$2
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10872$as_echo_n "checking for $ac_word... " >&6; }
10873if ${ac_cv_path_SORT+:} false; then :
10874  $as_echo_n "(cached) " >&6
10875else
10876  case $SORT in
10877  [\\/]* | ?:[\\/]*)
10878  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10879  ;;
10880  *)
10881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10882for as_dir in $PATH
10883do
10884  IFS=$as_save_IFS
10885  test -z "$as_dir" && as_dir=.
10886    for ac_exec_ext in '' $ac_executable_extensions; do
10887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10888    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10890    break 2
10891  fi
10892done
10893  done
10894IFS=$as_save_IFS
10895
10896  ;;
10897esac
10898fi
10899SORT=$ac_cv_path_SORT
10900if test -n "$SORT"; then
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10902$as_echo "$SORT" >&6; }
10903else
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10905$as_echo "no" >&6; }
10906fi
10907
10908
10909  test -n "$SORT" && break
10910done
10911
10912  else
10913    # The variable is set, but is it from the command line or the environment?
10914
10915    # Try to remove the string !SORT! from our list.
10916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10918      # If it failed, the variable was not from the command line. Ignore it,
10919      # but warn the user (except for BASH, which is always set by the calling BASH).
10920      if test "xSORT" != xBASH; then
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10922$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10923      fi
10924      # Try to locate tool using the code snippet
10925      for ac_prog in sort
10926do
10927  # Extract the first word of "$ac_prog", so it can be a program name with args.
10928set dummy $ac_prog; ac_word=$2
10929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10930$as_echo_n "checking for $ac_word... " >&6; }
10931if ${ac_cv_path_SORT+:} false; then :
10932  $as_echo_n "(cached) " >&6
10933else
10934  case $SORT in
10935  [\\/]* | ?:[\\/]*)
10936  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10937  ;;
10938  *)
10939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10940for as_dir in $PATH
10941do
10942  IFS=$as_save_IFS
10943  test -z "$as_dir" && as_dir=.
10944    for ac_exec_ext in '' $ac_executable_extensions; do
10945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10946    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10948    break 2
10949  fi
10950done
10951  done
10952IFS=$as_save_IFS
10953
10954  ;;
10955esac
10956fi
10957SORT=$ac_cv_path_SORT
10958if test -n "$SORT"; then
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10960$as_echo "$SORT" >&6; }
10961else
10962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
10964fi
10965
10966
10967  test -n "$SORT" && break
10968done
10969
10970    else
10971      # If it succeeded, then it was overridden by the user. We will use it
10972      # for the tool.
10973
10974      # First remove it from the list of overridden variables, so we can test
10975      # for unknown variables in the end.
10976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10977
10978      # Check if we try to supply an empty value
10979      if test "x$SORT" = x; then
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10981$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10983$as_echo_n "checking for SORT... " >&6; }
10984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10985$as_echo "disabled" >&6; }
10986      else
10987        # Check if the provided tool contains a complete path.
10988        tool_specified="$SORT"
10989        tool_basename="${tool_specified##*/}"
10990        if test "x$tool_basename" = "x$tool_specified"; then
10991          # A command without a complete path is provided, search $PATH.
10992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10993$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10994          # Extract the first word of "$tool_basename", so it can be a program name with args.
10995set dummy $tool_basename; ac_word=$2
10996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10997$as_echo_n "checking for $ac_word... " >&6; }
10998if ${ac_cv_path_SORT+:} false; then :
10999  $as_echo_n "(cached) " >&6
11000else
11001  case $SORT in
11002  [\\/]* | ?:[\\/]*)
11003  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11004  ;;
11005  *)
11006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11007for as_dir in $PATH
11008do
11009  IFS=$as_save_IFS
11010  test -z "$as_dir" && as_dir=.
11011    for ac_exec_ext in '' $ac_executable_extensions; do
11012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11013    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11015    break 2
11016  fi
11017done
11018  done
11019IFS=$as_save_IFS
11020
11021  ;;
11022esac
11023fi
11024SORT=$ac_cv_path_SORT
11025if test -n "$SORT"; then
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11027$as_echo "$SORT" >&6; }
11028else
11029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
11031fi
11032
11033
11034          if test "x$SORT" = x; then
11035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11036          fi
11037        else
11038          # Otherwise we believe it is a complete path. Use it as it is.
11039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11040$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11042$as_echo_n "checking for SORT... " >&6; }
11043          if test ! -x "$tool_specified"; then
11044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11045$as_echo "not found" >&6; }
11046            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11047          fi
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11049$as_echo "$tool_specified" >&6; }
11050        fi
11051      fi
11052    fi
11053
11054  fi
11055
11056
11057
11058  if test "x$SORT" = x; then
11059    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11060  fi
11061
11062
11063
11064
11065
11066  # Publish this variable in the help.
11067
11068
11069  if [ -z "${TAIL+x}" ]; then
11070    # The variable is not set by user, try to locate tool using the code snippet
11071    for ac_prog in tail
11072do
11073  # Extract the first word of "$ac_prog", so it can be a program name with args.
11074set dummy $ac_prog; ac_word=$2
11075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11076$as_echo_n "checking for $ac_word... " >&6; }
11077if ${ac_cv_path_TAIL+:} false; then :
11078  $as_echo_n "(cached) " >&6
11079else
11080  case $TAIL in
11081  [\\/]* | ?:[\\/]*)
11082  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11083  ;;
11084  *)
11085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11086for as_dir in $PATH
11087do
11088  IFS=$as_save_IFS
11089  test -z "$as_dir" && as_dir=.
11090    for ac_exec_ext in '' $ac_executable_extensions; do
11091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11092    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11094    break 2
11095  fi
11096done
11097  done
11098IFS=$as_save_IFS
11099
11100  ;;
11101esac
11102fi
11103TAIL=$ac_cv_path_TAIL
11104if test -n "$TAIL"; then
11105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11106$as_echo "$TAIL" >&6; }
11107else
11108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11109$as_echo "no" >&6; }
11110fi
11111
11112
11113  test -n "$TAIL" && break
11114done
11115
11116  else
11117    # The variable is set, but is it from the command line or the environment?
11118
11119    # Try to remove the string !TAIL! from our list.
11120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11122      # If it failed, the variable was not from the command line. Ignore it,
11123      # but warn the user (except for BASH, which is always set by the calling BASH).
11124      if test "xTAIL" != xBASH; then
11125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11126$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11127      fi
11128      # Try to locate tool using the code snippet
11129      for ac_prog in tail
11130do
11131  # Extract the first word of "$ac_prog", so it can be a program name with args.
11132set dummy $ac_prog; ac_word=$2
11133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11134$as_echo_n "checking for $ac_word... " >&6; }
11135if ${ac_cv_path_TAIL+:} false; then :
11136  $as_echo_n "(cached) " >&6
11137else
11138  case $TAIL in
11139  [\\/]* | ?:[\\/]*)
11140  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11141  ;;
11142  *)
11143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11144for as_dir in $PATH
11145do
11146  IFS=$as_save_IFS
11147  test -z "$as_dir" && as_dir=.
11148    for ac_exec_ext in '' $ac_executable_extensions; do
11149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11150    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11152    break 2
11153  fi
11154done
11155  done
11156IFS=$as_save_IFS
11157
11158  ;;
11159esac
11160fi
11161TAIL=$ac_cv_path_TAIL
11162if test -n "$TAIL"; then
11163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11164$as_echo "$TAIL" >&6; }
11165else
11166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167$as_echo "no" >&6; }
11168fi
11169
11170
11171  test -n "$TAIL" && break
11172done
11173
11174    else
11175      # If it succeeded, then it was overridden by the user. We will use it
11176      # for the tool.
11177
11178      # First remove it from the list of overridden variables, so we can test
11179      # for unknown variables in the end.
11180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11181
11182      # Check if we try to supply an empty value
11183      if test "x$TAIL" = x; then
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11185$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11187$as_echo_n "checking for TAIL... " >&6; }
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11189$as_echo "disabled" >&6; }
11190      else
11191        # Check if the provided tool contains a complete path.
11192        tool_specified="$TAIL"
11193        tool_basename="${tool_specified##*/}"
11194        if test "x$tool_basename" = "x$tool_specified"; then
11195          # A command without a complete path is provided, search $PATH.
11196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11197$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11198          # Extract the first word of "$tool_basename", so it can be a program name with args.
11199set dummy $tool_basename; ac_word=$2
11200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11201$as_echo_n "checking for $ac_word... " >&6; }
11202if ${ac_cv_path_TAIL+:} false; then :
11203  $as_echo_n "(cached) " >&6
11204else
11205  case $TAIL in
11206  [\\/]* | ?:[\\/]*)
11207  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11208  ;;
11209  *)
11210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11211for as_dir in $PATH
11212do
11213  IFS=$as_save_IFS
11214  test -z "$as_dir" && as_dir=.
11215    for ac_exec_ext in '' $ac_executable_extensions; do
11216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11217    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11219    break 2
11220  fi
11221done
11222  done
11223IFS=$as_save_IFS
11224
11225  ;;
11226esac
11227fi
11228TAIL=$ac_cv_path_TAIL
11229if test -n "$TAIL"; then
11230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11231$as_echo "$TAIL" >&6; }
11232else
11233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11234$as_echo "no" >&6; }
11235fi
11236
11237
11238          if test "x$TAIL" = x; then
11239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11240          fi
11241        else
11242          # Otherwise we believe it is a complete path. Use it as it is.
11243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11244$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11246$as_echo_n "checking for TAIL... " >&6; }
11247          if test ! -x "$tool_specified"; then
11248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11249$as_echo "not found" >&6; }
11250            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11251          fi
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11253$as_echo "$tool_specified" >&6; }
11254        fi
11255      fi
11256    fi
11257
11258  fi
11259
11260
11261
11262  if test "x$TAIL" = x; then
11263    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11264  fi
11265
11266
11267
11268
11269
11270  # Publish this variable in the help.
11271
11272
11273  if [ -z "${TAR+x}" ]; then
11274    # The variable is not set by user, try to locate tool using the code snippet
11275    for ac_prog in gtar tar
11276do
11277  # Extract the first word of "$ac_prog", so it can be a program name with args.
11278set dummy $ac_prog; ac_word=$2
11279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11280$as_echo_n "checking for $ac_word... " >&6; }
11281if ${ac_cv_path_TAR+:} false; then :
11282  $as_echo_n "(cached) " >&6
11283else
11284  case $TAR in
11285  [\\/]* | ?:[\\/]*)
11286  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11287  ;;
11288  *)
11289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11290for as_dir in $PATH
11291do
11292  IFS=$as_save_IFS
11293  test -z "$as_dir" && as_dir=.
11294    for ac_exec_ext in '' $ac_executable_extensions; do
11295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11296    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11298    break 2
11299  fi
11300done
11301  done
11302IFS=$as_save_IFS
11303
11304  ;;
11305esac
11306fi
11307TAR=$ac_cv_path_TAR
11308if test -n "$TAR"; then
11309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11310$as_echo "$TAR" >&6; }
11311else
11312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314fi
11315
11316
11317  test -n "$TAR" && break
11318done
11319
11320  else
11321    # The variable is set, but is it from the command line or the environment?
11322
11323    # Try to remove the string !TAR! from our list.
11324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11326      # If it failed, the variable was not from the command line. Ignore it,
11327      # but warn the user (except for BASH, which is always set by the calling BASH).
11328      if test "xTAR" != xBASH; then
11329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11330$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11331      fi
11332      # Try to locate tool using the code snippet
11333      for ac_prog in gtar tar
11334do
11335  # Extract the first word of "$ac_prog", so it can be a program name with args.
11336set dummy $ac_prog; ac_word=$2
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11338$as_echo_n "checking for $ac_word... " >&6; }
11339if ${ac_cv_path_TAR+:} false; then :
11340  $as_echo_n "(cached) " >&6
11341else
11342  case $TAR in
11343  [\\/]* | ?:[\\/]*)
11344  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11345  ;;
11346  *)
11347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11348for as_dir in $PATH
11349do
11350  IFS=$as_save_IFS
11351  test -z "$as_dir" && as_dir=.
11352    for ac_exec_ext in '' $ac_executable_extensions; do
11353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11354    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11356    break 2
11357  fi
11358done
11359  done
11360IFS=$as_save_IFS
11361
11362  ;;
11363esac
11364fi
11365TAR=$ac_cv_path_TAR
11366if test -n "$TAR"; then
11367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11368$as_echo "$TAR" >&6; }
11369else
11370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
11372fi
11373
11374
11375  test -n "$TAR" && break
11376done
11377
11378    else
11379      # If it succeeded, then it was overridden by the user. We will use it
11380      # for the tool.
11381
11382      # First remove it from the list of overridden variables, so we can test
11383      # for unknown variables in the end.
11384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11385
11386      # Check if we try to supply an empty value
11387      if test "x$TAR" = x; then
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11389$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11391$as_echo_n "checking for TAR... " >&6; }
11392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11393$as_echo "disabled" >&6; }
11394      else
11395        # Check if the provided tool contains a complete path.
11396        tool_specified="$TAR"
11397        tool_basename="${tool_specified##*/}"
11398        if test "x$tool_basename" = "x$tool_specified"; then
11399          # A command without a complete path is provided, search $PATH.
11400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11401$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11402          # Extract the first word of "$tool_basename", so it can be a program name with args.
11403set dummy $tool_basename; ac_word=$2
11404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11405$as_echo_n "checking for $ac_word... " >&6; }
11406if ${ac_cv_path_TAR+:} false; then :
11407  $as_echo_n "(cached) " >&6
11408else
11409  case $TAR in
11410  [\\/]* | ?:[\\/]*)
11411  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11412  ;;
11413  *)
11414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11415for as_dir in $PATH
11416do
11417  IFS=$as_save_IFS
11418  test -z "$as_dir" && as_dir=.
11419    for ac_exec_ext in '' $ac_executable_extensions; do
11420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11421    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11423    break 2
11424  fi
11425done
11426  done
11427IFS=$as_save_IFS
11428
11429  ;;
11430esac
11431fi
11432TAR=$ac_cv_path_TAR
11433if test -n "$TAR"; then
11434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11435$as_echo "$TAR" >&6; }
11436else
11437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
11439fi
11440
11441
11442          if test "x$TAR" = x; then
11443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11444          fi
11445        else
11446          # Otherwise we believe it is a complete path. Use it as it is.
11447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11448$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11450$as_echo_n "checking for TAR... " >&6; }
11451          if test ! -x "$tool_specified"; then
11452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11453$as_echo "not found" >&6; }
11454            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11455          fi
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11457$as_echo "$tool_specified" >&6; }
11458        fi
11459      fi
11460    fi
11461
11462  fi
11463
11464
11465
11466  if test "x$TAR" = x; then
11467    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11468  fi
11469
11470
11471
11472
11473
11474  # Publish this variable in the help.
11475
11476
11477  if [ -z "${TEE+x}" ]; then
11478    # The variable is not set by user, try to locate tool using the code snippet
11479    for ac_prog in tee
11480do
11481  # Extract the first word of "$ac_prog", so it can be a program name with args.
11482set dummy $ac_prog; ac_word=$2
11483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11484$as_echo_n "checking for $ac_word... " >&6; }
11485if ${ac_cv_path_TEE+:} false; then :
11486  $as_echo_n "(cached) " >&6
11487else
11488  case $TEE in
11489  [\\/]* | ?:[\\/]*)
11490  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11491  ;;
11492  *)
11493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11494for as_dir in $PATH
11495do
11496  IFS=$as_save_IFS
11497  test -z "$as_dir" && as_dir=.
11498    for ac_exec_ext in '' $ac_executable_extensions; do
11499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11500    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11502    break 2
11503  fi
11504done
11505  done
11506IFS=$as_save_IFS
11507
11508  ;;
11509esac
11510fi
11511TEE=$ac_cv_path_TEE
11512if test -n "$TEE"; then
11513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11514$as_echo "$TEE" >&6; }
11515else
11516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11517$as_echo "no" >&6; }
11518fi
11519
11520
11521  test -n "$TEE" && break
11522done
11523
11524  else
11525    # The variable is set, but is it from the command line or the environment?
11526
11527    # Try to remove the string !TEE! from our list.
11528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11530      # If it failed, the variable was not from the command line. Ignore it,
11531      # but warn the user (except for BASH, which is always set by the calling BASH).
11532      if test "xTEE" != xBASH; then
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11534$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11535      fi
11536      # Try to locate tool using the code snippet
11537      for ac_prog in tee
11538do
11539  # Extract the first word of "$ac_prog", so it can be a program name with args.
11540set dummy $ac_prog; ac_word=$2
11541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11542$as_echo_n "checking for $ac_word... " >&6; }
11543if ${ac_cv_path_TEE+:} false; then :
11544  $as_echo_n "(cached) " >&6
11545else
11546  case $TEE in
11547  [\\/]* | ?:[\\/]*)
11548  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11549  ;;
11550  *)
11551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11552for as_dir in $PATH
11553do
11554  IFS=$as_save_IFS
11555  test -z "$as_dir" && as_dir=.
11556    for ac_exec_ext in '' $ac_executable_extensions; do
11557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11558    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11560    break 2
11561  fi
11562done
11563  done
11564IFS=$as_save_IFS
11565
11566  ;;
11567esac
11568fi
11569TEE=$ac_cv_path_TEE
11570if test -n "$TEE"; then
11571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11572$as_echo "$TEE" >&6; }
11573else
11574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
11576fi
11577
11578
11579  test -n "$TEE" && break
11580done
11581
11582    else
11583      # If it succeeded, then it was overridden by the user. We will use it
11584      # for the tool.
11585
11586      # First remove it from the list of overridden variables, so we can test
11587      # for unknown variables in the end.
11588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11589
11590      # Check if we try to supply an empty value
11591      if test "x$TEE" = x; then
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11593$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11595$as_echo_n "checking for TEE... " >&6; }
11596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11597$as_echo "disabled" >&6; }
11598      else
11599        # Check if the provided tool contains a complete path.
11600        tool_specified="$TEE"
11601        tool_basename="${tool_specified##*/}"
11602        if test "x$tool_basename" = "x$tool_specified"; then
11603          # A command without a complete path is provided, search $PATH.
11604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11605$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11606          # Extract the first word of "$tool_basename", so it can be a program name with args.
11607set dummy $tool_basename; ac_word=$2
11608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11609$as_echo_n "checking for $ac_word... " >&6; }
11610if ${ac_cv_path_TEE+:} false; then :
11611  $as_echo_n "(cached) " >&6
11612else
11613  case $TEE in
11614  [\\/]* | ?:[\\/]*)
11615  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11616  ;;
11617  *)
11618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11619for as_dir in $PATH
11620do
11621  IFS=$as_save_IFS
11622  test -z "$as_dir" && as_dir=.
11623    for ac_exec_ext in '' $ac_executable_extensions; do
11624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11625    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11627    break 2
11628  fi
11629done
11630  done
11631IFS=$as_save_IFS
11632
11633  ;;
11634esac
11635fi
11636TEE=$ac_cv_path_TEE
11637if test -n "$TEE"; then
11638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11639$as_echo "$TEE" >&6; }
11640else
11641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11642$as_echo "no" >&6; }
11643fi
11644
11645
11646          if test "x$TEE" = x; then
11647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11648          fi
11649        else
11650          # Otherwise we believe it is a complete path. Use it as it is.
11651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11652$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11654$as_echo_n "checking for TEE... " >&6; }
11655          if test ! -x "$tool_specified"; then
11656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11657$as_echo "not found" >&6; }
11658            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11659          fi
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11661$as_echo "$tool_specified" >&6; }
11662        fi
11663      fi
11664    fi
11665
11666  fi
11667
11668
11669
11670  if test "x$TEE" = x; then
11671    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11672  fi
11673
11674
11675
11676
11677
11678  # Publish this variable in the help.
11679
11680
11681  if [ -z "${TOUCH+x}" ]; then
11682    # The variable is not set by user, try to locate tool using the code snippet
11683    for ac_prog in touch
11684do
11685  # Extract the first word of "$ac_prog", so it can be a program name with args.
11686set dummy $ac_prog; ac_word=$2
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11688$as_echo_n "checking for $ac_word... " >&6; }
11689if ${ac_cv_path_TOUCH+:} false; then :
11690  $as_echo_n "(cached) " >&6
11691else
11692  case $TOUCH in
11693  [\\/]* | ?:[\\/]*)
11694  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11695  ;;
11696  *)
11697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11698for as_dir in $PATH
11699do
11700  IFS=$as_save_IFS
11701  test -z "$as_dir" && as_dir=.
11702    for ac_exec_ext in '' $ac_executable_extensions; do
11703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11704    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11706    break 2
11707  fi
11708done
11709  done
11710IFS=$as_save_IFS
11711
11712  ;;
11713esac
11714fi
11715TOUCH=$ac_cv_path_TOUCH
11716if test -n "$TOUCH"; then
11717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11718$as_echo "$TOUCH" >&6; }
11719else
11720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11721$as_echo "no" >&6; }
11722fi
11723
11724
11725  test -n "$TOUCH" && break
11726done
11727
11728  else
11729    # The variable is set, but is it from the command line or the environment?
11730
11731    # Try to remove the string !TOUCH! from our list.
11732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11734      # If it failed, the variable was not from the command line. Ignore it,
11735      # but warn the user (except for BASH, which is always set by the calling BASH).
11736      if test "xTOUCH" != xBASH; then
11737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11738$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11739      fi
11740      # Try to locate tool using the code snippet
11741      for ac_prog in touch
11742do
11743  # Extract the first word of "$ac_prog", so it can be a program name with args.
11744set dummy $ac_prog; ac_word=$2
11745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746$as_echo_n "checking for $ac_word... " >&6; }
11747if ${ac_cv_path_TOUCH+:} false; then :
11748  $as_echo_n "(cached) " >&6
11749else
11750  case $TOUCH in
11751  [\\/]* | ?:[\\/]*)
11752  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11753  ;;
11754  *)
11755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11756for as_dir in $PATH
11757do
11758  IFS=$as_save_IFS
11759  test -z "$as_dir" && as_dir=.
11760    for ac_exec_ext in '' $ac_executable_extensions; do
11761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11762    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11764    break 2
11765  fi
11766done
11767  done
11768IFS=$as_save_IFS
11769
11770  ;;
11771esac
11772fi
11773TOUCH=$ac_cv_path_TOUCH
11774if test -n "$TOUCH"; then
11775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11776$as_echo "$TOUCH" >&6; }
11777else
11778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
11780fi
11781
11782
11783  test -n "$TOUCH" && break
11784done
11785
11786    else
11787      # If it succeeded, then it was overridden by the user. We will use it
11788      # for the tool.
11789
11790      # First remove it from the list of overridden variables, so we can test
11791      # for unknown variables in the end.
11792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11793
11794      # Check if we try to supply an empty value
11795      if test "x$TOUCH" = x; then
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11797$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11799$as_echo_n "checking for TOUCH... " >&6; }
11800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11801$as_echo "disabled" >&6; }
11802      else
11803        # Check if the provided tool contains a complete path.
11804        tool_specified="$TOUCH"
11805        tool_basename="${tool_specified##*/}"
11806        if test "x$tool_basename" = "x$tool_specified"; then
11807          # A command without a complete path is provided, search $PATH.
11808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11809$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11810          # Extract the first word of "$tool_basename", so it can be a program name with args.
11811set dummy $tool_basename; ac_word=$2
11812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11813$as_echo_n "checking for $ac_word... " >&6; }
11814if ${ac_cv_path_TOUCH+:} false; then :
11815  $as_echo_n "(cached) " >&6
11816else
11817  case $TOUCH in
11818  [\\/]* | ?:[\\/]*)
11819  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11820  ;;
11821  *)
11822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11823for as_dir in $PATH
11824do
11825  IFS=$as_save_IFS
11826  test -z "$as_dir" && as_dir=.
11827    for ac_exec_ext in '' $ac_executable_extensions; do
11828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11829    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11831    break 2
11832  fi
11833done
11834  done
11835IFS=$as_save_IFS
11836
11837  ;;
11838esac
11839fi
11840TOUCH=$ac_cv_path_TOUCH
11841if test -n "$TOUCH"; then
11842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11843$as_echo "$TOUCH" >&6; }
11844else
11845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11846$as_echo "no" >&6; }
11847fi
11848
11849
11850          if test "x$TOUCH" = x; then
11851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11852          fi
11853        else
11854          # Otherwise we believe it is a complete path. Use it as it is.
11855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11856$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11858$as_echo_n "checking for TOUCH... " >&6; }
11859          if test ! -x "$tool_specified"; then
11860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11861$as_echo "not found" >&6; }
11862            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11863          fi
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11865$as_echo "$tool_specified" >&6; }
11866        fi
11867      fi
11868    fi
11869
11870  fi
11871
11872
11873
11874  if test "x$TOUCH" = x; then
11875    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11876  fi
11877
11878
11879
11880
11881
11882  # Publish this variable in the help.
11883
11884
11885  if [ -z "${TR+x}" ]; then
11886    # The variable is not set by user, try to locate tool using the code snippet
11887    for ac_prog in tr
11888do
11889  # Extract the first word of "$ac_prog", so it can be a program name with args.
11890set dummy $ac_prog; ac_word=$2
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11892$as_echo_n "checking for $ac_word... " >&6; }
11893if ${ac_cv_path_TR+:} false; then :
11894  $as_echo_n "(cached) " >&6
11895else
11896  case $TR in
11897  [\\/]* | ?:[\\/]*)
11898  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11899  ;;
11900  *)
11901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11902for as_dir in $PATH
11903do
11904  IFS=$as_save_IFS
11905  test -z "$as_dir" && as_dir=.
11906    for ac_exec_ext in '' $ac_executable_extensions; do
11907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11908    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11910    break 2
11911  fi
11912done
11913  done
11914IFS=$as_save_IFS
11915
11916  ;;
11917esac
11918fi
11919TR=$ac_cv_path_TR
11920if test -n "$TR"; then
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11922$as_echo "$TR" >&6; }
11923else
11924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11925$as_echo "no" >&6; }
11926fi
11927
11928
11929  test -n "$TR" && break
11930done
11931
11932  else
11933    # The variable is set, but is it from the command line or the environment?
11934
11935    # Try to remove the string !TR! from our list.
11936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11938      # If it failed, the variable was not from the command line. Ignore it,
11939      # but warn the user (except for BASH, which is always set by the calling BASH).
11940      if test "xTR" != xBASH; then
11941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11942$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11943      fi
11944      # Try to locate tool using the code snippet
11945      for ac_prog in tr
11946do
11947  # Extract the first word of "$ac_prog", so it can be a program name with args.
11948set dummy $ac_prog; ac_word=$2
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11950$as_echo_n "checking for $ac_word... " >&6; }
11951if ${ac_cv_path_TR+:} false; then :
11952  $as_echo_n "(cached) " >&6
11953else
11954  case $TR in
11955  [\\/]* | ?:[\\/]*)
11956  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11957  ;;
11958  *)
11959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11960for as_dir in $PATH
11961do
11962  IFS=$as_save_IFS
11963  test -z "$as_dir" && as_dir=.
11964    for ac_exec_ext in '' $ac_executable_extensions; do
11965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11966    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11968    break 2
11969  fi
11970done
11971  done
11972IFS=$as_save_IFS
11973
11974  ;;
11975esac
11976fi
11977TR=$ac_cv_path_TR
11978if test -n "$TR"; then
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11980$as_echo "$TR" >&6; }
11981else
11982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11983$as_echo "no" >&6; }
11984fi
11985
11986
11987  test -n "$TR" && break
11988done
11989
11990    else
11991      # If it succeeded, then it was overridden by the user. We will use it
11992      # for the tool.
11993
11994      # First remove it from the list of overridden variables, so we can test
11995      # for unknown variables in the end.
11996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11997
11998      # Check if we try to supply an empty value
11999      if test "x$TR" = x; then
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12001$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12003$as_echo_n "checking for TR... " >&6; }
12004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12005$as_echo "disabled" >&6; }
12006      else
12007        # Check if the provided tool contains a complete path.
12008        tool_specified="$TR"
12009        tool_basename="${tool_specified##*/}"
12010        if test "x$tool_basename" = "x$tool_specified"; then
12011          # A command without a complete path is provided, search $PATH.
12012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12013$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12014          # Extract the first word of "$tool_basename", so it can be a program name with args.
12015set dummy $tool_basename; ac_word=$2
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12017$as_echo_n "checking for $ac_word... " >&6; }
12018if ${ac_cv_path_TR+:} false; then :
12019  $as_echo_n "(cached) " >&6
12020else
12021  case $TR in
12022  [\\/]* | ?:[\\/]*)
12023  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12024  ;;
12025  *)
12026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12027for as_dir in $PATH
12028do
12029  IFS=$as_save_IFS
12030  test -z "$as_dir" && as_dir=.
12031    for ac_exec_ext in '' $ac_executable_extensions; do
12032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12033    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12035    break 2
12036  fi
12037done
12038  done
12039IFS=$as_save_IFS
12040
12041  ;;
12042esac
12043fi
12044TR=$ac_cv_path_TR
12045if test -n "$TR"; then
12046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12047$as_echo "$TR" >&6; }
12048else
12049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12050$as_echo "no" >&6; }
12051fi
12052
12053
12054          if test "x$TR" = x; then
12055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12056          fi
12057        else
12058          # Otherwise we believe it is a complete path. Use it as it is.
12059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12060$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12062$as_echo_n "checking for TR... " >&6; }
12063          if test ! -x "$tool_specified"; then
12064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12065$as_echo "not found" >&6; }
12066            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12067          fi
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12069$as_echo "$tool_specified" >&6; }
12070        fi
12071      fi
12072    fi
12073
12074  fi
12075
12076
12077
12078  if test "x$TR" = x; then
12079    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12080  fi
12081
12082
12083
12084
12085
12086  # Publish this variable in the help.
12087
12088
12089  if [ -z "${UNAME+x}" ]; then
12090    # The variable is not set by user, try to locate tool using the code snippet
12091    for ac_prog in uname
12092do
12093  # Extract the first word of "$ac_prog", so it can be a program name with args.
12094set dummy $ac_prog; ac_word=$2
12095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12096$as_echo_n "checking for $ac_word... " >&6; }
12097if ${ac_cv_path_UNAME+:} false; then :
12098  $as_echo_n "(cached) " >&6
12099else
12100  case $UNAME in
12101  [\\/]* | ?:[\\/]*)
12102  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12103  ;;
12104  *)
12105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12106for as_dir in $PATH
12107do
12108  IFS=$as_save_IFS
12109  test -z "$as_dir" && as_dir=.
12110    for ac_exec_ext in '' $ac_executable_extensions; do
12111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12112    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12114    break 2
12115  fi
12116done
12117  done
12118IFS=$as_save_IFS
12119
12120  ;;
12121esac
12122fi
12123UNAME=$ac_cv_path_UNAME
12124if test -n "$UNAME"; then
12125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12126$as_echo "$UNAME" >&6; }
12127else
12128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12129$as_echo "no" >&6; }
12130fi
12131
12132
12133  test -n "$UNAME" && break
12134done
12135
12136  else
12137    # The variable is set, but is it from the command line or the environment?
12138
12139    # Try to remove the string !UNAME! from our list.
12140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12142      # If it failed, the variable was not from the command line. Ignore it,
12143      # but warn the user (except for BASH, which is always set by the calling BASH).
12144      if test "xUNAME" != xBASH; then
12145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12146$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12147      fi
12148      # Try to locate tool using the code snippet
12149      for ac_prog in uname
12150do
12151  # Extract the first word of "$ac_prog", so it can be a program name with args.
12152set dummy $ac_prog; ac_word=$2
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12154$as_echo_n "checking for $ac_word... " >&6; }
12155if ${ac_cv_path_UNAME+:} false; then :
12156  $as_echo_n "(cached) " >&6
12157else
12158  case $UNAME in
12159  [\\/]* | ?:[\\/]*)
12160  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12161  ;;
12162  *)
12163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12164for as_dir in $PATH
12165do
12166  IFS=$as_save_IFS
12167  test -z "$as_dir" && as_dir=.
12168    for ac_exec_ext in '' $ac_executable_extensions; do
12169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12170    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12172    break 2
12173  fi
12174done
12175  done
12176IFS=$as_save_IFS
12177
12178  ;;
12179esac
12180fi
12181UNAME=$ac_cv_path_UNAME
12182if test -n "$UNAME"; then
12183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12184$as_echo "$UNAME" >&6; }
12185else
12186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12187$as_echo "no" >&6; }
12188fi
12189
12190
12191  test -n "$UNAME" && break
12192done
12193
12194    else
12195      # If it succeeded, then it was overridden by the user. We will use it
12196      # for the tool.
12197
12198      # First remove it from the list of overridden variables, so we can test
12199      # for unknown variables in the end.
12200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12201
12202      # Check if we try to supply an empty value
12203      if test "x$UNAME" = x; then
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12205$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12207$as_echo_n "checking for UNAME... " >&6; }
12208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12209$as_echo "disabled" >&6; }
12210      else
12211        # Check if the provided tool contains a complete path.
12212        tool_specified="$UNAME"
12213        tool_basename="${tool_specified##*/}"
12214        if test "x$tool_basename" = "x$tool_specified"; then
12215          # A command without a complete path is provided, search $PATH.
12216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12217$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12218          # Extract the first word of "$tool_basename", so it can be a program name with args.
12219set dummy $tool_basename; ac_word=$2
12220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12221$as_echo_n "checking for $ac_word... " >&6; }
12222if ${ac_cv_path_UNAME+:} false; then :
12223  $as_echo_n "(cached) " >&6
12224else
12225  case $UNAME in
12226  [\\/]* | ?:[\\/]*)
12227  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12228  ;;
12229  *)
12230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12231for as_dir in $PATH
12232do
12233  IFS=$as_save_IFS
12234  test -z "$as_dir" && as_dir=.
12235    for ac_exec_ext in '' $ac_executable_extensions; do
12236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12237    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12239    break 2
12240  fi
12241done
12242  done
12243IFS=$as_save_IFS
12244
12245  ;;
12246esac
12247fi
12248UNAME=$ac_cv_path_UNAME
12249if test -n "$UNAME"; then
12250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12251$as_echo "$UNAME" >&6; }
12252else
12253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12254$as_echo "no" >&6; }
12255fi
12256
12257
12258          if test "x$UNAME" = x; then
12259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12260          fi
12261        else
12262          # Otherwise we believe it is a complete path. Use it as it is.
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12264$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12266$as_echo_n "checking for UNAME... " >&6; }
12267          if test ! -x "$tool_specified"; then
12268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12269$as_echo "not found" >&6; }
12270            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12271          fi
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12273$as_echo "$tool_specified" >&6; }
12274        fi
12275      fi
12276    fi
12277
12278  fi
12279
12280
12281
12282  if test "x$UNAME" = x; then
12283    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12284  fi
12285
12286
12287
12288
12289
12290  # Publish this variable in the help.
12291
12292
12293  if [ -z "${UNIQ+x}" ]; then
12294    # The variable is not set by user, try to locate tool using the code snippet
12295    for ac_prog in uniq
12296do
12297  # Extract the first word of "$ac_prog", so it can be a program name with args.
12298set dummy $ac_prog; ac_word=$2
12299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12300$as_echo_n "checking for $ac_word... " >&6; }
12301if ${ac_cv_path_UNIQ+:} false; then :
12302  $as_echo_n "(cached) " >&6
12303else
12304  case $UNIQ in
12305  [\\/]* | ?:[\\/]*)
12306  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12307  ;;
12308  *)
12309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12310for as_dir in $PATH
12311do
12312  IFS=$as_save_IFS
12313  test -z "$as_dir" && as_dir=.
12314    for ac_exec_ext in '' $ac_executable_extensions; do
12315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12316    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12318    break 2
12319  fi
12320done
12321  done
12322IFS=$as_save_IFS
12323
12324  ;;
12325esac
12326fi
12327UNIQ=$ac_cv_path_UNIQ
12328if test -n "$UNIQ"; then
12329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12330$as_echo "$UNIQ" >&6; }
12331else
12332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12333$as_echo "no" >&6; }
12334fi
12335
12336
12337  test -n "$UNIQ" && break
12338done
12339
12340  else
12341    # The variable is set, but is it from the command line or the environment?
12342
12343    # Try to remove the string !UNIQ! from our list.
12344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12346      # If it failed, the variable was not from the command line. Ignore it,
12347      # but warn the user (except for BASH, which is always set by the calling BASH).
12348      if test "xUNIQ" != xBASH; then
12349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12350$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12351      fi
12352      # Try to locate tool using the code snippet
12353      for ac_prog in uniq
12354do
12355  # Extract the first word of "$ac_prog", so it can be a program name with args.
12356set dummy $ac_prog; ac_word=$2
12357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12358$as_echo_n "checking for $ac_word... " >&6; }
12359if ${ac_cv_path_UNIQ+:} false; then :
12360  $as_echo_n "(cached) " >&6
12361else
12362  case $UNIQ in
12363  [\\/]* | ?:[\\/]*)
12364  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12365  ;;
12366  *)
12367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12368for as_dir in $PATH
12369do
12370  IFS=$as_save_IFS
12371  test -z "$as_dir" && as_dir=.
12372    for ac_exec_ext in '' $ac_executable_extensions; do
12373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12374    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12376    break 2
12377  fi
12378done
12379  done
12380IFS=$as_save_IFS
12381
12382  ;;
12383esac
12384fi
12385UNIQ=$ac_cv_path_UNIQ
12386if test -n "$UNIQ"; then
12387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12388$as_echo "$UNIQ" >&6; }
12389else
12390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12391$as_echo "no" >&6; }
12392fi
12393
12394
12395  test -n "$UNIQ" && break
12396done
12397
12398    else
12399      # If it succeeded, then it was overridden by the user. We will use it
12400      # for the tool.
12401
12402      # First remove it from the list of overridden variables, so we can test
12403      # for unknown variables in the end.
12404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12405
12406      # Check if we try to supply an empty value
12407      if test "x$UNIQ" = x; then
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12409$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12411$as_echo_n "checking for UNIQ... " >&6; }
12412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12413$as_echo "disabled" >&6; }
12414      else
12415        # Check if the provided tool contains a complete path.
12416        tool_specified="$UNIQ"
12417        tool_basename="${tool_specified##*/}"
12418        if test "x$tool_basename" = "x$tool_specified"; then
12419          # A command without a complete path is provided, search $PATH.
12420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12421$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12422          # Extract the first word of "$tool_basename", so it can be a program name with args.
12423set dummy $tool_basename; ac_word=$2
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12425$as_echo_n "checking for $ac_word... " >&6; }
12426if ${ac_cv_path_UNIQ+:} false; then :
12427  $as_echo_n "(cached) " >&6
12428else
12429  case $UNIQ in
12430  [\\/]* | ?:[\\/]*)
12431  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12432  ;;
12433  *)
12434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12435for as_dir in $PATH
12436do
12437  IFS=$as_save_IFS
12438  test -z "$as_dir" && as_dir=.
12439    for ac_exec_ext in '' $ac_executable_extensions; do
12440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12441    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12443    break 2
12444  fi
12445done
12446  done
12447IFS=$as_save_IFS
12448
12449  ;;
12450esac
12451fi
12452UNIQ=$ac_cv_path_UNIQ
12453if test -n "$UNIQ"; then
12454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12455$as_echo "$UNIQ" >&6; }
12456else
12457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12458$as_echo "no" >&6; }
12459fi
12460
12461
12462          if test "x$UNIQ" = x; then
12463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12464          fi
12465        else
12466          # Otherwise we believe it is a complete path. Use it as it is.
12467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12468$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12470$as_echo_n "checking for UNIQ... " >&6; }
12471          if test ! -x "$tool_specified"; then
12472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12473$as_echo "not found" >&6; }
12474            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12475          fi
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12477$as_echo "$tool_specified" >&6; }
12478        fi
12479      fi
12480    fi
12481
12482  fi
12483
12484
12485
12486  if test "x$UNIQ" = x; then
12487    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12488  fi
12489
12490
12491
12492
12493
12494  # Publish this variable in the help.
12495
12496
12497  if [ -z "${WC+x}" ]; then
12498    # The variable is not set by user, try to locate tool using the code snippet
12499    for ac_prog in wc
12500do
12501  # Extract the first word of "$ac_prog", so it can be a program name with args.
12502set dummy $ac_prog; ac_word=$2
12503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12504$as_echo_n "checking for $ac_word... " >&6; }
12505if ${ac_cv_path_WC+:} false; then :
12506  $as_echo_n "(cached) " >&6
12507else
12508  case $WC in
12509  [\\/]* | ?:[\\/]*)
12510  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12511  ;;
12512  *)
12513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12514for as_dir in $PATH
12515do
12516  IFS=$as_save_IFS
12517  test -z "$as_dir" && as_dir=.
12518    for ac_exec_ext in '' $ac_executable_extensions; do
12519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12520    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12522    break 2
12523  fi
12524done
12525  done
12526IFS=$as_save_IFS
12527
12528  ;;
12529esac
12530fi
12531WC=$ac_cv_path_WC
12532if test -n "$WC"; then
12533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12534$as_echo "$WC" >&6; }
12535else
12536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12537$as_echo "no" >&6; }
12538fi
12539
12540
12541  test -n "$WC" && break
12542done
12543
12544  else
12545    # The variable is set, but is it from the command line or the environment?
12546
12547    # Try to remove the string !WC! from our list.
12548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12550      # If it failed, the variable was not from the command line. Ignore it,
12551      # but warn the user (except for BASH, which is always set by the calling BASH).
12552      if test "xWC" != xBASH; then
12553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12554$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12555      fi
12556      # Try to locate tool using the code snippet
12557      for ac_prog in wc
12558do
12559  # Extract the first word of "$ac_prog", so it can be a program name with args.
12560set dummy $ac_prog; ac_word=$2
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12562$as_echo_n "checking for $ac_word... " >&6; }
12563if ${ac_cv_path_WC+:} false; then :
12564  $as_echo_n "(cached) " >&6
12565else
12566  case $WC in
12567  [\\/]* | ?:[\\/]*)
12568  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12569  ;;
12570  *)
12571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12572for as_dir in $PATH
12573do
12574  IFS=$as_save_IFS
12575  test -z "$as_dir" && as_dir=.
12576    for ac_exec_ext in '' $ac_executable_extensions; do
12577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12578    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12580    break 2
12581  fi
12582done
12583  done
12584IFS=$as_save_IFS
12585
12586  ;;
12587esac
12588fi
12589WC=$ac_cv_path_WC
12590if test -n "$WC"; then
12591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12592$as_echo "$WC" >&6; }
12593else
12594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12595$as_echo "no" >&6; }
12596fi
12597
12598
12599  test -n "$WC" && break
12600done
12601
12602    else
12603      # If it succeeded, then it was overridden by the user. We will use it
12604      # for the tool.
12605
12606      # First remove it from the list of overridden variables, so we can test
12607      # for unknown variables in the end.
12608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12609
12610      # Check if we try to supply an empty value
12611      if test "x$WC" = x; then
12612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12613$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12615$as_echo_n "checking for WC... " >&6; }
12616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12617$as_echo "disabled" >&6; }
12618      else
12619        # Check if the provided tool contains a complete path.
12620        tool_specified="$WC"
12621        tool_basename="${tool_specified##*/}"
12622        if test "x$tool_basename" = "x$tool_specified"; then
12623          # A command without a complete path is provided, search $PATH.
12624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12625$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12626          # Extract the first word of "$tool_basename", so it can be a program name with args.
12627set dummy $tool_basename; ac_word=$2
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12629$as_echo_n "checking for $ac_word... " >&6; }
12630if ${ac_cv_path_WC+:} false; then :
12631  $as_echo_n "(cached) " >&6
12632else
12633  case $WC in
12634  [\\/]* | ?:[\\/]*)
12635  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12636  ;;
12637  *)
12638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12639for as_dir in $PATH
12640do
12641  IFS=$as_save_IFS
12642  test -z "$as_dir" && as_dir=.
12643    for ac_exec_ext in '' $ac_executable_extensions; do
12644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12645    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12647    break 2
12648  fi
12649done
12650  done
12651IFS=$as_save_IFS
12652
12653  ;;
12654esac
12655fi
12656WC=$ac_cv_path_WC
12657if test -n "$WC"; then
12658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12659$as_echo "$WC" >&6; }
12660else
12661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12662$as_echo "no" >&6; }
12663fi
12664
12665
12666          if test "x$WC" = x; then
12667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12668          fi
12669        else
12670          # Otherwise we believe it is a complete path. Use it as it is.
12671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12672$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12674$as_echo_n "checking for WC... " >&6; }
12675          if test ! -x "$tool_specified"; then
12676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12677$as_echo "not found" >&6; }
12678            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12679          fi
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12681$as_echo "$tool_specified" >&6; }
12682        fi
12683      fi
12684    fi
12685
12686  fi
12687
12688
12689
12690  if test "x$WC" = x; then
12691    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12692  fi
12693
12694
12695
12696
12697
12698  # Publish this variable in the help.
12699
12700
12701  if [ -z "${WHICH+x}" ]; then
12702    # The variable is not set by user, try to locate tool using the code snippet
12703    for ac_prog in which
12704do
12705  # Extract the first word of "$ac_prog", so it can be a program name with args.
12706set dummy $ac_prog; ac_word=$2
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12708$as_echo_n "checking for $ac_word... " >&6; }
12709if ${ac_cv_path_WHICH+:} false; then :
12710  $as_echo_n "(cached) " >&6
12711else
12712  case $WHICH in
12713  [\\/]* | ?:[\\/]*)
12714  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12715  ;;
12716  *)
12717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12718for as_dir in $PATH
12719do
12720  IFS=$as_save_IFS
12721  test -z "$as_dir" && as_dir=.
12722    for ac_exec_ext in '' $ac_executable_extensions; do
12723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12724    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12726    break 2
12727  fi
12728done
12729  done
12730IFS=$as_save_IFS
12731
12732  ;;
12733esac
12734fi
12735WHICH=$ac_cv_path_WHICH
12736if test -n "$WHICH"; then
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12738$as_echo "$WHICH" >&6; }
12739else
12740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742fi
12743
12744
12745  test -n "$WHICH" && break
12746done
12747
12748  else
12749    # The variable is set, but is it from the command line or the environment?
12750
12751    # Try to remove the string !WHICH! from our list.
12752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12754      # If it failed, the variable was not from the command line. Ignore it,
12755      # but warn the user (except for BASH, which is always set by the calling BASH).
12756      if test "xWHICH" != xBASH; then
12757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12758$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12759      fi
12760      # Try to locate tool using the code snippet
12761      for ac_prog in which
12762do
12763  # Extract the first word of "$ac_prog", so it can be a program name with args.
12764set dummy $ac_prog; ac_word=$2
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12766$as_echo_n "checking for $ac_word... " >&6; }
12767if ${ac_cv_path_WHICH+:} false; then :
12768  $as_echo_n "(cached) " >&6
12769else
12770  case $WHICH in
12771  [\\/]* | ?:[\\/]*)
12772  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12773  ;;
12774  *)
12775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12776for as_dir in $PATH
12777do
12778  IFS=$as_save_IFS
12779  test -z "$as_dir" && as_dir=.
12780    for ac_exec_ext in '' $ac_executable_extensions; do
12781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12782    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12784    break 2
12785  fi
12786done
12787  done
12788IFS=$as_save_IFS
12789
12790  ;;
12791esac
12792fi
12793WHICH=$ac_cv_path_WHICH
12794if test -n "$WHICH"; then
12795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12796$as_echo "$WHICH" >&6; }
12797else
12798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12799$as_echo "no" >&6; }
12800fi
12801
12802
12803  test -n "$WHICH" && break
12804done
12805
12806    else
12807      # If it succeeded, then it was overridden by the user. We will use it
12808      # for the tool.
12809
12810      # First remove it from the list of overridden variables, so we can test
12811      # for unknown variables in the end.
12812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12813
12814      # Check if we try to supply an empty value
12815      if test "x$WHICH" = x; then
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12817$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12819$as_echo_n "checking for WHICH... " >&6; }
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12821$as_echo "disabled" >&6; }
12822      else
12823        # Check if the provided tool contains a complete path.
12824        tool_specified="$WHICH"
12825        tool_basename="${tool_specified##*/}"
12826        if test "x$tool_basename" = "x$tool_specified"; then
12827          # A command without a complete path is provided, search $PATH.
12828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12829$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12830          # Extract the first word of "$tool_basename", so it can be a program name with args.
12831set dummy $tool_basename; ac_word=$2
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12833$as_echo_n "checking for $ac_word... " >&6; }
12834if ${ac_cv_path_WHICH+:} false; then :
12835  $as_echo_n "(cached) " >&6
12836else
12837  case $WHICH in
12838  [\\/]* | ?:[\\/]*)
12839  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12840  ;;
12841  *)
12842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12843for as_dir in $PATH
12844do
12845  IFS=$as_save_IFS
12846  test -z "$as_dir" && as_dir=.
12847    for ac_exec_ext in '' $ac_executable_extensions; do
12848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12849    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12851    break 2
12852  fi
12853done
12854  done
12855IFS=$as_save_IFS
12856
12857  ;;
12858esac
12859fi
12860WHICH=$ac_cv_path_WHICH
12861if test -n "$WHICH"; then
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12863$as_echo "$WHICH" >&6; }
12864else
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12866$as_echo "no" >&6; }
12867fi
12868
12869
12870          if test "x$WHICH" = x; then
12871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12872          fi
12873        else
12874          # Otherwise we believe it is a complete path. Use it as it is.
12875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12876$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12878$as_echo_n "checking for WHICH... " >&6; }
12879          if test ! -x "$tool_specified"; then
12880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12881$as_echo "not found" >&6; }
12882            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12883          fi
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12885$as_echo "$tool_specified" >&6; }
12886        fi
12887      fi
12888    fi
12889
12890  fi
12891
12892
12893
12894  if test "x$WHICH" = x; then
12895    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12896  fi
12897
12898
12899
12900
12901
12902  # Publish this variable in the help.
12903
12904
12905  if [ -z "${XARGS+x}" ]; then
12906    # The variable is not set by user, try to locate tool using the code snippet
12907    for ac_prog in xargs
12908do
12909  # Extract the first word of "$ac_prog", so it can be a program name with args.
12910set dummy $ac_prog; ac_word=$2
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12912$as_echo_n "checking for $ac_word... " >&6; }
12913if ${ac_cv_path_XARGS+:} false; then :
12914  $as_echo_n "(cached) " >&6
12915else
12916  case $XARGS in
12917  [\\/]* | ?:[\\/]*)
12918  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12919  ;;
12920  *)
12921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12922for as_dir in $PATH
12923do
12924  IFS=$as_save_IFS
12925  test -z "$as_dir" && as_dir=.
12926    for ac_exec_ext in '' $ac_executable_extensions; do
12927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12928    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12930    break 2
12931  fi
12932done
12933  done
12934IFS=$as_save_IFS
12935
12936  ;;
12937esac
12938fi
12939XARGS=$ac_cv_path_XARGS
12940if test -n "$XARGS"; then
12941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12942$as_echo "$XARGS" >&6; }
12943else
12944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12945$as_echo "no" >&6; }
12946fi
12947
12948
12949  test -n "$XARGS" && break
12950done
12951
12952  else
12953    # The variable is set, but is it from the command line or the environment?
12954
12955    # Try to remove the string !XARGS! from our list.
12956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12958      # If it failed, the variable was not from the command line. Ignore it,
12959      # but warn the user (except for BASH, which is always set by the calling BASH).
12960      if test "xXARGS" != xBASH; then
12961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12962$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12963      fi
12964      # Try to locate tool using the code snippet
12965      for ac_prog in xargs
12966do
12967  # Extract the first word of "$ac_prog", so it can be a program name with args.
12968set dummy $ac_prog; ac_word=$2
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12970$as_echo_n "checking for $ac_word... " >&6; }
12971if ${ac_cv_path_XARGS+:} false; then :
12972  $as_echo_n "(cached) " >&6
12973else
12974  case $XARGS in
12975  [\\/]* | ?:[\\/]*)
12976  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12977  ;;
12978  *)
12979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12980for as_dir in $PATH
12981do
12982  IFS=$as_save_IFS
12983  test -z "$as_dir" && as_dir=.
12984    for ac_exec_ext in '' $ac_executable_extensions; do
12985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12986    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12988    break 2
12989  fi
12990done
12991  done
12992IFS=$as_save_IFS
12993
12994  ;;
12995esac
12996fi
12997XARGS=$ac_cv_path_XARGS
12998if test -n "$XARGS"; then
12999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13000$as_echo "$XARGS" >&6; }
13001else
13002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13003$as_echo "no" >&6; }
13004fi
13005
13006
13007  test -n "$XARGS" && break
13008done
13009
13010    else
13011      # If it succeeded, then it was overridden by the user. We will use it
13012      # for the tool.
13013
13014      # First remove it from the list of overridden variables, so we can test
13015      # for unknown variables in the end.
13016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13017
13018      # Check if we try to supply an empty value
13019      if test "x$XARGS" = x; then
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13021$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13023$as_echo_n "checking for XARGS... " >&6; }
13024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13025$as_echo "disabled" >&6; }
13026      else
13027        # Check if the provided tool contains a complete path.
13028        tool_specified="$XARGS"
13029        tool_basename="${tool_specified##*/}"
13030        if test "x$tool_basename" = "x$tool_specified"; then
13031          # A command without a complete path is provided, search $PATH.
13032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13033$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13034          # Extract the first word of "$tool_basename", so it can be a program name with args.
13035set dummy $tool_basename; ac_word=$2
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13037$as_echo_n "checking for $ac_word... " >&6; }
13038if ${ac_cv_path_XARGS+:} false; then :
13039  $as_echo_n "(cached) " >&6
13040else
13041  case $XARGS in
13042  [\\/]* | ?:[\\/]*)
13043  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13044  ;;
13045  *)
13046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13047for as_dir in $PATH
13048do
13049  IFS=$as_save_IFS
13050  test -z "$as_dir" && as_dir=.
13051    for ac_exec_ext in '' $ac_executable_extensions; do
13052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13053    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13055    break 2
13056  fi
13057done
13058  done
13059IFS=$as_save_IFS
13060
13061  ;;
13062esac
13063fi
13064XARGS=$ac_cv_path_XARGS
13065if test -n "$XARGS"; then
13066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13067$as_echo "$XARGS" >&6; }
13068else
13069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13070$as_echo "no" >&6; }
13071fi
13072
13073
13074          if test "x$XARGS" = x; then
13075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13076          fi
13077        else
13078          # Otherwise we believe it is a complete path. Use it as it is.
13079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13080$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13082$as_echo_n "checking for XARGS... " >&6; }
13083          if test ! -x "$tool_specified"; then
13084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13085$as_echo "not found" >&6; }
13086            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13087          fi
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13089$as_echo "$tool_specified" >&6; }
13090        fi
13091      fi
13092    fi
13093
13094  fi
13095
13096
13097
13098  if test "x$XARGS" = x; then
13099    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13100  fi
13101
13102
13103
13104  # Then required tools that require some special treatment.
13105
13106
13107  # Publish this variable in the help.
13108
13109
13110  if [ -z "${AWK+x}" ]; then
13111    # The variable is not set by user, try to locate tool using the code snippet
13112    for ac_prog in gawk mawk nawk awk
13113do
13114  # Extract the first word of "$ac_prog", so it can be a program name with args.
13115set dummy $ac_prog; ac_word=$2
13116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13117$as_echo_n "checking for $ac_word... " >&6; }
13118if ${ac_cv_prog_AWK+:} false; then :
13119  $as_echo_n "(cached) " >&6
13120else
13121  if test -n "$AWK"; then
13122  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13123else
13124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13125for as_dir in $PATH
13126do
13127  IFS=$as_save_IFS
13128  test -z "$as_dir" && as_dir=.
13129    for ac_exec_ext in '' $ac_executable_extensions; do
13130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13131    ac_cv_prog_AWK="$ac_prog"
13132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13133    break 2
13134  fi
13135done
13136  done
13137IFS=$as_save_IFS
13138
13139fi
13140fi
13141AWK=$ac_cv_prog_AWK
13142if test -n "$AWK"; then
13143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13144$as_echo "$AWK" >&6; }
13145else
13146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13147$as_echo "no" >&6; }
13148fi
13149
13150
13151  test -n "$AWK" && break
13152done
13153
13154  else
13155    # The variable is set, but is it from the command line or the environment?
13156
13157    # Try to remove the string !AWK! from our list.
13158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13160      # If it failed, the variable was not from the command line. Ignore it,
13161      # but warn the user (except for BASH, which is always set by the calling BASH).
13162      if test "xAWK" != xBASH; then
13163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13164$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13165      fi
13166      # Try to locate tool using the code snippet
13167      for ac_prog in gawk mawk nawk awk
13168do
13169  # Extract the first word of "$ac_prog", so it can be a program name with args.
13170set dummy $ac_prog; ac_word=$2
13171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13172$as_echo_n "checking for $ac_word... " >&6; }
13173if ${ac_cv_prog_AWK+:} false; then :
13174  $as_echo_n "(cached) " >&6
13175else
13176  if test -n "$AWK"; then
13177  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13178else
13179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13180for as_dir in $PATH
13181do
13182  IFS=$as_save_IFS
13183  test -z "$as_dir" && as_dir=.
13184    for ac_exec_ext in '' $ac_executable_extensions; do
13185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13186    ac_cv_prog_AWK="$ac_prog"
13187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13188    break 2
13189  fi
13190done
13191  done
13192IFS=$as_save_IFS
13193
13194fi
13195fi
13196AWK=$ac_cv_prog_AWK
13197if test -n "$AWK"; then
13198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13199$as_echo "$AWK" >&6; }
13200else
13201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13202$as_echo "no" >&6; }
13203fi
13204
13205
13206  test -n "$AWK" && break
13207done
13208
13209    else
13210      # If it succeeded, then it was overridden by the user. We will use it
13211      # for the tool.
13212
13213      # First remove it from the list of overridden variables, so we can test
13214      # for unknown variables in the end.
13215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13216
13217      # Check if we try to supply an empty value
13218      if test "x$AWK" = x; then
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13220$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13222$as_echo_n "checking for AWK... " >&6; }
13223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13224$as_echo "disabled" >&6; }
13225      else
13226        # Check if the provided tool contains a complete path.
13227        tool_specified="$AWK"
13228        tool_basename="${tool_specified##*/}"
13229        if test "x$tool_basename" = "x$tool_specified"; then
13230          # A command without a complete path is provided, search $PATH.
13231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13232$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13233          # Extract the first word of "$tool_basename", so it can be a program name with args.
13234set dummy $tool_basename; ac_word=$2
13235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13236$as_echo_n "checking for $ac_word... " >&6; }
13237if ${ac_cv_path_AWK+:} false; then :
13238  $as_echo_n "(cached) " >&6
13239else
13240  case $AWK in
13241  [\\/]* | ?:[\\/]*)
13242  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13243  ;;
13244  *)
13245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13246for as_dir in $PATH
13247do
13248  IFS=$as_save_IFS
13249  test -z "$as_dir" && as_dir=.
13250    for ac_exec_ext in '' $ac_executable_extensions; do
13251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13252    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13254    break 2
13255  fi
13256done
13257  done
13258IFS=$as_save_IFS
13259
13260  ;;
13261esac
13262fi
13263AWK=$ac_cv_path_AWK
13264if test -n "$AWK"; then
13265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13266$as_echo "$AWK" >&6; }
13267else
13268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13269$as_echo "no" >&6; }
13270fi
13271
13272
13273          if test "x$AWK" = x; then
13274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13275          fi
13276        else
13277          # Otherwise we believe it is a complete path. Use it as it is.
13278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13279$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13281$as_echo_n "checking for AWK... " >&6; }
13282          if test ! -x "$tool_specified"; then
13283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13284$as_echo "not found" >&6; }
13285            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13286          fi
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13288$as_echo "$tool_specified" >&6; }
13289        fi
13290      fi
13291    fi
13292
13293  fi
13294
13295
13296  if test "x$AWK" = x; then
13297    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13298  fi
13299
13300
13301
13302
13303  # Publish this variable in the help.
13304
13305
13306  if [ -z "${GREP+x}" ]; then
13307    # The variable is not set by user, try to locate tool using the code snippet
13308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13309$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13310if ${ac_cv_path_GREP+:} false; then :
13311  $as_echo_n "(cached) " >&6
13312else
13313  if test -z "$GREP"; then
13314  ac_path_GREP_found=false
13315  # Loop through the user's path and test for each of PROGNAME-LIST
13316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13317for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13318do
13319  IFS=$as_save_IFS
13320  test -z "$as_dir" && as_dir=.
13321    for ac_prog in grep ggrep; do
13322    for ac_exec_ext in '' $ac_executable_extensions; do
13323      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13324      as_fn_executable_p "$ac_path_GREP" || continue
13325# Check for GNU ac_path_GREP and select it if it is found.
13326  # Check for GNU $ac_path_GREP
13327case `"$ac_path_GREP" --version 2>&1` in
13328*GNU*)
13329  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13330*)
13331  ac_count=0
13332  $as_echo_n 0123456789 >"conftest.in"
13333  while :
13334  do
13335    cat "conftest.in" "conftest.in" >"conftest.tmp"
13336    mv "conftest.tmp" "conftest.in"
13337    cp "conftest.in" "conftest.nl"
13338    $as_echo 'GREP' >> "conftest.nl"
13339    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13340    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13341    as_fn_arith $ac_count + 1 && ac_count=$as_val
13342    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13343      # Best one so far, save it but keep looking for a better one
13344      ac_cv_path_GREP="$ac_path_GREP"
13345      ac_path_GREP_max=$ac_count
13346    fi
13347    # 10*(2^10) chars as input seems more than enough
13348    test $ac_count -gt 10 && break
13349  done
13350  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13351esac
13352
13353      $ac_path_GREP_found && break 3
13354    done
13355  done
13356  done
13357IFS=$as_save_IFS
13358  if test -z "$ac_cv_path_GREP"; then
13359    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13360  fi
13361else
13362  ac_cv_path_GREP=$GREP
13363fi
13364
13365fi
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13367$as_echo "$ac_cv_path_GREP" >&6; }
13368 GREP="$ac_cv_path_GREP"
13369
13370
13371  else
13372    # The variable is set, but is it from the command line or the environment?
13373
13374    # Try to remove the string !GREP! from our list.
13375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13377      # If it failed, the variable was not from the command line. Ignore it,
13378      # but warn the user (except for BASH, which is always set by the calling BASH).
13379      if test "xGREP" != xBASH; then
13380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13381$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13382      fi
13383      # Try to locate tool using the code snippet
13384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13385$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13386if ${ac_cv_path_GREP+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389  if test -z "$GREP"; then
13390  ac_path_GREP_found=false
13391  # Loop through the user's path and test for each of PROGNAME-LIST
13392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13393for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13394do
13395  IFS=$as_save_IFS
13396  test -z "$as_dir" && as_dir=.
13397    for ac_prog in grep ggrep; do
13398    for ac_exec_ext in '' $ac_executable_extensions; do
13399      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13400      as_fn_executable_p "$ac_path_GREP" || continue
13401# Check for GNU ac_path_GREP and select it if it is found.
13402  # Check for GNU $ac_path_GREP
13403case `"$ac_path_GREP" --version 2>&1` in
13404*GNU*)
13405  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13406*)
13407  ac_count=0
13408  $as_echo_n 0123456789 >"conftest.in"
13409  while :
13410  do
13411    cat "conftest.in" "conftest.in" >"conftest.tmp"
13412    mv "conftest.tmp" "conftest.in"
13413    cp "conftest.in" "conftest.nl"
13414    $as_echo 'GREP' >> "conftest.nl"
13415    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13416    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13417    as_fn_arith $ac_count + 1 && ac_count=$as_val
13418    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13419      # Best one so far, save it but keep looking for a better one
13420      ac_cv_path_GREP="$ac_path_GREP"
13421      ac_path_GREP_max=$ac_count
13422    fi
13423    # 10*(2^10) chars as input seems more than enough
13424    test $ac_count -gt 10 && break
13425  done
13426  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13427esac
13428
13429      $ac_path_GREP_found && break 3
13430    done
13431  done
13432  done
13433IFS=$as_save_IFS
13434  if test -z "$ac_cv_path_GREP"; then
13435    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13436  fi
13437else
13438  ac_cv_path_GREP=$GREP
13439fi
13440
13441fi
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13443$as_echo "$ac_cv_path_GREP" >&6; }
13444 GREP="$ac_cv_path_GREP"
13445
13446
13447    else
13448      # If it succeeded, then it was overridden by the user. We will use it
13449      # for the tool.
13450
13451      # First remove it from the list of overridden variables, so we can test
13452      # for unknown variables in the end.
13453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13454
13455      # Check if we try to supply an empty value
13456      if test "x$GREP" = x; then
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13458$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13460$as_echo_n "checking for GREP... " >&6; }
13461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13462$as_echo "disabled" >&6; }
13463      else
13464        # Check if the provided tool contains a complete path.
13465        tool_specified="$GREP"
13466        tool_basename="${tool_specified##*/}"
13467        if test "x$tool_basename" = "x$tool_specified"; then
13468          # A command without a complete path is provided, search $PATH.
13469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13470$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13471          # Extract the first word of "$tool_basename", so it can be a program name with args.
13472set dummy $tool_basename; ac_word=$2
13473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13474$as_echo_n "checking for $ac_word... " >&6; }
13475if ${ac_cv_path_GREP+:} false; then :
13476  $as_echo_n "(cached) " >&6
13477else
13478  case $GREP in
13479  [\\/]* | ?:[\\/]*)
13480  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13481  ;;
13482  *)
13483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13484for as_dir in $PATH
13485do
13486  IFS=$as_save_IFS
13487  test -z "$as_dir" && as_dir=.
13488    for ac_exec_ext in '' $ac_executable_extensions; do
13489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13490    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13492    break 2
13493  fi
13494done
13495  done
13496IFS=$as_save_IFS
13497
13498  ;;
13499esac
13500fi
13501GREP=$ac_cv_path_GREP
13502if test -n "$GREP"; then
13503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13504$as_echo "$GREP" >&6; }
13505else
13506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507$as_echo "no" >&6; }
13508fi
13509
13510
13511          if test "x$GREP" = x; then
13512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13513          fi
13514        else
13515          # Otherwise we believe it is a complete path. Use it as it is.
13516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13517$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13519$as_echo_n "checking for GREP... " >&6; }
13520          if test ! -x "$tool_specified"; then
13521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13522$as_echo "not found" >&6; }
13523            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13524          fi
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13526$as_echo "$tool_specified" >&6; }
13527        fi
13528      fi
13529    fi
13530
13531  fi
13532
13533
13534  if test "x$GREP" = x; then
13535    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13536  fi
13537
13538
13539
13540
13541  # Publish this variable in the help.
13542
13543
13544  if [ -z "${EGREP+x}" ]; then
13545    # The variable is not set by user, try to locate tool using the code snippet
13546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13547$as_echo_n "checking for egrep... " >&6; }
13548if ${ac_cv_path_EGREP+:} false; then :
13549  $as_echo_n "(cached) " >&6
13550else
13551  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13552   then ac_cv_path_EGREP="$GREP -E"
13553   else
13554     if test -z "$EGREP"; then
13555  ac_path_EGREP_found=false
13556  # Loop through the user's path and test for each of PROGNAME-LIST
13557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13558for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13559do
13560  IFS=$as_save_IFS
13561  test -z "$as_dir" && as_dir=.
13562    for ac_prog in egrep; do
13563    for ac_exec_ext in '' $ac_executable_extensions; do
13564      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13565      as_fn_executable_p "$ac_path_EGREP" || continue
13566# Check for GNU ac_path_EGREP and select it if it is found.
13567  # Check for GNU $ac_path_EGREP
13568case `"$ac_path_EGREP" --version 2>&1` in
13569*GNU*)
13570  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13571*)
13572  ac_count=0
13573  $as_echo_n 0123456789 >"conftest.in"
13574  while :
13575  do
13576    cat "conftest.in" "conftest.in" >"conftest.tmp"
13577    mv "conftest.tmp" "conftest.in"
13578    cp "conftest.in" "conftest.nl"
13579    $as_echo 'EGREP' >> "conftest.nl"
13580    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13581    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13582    as_fn_arith $ac_count + 1 && ac_count=$as_val
13583    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13584      # Best one so far, save it but keep looking for a better one
13585      ac_cv_path_EGREP="$ac_path_EGREP"
13586      ac_path_EGREP_max=$ac_count
13587    fi
13588    # 10*(2^10) chars as input seems more than enough
13589    test $ac_count -gt 10 && break
13590  done
13591  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13592esac
13593
13594      $ac_path_EGREP_found && break 3
13595    done
13596  done
13597  done
13598IFS=$as_save_IFS
13599  if test -z "$ac_cv_path_EGREP"; then
13600    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13601  fi
13602else
13603  ac_cv_path_EGREP=$EGREP
13604fi
13605
13606   fi
13607fi
13608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13609$as_echo "$ac_cv_path_EGREP" >&6; }
13610 EGREP="$ac_cv_path_EGREP"
13611
13612
13613  else
13614    # The variable is set, but is it from the command line or the environment?
13615
13616    # Try to remove the string !EGREP! from our list.
13617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13619      # If it failed, the variable was not from the command line. Ignore it,
13620      # but warn the user (except for BASH, which is always set by the calling BASH).
13621      if test "xEGREP" != xBASH; then
13622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13623$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13624      fi
13625      # Try to locate tool using the code snippet
13626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13627$as_echo_n "checking for egrep... " >&6; }
13628if ${ac_cv_path_EGREP+:} false; then :
13629  $as_echo_n "(cached) " >&6
13630else
13631  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13632   then ac_cv_path_EGREP="$GREP -E"
13633   else
13634     if test -z "$EGREP"; then
13635  ac_path_EGREP_found=false
13636  # Loop through the user's path and test for each of PROGNAME-LIST
13637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13639do
13640  IFS=$as_save_IFS
13641  test -z "$as_dir" && as_dir=.
13642    for ac_prog in egrep; do
13643    for ac_exec_ext in '' $ac_executable_extensions; do
13644      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13645      as_fn_executable_p "$ac_path_EGREP" || continue
13646# Check for GNU ac_path_EGREP and select it if it is found.
13647  # Check for GNU $ac_path_EGREP
13648case `"$ac_path_EGREP" --version 2>&1` in
13649*GNU*)
13650  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13651*)
13652  ac_count=0
13653  $as_echo_n 0123456789 >"conftest.in"
13654  while :
13655  do
13656    cat "conftest.in" "conftest.in" >"conftest.tmp"
13657    mv "conftest.tmp" "conftest.in"
13658    cp "conftest.in" "conftest.nl"
13659    $as_echo 'EGREP' >> "conftest.nl"
13660    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13661    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13662    as_fn_arith $ac_count + 1 && ac_count=$as_val
13663    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13664      # Best one so far, save it but keep looking for a better one
13665      ac_cv_path_EGREP="$ac_path_EGREP"
13666      ac_path_EGREP_max=$ac_count
13667    fi
13668    # 10*(2^10) chars as input seems more than enough
13669    test $ac_count -gt 10 && break
13670  done
13671  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13672esac
13673
13674      $ac_path_EGREP_found && break 3
13675    done
13676  done
13677  done
13678IFS=$as_save_IFS
13679  if test -z "$ac_cv_path_EGREP"; then
13680    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13681  fi
13682else
13683  ac_cv_path_EGREP=$EGREP
13684fi
13685
13686   fi
13687fi
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13689$as_echo "$ac_cv_path_EGREP" >&6; }
13690 EGREP="$ac_cv_path_EGREP"
13691
13692
13693    else
13694      # If it succeeded, then it was overridden by the user. We will use it
13695      # for the tool.
13696
13697      # First remove it from the list of overridden variables, so we can test
13698      # for unknown variables in the end.
13699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13700
13701      # Check if we try to supply an empty value
13702      if test "x$EGREP" = x; then
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13704$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13706$as_echo_n "checking for EGREP... " >&6; }
13707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13708$as_echo "disabled" >&6; }
13709      else
13710        # Check if the provided tool contains a complete path.
13711        tool_specified="$EGREP"
13712        tool_basename="${tool_specified##*/}"
13713        if test "x$tool_basename" = "x$tool_specified"; then
13714          # A command without a complete path is provided, search $PATH.
13715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13716$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13717          # Extract the first word of "$tool_basename", so it can be a program name with args.
13718set dummy $tool_basename; ac_word=$2
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13720$as_echo_n "checking for $ac_word... " >&6; }
13721if ${ac_cv_path_EGREP+:} false; then :
13722  $as_echo_n "(cached) " >&6
13723else
13724  case $EGREP in
13725  [\\/]* | ?:[\\/]*)
13726  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13727  ;;
13728  *)
13729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13730for as_dir in $PATH
13731do
13732  IFS=$as_save_IFS
13733  test -z "$as_dir" && as_dir=.
13734    for ac_exec_ext in '' $ac_executable_extensions; do
13735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13736    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13738    break 2
13739  fi
13740done
13741  done
13742IFS=$as_save_IFS
13743
13744  ;;
13745esac
13746fi
13747EGREP=$ac_cv_path_EGREP
13748if test -n "$EGREP"; then
13749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13750$as_echo "$EGREP" >&6; }
13751else
13752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13753$as_echo "no" >&6; }
13754fi
13755
13756
13757          if test "x$EGREP" = x; then
13758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13759          fi
13760        else
13761          # Otherwise we believe it is a complete path. Use it as it is.
13762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13763$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13765$as_echo_n "checking for EGREP... " >&6; }
13766          if test ! -x "$tool_specified"; then
13767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13768$as_echo "not found" >&6; }
13769            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13770          fi
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13772$as_echo "$tool_specified" >&6; }
13773        fi
13774      fi
13775    fi
13776
13777  fi
13778
13779
13780  if test "x$EGREP" = x; then
13781    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13782  fi
13783
13784
13785
13786
13787  # Publish this variable in the help.
13788
13789
13790  if [ -z "${FGREP+x}" ]; then
13791    # The variable is not set by user, try to locate tool using the code snippet
13792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13793$as_echo_n "checking for fgrep... " >&6; }
13794if ${ac_cv_path_FGREP+:} false; then :
13795  $as_echo_n "(cached) " >&6
13796else
13797  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13798   then ac_cv_path_FGREP="$GREP -F"
13799   else
13800     if test -z "$FGREP"; then
13801  ac_path_FGREP_found=false
13802  # Loop through the user's path and test for each of PROGNAME-LIST
13803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13804for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13805do
13806  IFS=$as_save_IFS
13807  test -z "$as_dir" && as_dir=.
13808    for ac_prog in fgrep; do
13809    for ac_exec_ext in '' $ac_executable_extensions; do
13810      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13811      as_fn_executable_p "$ac_path_FGREP" || continue
13812# Check for GNU ac_path_FGREP and select it if it is found.
13813  # Check for GNU $ac_path_FGREP
13814case `"$ac_path_FGREP" --version 2>&1` in
13815*GNU*)
13816  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13817*)
13818  ac_count=0
13819  $as_echo_n 0123456789 >"conftest.in"
13820  while :
13821  do
13822    cat "conftest.in" "conftest.in" >"conftest.tmp"
13823    mv "conftest.tmp" "conftest.in"
13824    cp "conftest.in" "conftest.nl"
13825    $as_echo 'FGREP' >> "conftest.nl"
13826    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13827    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13828    as_fn_arith $ac_count + 1 && ac_count=$as_val
13829    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13830      # Best one so far, save it but keep looking for a better one
13831      ac_cv_path_FGREP="$ac_path_FGREP"
13832      ac_path_FGREP_max=$ac_count
13833    fi
13834    # 10*(2^10) chars as input seems more than enough
13835    test $ac_count -gt 10 && break
13836  done
13837  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13838esac
13839
13840      $ac_path_FGREP_found && break 3
13841    done
13842  done
13843  done
13844IFS=$as_save_IFS
13845  if test -z "$ac_cv_path_FGREP"; then
13846    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13847  fi
13848else
13849  ac_cv_path_FGREP=$FGREP
13850fi
13851
13852   fi
13853fi
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13855$as_echo "$ac_cv_path_FGREP" >&6; }
13856 FGREP="$ac_cv_path_FGREP"
13857
13858
13859  else
13860    # The variable is set, but is it from the command line or the environment?
13861
13862    # Try to remove the string !FGREP! from our list.
13863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13865      # If it failed, the variable was not from the command line. Ignore it,
13866      # but warn the user (except for BASH, which is always set by the calling BASH).
13867      if test "xFGREP" != xBASH; then
13868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13869$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13870      fi
13871      # Try to locate tool using the code snippet
13872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13873$as_echo_n "checking for fgrep... " >&6; }
13874if ${ac_cv_path_FGREP+:} false; then :
13875  $as_echo_n "(cached) " >&6
13876else
13877  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13878   then ac_cv_path_FGREP="$GREP -F"
13879   else
13880     if test -z "$FGREP"; then
13881  ac_path_FGREP_found=false
13882  # Loop through the user's path and test for each of PROGNAME-LIST
13883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13884for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13885do
13886  IFS=$as_save_IFS
13887  test -z "$as_dir" && as_dir=.
13888    for ac_prog in fgrep; do
13889    for ac_exec_ext in '' $ac_executable_extensions; do
13890      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13891      as_fn_executable_p "$ac_path_FGREP" || continue
13892# Check for GNU ac_path_FGREP and select it if it is found.
13893  # Check for GNU $ac_path_FGREP
13894case `"$ac_path_FGREP" --version 2>&1` in
13895*GNU*)
13896  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13897*)
13898  ac_count=0
13899  $as_echo_n 0123456789 >"conftest.in"
13900  while :
13901  do
13902    cat "conftest.in" "conftest.in" >"conftest.tmp"
13903    mv "conftest.tmp" "conftest.in"
13904    cp "conftest.in" "conftest.nl"
13905    $as_echo 'FGREP' >> "conftest.nl"
13906    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13907    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13908    as_fn_arith $ac_count + 1 && ac_count=$as_val
13909    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13910      # Best one so far, save it but keep looking for a better one
13911      ac_cv_path_FGREP="$ac_path_FGREP"
13912      ac_path_FGREP_max=$ac_count
13913    fi
13914    # 10*(2^10) chars as input seems more than enough
13915    test $ac_count -gt 10 && break
13916  done
13917  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13918esac
13919
13920      $ac_path_FGREP_found && break 3
13921    done
13922  done
13923  done
13924IFS=$as_save_IFS
13925  if test -z "$ac_cv_path_FGREP"; then
13926    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13927  fi
13928else
13929  ac_cv_path_FGREP=$FGREP
13930fi
13931
13932   fi
13933fi
13934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13935$as_echo "$ac_cv_path_FGREP" >&6; }
13936 FGREP="$ac_cv_path_FGREP"
13937
13938
13939    else
13940      # If it succeeded, then it was overridden by the user. We will use it
13941      # for the tool.
13942
13943      # First remove it from the list of overridden variables, so we can test
13944      # for unknown variables in the end.
13945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13946
13947      # Check if we try to supply an empty value
13948      if test "x$FGREP" = x; then
13949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13950$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13952$as_echo_n "checking for FGREP... " >&6; }
13953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13954$as_echo "disabled" >&6; }
13955      else
13956        # Check if the provided tool contains a complete path.
13957        tool_specified="$FGREP"
13958        tool_basename="${tool_specified##*/}"
13959        if test "x$tool_basename" = "x$tool_specified"; then
13960          # A command without a complete path is provided, search $PATH.
13961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13962$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13963          # Extract the first word of "$tool_basename", so it can be a program name with args.
13964set dummy $tool_basename; ac_word=$2
13965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13966$as_echo_n "checking for $ac_word... " >&6; }
13967if ${ac_cv_path_FGREP+:} false; then :
13968  $as_echo_n "(cached) " >&6
13969else
13970  case $FGREP in
13971  [\\/]* | ?:[\\/]*)
13972  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13973  ;;
13974  *)
13975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13976for as_dir in $PATH
13977do
13978  IFS=$as_save_IFS
13979  test -z "$as_dir" && as_dir=.
13980    for ac_exec_ext in '' $ac_executable_extensions; do
13981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13982    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13984    break 2
13985  fi
13986done
13987  done
13988IFS=$as_save_IFS
13989
13990  ;;
13991esac
13992fi
13993FGREP=$ac_cv_path_FGREP
13994if test -n "$FGREP"; then
13995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13996$as_echo "$FGREP" >&6; }
13997else
13998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13999$as_echo "no" >&6; }
14000fi
14001
14002
14003          if test "x$FGREP" = x; then
14004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14005          fi
14006        else
14007          # Otherwise we believe it is a complete path. Use it as it is.
14008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14009$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14011$as_echo_n "checking for FGREP... " >&6; }
14012          if test ! -x "$tool_specified"; then
14013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14014$as_echo "not found" >&6; }
14015            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14016          fi
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14018$as_echo "$tool_specified" >&6; }
14019        fi
14020      fi
14021    fi
14022
14023  fi
14024
14025
14026  if test "x$FGREP" = x; then
14027    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14028  fi
14029
14030
14031
14032
14033  # Publish this variable in the help.
14034
14035
14036  if [ -z "${SED+x}" ]; then
14037    # The variable is not set by user, try to locate tool using the code snippet
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14039$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14040if ${ac_cv_path_SED+:} false; then :
14041  $as_echo_n "(cached) " >&6
14042else
14043            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14044     for ac_i in 1 2 3 4 5 6 7; do
14045       ac_script="$ac_script$as_nl$ac_script"
14046     done
14047     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14048     { ac_script=; unset ac_script;}
14049     if test -z "$SED"; then
14050  ac_path_SED_found=false
14051  # Loop through the user's path and test for each of PROGNAME-LIST
14052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14053for as_dir in $PATH
14054do
14055  IFS=$as_save_IFS
14056  test -z "$as_dir" && as_dir=.
14057    for ac_prog in sed gsed; do
14058    for ac_exec_ext in '' $ac_executable_extensions; do
14059      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14060      as_fn_executable_p "$ac_path_SED" || continue
14061# Check for GNU ac_path_SED and select it if it is found.
14062  # Check for GNU $ac_path_SED
14063case `"$ac_path_SED" --version 2>&1` in
14064*GNU*)
14065  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14066*)
14067  ac_count=0
14068  $as_echo_n 0123456789 >"conftest.in"
14069  while :
14070  do
14071    cat "conftest.in" "conftest.in" >"conftest.tmp"
14072    mv "conftest.tmp" "conftest.in"
14073    cp "conftest.in" "conftest.nl"
14074    $as_echo '' >> "conftest.nl"
14075    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14076    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14077    as_fn_arith $ac_count + 1 && ac_count=$as_val
14078    if test $ac_count -gt ${ac_path_SED_max-0}; then
14079      # Best one so far, save it but keep looking for a better one
14080      ac_cv_path_SED="$ac_path_SED"
14081      ac_path_SED_max=$ac_count
14082    fi
14083    # 10*(2^10) chars as input seems more than enough
14084    test $ac_count -gt 10 && break
14085  done
14086  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14087esac
14088
14089      $ac_path_SED_found && break 3
14090    done
14091  done
14092  done
14093IFS=$as_save_IFS
14094  if test -z "$ac_cv_path_SED"; then
14095    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14096  fi
14097else
14098  ac_cv_path_SED=$SED
14099fi
14100
14101fi
14102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14103$as_echo "$ac_cv_path_SED" >&6; }
14104 SED="$ac_cv_path_SED"
14105  rm -f conftest.sed
14106
14107  else
14108    # The variable is set, but is it from the command line or the environment?
14109
14110    # Try to remove the string !SED! from our list.
14111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14113      # If it failed, the variable was not from the command line. Ignore it,
14114      # but warn the user (except for BASH, which is always set by the calling BASH).
14115      if test "xSED" != xBASH; then
14116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14117$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14118      fi
14119      # Try to locate tool using the code snippet
14120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14121$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14122if ${ac_cv_path_SED+:} false; then :
14123  $as_echo_n "(cached) " >&6
14124else
14125            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14126     for ac_i in 1 2 3 4 5 6 7; do
14127       ac_script="$ac_script$as_nl$ac_script"
14128     done
14129     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14130     { ac_script=; unset ac_script;}
14131     if test -z "$SED"; then
14132  ac_path_SED_found=false
14133  # Loop through the user's path and test for each of PROGNAME-LIST
14134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14135for as_dir in $PATH
14136do
14137  IFS=$as_save_IFS
14138  test -z "$as_dir" && as_dir=.
14139    for ac_prog in sed gsed; do
14140    for ac_exec_ext in '' $ac_executable_extensions; do
14141      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14142      as_fn_executable_p "$ac_path_SED" || continue
14143# Check for GNU ac_path_SED and select it if it is found.
14144  # Check for GNU $ac_path_SED
14145case `"$ac_path_SED" --version 2>&1` in
14146*GNU*)
14147  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14148*)
14149  ac_count=0
14150  $as_echo_n 0123456789 >"conftest.in"
14151  while :
14152  do
14153    cat "conftest.in" "conftest.in" >"conftest.tmp"
14154    mv "conftest.tmp" "conftest.in"
14155    cp "conftest.in" "conftest.nl"
14156    $as_echo '' >> "conftest.nl"
14157    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14158    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14159    as_fn_arith $ac_count + 1 && ac_count=$as_val
14160    if test $ac_count -gt ${ac_path_SED_max-0}; then
14161      # Best one so far, save it but keep looking for a better one
14162      ac_cv_path_SED="$ac_path_SED"
14163      ac_path_SED_max=$ac_count
14164    fi
14165    # 10*(2^10) chars as input seems more than enough
14166    test $ac_count -gt 10 && break
14167  done
14168  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14169esac
14170
14171      $ac_path_SED_found && break 3
14172    done
14173  done
14174  done
14175IFS=$as_save_IFS
14176  if test -z "$ac_cv_path_SED"; then
14177    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14178  fi
14179else
14180  ac_cv_path_SED=$SED
14181fi
14182
14183fi
14184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14185$as_echo "$ac_cv_path_SED" >&6; }
14186 SED="$ac_cv_path_SED"
14187  rm -f conftest.sed
14188
14189    else
14190      # If it succeeded, then it was overridden by the user. We will use it
14191      # for the tool.
14192
14193      # First remove it from the list of overridden variables, so we can test
14194      # for unknown variables in the end.
14195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14196
14197      # Check if we try to supply an empty value
14198      if test "x$SED" = x; then
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14200$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14202$as_echo_n "checking for SED... " >&6; }
14203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14204$as_echo "disabled" >&6; }
14205      else
14206        # Check if the provided tool contains a complete path.
14207        tool_specified="$SED"
14208        tool_basename="${tool_specified##*/}"
14209        if test "x$tool_basename" = "x$tool_specified"; then
14210          # A command without a complete path is provided, search $PATH.
14211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14212$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14213          # Extract the first word of "$tool_basename", so it can be a program name with args.
14214set dummy $tool_basename; ac_word=$2
14215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14216$as_echo_n "checking for $ac_word... " >&6; }
14217if ${ac_cv_path_SED+:} false; then :
14218  $as_echo_n "(cached) " >&6
14219else
14220  case $SED in
14221  [\\/]* | ?:[\\/]*)
14222  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14223  ;;
14224  *)
14225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14226for as_dir in $PATH
14227do
14228  IFS=$as_save_IFS
14229  test -z "$as_dir" && as_dir=.
14230    for ac_exec_ext in '' $ac_executable_extensions; do
14231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14232    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14234    break 2
14235  fi
14236done
14237  done
14238IFS=$as_save_IFS
14239
14240  ;;
14241esac
14242fi
14243SED=$ac_cv_path_SED
14244if test -n "$SED"; then
14245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14246$as_echo "$SED" >&6; }
14247else
14248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14249$as_echo "no" >&6; }
14250fi
14251
14252
14253          if test "x$SED" = x; then
14254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14255          fi
14256        else
14257          # Otherwise we believe it is a complete path. Use it as it is.
14258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14259$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14261$as_echo_n "checking for SED... " >&6; }
14262          if test ! -x "$tool_specified"; then
14263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14264$as_echo "not found" >&6; }
14265            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14266          fi
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14268$as_echo "$tool_specified" >&6; }
14269        fi
14270      fi
14271    fi
14272
14273  fi
14274
14275
14276  if test "x$SED" = x; then
14277    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14278  fi
14279
14280
14281
14282  # Always force rm.
14283  RM="$RM -f"
14284
14285  # pwd behaves differently on various platforms and some don't support the -L flag.
14286  # Always use the bash builtin pwd to get uniform behavior.
14287  THEPWDCMD=pwd
14288
14289  # These are not required on all platforms
14290
14291
14292  # Publish this variable in the help.
14293
14294
14295  if [ -z "${CYGPATH+x}" ]; then
14296    # The variable is not set by user, try to locate tool using the code snippet
14297    for ac_prog in cygpath
14298do
14299  # Extract the first word of "$ac_prog", so it can be a program name with args.
14300set dummy $ac_prog; ac_word=$2
14301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14302$as_echo_n "checking for $ac_word... " >&6; }
14303if ${ac_cv_path_CYGPATH+:} false; then :
14304  $as_echo_n "(cached) " >&6
14305else
14306  case $CYGPATH in
14307  [\\/]* | ?:[\\/]*)
14308  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14309  ;;
14310  *)
14311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14312for as_dir in $PATH
14313do
14314  IFS=$as_save_IFS
14315  test -z "$as_dir" && as_dir=.
14316    for ac_exec_ext in '' $ac_executable_extensions; do
14317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14318    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14320    break 2
14321  fi
14322done
14323  done
14324IFS=$as_save_IFS
14325
14326  ;;
14327esac
14328fi
14329CYGPATH=$ac_cv_path_CYGPATH
14330if test -n "$CYGPATH"; then
14331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14332$as_echo "$CYGPATH" >&6; }
14333else
14334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14335$as_echo "no" >&6; }
14336fi
14337
14338
14339  test -n "$CYGPATH" && break
14340done
14341
14342  else
14343    # The variable is set, but is it from the command line or the environment?
14344
14345    # Try to remove the string !CYGPATH! from our list.
14346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14348      # If it failed, the variable was not from the command line. Ignore it,
14349      # but warn the user (except for BASH, which is always set by the calling BASH).
14350      if test "xCYGPATH" != xBASH; then
14351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14352$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14353      fi
14354      # Try to locate tool using the code snippet
14355      for ac_prog in cygpath
14356do
14357  # Extract the first word of "$ac_prog", so it can be a program name with args.
14358set dummy $ac_prog; ac_word=$2
14359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14360$as_echo_n "checking for $ac_word... " >&6; }
14361if ${ac_cv_path_CYGPATH+:} false; then :
14362  $as_echo_n "(cached) " >&6
14363else
14364  case $CYGPATH in
14365  [\\/]* | ?:[\\/]*)
14366  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14367  ;;
14368  *)
14369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14370for as_dir in $PATH
14371do
14372  IFS=$as_save_IFS
14373  test -z "$as_dir" && as_dir=.
14374    for ac_exec_ext in '' $ac_executable_extensions; do
14375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14376    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14378    break 2
14379  fi
14380done
14381  done
14382IFS=$as_save_IFS
14383
14384  ;;
14385esac
14386fi
14387CYGPATH=$ac_cv_path_CYGPATH
14388if test -n "$CYGPATH"; then
14389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14390$as_echo "$CYGPATH" >&6; }
14391else
14392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14393$as_echo "no" >&6; }
14394fi
14395
14396
14397  test -n "$CYGPATH" && break
14398done
14399
14400    else
14401      # If it succeeded, then it was overridden by the user. We will use it
14402      # for the tool.
14403
14404      # First remove it from the list of overridden variables, so we can test
14405      # for unknown variables in the end.
14406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14407
14408      # Check if we try to supply an empty value
14409      if test "x$CYGPATH" = x; then
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14411$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14413$as_echo_n "checking for CYGPATH... " >&6; }
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14415$as_echo "disabled" >&6; }
14416      else
14417        # Check if the provided tool contains a complete path.
14418        tool_specified="$CYGPATH"
14419        tool_basename="${tool_specified##*/}"
14420        if test "x$tool_basename" = "x$tool_specified"; then
14421          # A command without a complete path is provided, search $PATH.
14422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14423$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14424          # Extract the first word of "$tool_basename", so it can be a program name with args.
14425set dummy $tool_basename; ac_word=$2
14426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14427$as_echo_n "checking for $ac_word... " >&6; }
14428if ${ac_cv_path_CYGPATH+:} false; then :
14429  $as_echo_n "(cached) " >&6
14430else
14431  case $CYGPATH in
14432  [\\/]* | ?:[\\/]*)
14433  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14434  ;;
14435  *)
14436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14437for as_dir in $PATH
14438do
14439  IFS=$as_save_IFS
14440  test -z "$as_dir" && as_dir=.
14441    for ac_exec_ext in '' $ac_executable_extensions; do
14442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14443    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14445    break 2
14446  fi
14447done
14448  done
14449IFS=$as_save_IFS
14450
14451  ;;
14452esac
14453fi
14454CYGPATH=$ac_cv_path_CYGPATH
14455if test -n "$CYGPATH"; then
14456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14457$as_echo "$CYGPATH" >&6; }
14458else
14459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14460$as_echo "no" >&6; }
14461fi
14462
14463
14464          if test "x$CYGPATH" = x; then
14465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14466          fi
14467        else
14468          # Otherwise we believe it is a complete path. Use it as it is.
14469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14470$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14472$as_echo_n "checking for CYGPATH... " >&6; }
14473          if test ! -x "$tool_specified"; then
14474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14475$as_echo "not found" >&6; }
14476            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14477          fi
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14479$as_echo "$tool_specified" >&6; }
14480        fi
14481      fi
14482    fi
14483
14484  fi
14485
14486
14487
14488
14489  # Publish this variable in the help.
14490
14491
14492  if [ -z "${READLINK+x}" ]; then
14493    # The variable is not set by user, try to locate tool using the code snippet
14494    for ac_prog in greadlink readlink
14495do
14496  # Extract the first word of "$ac_prog", so it can be a program name with args.
14497set dummy $ac_prog; ac_word=$2
14498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14499$as_echo_n "checking for $ac_word... " >&6; }
14500if ${ac_cv_path_READLINK+:} false; then :
14501  $as_echo_n "(cached) " >&6
14502else
14503  case $READLINK in
14504  [\\/]* | ?:[\\/]*)
14505  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14506  ;;
14507  *)
14508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14509for as_dir in $PATH
14510do
14511  IFS=$as_save_IFS
14512  test -z "$as_dir" && as_dir=.
14513    for ac_exec_ext in '' $ac_executable_extensions; do
14514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14515    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14517    break 2
14518  fi
14519done
14520  done
14521IFS=$as_save_IFS
14522
14523  ;;
14524esac
14525fi
14526READLINK=$ac_cv_path_READLINK
14527if test -n "$READLINK"; then
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14529$as_echo "$READLINK" >&6; }
14530else
14531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14532$as_echo "no" >&6; }
14533fi
14534
14535
14536  test -n "$READLINK" && break
14537done
14538
14539  else
14540    # The variable is set, but is it from the command line or the environment?
14541
14542    # Try to remove the string !READLINK! from our list.
14543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14545      # If it failed, the variable was not from the command line. Ignore it,
14546      # but warn the user (except for BASH, which is always set by the calling BASH).
14547      if test "xREADLINK" != xBASH; then
14548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14549$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14550      fi
14551      # Try to locate tool using the code snippet
14552      for ac_prog in greadlink readlink
14553do
14554  # Extract the first word of "$ac_prog", so it can be a program name with args.
14555set dummy $ac_prog; ac_word=$2
14556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14557$as_echo_n "checking for $ac_word... " >&6; }
14558if ${ac_cv_path_READLINK+:} false; then :
14559  $as_echo_n "(cached) " >&6
14560else
14561  case $READLINK in
14562  [\\/]* | ?:[\\/]*)
14563  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14564  ;;
14565  *)
14566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14567for as_dir in $PATH
14568do
14569  IFS=$as_save_IFS
14570  test -z "$as_dir" && as_dir=.
14571    for ac_exec_ext in '' $ac_executable_extensions; do
14572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14573    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14575    break 2
14576  fi
14577done
14578  done
14579IFS=$as_save_IFS
14580
14581  ;;
14582esac
14583fi
14584READLINK=$ac_cv_path_READLINK
14585if test -n "$READLINK"; then
14586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14587$as_echo "$READLINK" >&6; }
14588else
14589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14590$as_echo "no" >&6; }
14591fi
14592
14593
14594  test -n "$READLINK" && break
14595done
14596
14597    else
14598      # If it succeeded, then it was overridden by the user. We will use it
14599      # for the tool.
14600
14601      # First remove it from the list of overridden variables, so we can test
14602      # for unknown variables in the end.
14603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14604
14605      # Check if we try to supply an empty value
14606      if test "x$READLINK" = x; then
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14608$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14610$as_echo_n "checking for READLINK... " >&6; }
14611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14612$as_echo "disabled" >&6; }
14613      else
14614        # Check if the provided tool contains a complete path.
14615        tool_specified="$READLINK"
14616        tool_basename="${tool_specified##*/}"
14617        if test "x$tool_basename" = "x$tool_specified"; then
14618          # A command without a complete path is provided, search $PATH.
14619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14620$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14621          # Extract the first word of "$tool_basename", so it can be a program name with args.
14622set dummy $tool_basename; ac_word=$2
14623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14624$as_echo_n "checking for $ac_word... " >&6; }
14625if ${ac_cv_path_READLINK+:} false; then :
14626  $as_echo_n "(cached) " >&6
14627else
14628  case $READLINK in
14629  [\\/]* | ?:[\\/]*)
14630  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14631  ;;
14632  *)
14633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14634for as_dir in $PATH
14635do
14636  IFS=$as_save_IFS
14637  test -z "$as_dir" && as_dir=.
14638    for ac_exec_ext in '' $ac_executable_extensions; do
14639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14640    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14642    break 2
14643  fi
14644done
14645  done
14646IFS=$as_save_IFS
14647
14648  ;;
14649esac
14650fi
14651READLINK=$ac_cv_path_READLINK
14652if test -n "$READLINK"; then
14653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14654$as_echo "$READLINK" >&6; }
14655else
14656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14657$as_echo "no" >&6; }
14658fi
14659
14660
14661          if test "x$READLINK" = x; then
14662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14663          fi
14664        else
14665          # Otherwise we believe it is a complete path. Use it as it is.
14666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14667$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14669$as_echo_n "checking for READLINK... " >&6; }
14670          if test ! -x "$tool_specified"; then
14671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14672$as_echo "not found" >&6; }
14673            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14674          fi
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14676$as_echo "$tool_specified" >&6; }
14677        fi
14678      fi
14679    fi
14680
14681  fi
14682
14683
14684
14685
14686  # Publish this variable in the help.
14687
14688
14689  if [ -z "${DF+x}" ]; then
14690    # The variable is not set by user, try to locate tool using the code snippet
14691    for ac_prog in df
14692do
14693  # Extract the first word of "$ac_prog", so it can be a program name with args.
14694set dummy $ac_prog; ac_word=$2
14695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14696$as_echo_n "checking for $ac_word... " >&6; }
14697if ${ac_cv_path_DF+:} false; then :
14698  $as_echo_n "(cached) " >&6
14699else
14700  case $DF in
14701  [\\/]* | ?:[\\/]*)
14702  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14703  ;;
14704  *)
14705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14706for as_dir in $PATH
14707do
14708  IFS=$as_save_IFS
14709  test -z "$as_dir" && as_dir=.
14710    for ac_exec_ext in '' $ac_executable_extensions; do
14711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14712    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14714    break 2
14715  fi
14716done
14717  done
14718IFS=$as_save_IFS
14719
14720  ;;
14721esac
14722fi
14723DF=$ac_cv_path_DF
14724if test -n "$DF"; then
14725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14726$as_echo "$DF" >&6; }
14727else
14728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14729$as_echo "no" >&6; }
14730fi
14731
14732
14733  test -n "$DF" && break
14734done
14735
14736  else
14737    # The variable is set, but is it from the command line or the environment?
14738
14739    # Try to remove the string !DF! from our list.
14740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14742      # If it failed, the variable was not from the command line. Ignore it,
14743      # but warn the user (except for BASH, which is always set by the calling BASH).
14744      if test "xDF" != xBASH; then
14745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14746$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14747      fi
14748      # Try to locate tool using the code snippet
14749      for ac_prog in df
14750do
14751  # Extract the first word of "$ac_prog", so it can be a program name with args.
14752set dummy $ac_prog; ac_word=$2
14753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14754$as_echo_n "checking for $ac_word... " >&6; }
14755if ${ac_cv_path_DF+:} false; then :
14756  $as_echo_n "(cached) " >&6
14757else
14758  case $DF in
14759  [\\/]* | ?:[\\/]*)
14760  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14761  ;;
14762  *)
14763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14764for as_dir in $PATH
14765do
14766  IFS=$as_save_IFS
14767  test -z "$as_dir" && as_dir=.
14768    for ac_exec_ext in '' $ac_executable_extensions; do
14769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14770    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14772    break 2
14773  fi
14774done
14775  done
14776IFS=$as_save_IFS
14777
14778  ;;
14779esac
14780fi
14781DF=$ac_cv_path_DF
14782if test -n "$DF"; then
14783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14784$as_echo "$DF" >&6; }
14785else
14786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14787$as_echo "no" >&6; }
14788fi
14789
14790
14791  test -n "$DF" && break
14792done
14793
14794    else
14795      # If it succeeded, then it was overridden by the user. We will use it
14796      # for the tool.
14797
14798      # First remove it from the list of overridden variables, so we can test
14799      # for unknown variables in the end.
14800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14801
14802      # Check if we try to supply an empty value
14803      if test "x$DF" = x; then
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14805$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14807$as_echo_n "checking for DF... " >&6; }
14808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14809$as_echo "disabled" >&6; }
14810      else
14811        # Check if the provided tool contains a complete path.
14812        tool_specified="$DF"
14813        tool_basename="${tool_specified##*/}"
14814        if test "x$tool_basename" = "x$tool_specified"; then
14815          # A command without a complete path is provided, search $PATH.
14816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14817$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14818          # Extract the first word of "$tool_basename", so it can be a program name with args.
14819set dummy $tool_basename; ac_word=$2
14820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14821$as_echo_n "checking for $ac_word... " >&6; }
14822if ${ac_cv_path_DF+:} false; then :
14823  $as_echo_n "(cached) " >&6
14824else
14825  case $DF in
14826  [\\/]* | ?:[\\/]*)
14827  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14828  ;;
14829  *)
14830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14831for as_dir in $PATH
14832do
14833  IFS=$as_save_IFS
14834  test -z "$as_dir" && as_dir=.
14835    for ac_exec_ext in '' $ac_executable_extensions; do
14836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14837    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14839    break 2
14840  fi
14841done
14842  done
14843IFS=$as_save_IFS
14844
14845  ;;
14846esac
14847fi
14848DF=$ac_cv_path_DF
14849if test -n "$DF"; then
14850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14851$as_echo "$DF" >&6; }
14852else
14853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14854$as_echo "no" >&6; }
14855fi
14856
14857
14858          if test "x$DF" = x; then
14859            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14860          fi
14861        else
14862          # Otherwise we believe it is a complete path. Use it as it is.
14863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14864$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14865          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14866$as_echo_n "checking for DF... " >&6; }
14867          if test ! -x "$tool_specified"; then
14868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14869$as_echo "not found" >&6; }
14870            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14871          fi
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14873$as_echo "$tool_specified" >&6; }
14874        fi
14875      fi
14876    fi
14877
14878  fi
14879
14880
14881
14882
14883  # Publish this variable in the help.
14884
14885
14886  if [ -z "${CPIO+x}" ]; then
14887    # The variable is not set by user, try to locate tool using the code snippet
14888    for ac_prog in cpio bsdcpio
14889do
14890  # Extract the first word of "$ac_prog", so it can be a program name with args.
14891set dummy $ac_prog; ac_word=$2
14892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14893$as_echo_n "checking for $ac_word... " >&6; }
14894if ${ac_cv_path_CPIO+:} false; then :
14895  $as_echo_n "(cached) " >&6
14896else
14897  case $CPIO in
14898  [\\/]* | ?:[\\/]*)
14899  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14900  ;;
14901  *)
14902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14903for as_dir in $PATH
14904do
14905  IFS=$as_save_IFS
14906  test -z "$as_dir" && as_dir=.
14907    for ac_exec_ext in '' $ac_executable_extensions; do
14908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14909    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14911    break 2
14912  fi
14913done
14914  done
14915IFS=$as_save_IFS
14916
14917  ;;
14918esac
14919fi
14920CPIO=$ac_cv_path_CPIO
14921if test -n "$CPIO"; then
14922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14923$as_echo "$CPIO" >&6; }
14924else
14925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14926$as_echo "no" >&6; }
14927fi
14928
14929
14930  test -n "$CPIO" && break
14931done
14932
14933  else
14934    # The variable is set, but is it from the command line or the environment?
14935
14936    # Try to remove the string !CPIO! from our list.
14937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14939      # If it failed, the variable was not from the command line. Ignore it,
14940      # but warn the user (except for BASH, which is always set by the calling BASH).
14941      if test "xCPIO" != xBASH; then
14942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14943$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14944      fi
14945      # Try to locate tool using the code snippet
14946      for ac_prog in cpio bsdcpio
14947do
14948  # Extract the first word of "$ac_prog", so it can be a program name with args.
14949set dummy $ac_prog; ac_word=$2
14950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14951$as_echo_n "checking for $ac_word... " >&6; }
14952if ${ac_cv_path_CPIO+:} false; then :
14953  $as_echo_n "(cached) " >&6
14954else
14955  case $CPIO in
14956  [\\/]* | ?:[\\/]*)
14957  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14958  ;;
14959  *)
14960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14961for as_dir in $PATH
14962do
14963  IFS=$as_save_IFS
14964  test -z "$as_dir" && as_dir=.
14965    for ac_exec_ext in '' $ac_executable_extensions; do
14966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14967    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14969    break 2
14970  fi
14971done
14972  done
14973IFS=$as_save_IFS
14974
14975  ;;
14976esac
14977fi
14978CPIO=$ac_cv_path_CPIO
14979if test -n "$CPIO"; then
14980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14981$as_echo "$CPIO" >&6; }
14982else
14983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14984$as_echo "no" >&6; }
14985fi
14986
14987
14988  test -n "$CPIO" && break
14989done
14990
14991    else
14992      # If it succeeded, then it was overridden by the user. We will use it
14993      # for the tool.
14994
14995      # First remove it from the list of overridden variables, so we can test
14996      # for unknown variables in the end.
14997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14998
14999      # Check if we try to supply an empty value
15000      if test "x$CPIO" = x; then
15001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15002$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15004$as_echo_n "checking for CPIO... " >&6; }
15005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15006$as_echo "disabled" >&6; }
15007      else
15008        # Check if the provided tool contains a complete path.
15009        tool_specified="$CPIO"
15010        tool_basename="${tool_specified##*/}"
15011        if test "x$tool_basename" = "x$tool_specified"; then
15012          # A command without a complete path is provided, search $PATH.
15013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15014$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15015          # Extract the first word of "$tool_basename", so it can be a program name with args.
15016set dummy $tool_basename; ac_word=$2
15017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15018$as_echo_n "checking for $ac_word... " >&6; }
15019if ${ac_cv_path_CPIO+:} false; then :
15020  $as_echo_n "(cached) " >&6
15021else
15022  case $CPIO in
15023  [\\/]* | ?:[\\/]*)
15024  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15025  ;;
15026  *)
15027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15028for as_dir in $PATH
15029do
15030  IFS=$as_save_IFS
15031  test -z "$as_dir" && as_dir=.
15032    for ac_exec_ext in '' $ac_executable_extensions; do
15033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15034    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15036    break 2
15037  fi
15038done
15039  done
15040IFS=$as_save_IFS
15041
15042  ;;
15043esac
15044fi
15045CPIO=$ac_cv_path_CPIO
15046if test -n "$CPIO"; then
15047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15048$as_echo "$CPIO" >&6; }
15049else
15050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15051$as_echo "no" >&6; }
15052fi
15053
15054
15055          if test "x$CPIO" = x; then
15056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15057          fi
15058        else
15059          # Otherwise we believe it is a complete path. Use it as it is.
15060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15061$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15063$as_echo_n "checking for CPIO... " >&6; }
15064          if test ! -x "$tool_specified"; then
15065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15066$as_echo "not found" >&6; }
15067            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15068          fi
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15070$as_echo "$tool_specified" >&6; }
15071        fi
15072      fi
15073    fi
15074
15075  fi
15076
15077
15078
15079
15080  # Publish this variable in the help.
15081
15082
15083  if [ -z "${NICE+x}" ]; then
15084    # The variable is not set by user, try to locate tool using the code snippet
15085    for ac_prog in nice
15086do
15087  # Extract the first word of "$ac_prog", so it can be a program name with args.
15088set dummy $ac_prog; ac_word=$2
15089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15090$as_echo_n "checking for $ac_word... " >&6; }
15091if ${ac_cv_path_NICE+:} false; then :
15092  $as_echo_n "(cached) " >&6
15093else
15094  case $NICE in
15095  [\\/]* | ?:[\\/]*)
15096  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15097  ;;
15098  *)
15099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15100for as_dir in $PATH
15101do
15102  IFS=$as_save_IFS
15103  test -z "$as_dir" && as_dir=.
15104    for ac_exec_ext in '' $ac_executable_extensions; do
15105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15106    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15108    break 2
15109  fi
15110done
15111  done
15112IFS=$as_save_IFS
15113
15114  ;;
15115esac
15116fi
15117NICE=$ac_cv_path_NICE
15118if test -n "$NICE"; then
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15120$as_echo "$NICE" >&6; }
15121else
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15123$as_echo "no" >&6; }
15124fi
15125
15126
15127  test -n "$NICE" && break
15128done
15129
15130  else
15131    # The variable is set, but is it from the command line or the environment?
15132
15133    # Try to remove the string !NICE! from our list.
15134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15136      # If it failed, the variable was not from the command line. Ignore it,
15137      # but warn the user (except for BASH, which is always set by the calling BASH).
15138      if test "xNICE" != xBASH; then
15139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15140$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15141      fi
15142      # Try to locate tool using the code snippet
15143      for ac_prog in nice
15144do
15145  # Extract the first word of "$ac_prog", so it can be a program name with args.
15146set dummy $ac_prog; ac_word=$2
15147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15148$as_echo_n "checking for $ac_word... " >&6; }
15149if ${ac_cv_path_NICE+:} false; then :
15150  $as_echo_n "(cached) " >&6
15151else
15152  case $NICE in
15153  [\\/]* | ?:[\\/]*)
15154  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15155  ;;
15156  *)
15157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15158for as_dir in $PATH
15159do
15160  IFS=$as_save_IFS
15161  test -z "$as_dir" && as_dir=.
15162    for ac_exec_ext in '' $ac_executable_extensions; do
15163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15164    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15166    break 2
15167  fi
15168done
15169  done
15170IFS=$as_save_IFS
15171
15172  ;;
15173esac
15174fi
15175NICE=$ac_cv_path_NICE
15176if test -n "$NICE"; then
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15178$as_echo "$NICE" >&6; }
15179else
15180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181$as_echo "no" >&6; }
15182fi
15183
15184
15185  test -n "$NICE" && break
15186done
15187
15188    else
15189      # If it succeeded, then it was overridden by the user. We will use it
15190      # for the tool.
15191
15192      # First remove it from the list of overridden variables, so we can test
15193      # for unknown variables in the end.
15194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15195
15196      # Check if we try to supply an empty value
15197      if test "x$NICE" = x; then
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15199$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15201$as_echo_n "checking for NICE... " >&6; }
15202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15203$as_echo "disabled" >&6; }
15204      else
15205        # Check if the provided tool contains a complete path.
15206        tool_specified="$NICE"
15207        tool_basename="${tool_specified##*/}"
15208        if test "x$tool_basename" = "x$tool_specified"; then
15209          # A command without a complete path is provided, search $PATH.
15210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15211$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15212          # Extract the first word of "$tool_basename", so it can be a program name with args.
15213set dummy $tool_basename; ac_word=$2
15214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15215$as_echo_n "checking for $ac_word... " >&6; }
15216if ${ac_cv_path_NICE+:} false; then :
15217  $as_echo_n "(cached) " >&6
15218else
15219  case $NICE in
15220  [\\/]* | ?:[\\/]*)
15221  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15222  ;;
15223  *)
15224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15225for as_dir in $PATH
15226do
15227  IFS=$as_save_IFS
15228  test -z "$as_dir" && as_dir=.
15229    for ac_exec_ext in '' $ac_executable_extensions; do
15230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15231    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15233    break 2
15234  fi
15235done
15236  done
15237IFS=$as_save_IFS
15238
15239  ;;
15240esac
15241fi
15242NICE=$ac_cv_path_NICE
15243if test -n "$NICE"; then
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15245$as_echo "$NICE" >&6; }
15246else
15247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15248$as_echo "no" >&6; }
15249fi
15250
15251
15252          if test "x$NICE" = x; then
15253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15254          fi
15255        else
15256          # Otherwise we believe it is a complete path. Use it as it is.
15257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15258$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15260$as_echo_n "checking for NICE... " >&6; }
15261          if test ! -x "$tool_specified"; then
15262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15263$as_echo "not found" >&6; }
15264            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15265          fi
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15267$as_echo "$tool_specified" >&6; }
15268        fi
15269      fi
15270    fi
15271
15272  fi
15273
15274
15275
15276
15277# Now we can determine OpenJDK build and target platforms. This is required to
15278# have early on.
15279# Make sure we can run config.sub.
15280$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15281  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15282
15283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15284$as_echo_n "checking build system type... " >&6; }
15285if ${ac_cv_build+:} false; then :
15286  $as_echo_n "(cached) " >&6
15287else
15288  ac_build_alias=$build_alias
15289test "x$ac_build_alias" = x &&
15290  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15291test "x$ac_build_alias" = x &&
15292  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15293ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15294  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15295
15296fi
15297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15298$as_echo "$ac_cv_build" >&6; }
15299case $ac_cv_build in
15300*-*-*) ;;
15301*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15302esac
15303build=$ac_cv_build
15304ac_save_IFS=$IFS; IFS='-'
15305set x $ac_cv_build
15306shift
15307build_cpu=$1
15308build_vendor=$2
15309shift; shift
15310# Remember, the first character of IFS is used to create $*,
15311# except with old shells:
15312build_os=$*
15313IFS=$ac_save_IFS
15314case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15315
15316
15317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15318$as_echo_n "checking host system type... " >&6; }
15319if ${ac_cv_host+:} false; then :
15320  $as_echo_n "(cached) " >&6
15321else
15322  if test "x$host_alias" = x; then
15323  ac_cv_host=$ac_cv_build
15324else
15325  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15326    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15327fi
15328
15329fi
15330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15331$as_echo "$ac_cv_host" >&6; }
15332case $ac_cv_host in
15333*-*-*) ;;
15334*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15335esac
15336host=$ac_cv_host
15337ac_save_IFS=$IFS; IFS='-'
15338set x $ac_cv_host
15339shift
15340host_cpu=$1
15341host_vendor=$2
15342shift; shift
15343# Remember, the first character of IFS is used to create $*,
15344# except with old shells:
15345host_os=$*
15346IFS=$ac_save_IFS
15347case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15348
15349
15350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15351$as_echo_n "checking target system type... " >&6; }
15352if ${ac_cv_target+:} false; then :
15353  $as_echo_n "(cached) " >&6
15354else
15355  if test "x$target_alias" = x; then
15356  ac_cv_target=$ac_cv_host
15357else
15358  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15359    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15360fi
15361
15362fi
15363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15364$as_echo "$ac_cv_target" >&6; }
15365case $ac_cv_target in
15366*-*-*) ;;
15367*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15368esac
15369target=$ac_cv_target
15370ac_save_IFS=$IFS; IFS='-'
15371set x $ac_cv_target
15372shift
15373target_cpu=$1
15374target_vendor=$2
15375shift; shift
15376# Remember, the first character of IFS is used to create $*,
15377# except with old shells:
15378target_os=$*
15379IFS=$ac_save_IFS
15380case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15381
15382
15383# The aliases save the names the user supplied, while $host etc.
15384# will get canonicalized.
15385test -n "$target_alias" &&
15386  test "$program_prefix$program_suffix$program_transform_name" = \
15387    NONENONEs,x,x, &&
15388  program_prefix=${target_alias}-
15389
15390  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15391  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15392  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15393  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15394  # to use the configure naming style.
15395
15396
15397
15398
15399
15400  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15401  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15402  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15403  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15404  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15405  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15406
15407
15408
15409  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15410
15411  case "$build_os" in
15412    *linux*)
15413      VAR_OS=linux
15414      VAR_OS_TYPE=unix
15415      ;;
15416    *solaris*)
15417      VAR_OS=solaris
15418      VAR_OS_TYPE=unix
15419      ;;
15420    *darwin*)
15421      VAR_OS=macosx
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *bsd*)
15425      VAR_OS=bsd
15426      VAR_OS_TYPE=unix
15427      ;;
15428    *cygwin*)
15429      VAR_OS=windows
15430      VAR_OS_ENV=windows.cygwin
15431      ;;
15432    *mingw*)
15433      VAR_OS=windows
15434      VAR_OS_ENV=windows.msys
15435      ;;
15436    *aix*)
15437      VAR_OS=aix
15438      VAR_OS_TYPE=unix
15439      ;;
15440    *)
15441      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15442      ;;
15443  esac
15444
15445
15446  # First argument is the cpu name from the trip/quad
15447  case "$build_cpu" in
15448    x86_64)
15449      VAR_CPU=x86_64
15450      VAR_CPU_ARCH=x86
15451      VAR_CPU_BITS=64
15452      VAR_CPU_ENDIAN=little
15453      ;;
15454    i?86)
15455      VAR_CPU=x86
15456      VAR_CPU_ARCH=x86
15457      VAR_CPU_BITS=32
15458      VAR_CPU_ENDIAN=little
15459      ;;
15460    arm*)
15461      VAR_CPU=arm
15462      VAR_CPU_ARCH=arm
15463      VAR_CPU_BITS=32
15464      VAR_CPU_ENDIAN=little
15465      ;;
15466    aarch64)
15467      VAR_CPU=aarch64
15468      VAR_CPU_ARCH=aarch64
15469      VAR_CPU_BITS=64
15470      VAR_CPU_ENDIAN=little
15471      ;;
15472    powerpc)
15473      VAR_CPU=ppc
15474      VAR_CPU_ARCH=ppc
15475      VAR_CPU_BITS=32
15476      VAR_CPU_ENDIAN=big
15477      ;;
15478    powerpc64)
15479      VAR_CPU=ppc64
15480      VAR_CPU_ARCH=ppc
15481      VAR_CPU_BITS=64
15482      VAR_CPU_ENDIAN=big
15483      ;;
15484    powerpc64le)
15485      VAR_CPU=ppc64le
15486      VAR_CPU_ARCH=ppc
15487      VAR_CPU_BITS=64
15488      VAR_CPU_ENDIAN=little
15489      ;;
15490    s390)
15491      VAR_CPU=s390
15492      VAR_CPU_ARCH=s390
15493      VAR_CPU_BITS=32
15494      VAR_CPU_ENDIAN=big
15495      ;;
15496    s390x)
15497      VAR_CPU=s390x
15498      VAR_CPU_ARCH=s390
15499      VAR_CPU_BITS=64
15500      VAR_CPU_ENDIAN=big
15501      ;;
15502    sparc)
15503      VAR_CPU=sparc
15504      VAR_CPU_ARCH=sparc
15505      VAR_CPU_BITS=32
15506      VAR_CPU_ENDIAN=big
15507      ;;
15508    sparcv9|sparc64)
15509      VAR_CPU=sparcv9
15510      VAR_CPU_ARCH=sparc
15511      VAR_CPU_BITS=64
15512      VAR_CPU_ENDIAN=big
15513      ;;
15514    *)
15515      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15516      ;;
15517  esac
15518
15519  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15520  OPENJDK_BUILD_OS="$VAR_OS"
15521  if test "x$VAR_OS_TYPE" != x; then
15522    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15523  else
15524    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15525  fi
15526  if test "x$VAR_OS_ENV" != x; then
15527    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15528  else
15529    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15530  fi
15531  OPENJDK_BUILD_CPU="$VAR_CPU"
15532  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15533  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15534  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15535
15536
15537
15538
15539
15540
15541
15542
15543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15544$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15546$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15547
15548  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15549
15550  case "$host_os" in
15551    *linux*)
15552      VAR_OS=linux
15553      VAR_OS_TYPE=unix
15554      ;;
15555    *solaris*)
15556      VAR_OS=solaris
15557      VAR_OS_TYPE=unix
15558      ;;
15559    *darwin*)
15560      VAR_OS=macosx
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *bsd*)
15564      VAR_OS=bsd
15565      VAR_OS_TYPE=unix
15566      ;;
15567    *cygwin*)
15568      VAR_OS=windows
15569      VAR_OS_ENV=windows.cygwin
15570      ;;
15571    *mingw*)
15572      VAR_OS=windows
15573      VAR_OS_ENV=windows.msys
15574      ;;
15575    *aix*)
15576      VAR_OS=aix
15577      VAR_OS_TYPE=unix
15578      ;;
15579    *)
15580      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15581      ;;
15582  esac
15583
15584
15585  # First argument is the cpu name from the trip/quad
15586  case "$host_cpu" in
15587    x86_64)
15588      VAR_CPU=x86_64
15589      VAR_CPU_ARCH=x86
15590      VAR_CPU_BITS=64
15591      VAR_CPU_ENDIAN=little
15592      ;;
15593    i?86)
15594      VAR_CPU=x86
15595      VAR_CPU_ARCH=x86
15596      VAR_CPU_BITS=32
15597      VAR_CPU_ENDIAN=little
15598      ;;
15599    arm*)
15600      VAR_CPU=arm
15601      VAR_CPU_ARCH=arm
15602      VAR_CPU_BITS=32
15603      VAR_CPU_ENDIAN=little
15604      ;;
15605    aarch64)
15606      VAR_CPU=aarch64
15607      VAR_CPU_ARCH=aarch64
15608      VAR_CPU_BITS=64
15609      VAR_CPU_ENDIAN=little
15610      ;;
15611    powerpc)
15612      VAR_CPU=ppc
15613      VAR_CPU_ARCH=ppc
15614      VAR_CPU_BITS=32
15615      VAR_CPU_ENDIAN=big
15616      ;;
15617    powerpc64)
15618      VAR_CPU=ppc64
15619      VAR_CPU_ARCH=ppc
15620      VAR_CPU_BITS=64
15621      VAR_CPU_ENDIAN=big
15622      ;;
15623    powerpc64le)
15624      VAR_CPU=ppc64le
15625      VAR_CPU_ARCH=ppc
15626      VAR_CPU_BITS=64
15627      VAR_CPU_ENDIAN=little
15628      ;;
15629    s390)
15630      VAR_CPU=s390
15631      VAR_CPU_ARCH=s390
15632      VAR_CPU_BITS=32
15633      VAR_CPU_ENDIAN=big
15634      ;;
15635    s390x)
15636      VAR_CPU=s390x
15637      VAR_CPU_ARCH=s390
15638      VAR_CPU_BITS=64
15639      VAR_CPU_ENDIAN=big
15640      ;;
15641    sparc)
15642      VAR_CPU=sparc
15643      VAR_CPU_ARCH=sparc
15644      VAR_CPU_BITS=32
15645      VAR_CPU_ENDIAN=big
15646      ;;
15647    sparcv9|sparc64)
15648      VAR_CPU=sparcv9
15649      VAR_CPU_ARCH=sparc
15650      VAR_CPU_BITS=64
15651      VAR_CPU_ENDIAN=big
15652      ;;
15653    *)
15654      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15655      ;;
15656  esac
15657
15658  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15659  OPENJDK_TARGET_OS="$VAR_OS"
15660  if test "x$VAR_OS_TYPE" != x; then
15661    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15662  else
15663    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15664  fi
15665  if test "x$VAR_OS_ENV" != x; then
15666    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15667  else
15668    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15669  fi
15670  OPENJDK_TARGET_CPU="$VAR_CPU"
15671  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15672  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15673  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15674
15675
15676
15677
15678
15679
15680
15681
15682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15683$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15685$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15686
15687
15688
15689# Check whether --with-target-bits was given.
15690if test "${with_target_bits+set}" = set; then :
15691  withval=$with_target_bits;
15692fi
15693
15694
15695  # We have three types of compiles:
15696  # native  == normal compilation, target system == build system
15697  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15698  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15699  #
15700  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15701    # We're doing a proper cross-compilation
15702    COMPILE_TYPE="cross"
15703  else
15704    COMPILE_TYPE="native"
15705  fi
15706
15707  if test "x$with_target_bits" != x; then
15708    if test "x$COMPILE_TYPE" = "xcross"; then
15709      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15710    fi
15711
15712    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15713      # A reduced build is requested
15714      COMPILE_TYPE="reduced"
15715      OPENJDK_TARGET_CPU_BITS=32
15716      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15717        OPENJDK_TARGET_CPU=x86
15718      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15719        OPENJDK_TARGET_CPU=sparc
15720      else
15721        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15722      fi
15723    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15724      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
15725    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15726      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15727$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15728    else
15729      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15730    fi
15731  fi
15732
15733
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15735$as_echo_n "checking compilation type... " >&6; }
15736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15737$as_echo "$COMPILE_TYPE" >&6; }
15738
15739
15740  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15741    REQUIRED_OS_NAME=SunOS
15742    REQUIRED_OS_VERSION=5.10
15743  fi
15744  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15745    REQUIRED_OS_NAME=Linux
15746    REQUIRED_OS_VERSION=2.6
15747  fi
15748  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15749    REQUIRED_OS_NAME=Windows
15750    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15751      REQUIRED_OS_VERSION=5.2
15752    else
15753      REQUIRED_OS_VERSION=5.1
15754    fi
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15757    REQUIRED_OS_NAME=Darwin
15758    REQUIRED_OS_VERSION=11.2
15759  fi
15760  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15761    REQUIRED_OS_NAME=AIX
15762    REQUIRED_OS_VERSION=7.1
15763  fi
15764
15765
15766
15767
15768
15769
15770  # Also store the legacy naming of the cpu.
15771  # Ie i586 and amd64 instead of x86 and x86_64
15772  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15773  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15774    OPENJDK_TARGET_CPU_LEGACY="i586"
15775  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15776    # On all platforms except MacOSX replace x86_64 with amd64.
15777    OPENJDK_TARGET_CPU_LEGACY="amd64"
15778  fi
15779
15780
15781  # And the second legacy naming of the cpu.
15782  # Ie i386 and amd64 instead of x86 and x86_64.
15783  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15784  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15785    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15786  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15787    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15788  fi
15789
15790
15791  # This is the name of the cpu (but using i386 and amd64 instead of
15792  # x86 and x86_64, respectively), preceeded by a /, to be used when
15793  # locating libraries. On macosx, it's empty, though.
15794  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15795  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15796    OPENJDK_TARGET_CPU_LIBDIR=""
15797  fi
15798
15799
15800  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15801  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15802  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15803  OPENJDK_TARGET_CPU_ISADIR=""
15804  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15805    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15806      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15807    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15808      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15809    fi
15810  fi
15811
15812
15813  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15814  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15815  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15816    # On linux only, we replace x86 with i386.
15817    OPENJDK_TARGET_CPU_OSARCH="i386"
15818  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15819    # On all platforms except macosx, we replace x86_64 with amd64.
15820    OPENJDK_TARGET_CPU_OSARCH="amd64"
15821  fi
15822
15823
15824  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15825  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15826    OPENJDK_TARGET_CPU_JLI="i386"
15827  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15828    # On all platforms except macosx, we replace x86_64 with amd64.
15829    OPENJDK_TARGET_CPU_JLI="amd64"
15830  fi
15831  # Now setup the -D flags for building libjli.
15832  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15833  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15834    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15835      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15836    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15837      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15838    fi
15839  fi
15840
15841
15842  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15843      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15844  else
15845      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15846  fi
15847
15848
15849  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15850  # Macosx is osx and x86_64 is x64
15851  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15852    OPENJDK_TARGET_OS_BUNDLE="osx"
15853  else
15854    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15855  fi
15856  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15857    OPENJDK_TARGET_CPU_BUNDLE="x64"
15858  else
15859    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15860  fi
15861  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15862
15863
15864
15865
15866  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15867    A_LP64="LP64:="
15868    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15869    # unpack200.exe
15870    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15871      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15872    fi
15873  fi
15874  LP64=$A_LP64
15875
15876
15877  if test "x$COMPILE_TYPE" = "xcross"; then
15878    # FIXME: ... or should this include reduced builds..?
15879    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15880  else
15881    DEFINE_CROSS_COMPILE_ARCH=""
15882  fi
15883
15884
15885  # Convert openjdk platform names to hotspot names
15886
15887  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15888  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15889    HOTSPOT_TARGET_OS=bsd
15890  fi
15891
15892
15893  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15894  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15895    HOTSPOT_TARGET_OS_TYPE=posix
15896  fi
15897
15898
15899  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15900  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    HOTSPOT_TARGET_CPU=x86_32
15902  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15903    HOTSPOT_TARGET_CPU=sparc
15904  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15905    HOTSPOT_TARGET_CPU=ppc_64
15906  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15907    HOTSPOT_TARGET_CPU=ppc_64
15908  fi
15909
15910
15911  # This is identical with OPENJDK_*, but define anyway for consistency.
15912  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15913
15914
15915  # Setup HOTSPOT_TARGET_CPU_DEFINE
15916  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15917    HOTSPOT_TARGET_CPU_DEFINE=IA32
15918  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15919    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15920  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15921    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15922  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15923    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15924  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15925    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15926  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15927    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15928
15929  # The cpu defines below are for zero, we don't support them directly.
15930  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15931    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15934  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15935    HOTSPOT_TARGET_CPU_DEFINE=S390
15936  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15937    HOTSPOT_TARGET_CPU_DEFINE=S390
15938  elif test "x$OPENJDK_TARGET_CPU" != x; then
15939    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15940  fi
15941
15942
15943
15944
15945  # Also store the legacy naming of the cpu.
15946  # Ie i586 and amd64 instead of x86 and x86_64
15947  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15948  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15949    OPENJDK_BUILD_CPU_LEGACY="i586"
15950  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15951    # On all platforms except MacOSX replace x86_64 with amd64.
15952    OPENJDK_BUILD_CPU_LEGACY="amd64"
15953  fi
15954
15955
15956  # And the second legacy naming of the cpu.
15957  # Ie i386 and amd64 instead of x86 and x86_64.
15958  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15959  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15960    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15961  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15962    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15963  fi
15964
15965
15966  # This is the name of the cpu (but using i386 and amd64 instead of
15967  # x86 and x86_64, respectively), preceeded by a /, to be used when
15968  # locating libraries. On macosx, it's empty, though.
15969  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15970  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15971    OPENJDK_BUILD_CPU_LIBDIR=""
15972  fi
15973
15974
15975  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15976  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15977  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15978  OPENJDK_BUILD_CPU_ISADIR=""
15979  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15980    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15981      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15982    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15983      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15984    fi
15985  fi
15986
15987
15988  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15989  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15990  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15991    # On linux only, we replace x86 with i386.
15992    OPENJDK_BUILD_CPU_OSARCH="i386"
15993  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15994    # On all platforms except macosx, we replace x86_64 with amd64.
15995    OPENJDK_BUILD_CPU_OSARCH="amd64"
15996  fi
15997
15998
15999  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16000  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16001    OPENJDK_BUILD_CPU_JLI="i386"
16002  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16003    # On all platforms except macosx, we replace x86_64 with amd64.
16004    OPENJDK_BUILD_CPU_JLI="amd64"
16005  fi
16006  # Now setup the -D flags for building libjli.
16007  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16008  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16009    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16010      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16011    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16012      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16013    fi
16014  fi
16015
16016
16017  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16018      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16019  else
16020      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16021  fi
16022
16023
16024  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16025  # Macosx is osx and x86_64 is x64
16026  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16027    OPENJDK_BUILD_OS_BUNDLE="osx"
16028  else
16029    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16030  fi
16031  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16032    OPENJDK_BUILD_CPU_BUNDLE="x64"
16033  else
16034    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16035  fi
16036  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16037
16038
16039
16040
16041  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16042    A_LP64="LP64:="
16043    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16044    # unpack200.exe
16045    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16046      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16047    fi
16048  fi
16049  LP64=$A_LP64
16050
16051
16052  if test "x$COMPILE_TYPE" = "xcross"; then
16053    # FIXME: ... or should this include reduced builds..?
16054    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16055  else
16056    DEFINE_CROSS_COMPILE_ARCH=""
16057  fi
16058
16059
16060  # Convert openjdk platform names to hotspot names
16061
16062  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16063  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16064    HOTSPOT_BUILD_OS=bsd
16065  fi
16066
16067
16068  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16069  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16070    HOTSPOT_BUILD_OS_TYPE=posix
16071  fi
16072
16073
16074  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16075  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16076    HOTSPOT_BUILD_CPU=x86_32
16077  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16078    HOTSPOT_BUILD_CPU=sparc
16079  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16080    HOTSPOT_BUILD_CPU=ppc_64
16081  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16082    HOTSPOT_BUILD_CPU=ppc_64
16083  fi
16084
16085
16086  # This is identical with OPENJDK_*, but define anyway for consistency.
16087  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16088
16089
16090  # Setup HOTSPOT_BUILD_CPU_DEFINE
16091  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16092    HOTSPOT_BUILD_CPU_DEFINE=IA32
16093  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16094    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16095  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16096    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16097  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16098    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16099  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16101  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16102    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16103
16104  # The cpu defines below are for zero, we don't support them directly.
16105  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16106    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16109  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16110    HOTSPOT_BUILD_CPU_DEFINE=S390
16111  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16112    HOTSPOT_BUILD_CPU_DEFINE=S390
16113  elif test "x$OPENJDK_BUILD_CPU" != x; then
16114    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16115  fi
16116
16117
16118
16119
16120  # ZERO_ARCHDEF is used to enable architecture-specific code.
16121  # This is used in legacy hotspot build.
16122  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16123
16124
16125
16126
16127
16128# Continue setting up basic stuff. Most remaining code require fundamental tools.
16129
16130  # Save the current directory this script was started from
16131  CURDIR="$PWD"
16132
16133  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16134  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16135  # was not available at that time.
16136  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16137  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16138    ORIGINAL_PATH="$REWRITTEN_PATH"
16139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16140$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16141  fi
16142
16143  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16144    PATH_SEP=";"
16145
16146  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16147  if test $SRC_ROOT_LENGTH -gt 100; then
16148    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16149  fi
16150
16151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16153$as_echo_n "checking cygwin release... " >&6; }
16154    CYGWIN_VERSION=`$UNAME -r`
16155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16156$as_echo "$CYGWIN_VERSION" >&6; }
16157    WINDOWS_ENV_VENDOR='cygwin'
16158    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16159
16160    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16161    if test "x$CYGWIN_VERSION_OLD" != x; then
16162      { $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
16163$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;}
16164      as_fn_error $? "Cannot continue" "$LINENO" 5
16165    fi
16166    if test "x$CYGPATH" = x; then
16167      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16168    fi
16169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16170$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16171    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16172    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16173    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16174    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16176$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16177    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16178    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16179    if test "x$test_cygdrive_prefix" = x; then
16180      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16181    fi
16182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16184$as_echo_n "checking msys release... " >&6; }
16185    MSYS_VERSION=`$UNAME -r`
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16187$as_echo "$MSYS_VERSION" >&6; }
16188
16189    WINDOWS_ENV_VENDOR='msys'
16190    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16191
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16193$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16194    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16195    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16196
16197  windows_path="$MSYS_ROOT_PATH"
16198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16199    unix_path=`$CYGPATH -u "$windows_path"`
16200    MSYS_ROOT_PATH="$unix_path"
16201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16203    MSYS_ROOT_PATH="$unix_path"
16204  fi
16205
16206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16207$as_echo "$MSYS_ROOT_PATH" >&6; }
16208    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16209  else
16210    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16211  fi
16212
16213  # Test if windows or unix (cygwin/msys) find is first in path.
16214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16215$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16216  FIND_BINARY_OUTPUT=`find --version 2>&1`
16217  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16219$as_echo "unix style" >&6; }
16220  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16222$as_echo "Windows" >&6; }
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16224$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16225    { $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
16226$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16227    as_fn_error $? "Cannot continue" "$LINENO" 5
16228  else
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16230$as_echo "unknown" >&6; }
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16232$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16233  fi
16234
16235  else
16236    PATH_SEP=":"
16237  fi
16238
16239
16240  # We get the top-level directory from the supporting wrappers.
16241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16242$as_echo_n "checking for top-level directory... " >&6; }
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16244$as_echo "$TOPDIR" >&6; }
16245
16246
16247  # Save the original version of TOPDIR for string comparisons
16248  ORIGINAL_TOPDIR="$TOPDIR"
16249
16250
16251  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16252
16253  # Only process if variable expands to non-empty
16254
16255  if test "x$CURDIR" != x; then
16256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257
16258  # Input might be given as Windows format, start by converting to
16259  # unix format.
16260  path="$CURDIR"
16261  new_path=`$CYGPATH -u "$path"`
16262
16263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16266  # "foo.exe" is OK but "foo" is an error.
16267  #
16268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16269  # It is also a way to make sure we got the proper file name for the real test later on.
16270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16271  if test "x$test_shortpath" = x; then
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16273$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16274    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16275  fi
16276
16277  # Call helper function which possibly converts this using DOS-style short mode.
16278  # If so, the updated path is stored in $new_path.
16279
16280  input_path="$new_path"
16281  # Check if we need to convert this using DOS-style short mode. If the path
16282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16283  # take no chances and rewrite it.
16284  # Note: m4 eats our [], so we need to use [ and ] instead.
16285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16286  if test "x$has_forbidden_chars" != x; then
16287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16291      # Going to short mode and back again did indeed matter. Since short mode is
16292      # case insensitive, let's make it lowercase to improve readability.
16293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16294      # Now convert it back to Unix-style (cygpath)
16295      input_path=`$CYGPATH -u "$shortmode_path"`
16296      new_path="$input_path"
16297    fi
16298  fi
16299
16300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16301  if test "x$test_cygdrive_prefix" = x; then
16302    # As a simple fix, exclude /usr/bin since it's not a real path.
16303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16305      # a path prefixed by /cygdrive for fixpath to work.
16306      new_path="$CYGWIN_ROOT_PATH$input_path"
16307    fi
16308  fi
16309
16310
16311  if test "x$path" != "x$new_path"; then
16312    CURDIR="$new_path"
16313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16314$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16315  fi
16316
16317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16318
16319  path="$CURDIR"
16320  has_colon=`$ECHO $path | $GREP ^.:`
16321  new_path="$path"
16322  if test "x$has_colon" = x; then
16323    # Not in mixed or Windows style, start by that.
16324    new_path=`cmd //c echo $path`
16325  fi
16326
16327
16328  input_path="$new_path"
16329  # Check if we need to convert this using DOS-style short mode. If the path
16330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16331  # take no chances and rewrite it.
16332  # Note: m4 eats our [], so we need to use [ and ] instead.
16333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16334  if test "x$has_forbidden_chars" != x; then
16335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16337  fi
16338
16339
16340  windows_path="$new_path"
16341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16342    unix_path=`$CYGPATH -u "$windows_path"`
16343    new_path="$unix_path"
16344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16346    new_path="$unix_path"
16347  fi
16348
16349  if test "x$path" != "x$new_path"; then
16350    CURDIR="$new_path"
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16352$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16353  fi
16354
16355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16357
16358    else
16359      # We're on a unix platform. Hooray! :)
16360      path="$CURDIR"
16361      has_space=`$ECHO "$path" | $GREP " "`
16362      if test "x$has_space" != x; then
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16364$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16366      fi
16367
16368      # Use eval to expand a potential ~
16369      eval path="$path"
16370      if test ! -f "$path" && test ! -d "$path"; then
16371        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16372      fi
16373
16374      if test -d "$path"; then
16375        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16376      else
16377        dir="`$DIRNAME "$path"`"
16378        base="`$BASENAME "$path"`"
16379        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16380      fi
16381    fi
16382  fi
16383
16384
16385  # Only process if variable expands to non-empty
16386
16387  if test "x$TOPDIR" != x; then
16388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16389
16390  # Input might be given as Windows format, start by converting to
16391  # unix format.
16392  path="$TOPDIR"
16393  new_path=`$CYGPATH -u "$path"`
16394
16395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16398  # "foo.exe" is OK but "foo" is an error.
16399  #
16400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16401  # It is also a way to make sure we got the proper file name for the real test later on.
16402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16403  if test "x$test_shortpath" = x; then
16404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16405$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16406    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16407  fi
16408
16409  # Call helper function which possibly converts this using DOS-style short mode.
16410  # If so, the updated path is stored in $new_path.
16411
16412  input_path="$new_path"
16413  # Check if we need to convert this using DOS-style short mode. If the path
16414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16415  # take no chances and rewrite it.
16416  # Note: m4 eats our [], so we need to use [ and ] instead.
16417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16418  if test "x$has_forbidden_chars" != x; then
16419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16423      # Going to short mode and back again did indeed matter. Since short mode is
16424      # case insensitive, let's make it lowercase to improve readability.
16425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16426      # Now convert it back to Unix-style (cygpath)
16427      input_path=`$CYGPATH -u "$shortmode_path"`
16428      new_path="$input_path"
16429    fi
16430  fi
16431
16432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16433  if test "x$test_cygdrive_prefix" = x; then
16434    # As a simple fix, exclude /usr/bin since it's not a real path.
16435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16437      # a path prefixed by /cygdrive for fixpath to work.
16438      new_path="$CYGWIN_ROOT_PATH$input_path"
16439    fi
16440  fi
16441
16442
16443  if test "x$path" != "x$new_path"; then
16444    TOPDIR="$new_path"
16445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16446$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16447  fi
16448
16449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16450
16451  path="$TOPDIR"
16452  has_colon=`$ECHO $path | $GREP ^.:`
16453  new_path="$path"
16454  if test "x$has_colon" = x; then
16455    # Not in mixed or Windows style, start by that.
16456    new_path=`cmd //c echo $path`
16457  fi
16458
16459
16460  input_path="$new_path"
16461  # Check if we need to convert this using DOS-style short mode. If the path
16462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16463  # take no chances and rewrite it.
16464  # Note: m4 eats our [], so we need to use [ and ] instead.
16465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16466  if test "x$has_forbidden_chars" != x; then
16467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16469  fi
16470
16471
16472  windows_path="$new_path"
16473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16474    unix_path=`$CYGPATH -u "$windows_path"`
16475    new_path="$unix_path"
16476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16478    new_path="$unix_path"
16479  fi
16480
16481  if test "x$path" != "x$new_path"; then
16482    TOPDIR="$new_path"
16483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16484$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16485  fi
16486
16487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16489
16490    else
16491      # We're on a unix platform. Hooray! :)
16492      path="$TOPDIR"
16493      has_space=`$ECHO "$path" | $GREP " "`
16494      if test "x$has_space" != x; then
16495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16496$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16498      fi
16499
16500      # Use eval to expand a potential ~
16501      eval path="$path"
16502      if test ! -f "$path" && test ! -d "$path"; then
16503        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16504      fi
16505
16506      if test -d "$path"; then
16507        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16508      else
16509        dir="`$DIRNAME "$path"`"
16510        base="`$BASENAME "$path"`"
16511        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16512      fi
16513    fi
16514  fi
16515
16516  # SRC_ROOT is a traditional alias for TOPDIR.
16517  SRC_ROOT=$TOPDIR
16518
16519  # Calculate a canonical version of TOPDIR for string comparisons
16520  CANONICAL_TOPDIR=$TOPDIR
16521
16522  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16523    # Follow a chain of symbolic links. Use readlink
16524    # where it exists, else fall back to horribly
16525    # complicated shell code.
16526    if test "x$READLINK_TESTED" != yes; then
16527      # On MacOSX there is a readlink tool with a different
16528      # purpose than the GNU readlink tool. Check the found readlink.
16529      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16530      if test "x$ISGNU" = x; then
16531        # A readlink that we do not know how to use.
16532        # Are there other non-GNU readlinks out there?
16533        READLINK_TESTED=yes
16534        READLINK=
16535      fi
16536    fi
16537
16538    if test "x$READLINK" != x; then
16539      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16540    else
16541      # Save the current directory for restoring afterwards
16542      STARTDIR=$PWD
16543      COUNTER=0
16544      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16545      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16546      cd $sym_link_dir
16547      # Use -P flag to resolve symlinks in directories.
16548      cd `$THEPWDCMD -P`
16549      sym_link_dir=`$THEPWDCMD -P`
16550      # Resolve file symlinks
16551      while test $COUNTER -lt 20; do
16552        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16553        if test "x$ISLINK" == x; then
16554          # This is not a symbolic link! We are done!
16555          break
16556        fi
16557        # Again resolve directory symlinks since the target of the just found
16558        # link could be in a different directory
16559        cd `$DIRNAME $ISLINK`
16560        sym_link_dir=`$THEPWDCMD -P`
16561        sym_link_file=`$BASENAME $ISLINK`
16562        let COUNTER=COUNTER+1
16563      done
16564      cd $STARTDIR
16565      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16566    fi
16567  fi
16568
16569
16570
16571  # Locate the directory of this script.
16572  AUTOCONF_DIR=$TOPDIR/common/autoconf
16573
16574  # Setup username (for use in adhoc version strings etc)
16575  # Outer [ ] to quote m4.
16576   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16577
16578
16579
16580# Check if it's a pure open build or if custom sources are to be used.
16581
16582  # Check whether --enable-openjdk-only was given.
16583if test "${enable_openjdk_only+set}" = set; then :
16584  enableval=$enable_openjdk_only;
16585else
16586  enable_openjdk_only="no"
16587fi
16588
16589
16590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16591$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16593$as_echo "$enable_openjdk_only" >&6; }
16594  if test "x$enable_openjdk_only" = "xyes"; then
16595    SUPPRESS_CUSTOM_EXTENSIONS="true"
16596  elif test "x$enable_openjdk_only" = "xno"; then
16597    SUPPRESS_CUSTOM_EXTENSIONS="false"
16598  else
16599    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16600  fi
16601
16602  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16603  # the IncludeCustomExtension macro.
16604
16605
16606# Check whether --with-custom-make-dir was given.
16607if test "${with_custom_make_dir+set}" = set; then :
16608  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
16609$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16610fi
16611
16612
16613
16614
16615# These are needed to be able to create a configuration name (and thus the output directory)
16616
16617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16618$as_echo_n "checking which variant of the JDK to build... " >&6; }
16619
16620# Check whether --with-jdk-variant was given.
16621if test "${with_jdk_variant+set}" = set; then :
16622  withval=$with_jdk_variant;
16623fi
16624
16625
16626  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16627    JDK_VARIANT="normal"
16628  else
16629    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16630  fi
16631
16632
16633
16634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16635$as_echo "$JDK_VARIANT" >&6; }
16636
16637
16638  DEBUG_LEVEL="release"
16639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16640$as_echo_n "checking which debug level to use... " >&6; }
16641  # Check whether --enable-debug was given.
16642if test "${enable_debug+set}" = set; then :
16643  enableval=$enable_debug;
16644        ENABLE_DEBUG="${enableval}"
16645        DEBUG_LEVEL="fastdebug"
16646
16647else
16648  ENABLE_DEBUG="no"
16649fi
16650
16651
16652
16653# Check whether --with-debug-level was given.
16654if test "${with_debug_level+set}" = set; then :
16655  withval=$with_debug_level;
16656        DEBUG_LEVEL="${withval}"
16657        if test "x$ENABLE_DEBUG" = xyes; then
16658          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16659        fi
16660
16661fi
16662
16663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16664$as_echo "$DEBUG_LEVEL" >&6; }
16665
16666  if test "x$DEBUG_LEVEL" != xrelease && \
16667      test "x$DEBUG_LEVEL" != xoptimized && \
16668      test "x$DEBUG_LEVEL" != xfastdebug && \
16669      test "x$DEBUG_LEVEL" != xslowdebug; then
16670    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16671  fi
16672
16673  # Translate DEBUG_LEVEL to debug level used by Hotspot
16674  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16675  if test "x$DEBUG_LEVEL" = xrelease; then
16676    HOTSPOT_DEBUG_LEVEL="product"
16677  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16678    HOTSPOT_DEBUG_LEVEL="debug"
16679  fi
16680
16681  if test "x$DEBUG_LEVEL" = xoptimized; then
16682    # The debug level 'optimized' is a little special because it is currently only
16683    # applicable to the HotSpot build where it means to build a completely
16684    # optimized version of the VM without any debugging code (like for the
16685    # 'release' debug level which is called 'product' in the HotSpot build) but
16686    # with the exception that it can contain additional code which is otherwise
16687    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16688    # test new and/or experimental features which are not intended for customer
16689    # shipment. Because these new features need to be tested and benchmarked in
16690    # real world scenarios, we want to build the containing JDK at the 'release'
16691    # debug level.
16692    DEBUG_LEVEL="release"
16693  fi
16694
16695
16696
16697
16698
16699
16700# Check whether --with-jvm-variants was given.
16701if test "${with_jvm_variants+set}" = set; then :
16702  withval=$with_jvm_variants;
16703fi
16704
16705
16706  if test "x$with_jvm_variants" = x; then
16707    with_jvm_variants="server"
16708  fi
16709  JVM_VARIANTS_OPT="$with_jvm_variants"
16710
16711  # Has the user listed more than one variant?
16712  # Additional [] needed to keep m4 from mangling shell constructs.
16713  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16714    BUILDING_MULTIPLE_JVM_VARIANTS=true
16715  else
16716    BUILDING_MULTIPLE_JVM_VARIANTS=false
16717  fi
16718  # Replace the commas with AND for use in the build directory name.
16719  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16720
16721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16722$as_echo_n "checking which variants of the JVM to build... " >&6; }
16723  # JVM_VARIANTS is a space-separated list.
16724  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16725  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16727$as_echo "$JVM_VARIANTS" >&6; }
16728
16729  # Check that the selected variants are valid
16730
16731  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16732  # Notice that the original variant failes on SLES 10 and 11
16733  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16734  STACK=${JVM_VARIANTS// /$'\n'}
16735  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16736  if test "x$INVALID_VARIANTS" != x; then
16737    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16738$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16739    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16740  fi
16741
16742  # All "special" variants share the same output directory ("server")
16743  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16744  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16745  STACK=${JVM_VARIANTS// /$'\n'}
16746  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16747  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16748    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16749  fi
16750
16751  # The "main" variant is the one used by other libs to link against during the
16752  # build.
16753  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16754    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16755    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16756      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16757        JVM_VARIANT_MAIN="$variant"
16758        break
16759      fi
16760    done
16761  else
16762    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16763  fi
16764
16765
16766
16767
16768
16769  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16770    # zero behaves as a platform and rewrites these values. This is really weird. :(
16771    # We are guaranteed that we do not build any other variants when building zero.
16772    HOTSPOT_TARGET_CPU=zero
16773    HOTSPOT_TARGET_CPU_ARCH=zero
16774  fi
16775
16776
16777# With basic setup done, call the custom early hook.
16778
16779
16780# Check if we have devkits, extra paths or sysroot set.
16781
16782
16783# Check whether --with-devkit was given.
16784if test "${with_devkit+set}" = set; then :
16785  withval=$with_devkit;
16786
16787  # Only process if variable expands to non-empty
16788
16789  if test "x$with_devkit" != x; then
16790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16791
16792  # Input might be given as Windows format, start by converting to
16793  # unix format.
16794  path="$with_devkit"
16795  new_path=`$CYGPATH -u "$path"`
16796
16797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16800  # "foo.exe" is OK but "foo" is an error.
16801  #
16802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16803  # It is also a way to make sure we got the proper file name for the real test later on.
16804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16805  if test "x$test_shortpath" = x; then
16806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16807$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16808    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16809  fi
16810
16811  # Call helper function which possibly converts this using DOS-style short mode.
16812  # If so, the updated path is stored in $new_path.
16813
16814  input_path="$new_path"
16815  # Check if we need to convert this using DOS-style short mode. If the path
16816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16817  # take no chances and rewrite it.
16818  # Note: m4 eats our [], so we need to use [ and ] instead.
16819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16820  if test "x$has_forbidden_chars" != x; then
16821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16825      # Going to short mode and back again did indeed matter. Since short mode is
16826      # case insensitive, let's make it lowercase to improve readability.
16827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16828      # Now convert it back to Unix-style (cygpath)
16829      input_path=`$CYGPATH -u "$shortmode_path"`
16830      new_path="$input_path"
16831    fi
16832  fi
16833
16834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16835  if test "x$test_cygdrive_prefix" = x; then
16836    # As a simple fix, exclude /usr/bin since it's not a real path.
16837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16839      # a path prefixed by /cygdrive for fixpath to work.
16840      new_path="$CYGWIN_ROOT_PATH$input_path"
16841    fi
16842  fi
16843
16844
16845  if test "x$path" != "x$new_path"; then
16846    with_devkit="$new_path"
16847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16848$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16849  fi
16850
16851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16852
16853  path="$with_devkit"
16854  has_colon=`$ECHO $path | $GREP ^.:`
16855  new_path="$path"
16856  if test "x$has_colon" = x; then
16857    # Not in mixed or Windows style, start by that.
16858    new_path=`cmd //c echo $path`
16859  fi
16860
16861
16862  input_path="$new_path"
16863  # Check if we need to convert this using DOS-style short mode. If the path
16864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16865  # take no chances and rewrite it.
16866  # Note: m4 eats our [], so we need to use [ and ] instead.
16867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16868  if test "x$has_forbidden_chars" != x; then
16869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16871  fi
16872
16873
16874  windows_path="$new_path"
16875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16876    unix_path=`$CYGPATH -u "$windows_path"`
16877    new_path="$unix_path"
16878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16880    new_path="$unix_path"
16881  fi
16882
16883  if test "x$path" != "x$new_path"; then
16884    with_devkit="$new_path"
16885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16886$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16887  fi
16888
16889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16891
16892    else
16893      # We're on a unix platform. Hooray! :)
16894      path="$with_devkit"
16895      has_space=`$ECHO "$path" | $GREP " "`
16896      if test "x$has_space" != x; then
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16898$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16900      fi
16901
16902      # Use eval to expand a potential ~
16903      eval path="$path"
16904      if test ! -f "$path" && test ! -d "$path"; then
16905        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16906      fi
16907
16908      if test -d "$path"; then
16909        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16910      else
16911        dir="`$DIRNAME "$path"`"
16912        base="`$BASENAME "$path"`"
16913        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16914      fi
16915    fi
16916  fi
16917
16918        DEVKIT_ROOT="$with_devkit"
16919        # Check for a meta data info file in the root of the devkit
16920        if test -f "$DEVKIT_ROOT/devkit.info"; then
16921          . $DEVKIT_ROOT/devkit.info
16922          # This potentially sets the following:
16923          # A descriptive name of the devkit
16924
16925  if test "x$DEVKIT_NAME" = x; then
16926    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16927  fi
16928
16929          # Corresponds to --with-extra-path
16930
16931  if test "x$DEVKIT_EXTRA_PATH" = x; then
16932    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # Corresponds to --with-toolchain-path
16936
16937  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16938    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941          # Corresponds to --with-sysroot
16942
16943  if test "x$DEVKIT_SYSROOT" = x; then
16944    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16945  fi
16946
16947
16948          # Identifies the Visual Studio version in the devkit
16949
16950  if test "x$DEVKIT_VS_VERSION" = x; then
16951    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16952  fi
16953
16954          # The Visual Studio include environment variable
16955
16956  if test "x$DEVKIT_VS_INCLUDE" = x; then
16957    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16958  fi
16959
16960          # The Visual Studio lib environment variable
16961
16962  if test "x$DEVKIT_VS_LIB" = x; then
16963    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16964  fi
16965
16966          # Corresponds to --with-msvcr-dll
16967
16968  if test "x$DEVKIT_MSVCR_DLL" = x; then
16969    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16970  fi
16971
16972          # Corresponds to --with-msvcp-dll
16973
16974  if test "x$DEVKIT_MSVCP_DLL" = x; then
16975    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16976  fi
16977
16978        fi
16979
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16981$as_echo_n "checking for devkit... " >&6; }
16982        if test "x$DEVKIT_NAME" != x; then
16983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16984$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16985        else
16986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16987$as_echo "$DEVKIT_ROOT" >&6; }
16988        fi
16989
16990
16991  if test "x$DEVKIT_EXTRA_PATH" != x; then
16992    if test "x$EXTRA_PATH" = x; then
16993      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16994    else
16995      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16996    fi
16997  fi
16998
16999
17000        # Fallback default of just /bin if DEVKIT_PATH is not defined
17001        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17002          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17003        fi
17004
17005  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17006    if test "x$TOOLCHAIN_PATH" = x; then
17007      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17008    else
17009      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17010    fi
17011  fi
17012
17013
17014        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17015        # places for backwards compatiblity.
17016        if test "x$DEVKIT_SYSROOT" != x; then
17017          SYSROOT="$DEVKIT_SYSROOT"
17018        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17019          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17020        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17021          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17022        fi
17023
17024
17025fi
17026
17027
17028  # You can force the sysroot if the sysroot encoded into the compiler tools
17029  # is not correct.
17030
17031# Check whether --with-sys-root was given.
17032if test "${with_sys_root+set}" = set; then :
17033  withval=$with_sys_root; SYSROOT=$with_sys_root
17034
17035fi
17036
17037
17038
17039# Check whether --with-sysroot was given.
17040if test "${with_sysroot+set}" = set; then :
17041  withval=$with_sysroot; SYSROOT=$with_sysroot
17042
17043fi
17044
17045
17046
17047# Check whether --with-tools-dir was given.
17048if test "${with_tools_dir+set}" = set; then :
17049  withval=$with_tools_dir;
17050  if test "x$with_tools_dir" != x; then
17051    if test "x$TOOLCHAIN_PATH" = x; then
17052      TOOLCHAIN_PATH="$with_tools_dir"
17053    else
17054      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17055    fi
17056  fi
17057
17058
17059fi
17060
17061
17062
17063# Check whether --with-toolchain-path was given.
17064if test "${with_toolchain_path+set}" = set; then :
17065  withval=$with_toolchain_path;
17066  if test "x$with_toolchain_path" != x; then
17067    if test "x$TOOLCHAIN_PATH" = x; then
17068      TOOLCHAIN_PATH="$with_toolchain_path"
17069    else
17070      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17071    fi
17072  fi
17073
17074
17075fi
17076
17077
17078
17079# Check whether --with-extra-path was given.
17080if test "${with_extra_path+set}" = set; then :
17081  withval=$with_extra_path;
17082  if test "x$with_extra_path" != x; then
17083    if test "x$EXTRA_PATH" = x; then
17084      EXTRA_PATH="$with_extra_path"
17085    else
17086      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17087    fi
17088  fi
17089
17090
17091fi
17092
17093
17094  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17095    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17096    # If not, detect if Xcode is installed by running xcodebuild -version
17097    # if no Xcode installed, xcodebuild exits with 1
17098    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17099    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17100      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17101      # fall back on the stub binary in /usr/bin/xcodebuild
17102      # Extract the first word of "xcodebuild", so it can be a program name with args.
17103set dummy xcodebuild; ac_word=$2
17104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17105$as_echo_n "checking for $ac_word... " >&6; }
17106if ${ac_cv_path_XCODEBUILD+:} false; then :
17107  $as_echo_n "(cached) " >&6
17108else
17109  case $XCODEBUILD in
17110  [\\/]* | ?:[\\/]*)
17111  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17112  ;;
17113  *)
17114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17115for as_dir in $TOOLCHAIN_PATH
17116do
17117  IFS=$as_save_IFS
17118  test -z "$as_dir" && as_dir=.
17119    for ac_exec_ext in '' $ac_executable_extensions; do
17120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17121    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17123    break 2
17124  fi
17125done
17126  done
17127IFS=$as_save_IFS
17128
17129  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17130  ;;
17131esac
17132fi
17133XCODEBUILD=$ac_cv_path_XCODEBUILD
17134if test -n "$XCODEBUILD"; then
17135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17136$as_echo "$XCODEBUILD" >&6; }
17137else
17138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17139$as_echo "no" >&6; }
17140fi
17141
17142
17143    else
17144      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17145      # when only the command line tools are installed there are no SDKs, so headers
17146      # are copied into the system frameworks
17147      XCODEBUILD=
17148
17149    fi
17150
17151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17152$as_echo_n "checking for sdk name... " >&6; }
17153
17154# Check whether --with-sdk-name was given.
17155if test "${with_sdk_name+set}" = set; then :
17156  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17157
17158fi
17159
17160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17161$as_echo "$SDKNAME" >&6; }
17162
17163    # if toolchain path is specified then don't rely on system headers, they may not compile
17164    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17165    test -z "$TOOLCHAIN_PATH" && \
17166      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17167
17168    if test -z "$SYSROOT"; then
17169      if test -n "$XCODEBUILD"; then
17170        # if we don't have system headers, use default SDK name (last resort)
17171        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17172          SDKNAME=${SDKNAME:-macosx}
17173        fi
17174
17175        if test -n "$SDKNAME"; then
17176          # Call xcodebuild to determine SYSROOT
17177          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17178        fi
17179      else
17180        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17181          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
17182        fi
17183      fi
17184    else
17185      # warn user if --with-sdk-name was also set
17186      if test -n "$with_sdk_name"; then
17187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17188$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17189      fi
17190    fi
17191
17192    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17193      # If no system framework headers, then SYSROOT must be set, or we won't build
17194      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
17195    fi
17196
17197    # Perform a basic sanity test
17198    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17199      if test -z "$SYSROOT"; then
17200        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
17201      else
17202        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17203      fi
17204    fi
17205
17206    # set SDKROOT too, Xcode tools will pick it up
17207    SDKROOT=$SYSROOT
17208
17209  fi
17210
17211  # Prepend the extra path to the global path
17212
17213  if test "x$EXTRA_PATH" != x; then
17214    if test "x$PATH" = x; then
17215      PATH="$EXTRA_PATH"
17216    else
17217      PATH="$EXTRA_PATH:$PATH"
17218    fi
17219  fi
17220
17221
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17223$as_echo_n "checking for sysroot... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17225$as_echo "$SYSROOT" >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17227$as_echo_n "checking for toolchain path... " >&6; }
17228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17229$as_echo "$TOOLCHAIN_PATH" >&6; }
17230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17231$as_echo_n "checking for extra path... " >&6; }
17232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17233$as_echo "$EXTRA_PATH" >&6; }
17234
17235
17236# To properly create a configuration name, we need to have the OpenJDK target
17237# and options (variants and debug level) parsed.
17238
17239
17240
17241# Check whether --with-conf-name was given.
17242if test "${with_conf_name+set}" = set; then :
17243  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17244fi
17245
17246
17247  # Test from where we are running configure, in or outside of src root.
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17249$as_echo_n "checking where to store configuration... " >&6; }
17250  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17251      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17252      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17253    # We are running configure from the src root.
17254    # Create a default ./build/target-variant-debuglevel output root.
17255    if test "x${CONF_NAME}" = x; then
17256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17257$as_echo "in default location" >&6; }
17258      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17259    else
17260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17261$as_echo "in build directory with custom name" >&6; }
17262    fi
17263    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17264    $MKDIR -p "$OUTPUT_ROOT"
17265    if test ! -d "$OUTPUT_ROOT"; then
17266      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17267    fi
17268  else
17269    # We are running configure from outside of the src dir.
17270    # Then use the current directory as output dir!
17271    # If configuration is situated in normal build directory, just use the build
17272    # directory name as configuration name, otherwise use the complete path.
17273    if test "x${CONF_NAME}" = x; then
17274      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17275    fi
17276    OUTPUT_ROOT="$CURDIR"
17277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17278$as_echo "in current directory" >&6; }
17279
17280    # WARNING: This might be a bad thing to do. You need to be sure you want to
17281    # have a configuration in this directory. Do some sanity checks!
17282
17283    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17284      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17285      # other files
17286      files_present=`$LS $OUTPUT_ROOT`
17287      # Configure has already touched config.log and confdefs.h in the current dir when this check
17288      # is performed.
17289      filtered_files=`$ECHO "$files_present" \
17290          | $SED -e 's/config.log//g' \
17291              -e 's/configure.log//g' \
17292              -e 's/confdefs.h//g' \
17293              -e 's/ //g' \
17294          | $TR -d '\n'`
17295      if test "x$filtered_files" != x; then
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17297$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17299$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17301$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17303$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17304        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17305$as_echo "$as_me: seriously mess up just about everything." >&6;}
17306        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17307$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17308        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17309$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17310        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17311      fi
17312    fi
17313  fi
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17315$as_echo_n "checking what configuration name to use... " >&6; }
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17317$as_echo "$CONF_NAME" >&6; }
17318
17319
17320  # Only process if variable expands to non-empty
17321
17322  if test "x$OUTPUT_ROOT" != x; then
17323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17324
17325  # Input might be given as Windows format, start by converting to
17326  # unix format.
17327  path="$OUTPUT_ROOT"
17328  new_path=`$CYGPATH -u "$path"`
17329
17330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17333  # "foo.exe" is OK but "foo" is an error.
17334  #
17335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17336  # It is also a way to make sure we got the proper file name for the real test later on.
17337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17338  if test "x$test_shortpath" = x; then
17339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17340$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17341    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17342  fi
17343
17344  # Call helper function which possibly converts this using DOS-style short mode.
17345  # If so, the updated path is stored in $new_path.
17346
17347  input_path="$new_path"
17348  # Check if we need to convert this using DOS-style short mode. If the path
17349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17350  # take no chances and rewrite it.
17351  # Note: m4 eats our [], so we need to use [ and ] instead.
17352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17353  if test "x$has_forbidden_chars" != x; then
17354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17358      # Going to short mode and back again did indeed matter. Since short mode is
17359      # case insensitive, let's make it lowercase to improve readability.
17360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17361      # Now convert it back to Unix-style (cygpath)
17362      input_path=`$CYGPATH -u "$shortmode_path"`
17363      new_path="$input_path"
17364    fi
17365  fi
17366
17367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17368  if test "x$test_cygdrive_prefix" = x; then
17369    # As a simple fix, exclude /usr/bin since it's not a real path.
17370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17372      # a path prefixed by /cygdrive for fixpath to work.
17373      new_path="$CYGWIN_ROOT_PATH$input_path"
17374    fi
17375  fi
17376
17377
17378  if test "x$path" != "x$new_path"; then
17379    OUTPUT_ROOT="$new_path"
17380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17381$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17382  fi
17383
17384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17385
17386  path="$OUTPUT_ROOT"
17387  has_colon=`$ECHO $path | $GREP ^.:`
17388  new_path="$path"
17389  if test "x$has_colon" = x; then
17390    # Not in mixed or Windows style, start by that.
17391    new_path=`cmd //c echo $path`
17392  fi
17393
17394
17395  input_path="$new_path"
17396  # Check if we need to convert this using DOS-style short mode. If the path
17397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17398  # take no chances and rewrite it.
17399  # Note: m4 eats our [], so we need to use [ and ] instead.
17400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17401  if test "x$has_forbidden_chars" != x; then
17402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17404  fi
17405
17406
17407  windows_path="$new_path"
17408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17409    unix_path=`$CYGPATH -u "$windows_path"`
17410    new_path="$unix_path"
17411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17413    new_path="$unix_path"
17414  fi
17415
17416  if test "x$path" != "x$new_path"; then
17417    OUTPUT_ROOT="$new_path"
17418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17419$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17420  fi
17421
17422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17424
17425    else
17426      # We're on a unix platform. Hooray! :)
17427      path="$OUTPUT_ROOT"
17428      has_space=`$ECHO "$path" | $GREP " "`
17429      if test "x$has_space" != x; then
17430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17431$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17433      fi
17434
17435      # Use eval to expand a potential ~
17436      eval path="$path"
17437      if test ! -f "$path" && test ! -d "$path"; then
17438        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17439      fi
17440
17441      if test -d "$path"; then
17442        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17443      else
17444        dir="`$DIRNAME "$path"`"
17445        base="`$BASENAME "$path"`"
17446        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17447      fi
17448    fi
17449  fi
17450
17451
17452  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17453  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17454
17455  SPEC=$OUTPUT_ROOT/spec.gmk
17456
17457  CONF_NAME=$CONF_NAME
17458
17459  OUTPUT_ROOT=$OUTPUT_ROOT
17460
17461
17462
17463  # The spec.gmk file contains all variables for the make system.
17464  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17465
17466  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17467  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17468
17469  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17470  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17471
17472  # The compare.sh is used to compare the build output to other builds.
17473  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17474
17475  # The generated Makefile knows where the spec.gmk is and where the source is.
17476  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17477  # which will look for generated configurations
17478  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17479
17480
17481
17482# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17483
17484  for ac_prog in apt-get yum port pkgutil pkgadd
17485do
17486  # Extract the first word of "$ac_prog", so it can be a program name with args.
17487set dummy $ac_prog; ac_word=$2
17488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17489$as_echo_n "checking for $ac_word... " >&6; }
17490if ${ac_cv_prog_PKGHANDLER+:} false; then :
17491  $as_echo_n "(cached) " >&6
17492else
17493  if test -n "$PKGHANDLER"; then
17494  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17495else
17496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17497for as_dir in $PATH
17498do
17499  IFS=$as_save_IFS
17500  test -z "$as_dir" && as_dir=.
17501    for ac_exec_ext in '' $ac_executable_extensions; do
17502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17503    ac_cv_prog_PKGHANDLER="$ac_prog"
17504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17505    break 2
17506  fi
17507done
17508  done
17509IFS=$as_save_IFS
17510
17511fi
17512fi
17513PKGHANDLER=$ac_cv_prog_PKGHANDLER
17514if test -n "$PKGHANDLER"; then
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17516$as_echo "$PKGHANDLER" >&6; }
17517else
17518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17519$as_echo "no" >&6; }
17520fi
17521
17522
17523  test -n "$PKGHANDLER" && break
17524done
17525
17526
17527
17528# Setup tools that requires more complex handling, or that is not needed by the configure script.
17529
17530
17531
17532  # Publish this variable in the help.
17533
17534
17535  if [ -z "${MAKE+x}" ]; then
17536    # The variable is not set by user, try to locate tool using the code snippet
17537
17538    # Try our hardest to locate a correct version of GNU make
17539    for ac_prog in gmake
17540do
17541  # Extract the first word of "$ac_prog", so it can be a program name with args.
17542set dummy $ac_prog; ac_word=$2
17543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17544$as_echo_n "checking for $ac_word... " >&6; }
17545if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17546  $as_echo_n "(cached) " >&6
17547else
17548  case $CHECK_GMAKE in
17549  [\\/]* | ?:[\\/]*)
17550  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17551  ;;
17552  *)
17553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17554for as_dir in $PATH
17555do
17556  IFS=$as_save_IFS
17557  test -z "$as_dir" && as_dir=.
17558    for ac_exec_ext in '' $ac_executable_extensions; do
17559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17560    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17562    break 2
17563  fi
17564done
17565  done
17566IFS=$as_save_IFS
17567
17568  ;;
17569esac
17570fi
17571CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17572if test -n "$CHECK_GMAKE"; then
17573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17574$as_echo "$CHECK_GMAKE" >&6; }
17575else
17576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17577$as_echo "no" >&6; }
17578fi
17579
17580
17581  test -n "$CHECK_GMAKE" && break
17582done
17583
17584
17585  MAKE_CANDIDATE=""$CHECK_GMAKE""
17586  DESCRIPTION="gmake in PATH"
17587
17588  # On Cygwin, we require a newer version of make than on other platforms
17589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17590    MAKE_VERSION_EXPR="-e 4\."
17591    MAKE_REQUIRED_VERSION="4.0"
17592   else
17593    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17594    MAKE_REQUIRED_VERSION="3.81"
17595  fi
17596
17597  if test "x$MAKE_CANDIDATE" != x; then
17598    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17599$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17600    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17601    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17602    if test "x$IS_GNU_MAKE" = x; then
17603      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17604$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17605    else
17606      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17607      if test "x$IS_MODERN_MAKE" = x; then
17608        { $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
17609$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;}
17610      else
17611        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17612          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17613            MAKE_EXPECTED_ENV='cygwin'
17614          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17615            MAKE_EXPECTED_ENV='msys'
17616          else
17617            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17618          fi
17619          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17620          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17621        else
17622          # Not relevant for non-Windows
17623          IS_MAKE_CORRECT_ENV=true
17624        fi
17625        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17626          { $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
17627$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;}
17628        else
17629          FOUND_MAKE=$MAKE_CANDIDATE
17630
17631  # Only process if variable expands to non-empty
17632
17633  if test "x$FOUND_MAKE" != x; then
17634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17635
17636  # First separate the path from the arguments. This will split at the first
17637  # space.
17638  complete="$FOUND_MAKE"
17639  path="${complete%% *}"
17640  tmp="$complete EOL"
17641  arguments="${tmp#* }"
17642
17643  # Input might be given as Windows format, start by converting to
17644  # unix format.
17645  new_path=`$CYGPATH -u "$path"`
17646
17647  # Now try to locate executable using which
17648  new_path=`$WHICH "$new_path" 2> /dev/null`
17649  # bat and cmd files are not always considered executable in cygwin causing which
17650  # to not find them
17651  if test "x$new_path" = x \
17652      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17653      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17654    new_path=`$CYGPATH -u "$path"`
17655  fi
17656  if test "x$new_path" = x; then
17657    # Oops. Which didn't find the executable.
17658    # The splitting of arguments from the executable at a space might have been incorrect,
17659    # since paths with space are more likely in Windows. Give it another try with the whole
17660    # argument.
17661    path="$complete"
17662    arguments="EOL"
17663    new_path=`$CYGPATH -u "$path"`
17664    new_path=`$WHICH "$new_path" 2> /dev/null`
17665    # bat and cmd files are not always considered executable in cygwin causing which
17666    # to not find them
17667    if test "x$new_path" = x \
17668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17670      new_path=`$CYGPATH -u "$path"`
17671    fi
17672    if test "x$new_path" = x; then
17673      # It's still not found. Now this is an unrecoverable error.
17674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17676      has_space=`$ECHO "$complete" | $GREP " "`
17677      if test "x$has_space" != x; then
17678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17680      fi
17681      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17682    fi
17683  fi
17684
17685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17688  # "foo.exe" is OK but "foo" is an error.
17689  #
17690  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17691  # It is also a way to make sure we got the proper file name for the real test later on.
17692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17693  if test "x$test_shortpath" = x; then
17694    # Short path failed, file does not exist as specified.
17695    # Try adding .exe or .cmd
17696    if test -f "${new_path}.exe"; then
17697      input_to_shortpath="${new_path}.exe"
17698    elif test -f "${new_path}.cmd"; then
17699      input_to_shortpath="${new_path}.cmd"
17700    else
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17702$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17706    fi
17707  else
17708    input_to_shortpath="$new_path"
17709  fi
17710
17711  # Call helper function which possibly converts this using DOS-style short mode.
17712  # If so, the updated path is stored in $new_path.
17713  new_path="$input_to_shortpath"
17714
17715  input_path="$input_to_shortpath"
17716  # Check if we need to convert this using DOS-style short mode. If the path
17717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17718  # take no chances and rewrite it.
17719  # Note: m4 eats our [], so we need to use [ and ] instead.
17720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17721  if test "x$has_forbidden_chars" != x; then
17722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17726      # Going to short mode and back again did indeed matter. Since short mode is
17727      # case insensitive, let's make it lowercase to improve readability.
17728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17729      # Now convert it back to Unix-style (cygpath)
17730      input_path=`$CYGPATH -u "$shortmode_path"`
17731      new_path="$input_path"
17732    fi
17733  fi
17734
17735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17736  if test "x$test_cygdrive_prefix" = x; then
17737    # As a simple fix, exclude /usr/bin since it's not a real path.
17738    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17740      # a path prefixed by /cygdrive for fixpath to work.
17741      new_path="$CYGWIN_ROOT_PATH$input_path"
17742    fi
17743  fi
17744
17745  # remove trailing .exe if any
17746  new_path="${new_path/%.exe/}"
17747
17748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17749
17750  # First separate the path from the arguments. This will split at the first
17751  # space.
17752  complete="$FOUND_MAKE"
17753  path="${complete%% *}"
17754  tmp="$complete EOL"
17755  arguments="${tmp#* }"
17756
17757  # Input might be given as Windows format, start by converting to
17758  # unix format.
17759  new_path="$path"
17760
17761  windows_path="$new_path"
17762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17763    unix_path=`$CYGPATH -u "$windows_path"`
17764    new_path="$unix_path"
17765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17767    new_path="$unix_path"
17768  fi
17769
17770
17771  # Now try to locate executable using which
17772  new_path=`$WHICH "$new_path" 2> /dev/null`
17773
17774  if test "x$new_path" = x; then
17775    # Oops. Which didn't find the executable.
17776    # The splitting of arguments from the executable at a space might have been incorrect,
17777    # since paths with space are more likely in Windows. Give it another try with the whole
17778    # argument.
17779    path="$complete"
17780    arguments="EOL"
17781    new_path="$path"
17782
17783  windows_path="$new_path"
17784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785    unix_path=`$CYGPATH -u "$windows_path"`
17786    new_path="$unix_path"
17787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17789    new_path="$unix_path"
17790  fi
17791
17792
17793    new_path=`$WHICH "$new_path" 2> /dev/null`
17794    # bat and cmd files are not always considered executable in MSYS causing which
17795    # to not find them
17796    if test "x$new_path" = x \
17797        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17798        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17799      new_path="$path"
17800
17801  windows_path="$new_path"
17802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17803    unix_path=`$CYGPATH -u "$windows_path"`
17804    new_path="$unix_path"
17805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17807    new_path="$unix_path"
17808  fi
17809
17810    fi
17811
17812    if test "x$new_path" = x; then
17813      # It's still not found. Now this is an unrecoverable error.
17814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17816      has_space=`$ECHO "$complete" | $GREP " "`
17817      if test "x$has_space" != x; then
17818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17820      fi
17821      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17822    fi
17823  fi
17824
17825  # Now new_path has a complete unix path to the binary
17826  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17827    # Keep paths in /bin as-is, but remove trailing .exe if any
17828    new_path="${new_path/%.exe/}"
17829    # Do not save /bin paths to all_fixpath_prefixes!
17830  else
17831    # Not in mixed or Windows style, start by that.
17832    new_path=`cmd //c echo $new_path`
17833
17834  input_path="$new_path"
17835  # Check if we need to convert this using DOS-style short mode. If the path
17836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17837  # take no chances and rewrite it.
17838  # Note: m4 eats our [], so we need to use [ and ] instead.
17839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17840  if test "x$has_forbidden_chars" != x; then
17841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17843  fi
17844
17845    # Output is in $new_path
17846
17847  windows_path="$new_path"
17848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17849    unix_path=`$CYGPATH -u "$windows_path"`
17850    new_path="$unix_path"
17851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17853    new_path="$unix_path"
17854  fi
17855
17856    # remove trailing .exe if any
17857    new_path="${new_path/%.exe/}"
17858
17859    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17860    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17861  fi
17862
17863    else
17864      # We're on a unix platform. Hooray! :)
17865      # First separate the path from the arguments. This will split at the first
17866      # space.
17867      complete="$FOUND_MAKE"
17868      path="${complete%% *}"
17869      tmp="$complete EOL"
17870      arguments="${tmp#* }"
17871
17872      # Cannot rely on the command "which" here since it doesn't always work.
17873      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17874      if test -z "$is_absolute_path"; then
17875        # Path to executable is not absolute. Find it.
17876        IFS_save="$IFS"
17877        IFS=:
17878        for p in $PATH; do
17879          if test -f "$p/$path" && test -x "$p/$path"; then
17880            new_path="$p/$path"
17881            break
17882          fi
17883        done
17884        IFS="$IFS_save"
17885      else
17886        # This is an absolute path, we can use it without further modifications.
17887        new_path="$path"
17888      fi
17889
17890      if test "x$new_path" = x; then
17891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17893        has_space=`$ECHO "$complete" | $GREP " "`
17894        if test "x$has_space" != x; then
17895          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17897        fi
17898        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17899      fi
17900    fi
17901
17902    # Now join together the path and the arguments once again
17903    if test "x$arguments" != xEOL; then
17904      new_complete="$new_path ${arguments% *}"
17905    else
17906      new_complete="$new_path"
17907    fi
17908
17909    if test "x$complete" != "x$new_complete"; then
17910      FOUND_MAKE="$new_complete"
17911      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17912$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17913    fi
17914  fi
17915
17916        fi
17917      fi
17918    fi
17919  fi
17920
17921
17922    if test "x$FOUND_MAKE" = x; then
17923      for ac_prog in make
17924do
17925  # Extract the first word of "$ac_prog", so it can be a program name with args.
17926set dummy $ac_prog; ac_word=$2
17927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17928$as_echo_n "checking for $ac_word... " >&6; }
17929if ${ac_cv_path_CHECK_MAKE+:} false; then :
17930  $as_echo_n "(cached) " >&6
17931else
17932  case $CHECK_MAKE in
17933  [\\/]* | ?:[\\/]*)
17934  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17935  ;;
17936  *)
17937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17938for as_dir in $PATH
17939do
17940  IFS=$as_save_IFS
17941  test -z "$as_dir" && as_dir=.
17942    for ac_exec_ext in '' $ac_executable_extensions; do
17943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17944    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17946    break 2
17947  fi
17948done
17949  done
17950IFS=$as_save_IFS
17951
17952  ;;
17953esac
17954fi
17955CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17956if test -n "$CHECK_MAKE"; then
17957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17958$as_echo "$CHECK_MAKE" >&6; }
17959else
17960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961$as_echo "no" >&6; }
17962fi
17963
17964
17965  test -n "$CHECK_MAKE" && break
17966done
17967
17968
17969  MAKE_CANDIDATE=""$CHECK_MAKE""
17970  DESCRIPTION="make in PATH"
17971
17972  # On Cygwin, we require a newer version of make than on other platforms
17973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17974    MAKE_VERSION_EXPR="-e 4\."
17975    MAKE_REQUIRED_VERSION="4.0"
17976   else
17977    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17978    MAKE_REQUIRED_VERSION="3.81"
17979  fi
17980
17981  if test "x$MAKE_CANDIDATE" != x; then
17982    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17983$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17984    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17985    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17986    if test "x$IS_GNU_MAKE" = x; then
17987      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17988$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17989    else
17990      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17991      if test "x$IS_MODERN_MAKE" = x; then
17992        { $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
17993$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;}
17994      else
17995        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17996          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17997            MAKE_EXPECTED_ENV='cygwin'
17998          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17999            MAKE_EXPECTED_ENV='msys'
18000          else
18001            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18002          fi
18003          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18004          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18005        else
18006          # Not relevant for non-Windows
18007          IS_MAKE_CORRECT_ENV=true
18008        fi
18009        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18010          { $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
18011$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;}
18012        else
18013          FOUND_MAKE=$MAKE_CANDIDATE
18014
18015  # Only process if variable expands to non-empty
18016
18017  if test "x$FOUND_MAKE" != x; then
18018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18019
18020  # First separate the path from the arguments. This will split at the first
18021  # space.
18022  complete="$FOUND_MAKE"
18023  path="${complete%% *}"
18024  tmp="$complete EOL"
18025  arguments="${tmp#* }"
18026
18027  # Input might be given as Windows format, start by converting to
18028  # unix format.
18029  new_path=`$CYGPATH -u "$path"`
18030
18031  # Now try to locate executable using which
18032  new_path=`$WHICH "$new_path" 2> /dev/null`
18033  # bat and cmd files are not always considered executable in cygwin causing which
18034  # to not find them
18035  if test "x$new_path" = x \
18036      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18037      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18038    new_path=`$CYGPATH -u "$path"`
18039  fi
18040  if test "x$new_path" = x; then
18041    # Oops. Which didn't find the executable.
18042    # The splitting of arguments from the executable at a space might have been incorrect,
18043    # since paths with space are more likely in Windows. Give it another try with the whole
18044    # argument.
18045    path="$complete"
18046    arguments="EOL"
18047    new_path=`$CYGPATH -u "$path"`
18048    new_path=`$WHICH "$new_path" 2> /dev/null`
18049    # bat and cmd files are not always considered executable in cygwin causing which
18050    # to not find them
18051    if test "x$new_path" = x \
18052        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18053        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18054      new_path=`$CYGPATH -u "$path"`
18055    fi
18056    if test "x$new_path" = x; then
18057      # It's still not found. Now this is an unrecoverable error.
18058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18060      has_space=`$ECHO "$complete" | $GREP " "`
18061      if test "x$has_space" != x; then
18062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18064      fi
18065      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18066    fi
18067  fi
18068
18069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18072  # "foo.exe" is OK but "foo" is an error.
18073  #
18074  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18075  # It is also a way to make sure we got the proper file name for the real test later on.
18076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18077  if test "x$test_shortpath" = x; then
18078    # Short path failed, file does not exist as specified.
18079    # Try adding .exe or .cmd
18080    if test -f "${new_path}.exe"; then
18081      input_to_shortpath="${new_path}.exe"
18082    elif test -f "${new_path}.cmd"; then
18083      input_to_shortpath="${new_path}.cmd"
18084    else
18085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18086$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18087      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18088$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18090    fi
18091  else
18092    input_to_shortpath="$new_path"
18093  fi
18094
18095  # Call helper function which possibly converts this using DOS-style short mode.
18096  # If so, the updated path is stored in $new_path.
18097  new_path="$input_to_shortpath"
18098
18099  input_path="$input_to_shortpath"
18100  # Check if we need to convert this using DOS-style short mode. If the path
18101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18102  # take no chances and rewrite it.
18103  # Note: m4 eats our [], so we need to use [ and ] instead.
18104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18105  if test "x$has_forbidden_chars" != x; then
18106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18110      # Going to short mode and back again did indeed matter. Since short mode is
18111      # case insensitive, let's make it lowercase to improve readability.
18112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18113      # Now convert it back to Unix-style (cygpath)
18114      input_path=`$CYGPATH -u "$shortmode_path"`
18115      new_path="$input_path"
18116    fi
18117  fi
18118
18119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18120  if test "x$test_cygdrive_prefix" = x; then
18121    # As a simple fix, exclude /usr/bin since it's not a real path.
18122    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18124      # a path prefixed by /cygdrive for fixpath to work.
18125      new_path="$CYGWIN_ROOT_PATH$input_path"
18126    fi
18127  fi
18128
18129  # remove trailing .exe if any
18130  new_path="${new_path/%.exe/}"
18131
18132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18133
18134  # First separate the path from the arguments. This will split at the first
18135  # space.
18136  complete="$FOUND_MAKE"
18137  path="${complete%% *}"
18138  tmp="$complete EOL"
18139  arguments="${tmp#* }"
18140
18141  # Input might be given as Windows format, start by converting to
18142  # unix format.
18143  new_path="$path"
18144
18145  windows_path="$new_path"
18146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18147    unix_path=`$CYGPATH -u "$windows_path"`
18148    new_path="$unix_path"
18149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18151    new_path="$unix_path"
18152  fi
18153
18154
18155  # Now try to locate executable using which
18156  new_path=`$WHICH "$new_path" 2> /dev/null`
18157
18158  if test "x$new_path" = x; then
18159    # Oops. Which didn't find the executable.
18160    # The splitting of arguments from the executable at a space might have been incorrect,
18161    # since paths with space are more likely in Windows. Give it another try with the whole
18162    # argument.
18163    path="$complete"
18164    arguments="EOL"
18165    new_path="$path"
18166
18167  windows_path="$new_path"
18168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18169    unix_path=`$CYGPATH -u "$windows_path"`
18170    new_path="$unix_path"
18171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18173    new_path="$unix_path"
18174  fi
18175
18176
18177    new_path=`$WHICH "$new_path" 2> /dev/null`
18178    # bat and cmd files are not always considered executable in MSYS causing which
18179    # to not find them
18180    if test "x$new_path" = x \
18181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18183      new_path="$path"
18184
18185  windows_path="$new_path"
18186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18187    unix_path=`$CYGPATH -u "$windows_path"`
18188    new_path="$unix_path"
18189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18191    new_path="$unix_path"
18192  fi
18193
18194    fi
18195
18196    if test "x$new_path" = x; then
18197      # It's still not found. Now this is an unrecoverable error.
18198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18199$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18200      has_space=`$ECHO "$complete" | $GREP " "`
18201      if test "x$has_space" != x; then
18202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18204      fi
18205      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18206    fi
18207  fi
18208
18209  # Now new_path has a complete unix path to the binary
18210  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18211    # Keep paths in /bin as-is, but remove trailing .exe if any
18212    new_path="${new_path/%.exe/}"
18213    # Do not save /bin paths to all_fixpath_prefixes!
18214  else
18215    # Not in mixed or Windows style, start by that.
18216    new_path=`cmd //c echo $new_path`
18217
18218  input_path="$new_path"
18219  # Check if we need to convert this using DOS-style short mode. If the path
18220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18221  # take no chances and rewrite it.
18222  # Note: m4 eats our [], so we need to use [ and ] instead.
18223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18224  if test "x$has_forbidden_chars" != x; then
18225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18227  fi
18228
18229    # Output is in $new_path
18230
18231  windows_path="$new_path"
18232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233    unix_path=`$CYGPATH -u "$windows_path"`
18234    new_path="$unix_path"
18235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18237    new_path="$unix_path"
18238  fi
18239
18240    # remove trailing .exe if any
18241    new_path="${new_path/%.exe/}"
18242
18243    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18244    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18245  fi
18246
18247    else
18248      # We're on a unix platform. Hooray! :)
18249      # First separate the path from the arguments. This will split at the first
18250      # space.
18251      complete="$FOUND_MAKE"
18252      path="${complete%% *}"
18253      tmp="$complete EOL"
18254      arguments="${tmp#* }"
18255
18256      # Cannot rely on the command "which" here since it doesn't always work.
18257      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18258      if test -z "$is_absolute_path"; then
18259        # Path to executable is not absolute. Find it.
18260        IFS_save="$IFS"
18261        IFS=:
18262        for p in $PATH; do
18263          if test -f "$p/$path" && test -x "$p/$path"; then
18264            new_path="$p/$path"
18265            break
18266          fi
18267        done
18268        IFS="$IFS_save"
18269      else
18270        # This is an absolute path, we can use it without further modifications.
18271        new_path="$path"
18272      fi
18273
18274      if test "x$new_path" = x; then
18275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18276$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18277        has_space=`$ECHO "$complete" | $GREP " "`
18278        if test "x$has_space" != x; then
18279          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18280$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18281        fi
18282        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18283      fi
18284    fi
18285
18286    # Now join together the path and the arguments once again
18287    if test "x$arguments" != xEOL; then
18288      new_complete="$new_path ${arguments% *}"
18289    else
18290      new_complete="$new_path"
18291    fi
18292
18293    if test "x$complete" != "x$new_complete"; then
18294      FOUND_MAKE="$new_complete"
18295      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18296$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18297    fi
18298  fi
18299
18300        fi
18301      fi
18302    fi
18303  fi
18304
18305    fi
18306
18307    if test "x$FOUND_MAKE" = x; then
18308      if test "x$TOOLCHAIN_PATH" != x; then
18309        # We have a toolchain path, check that as well before giving up.
18310        OLD_PATH=$PATH
18311        PATH=$TOOLCHAIN_PATH:$PATH
18312        for ac_prog in gmake
18313do
18314  # Extract the first word of "$ac_prog", so it can be a program name with args.
18315set dummy $ac_prog; ac_word=$2
18316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18317$as_echo_n "checking for $ac_word... " >&6; }
18318if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18319  $as_echo_n "(cached) " >&6
18320else
18321  case $CHECK_TOOLSDIR_GMAKE in
18322  [\\/]* | ?:[\\/]*)
18323  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18324  ;;
18325  *)
18326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18327for as_dir in $PATH
18328do
18329  IFS=$as_save_IFS
18330  test -z "$as_dir" && as_dir=.
18331    for ac_exec_ext in '' $ac_executable_extensions; do
18332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18333    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18335    break 2
18336  fi
18337done
18338  done
18339IFS=$as_save_IFS
18340
18341  ;;
18342esac
18343fi
18344CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18345if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18347$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18348else
18349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18350$as_echo "no" >&6; }
18351fi
18352
18353
18354  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18355done
18356
18357
18358  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18359  DESCRIPTION="gmake in tools-dir"
18360
18361  # On Cygwin, we require a newer version of make than on other platforms
18362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363    MAKE_VERSION_EXPR="-e 4\."
18364    MAKE_REQUIRED_VERSION="4.0"
18365   else
18366    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18367    MAKE_REQUIRED_VERSION="3.81"
18368  fi
18369
18370  if test "x$MAKE_CANDIDATE" != x; then
18371    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18372$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18373    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18374    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18375    if test "x$IS_GNU_MAKE" = x; then
18376      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18377$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18378    else
18379      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18380      if test "x$IS_MODERN_MAKE" = x; then
18381        { $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
18382$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;}
18383      else
18384        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18385          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18386            MAKE_EXPECTED_ENV='cygwin'
18387          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18388            MAKE_EXPECTED_ENV='msys'
18389          else
18390            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18391          fi
18392          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18393          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18394        else
18395          # Not relevant for non-Windows
18396          IS_MAKE_CORRECT_ENV=true
18397        fi
18398        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18399          { $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
18400$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;}
18401        else
18402          FOUND_MAKE=$MAKE_CANDIDATE
18403
18404  # Only process if variable expands to non-empty
18405
18406  if test "x$FOUND_MAKE" != x; then
18407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18408
18409  # First separate the path from the arguments. This will split at the first
18410  # space.
18411  complete="$FOUND_MAKE"
18412  path="${complete%% *}"
18413  tmp="$complete EOL"
18414  arguments="${tmp#* }"
18415
18416  # Input might be given as Windows format, start by converting to
18417  # unix format.
18418  new_path=`$CYGPATH -u "$path"`
18419
18420  # Now try to locate executable using which
18421  new_path=`$WHICH "$new_path" 2> /dev/null`
18422  # bat and cmd files are not always considered executable in cygwin causing which
18423  # to not find them
18424  if test "x$new_path" = x \
18425      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18426      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18427    new_path=`$CYGPATH -u "$path"`
18428  fi
18429  if test "x$new_path" = x; then
18430    # Oops. Which didn't find the executable.
18431    # The splitting of arguments from the executable at a space might have been incorrect,
18432    # since paths with space are more likely in Windows. Give it another try with the whole
18433    # argument.
18434    path="$complete"
18435    arguments="EOL"
18436    new_path=`$CYGPATH -u "$path"`
18437    new_path=`$WHICH "$new_path" 2> /dev/null`
18438    # bat and cmd files are not always considered executable in cygwin causing which
18439    # to not find them
18440    if test "x$new_path" = x \
18441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18443      new_path=`$CYGPATH -u "$path"`
18444    fi
18445    if test "x$new_path" = x; then
18446      # It's still not found. Now this is an unrecoverable error.
18447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18448$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18449      has_space=`$ECHO "$complete" | $GREP " "`
18450      if test "x$has_space" != x; then
18451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18453      fi
18454      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18455    fi
18456  fi
18457
18458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18461  # "foo.exe" is OK but "foo" is an error.
18462  #
18463  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18464  # It is also a way to make sure we got the proper file name for the real test later on.
18465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18466  if test "x$test_shortpath" = x; then
18467    # Short path failed, file does not exist as specified.
18468    # Try adding .exe or .cmd
18469    if test -f "${new_path}.exe"; then
18470      input_to_shortpath="${new_path}.exe"
18471    elif test -f "${new_path}.cmd"; then
18472      input_to_shortpath="${new_path}.cmd"
18473    else
18474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18475$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18477$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18478      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18479    fi
18480  else
18481    input_to_shortpath="$new_path"
18482  fi
18483
18484  # Call helper function which possibly converts this using DOS-style short mode.
18485  # If so, the updated path is stored in $new_path.
18486  new_path="$input_to_shortpath"
18487
18488  input_path="$input_to_shortpath"
18489  # Check if we need to convert this using DOS-style short mode. If the path
18490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18491  # take no chances and rewrite it.
18492  # Note: m4 eats our [], so we need to use [ and ] instead.
18493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18494  if test "x$has_forbidden_chars" != x; then
18495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18499      # Going to short mode and back again did indeed matter. Since short mode is
18500      # case insensitive, let's make it lowercase to improve readability.
18501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18502      # Now convert it back to Unix-style (cygpath)
18503      input_path=`$CYGPATH -u "$shortmode_path"`
18504      new_path="$input_path"
18505    fi
18506  fi
18507
18508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18509  if test "x$test_cygdrive_prefix" = x; then
18510    # As a simple fix, exclude /usr/bin since it's not a real path.
18511    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18513      # a path prefixed by /cygdrive for fixpath to work.
18514      new_path="$CYGWIN_ROOT_PATH$input_path"
18515    fi
18516  fi
18517
18518  # remove trailing .exe if any
18519  new_path="${new_path/%.exe/}"
18520
18521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18522
18523  # First separate the path from the arguments. This will split at the first
18524  # space.
18525  complete="$FOUND_MAKE"
18526  path="${complete%% *}"
18527  tmp="$complete EOL"
18528  arguments="${tmp#* }"
18529
18530  # Input might be given as Windows format, start by converting to
18531  # unix format.
18532  new_path="$path"
18533
18534  windows_path="$new_path"
18535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18536    unix_path=`$CYGPATH -u "$windows_path"`
18537    new_path="$unix_path"
18538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18540    new_path="$unix_path"
18541  fi
18542
18543
18544  # Now try to locate executable using which
18545  new_path=`$WHICH "$new_path" 2> /dev/null`
18546
18547  if test "x$new_path" = x; then
18548    # Oops. Which didn't find the executable.
18549    # The splitting of arguments from the executable at a space might have been incorrect,
18550    # since paths with space are more likely in Windows. Give it another try with the whole
18551    # argument.
18552    path="$complete"
18553    arguments="EOL"
18554    new_path="$path"
18555
18556  windows_path="$new_path"
18557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18558    unix_path=`$CYGPATH -u "$windows_path"`
18559    new_path="$unix_path"
18560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18562    new_path="$unix_path"
18563  fi
18564
18565
18566    new_path=`$WHICH "$new_path" 2> /dev/null`
18567    # bat and cmd files are not always considered executable in MSYS causing which
18568    # to not find them
18569    if test "x$new_path" = x \
18570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18572      new_path="$path"
18573
18574  windows_path="$new_path"
18575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18576    unix_path=`$CYGPATH -u "$windows_path"`
18577    new_path="$unix_path"
18578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18580    new_path="$unix_path"
18581  fi
18582
18583    fi
18584
18585    if test "x$new_path" = x; then
18586      # It's still not found. Now this is an unrecoverable error.
18587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18588$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18589      has_space=`$ECHO "$complete" | $GREP " "`
18590      if test "x$has_space" != x; then
18591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18593      fi
18594      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18595    fi
18596  fi
18597
18598  # Now new_path has a complete unix path to the binary
18599  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18600    # Keep paths in /bin as-is, but remove trailing .exe if any
18601    new_path="${new_path/%.exe/}"
18602    # Do not save /bin paths to all_fixpath_prefixes!
18603  else
18604    # Not in mixed or Windows style, start by that.
18605    new_path=`cmd //c echo $new_path`
18606
18607  input_path="$new_path"
18608  # Check if we need to convert this using DOS-style short mode. If the path
18609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18610  # take no chances and rewrite it.
18611  # Note: m4 eats our [], so we need to use [ and ] instead.
18612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18613  if test "x$has_forbidden_chars" != x; then
18614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18616  fi
18617
18618    # Output is in $new_path
18619
18620  windows_path="$new_path"
18621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622    unix_path=`$CYGPATH -u "$windows_path"`
18623    new_path="$unix_path"
18624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18626    new_path="$unix_path"
18627  fi
18628
18629    # remove trailing .exe if any
18630    new_path="${new_path/%.exe/}"
18631
18632    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18633    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18634  fi
18635
18636    else
18637      # We're on a unix platform. Hooray! :)
18638      # First separate the path from the arguments. This will split at the first
18639      # space.
18640      complete="$FOUND_MAKE"
18641      path="${complete%% *}"
18642      tmp="$complete EOL"
18643      arguments="${tmp#* }"
18644
18645      # Cannot rely on the command "which" here since it doesn't always work.
18646      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18647      if test -z "$is_absolute_path"; then
18648        # Path to executable is not absolute. Find it.
18649        IFS_save="$IFS"
18650        IFS=:
18651        for p in $PATH; do
18652          if test -f "$p/$path" && test -x "$p/$path"; then
18653            new_path="$p/$path"
18654            break
18655          fi
18656        done
18657        IFS="$IFS_save"
18658      else
18659        # This is an absolute path, we can use it without further modifications.
18660        new_path="$path"
18661      fi
18662
18663      if test "x$new_path" = x; then
18664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18665$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18666        has_space=`$ECHO "$complete" | $GREP " "`
18667        if test "x$has_space" != x; then
18668          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18669$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18670        fi
18671        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18672      fi
18673    fi
18674
18675    # Now join together the path and the arguments once again
18676    if test "x$arguments" != xEOL; then
18677      new_complete="$new_path ${arguments% *}"
18678    else
18679      new_complete="$new_path"
18680    fi
18681
18682    if test "x$complete" != "x$new_complete"; then
18683      FOUND_MAKE="$new_complete"
18684      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18685$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18686    fi
18687  fi
18688
18689        fi
18690      fi
18691    fi
18692  fi
18693
18694        if test "x$FOUND_MAKE" = x; then
18695          for ac_prog in make
18696do
18697  # Extract the first word of "$ac_prog", so it can be a program name with args.
18698set dummy $ac_prog; ac_word=$2
18699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18700$as_echo_n "checking for $ac_word... " >&6; }
18701if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18702  $as_echo_n "(cached) " >&6
18703else
18704  case $CHECK_TOOLSDIR_MAKE in
18705  [\\/]* | ?:[\\/]*)
18706  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18707  ;;
18708  *)
18709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18710for as_dir in $PATH
18711do
18712  IFS=$as_save_IFS
18713  test -z "$as_dir" && as_dir=.
18714    for ac_exec_ext in '' $ac_executable_extensions; do
18715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18716    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18718    break 2
18719  fi
18720done
18721  done
18722IFS=$as_save_IFS
18723
18724  ;;
18725esac
18726fi
18727CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18728if test -n "$CHECK_TOOLSDIR_MAKE"; then
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18730$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18731else
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18733$as_echo "no" >&6; }
18734fi
18735
18736
18737  test -n "$CHECK_TOOLSDIR_MAKE" && break
18738done
18739
18740
18741  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18742  DESCRIPTION="make in tools-dir"
18743
18744  # On Cygwin, we require a newer version of make than on other platforms
18745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18746    MAKE_VERSION_EXPR="-e 4\."
18747    MAKE_REQUIRED_VERSION="4.0"
18748   else
18749    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18750    MAKE_REQUIRED_VERSION="3.81"
18751  fi
18752
18753  if test "x$MAKE_CANDIDATE" != x; then
18754    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18755$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18756    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18757    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18758    if test "x$IS_GNU_MAKE" = x; then
18759      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18760$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18761    else
18762      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18763      if test "x$IS_MODERN_MAKE" = x; then
18764        { $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
18765$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;}
18766      else
18767        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18768          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769            MAKE_EXPECTED_ENV='cygwin'
18770          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18771            MAKE_EXPECTED_ENV='msys'
18772          else
18773            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18774          fi
18775          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18776          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18777        else
18778          # Not relevant for non-Windows
18779          IS_MAKE_CORRECT_ENV=true
18780        fi
18781        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18782          { $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
18783$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;}
18784        else
18785          FOUND_MAKE=$MAKE_CANDIDATE
18786
18787  # Only process if variable expands to non-empty
18788
18789  if test "x$FOUND_MAKE" != x; then
18790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791
18792  # First separate the path from the arguments. This will split at the first
18793  # space.
18794  complete="$FOUND_MAKE"
18795  path="${complete%% *}"
18796  tmp="$complete EOL"
18797  arguments="${tmp#* }"
18798
18799  # Input might be given as Windows format, start by converting to
18800  # unix format.
18801  new_path=`$CYGPATH -u "$path"`
18802
18803  # Now try to locate executable using which
18804  new_path=`$WHICH "$new_path" 2> /dev/null`
18805  # bat and cmd files are not always considered executable in cygwin causing which
18806  # to not find them
18807  if test "x$new_path" = x \
18808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18810    new_path=`$CYGPATH -u "$path"`
18811  fi
18812  if test "x$new_path" = x; then
18813    # Oops. Which didn't find the executable.
18814    # The splitting of arguments from the executable at a space might have been incorrect,
18815    # since paths with space are more likely in Windows. Give it another try with the whole
18816    # argument.
18817    path="$complete"
18818    arguments="EOL"
18819    new_path=`$CYGPATH -u "$path"`
18820    new_path=`$WHICH "$new_path" 2> /dev/null`
18821    # bat and cmd files are not always considered executable in cygwin causing which
18822    # to not find them
18823    if test "x$new_path" = x \
18824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18826      new_path=`$CYGPATH -u "$path"`
18827    fi
18828    if test "x$new_path" = x; then
18829      # It's still not found. Now this is an unrecoverable error.
18830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18832      has_space=`$ECHO "$complete" | $GREP " "`
18833      if test "x$has_space" != x; then
18834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18836      fi
18837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18838    fi
18839  fi
18840
18841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18844  # "foo.exe" is OK but "foo" is an error.
18845  #
18846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18847  # It is also a way to make sure we got the proper file name for the real test later on.
18848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18849  if test "x$test_shortpath" = x; then
18850    # Short path failed, file does not exist as specified.
18851    # Try adding .exe or .cmd
18852    if test -f "${new_path}.exe"; then
18853      input_to_shortpath="${new_path}.exe"
18854    elif test -f "${new_path}.cmd"; then
18855      input_to_shortpath="${new_path}.cmd"
18856    else
18857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18858$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18861      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18862    fi
18863  else
18864    input_to_shortpath="$new_path"
18865  fi
18866
18867  # Call helper function which possibly converts this using DOS-style short mode.
18868  # If so, the updated path is stored in $new_path.
18869  new_path="$input_to_shortpath"
18870
18871  input_path="$input_to_shortpath"
18872  # Check if we need to convert this using DOS-style short mode. If the path
18873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18874  # take no chances and rewrite it.
18875  # Note: m4 eats our [], so we need to use [ and ] instead.
18876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18877  if test "x$has_forbidden_chars" != x; then
18878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18882      # Going to short mode and back again did indeed matter. Since short mode is
18883      # case insensitive, let's make it lowercase to improve readability.
18884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18885      # Now convert it back to Unix-style (cygpath)
18886      input_path=`$CYGPATH -u "$shortmode_path"`
18887      new_path="$input_path"
18888    fi
18889  fi
18890
18891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18892  if test "x$test_cygdrive_prefix" = x; then
18893    # As a simple fix, exclude /usr/bin since it's not a real path.
18894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18896      # a path prefixed by /cygdrive for fixpath to work.
18897      new_path="$CYGWIN_ROOT_PATH$input_path"
18898    fi
18899  fi
18900
18901  # remove trailing .exe if any
18902  new_path="${new_path/%.exe/}"
18903
18904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905
18906  # First separate the path from the arguments. This will split at the first
18907  # space.
18908  complete="$FOUND_MAKE"
18909  path="${complete%% *}"
18910  tmp="$complete EOL"
18911  arguments="${tmp#* }"
18912
18913  # Input might be given as Windows format, start by converting to
18914  # unix format.
18915  new_path="$path"
18916
18917  windows_path="$new_path"
18918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18919    unix_path=`$CYGPATH -u "$windows_path"`
18920    new_path="$unix_path"
18921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18923    new_path="$unix_path"
18924  fi
18925
18926
18927  # Now try to locate executable using which
18928  new_path=`$WHICH "$new_path" 2> /dev/null`
18929
18930  if test "x$new_path" = x; then
18931    # Oops. Which didn't find the executable.
18932    # The splitting of arguments from the executable at a space might have been incorrect,
18933    # since paths with space are more likely in Windows. Give it another try with the whole
18934    # argument.
18935    path="$complete"
18936    arguments="EOL"
18937    new_path="$path"
18938
18939  windows_path="$new_path"
18940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18941    unix_path=`$CYGPATH -u "$windows_path"`
18942    new_path="$unix_path"
18943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18945    new_path="$unix_path"
18946  fi
18947
18948
18949    new_path=`$WHICH "$new_path" 2> /dev/null`
18950    # bat and cmd files are not always considered executable in MSYS causing which
18951    # to not find them
18952    if test "x$new_path" = x \
18953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18955      new_path="$path"
18956
18957  windows_path="$new_path"
18958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18959    unix_path=`$CYGPATH -u "$windows_path"`
18960    new_path="$unix_path"
18961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18963    new_path="$unix_path"
18964  fi
18965
18966    fi
18967
18968    if test "x$new_path" = x; then
18969      # It's still not found. Now this is an unrecoverable error.
18970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18971$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18972      has_space=`$ECHO "$complete" | $GREP " "`
18973      if test "x$has_space" != x; then
18974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18976      fi
18977      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18978    fi
18979  fi
18980
18981  # Now new_path has a complete unix path to the binary
18982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18983    # Keep paths in /bin as-is, but remove trailing .exe if any
18984    new_path="${new_path/%.exe/}"
18985    # Do not save /bin paths to all_fixpath_prefixes!
18986  else
18987    # Not in mixed or Windows style, start by that.
18988    new_path=`cmd //c echo $new_path`
18989
18990  input_path="$new_path"
18991  # Check if we need to convert this using DOS-style short mode. If the path
18992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18993  # take no chances and rewrite it.
18994  # Note: m4 eats our [], so we need to use [ and ] instead.
18995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18996  if test "x$has_forbidden_chars" != x; then
18997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18999  fi
19000
19001    # Output is in $new_path
19002
19003  windows_path="$new_path"
19004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19005    unix_path=`$CYGPATH -u "$windows_path"`
19006    new_path="$unix_path"
19007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19009    new_path="$unix_path"
19010  fi
19011
19012    # remove trailing .exe if any
19013    new_path="${new_path/%.exe/}"
19014
19015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19017  fi
19018
19019    else
19020      # We're on a unix platform. Hooray! :)
19021      # First separate the path from the arguments. This will split at the first
19022      # space.
19023      complete="$FOUND_MAKE"
19024      path="${complete%% *}"
19025      tmp="$complete EOL"
19026      arguments="${tmp#* }"
19027
19028      # Cannot rely on the command "which" here since it doesn't always work.
19029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19030      if test -z "$is_absolute_path"; then
19031        # Path to executable is not absolute. Find it.
19032        IFS_save="$IFS"
19033        IFS=:
19034        for p in $PATH; do
19035          if test -f "$p/$path" && test -x "$p/$path"; then
19036            new_path="$p/$path"
19037            break
19038          fi
19039        done
19040        IFS="$IFS_save"
19041      else
19042        # This is an absolute path, we can use it without further modifications.
19043        new_path="$path"
19044      fi
19045
19046      if test "x$new_path" = x; then
19047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19048$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19049        has_space=`$ECHO "$complete" | $GREP " "`
19050        if test "x$has_space" != x; then
19051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19053        fi
19054        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19055      fi
19056    fi
19057
19058    # Now join together the path and the arguments once again
19059    if test "x$arguments" != xEOL; then
19060      new_complete="$new_path ${arguments% *}"
19061    else
19062      new_complete="$new_path"
19063    fi
19064
19065    if test "x$complete" != "x$new_complete"; then
19066      FOUND_MAKE="$new_complete"
19067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19068$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19069    fi
19070  fi
19071
19072        fi
19073      fi
19074    fi
19075  fi
19076
19077        fi
19078        PATH=$OLD_PATH
19079      fi
19080    fi
19081
19082    if test "x$FOUND_MAKE" = x; then
19083      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
19084    fi
19085
19086  else
19087    # The variable is set, but is it from the command line or the environment?
19088
19089    # Try to remove the string !MAKE! from our list.
19090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19092      # If it failed, the variable was not from the command line. Ignore it,
19093      # but warn the user (except for BASH, which is always set by the calling BASH).
19094      if test "xMAKE" != xBASH; then
19095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19096$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19097      fi
19098      # Try to locate tool using the code snippet
19099
19100    # Try our hardest to locate a correct version of GNU make
19101    for ac_prog in gmake
19102do
19103  # Extract the first word of "$ac_prog", so it can be a program name with args.
19104set dummy $ac_prog; ac_word=$2
19105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19106$as_echo_n "checking for $ac_word... " >&6; }
19107if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19108  $as_echo_n "(cached) " >&6
19109else
19110  case $CHECK_GMAKE in
19111  [\\/]* | ?:[\\/]*)
19112  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19113  ;;
19114  *)
19115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19116for as_dir in $PATH
19117do
19118  IFS=$as_save_IFS
19119  test -z "$as_dir" && as_dir=.
19120    for ac_exec_ext in '' $ac_executable_extensions; do
19121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19122    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19124    break 2
19125  fi
19126done
19127  done
19128IFS=$as_save_IFS
19129
19130  ;;
19131esac
19132fi
19133CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19134if test -n "$CHECK_GMAKE"; then
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19136$as_echo "$CHECK_GMAKE" >&6; }
19137else
19138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139$as_echo "no" >&6; }
19140fi
19141
19142
19143  test -n "$CHECK_GMAKE" && break
19144done
19145
19146
19147  MAKE_CANDIDATE=""$CHECK_GMAKE""
19148  DESCRIPTION="gmake in PATH"
19149
19150  # On Cygwin, we require a newer version of make than on other platforms
19151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152    MAKE_VERSION_EXPR="-e 4\."
19153    MAKE_REQUIRED_VERSION="4.0"
19154   else
19155    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19156    MAKE_REQUIRED_VERSION="3.81"
19157  fi
19158
19159  if test "x$MAKE_CANDIDATE" != x; then
19160    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19161$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19162    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19163    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19164    if test "x$IS_GNU_MAKE" = x; then
19165      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19166$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19167    else
19168      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19169      if test "x$IS_MODERN_MAKE" = x; then
19170        { $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
19171$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;}
19172      else
19173        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19174          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19175            MAKE_EXPECTED_ENV='cygwin'
19176          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19177            MAKE_EXPECTED_ENV='msys'
19178          else
19179            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19180          fi
19181          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19182          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19183        else
19184          # Not relevant for non-Windows
19185          IS_MAKE_CORRECT_ENV=true
19186        fi
19187        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19188          { $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
19189$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;}
19190        else
19191          FOUND_MAKE=$MAKE_CANDIDATE
19192
19193  # Only process if variable expands to non-empty
19194
19195  if test "x$FOUND_MAKE" != x; then
19196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19197
19198  # First separate the path from the arguments. This will split at the first
19199  # space.
19200  complete="$FOUND_MAKE"
19201  path="${complete%% *}"
19202  tmp="$complete EOL"
19203  arguments="${tmp#* }"
19204
19205  # Input might be given as Windows format, start by converting to
19206  # unix format.
19207  new_path=`$CYGPATH -u "$path"`
19208
19209  # Now try to locate executable using which
19210  new_path=`$WHICH "$new_path" 2> /dev/null`
19211  # bat and cmd files are not always considered executable in cygwin causing which
19212  # to not find them
19213  if test "x$new_path" = x \
19214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19216    new_path=`$CYGPATH -u "$path"`
19217  fi
19218  if test "x$new_path" = x; then
19219    # Oops. Which didn't find the executable.
19220    # The splitting of arguments from the executable at a space might have been incorrect,
19221    # since paths with space are more likely in Windows. Give it another try with the whole
19222    # argument.
19223    path="$complete"
19224    arguments="EOL"
19225    new_path=`$CYGPATH -u "$path"`
19226    new_path=`$WHICH "$new_path" 2> /dev/null`
19227    # bat and cmd files are not always considered executable in cygwin causing which
19228    # to not find them
19229    if test "x$new_path" = x \
19230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19232      new_path=`$CYGPATH -u "$path"`
19233    fi
19234    if test "x$new_path" = x; then
19235      # It's still not found. Now this is an unrecoverable error.
19236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19238      has_space=`$ECHO "$complete" | $GREP " "`
19239      if test "x$has_space" != x; then
19240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19242      fi
19243      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19244    fi
19245  fi
19246
19247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19250  # "foo.exe" is OK but "foo" is an error.
19251  #
19252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19253  # It is also a way to make sure we got the proper file name for the real test later on.
19254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19255  if test "x$test_shortpath" = x; then
19256    # Short path failed, file does not exist as specified.
19257    # Try adding .exe or .cmd
19258    if test -f "${new_path}.exe"; then
19259      input_to_shortpath="${new_path}.exe"
19260    elif test -f "${new_path}.cmd"; then
19261      input_to_shortpath="${new_path}.cmd"
19262    else
19263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19264$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19267      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19268    fi
19269  else
19270    input_to_shortpath="$new_path"
19271  fi
19272
19273  # Call helper function which possibly converts this using DOS-style short mode.
19274  # If so, the updated path is stored in $new_path.
19275  new_path="$input_to_shortpath"
19276
19277  input_path="$input_to_shortpath"
19278  # Check if we need to convert this using DOS-style short mode. If the path
19279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19280  # take no chances and rewrite it.
19281  # Note: m4 eats our [], so we need to use [ and ] instead.
19282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19283  if test "x$has_forbidden_chars" != x; then
19284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19288      # Going to short mode and back again did indeed matter. Since short mode is
19289      # case insensitive, let's make it lowercase to improve readability.
19290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19291      # Now convert it back to Unix-style (cygpath)
19292      input_path=`$CYGPATH -u "$shortmode_path"`
19293      new_path="$input_path"
19294    fi
19295  fi
19296
19297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19298  if test "x$test_cygdrive_prefix" = x; then
19299    # As a simple fix, exclude /usr/bin since it's not a real path.
19300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19302      # a path prefixed by /cygdrive for fixpath to work.
19303      new_path="$CYGWIN_ROOT_PATH$input_path"
19304    fi
19305  fi
19306
19307  # remove trailing .exe if any
19308  new_path="${new_path/%.exe/}"
19309
19310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19311
19312  # First separate the path from the arguments. This will split at the first
19313  # space.
19314  complete="$FOUND_MAKE"
19315  path="${complete%% *}"
19316  tmp="$complete EOL"
19317  arguments="${tmp#* }"
19318
19319  # Input might be given as Windows format, start by converting to
19320  # unix format.
19321  new_path="$path"
19322
19323  windows_path="$new_path"
19324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19325    unix_path=`$CYGPATH -u "$windows_path"`
19326    new_path="$unix_path"
19327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19329    new_path="$unix_path"
19330  fi
19331
19332
19333  # Now try to locate executable using which
19334  new_path=`$WHICH "$new_path" 2> /dev/null`
19335
19336  if test "x$new_path" = x; then
19337    # Oops. Which didn't find the executable.
19338    # The splitting of arguments from the executable at a space might have been incorrect,
19339    # since paths with space are more likely in Windows. Give it another try with the whole
19340    # argument.
19341    path="$complete"
19342    arguments="EOL"
19343    new_path="$path"
19344
19345  windows_path="$new_path"
19346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19347    unix_path=`$CYGPATH -u "$windows_path"`
19348    new_path="$unix_path"
19349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19351    new_path="$unix_path"
19352  fi
19353
19354
19355    new_path=`$WHICH "$new_path" 2> /dev/null`
19356    # bat and cmd files are not always considered executable in MSYS causing which
19357    # to not find them
19358    if test "x$new_path" = x \
19359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19361      new_path="$path"
19362
19363  windows_path="$new_path"
19364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19365    unix_path=`$CYGPATH -u "$windows_path"`
19366    new_path="$unix_path"
19367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19369    new_path="$unix_path"
19370  fi
19371
19372    fi
19373
19374    if test "x$new_path" = x; then
19375      # It's still not found. Now this is an unrecoverable error.
19376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19377$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19378      has_space=`$ECHO "$complete" | $GREP " "`
19379      if test "x$has_space" != x; then
19380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19382      fi
19383      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19384    fi
19385  fi
19386
19387  # Now new_path has a complete unix path to the binary
19388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19389    # Keep paths in /bin as-is, but remove trailing .exe if any
19390    new_path="${new_path/%.exe/}"
19391    # Do not save /bin paths to all_fixpath_prefixes!
19392  else
19393    # Not in mixed or Windows style, start by that.
19394    new_path=`cmd //c echo $new_path`
19395
19396  input_path="$new_path"
19397  # Check if we need to convert this using DOS-style short mode. If the path
19398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19399  # take no chances and rewrite it.
19400  # Note: m4 eats our [], so we need to use [ and ] instead.
19401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19402  if test "x$has_forbidden_chars" != x; then
19403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19405  fi
19406
19407    # Output is in $new_path
19408
19409  windows_path="$new_path"
19410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19411    unix_path=`$CYGPATH -u "$windows_path"`
19412    new_path="$unix_path"
19413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19415    new_path="$unix_path"
19416  fi
19417
19418    # remove trailing .exe if any
19419    new_path="${new_path/%.exe/}"
19420
19421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19423  fi
19424
19425    else
19426      # We're on a unix platform. Hooray! :)
19427      # First separate the path from the arguments. This will split at the first
19428      # space.
19429      complete="$FOUND_MAKE"
19430      path="${complete%% *}"
19431      tmp="$complete EOL"
19432      arguments="${tmp#* }"
19433
19434      # Cannot rely on the command "which" here since it doesn't always work.
19435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19436      if test -z "$is_absolute_path"; then
19437        # Path to executable is not absolute. Find it.
19438        IFS_save="$IFS"
19439        IFS=:
19440        for p in $PATH; do
19441          if test -f "$p/$path" && test -x "$p/$path"; then
19442            new_path="$p/$path"
19443            break
19444          fi
19445        done
19446        IFS="$IFS_save"
19447      else
19448        # This is an absolute path, we can use it without further modifications.
19449        new_path="$path"
19450      fi
19451
19452      if test "x$new_path" = x; then
19453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19454$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19455        has_space=`$ECHO "$complete" | $GREP " "`
19456        if test "x$has_space" != x; then
19457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19459        fi
19460        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19461      fi
19462    fi
19463
19464    # Now join together the path and the arguments once again
19465    if test "x$arguments" != xEOL; then
19466      new_complete="$new_path ${arguments% *}"
19467    else
19468      new_complete="$new_path"
19469    fi
19470
19471    if test "x$complete" != "x$new_complete"; then
19472      FOUND_MAKE="$new_complete"
19473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19474$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19475    fi
19476  fi
19477
19478        fi
19479      fi
19480    fi
19481  fi
19482
19483
19484    if test "x$FOUND_MAKE" = x; then
19485      for ac_prog in make
19486do
19487  # Extract the first word of "$ac_prog", so it can be a program name with args.
19488set dummy $ac_prog; ac_word=$2
19489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19490$as_echo_n "checking for $ac_word... " >&6; }
19491if ${ac_cv_path_CHECK_MAKE+:} false; then :
19492  $as_echo_n "(cached) " >&6
19493else
19494  case $CHECK_MAKE in
19495  [\\/]* | ?:[\\/]*)
19496  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19497  ;;
19498  *)
19499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19500for as_dir in $PATH
19501do
19502  IFS=$as_save_IFS
19503  test -z "$as_dir" && as_dir=.
19504    for ac_exec_ext in '' $ac_executable_extensions; do
19505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19506    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19508    break 2
19509  fi
19510done
19511  done
19512IFS=$as_save_IFS
19513
19514  ;;
19515esac
19516fi
19517CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19518if test -n "$CHECK_MAKE"; then
19519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19520$as_echo "$CHECK_MAKE" >&6; }
19521else
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19523$as_echo "no" >&6; }
19524fi
19525
19526
19527  test -n "$CHECK_MAKE" && break
19528done
19529
19530
19531  MAKE_CANDIDATE=""$CHECK_MAKE""
19532  DESCRIPTION="make in PATH"
19533
19534  # On Cygwin, we require a newer version of make than on other platforms
19535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19536    MAKE_VERSION_EXPR="-e 4\."
19537    MAKE_REQUIRED_VERSION="4.0"
19538   else
19539    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19540    MAKE_REQUIRED_VERSION="3.81"
19541  fi
19542
19543  if test "x$MAKE_CANDIDATE" != x; then
19544    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19545$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19546    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19547    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19548    if test "x$IS_GNU_MAKE" = x; then
19549      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19550$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19551    else
19552      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19553      if test "x$IS_MODERN_MAKE" = x; then
19554        { $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
19555$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;}
19556      else
19557        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19558          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19559            MAKE_EXPECTED_ENV='cygwin'
19560          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19561            MAKE_EXPECTED_ENV='msys'
19562          else
19563            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19564          fi
19565          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19566          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19567        else
19568          # Not relevant for non-Windows
19569          IS_MAKE_CORRECT_ENV=true
19570        fi
19571        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19572          { $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
19573$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;}
19574        else
19575          FOUND_MAKE=$MAKE_CANDIDATE
19576
19577  # Only process if variable expands to non-empty
19578
19579  if test "x$FOUND_MAKE" != x; then
19580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19581
19582  # First separate the path from the arguments. This will split at the first
19583  # space.
19584  complete="$FOUND_MAKE"
19585  path="${complete%% *}"
19586  tmp="$complete EOL"
19587  arguments="${tmp#* }"
19588
19589  # Input might be given as Windows format, start by converting to
19590  # unix format.
19591  new_path=`$CYGPATH -u "$path"`
19592
19593  # Now try to locate executable using which
19594  new_path=`$WHICH "$new_path" 2> /dev/null`
19595  # bat and cmd files are not always considered executable in cygwin causing which
19596  # to not find them
19597  if test "x$new_path" = x \
19598      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19599      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19600    new_path=`$CYGPATH -u "$path"`
19601  fi
19602  if test "x$new_path" = x; then
19603    # Oops. Which didn't find the executable.
19604    # The splitting of arguments from the executable at a space might have been incorrect,
19605    # since paths with space are more likely in Windows. Give it another try with the whole
19606    # argument.
19607    path="$complete"
19608    arguments="EOL"
19609    new_path=`$CYGPATH -u "$path"`
19610    new_path=`$WHICH "$new_path" 2> /dev/null`
19611    # bat and cmd files are not always considered executable in cygwin causing which
19612    # to not find them
19613    if test "x$new_path" = x \
19614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19616      new_path=`$CYGPATH -u "$path"`
19617    fi
19618    if test "x$new_path" = x; then
19619      # It's still not found. Now this is an unrecoverable error.
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19621$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19622      has_space=`$ECHO "$complete" | $GREP " "`
19623      if test "x$has_space" != x; then
19624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19626      fi
19627      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19628    fi
19629  fi
19630
19631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19634  # "foo.exe" is OK but "foo" is an error.
19635  #
19636  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19637  # It is also a way to make sure we got the proper file name for the real test later on.
19638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19639  if test "x$test_shortpath" = x; then
19640    # Short path failed, file does not exist as specified.
19641    # Try adding .exe or .cmd
19642    if test -f "${new_path}.exe"; then
19643      input_to_shortpath="${new_path}.exe"
19644    elif test -f "${new_path}.cmd"; then
19645      input_to_shortpath="${new_path}.cmd"
19646    else
19647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19652    fi
19653  else
19654    input_to_shortpath="$new_path"
19655  fi
19656
19657  # Call helper function which possibly converts this using DOS-style short mode.
19658  # If so, the updated path is stored in $new_path.
19659  new_path="$input_to_shortpath"
19660
19661  input_path="$input_to_shortpath"
19662  # Check if we need to convert this using DOS-style short mode. If the path
19663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19664  # take no chances and rewrite it.
19665  # Note: m4 eats our [], so we need to use [ and ] instead.
19666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19667  if test "x$has_forbidden_chars" != x; then
19668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19672      # Going to short mode and back again did indeed matter. Since short mode is
19673      # case insensitive, let's make it lowercase to improve readability.
19674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19675      # Now convert it back to Unix-style (cygpath)
19676      input_path=`$CYGPATH -u "$shortmode_path"`
19677      new_path="$input_path"
19678    fi
19679  fi
19680
19681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19682  if test "x$test_cygdrive_prefix" = x; then
19683    # As a simple fix, exclude /usr/bin since it's not a real path.
19684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19686      # a path prefixed by /cygdrive for fixpath to work.
19687      new_path="$CYGWIN_ROOT_PATH$input_path"
19688    fi
19689  fi
19690
19691  # remove trailing .exe if any
19692  new_path="${new_path/%.exe/}"
19693
19694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19695
19696  # First separate the path from the arguments. This will split at the first
19697  # space.
19698  complete="$FOUND_MAKE"
19699  path="${complete%% *}"
19700  tmp="$complete EOL"
19701  arguments="${tmp#* }"
19702
19703  # Input might be given as Windows format, start by converting to
19704  # unix format.
19705  new_path="$path"
19706
19707  windows_path="$new_path"
19708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19709    unix_path=`$CYGPATH -u "$windows_path"`
19710    new_path="$unix_path"
19711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19713    new_path="$unix_path"
19714  fi
19715
19716
19717  # Now try to locate executable using which
19718  new_path=`$WHICH "$new_path" 2> /dev/null`
19719
19720  if test "x$new_path" = x; then
19721    # Oops. Which didn't find the executable.
19722    # The splitting of arguments from the executable at a space might have been incorrect,
19723    # since paths with space are more likely in Windows. Give it another try with the whole
19724    # argument.
19725    path="$complete"
19726    arguments="EOL"
19727    new_path="$path"
19728
19729  windows_path="$new_path"
19730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19731    unix_path=`$CYGPATH -u "$windows_path"`
19732    new_path="$unix_path"
19733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19735    new_path="$unix_path"
19736  fi
19737
19738
19739    new_path=`$WHICH "$new_path" 2> /dev/null`
19740    # bat and cmd files are not always considered executable in MSYS causing which
19741    # to not find them
19742    if test "x$new_path" = x \
19743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19745      new_path="$path"
19746
19747  windows_path="$new_path"
19748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749    unix_path=`$CYGPATH -u "$windows_path"`
19750    new_path="$unix_path"
19751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19753    new_path="$unix_path"
19754  fi
19755
19756    fi
19757
19758    if test "x$new_path" = x; then
19759      # It's still not found. Now this is an unrecoverable error.
19760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19761$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19762      has_space=`$ECHO "$complete" | $GREP " "`
19763      if test "x$has_space" != x; then
19764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19766      fi
19767      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19768    fi
19769  fi
19770
19771  # Now new_path has a complete unix path to the binary
19772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19773    # Keep paths in /bin as-is, but remove trailing .exe if any
19774    new_path="${new_path/%.exe/}"
19775    # Do not save /bin paths to all_fixpath_prefixes!
19776  else
19777    # Not in mixed or Windows style, start by that.
19778    new_path=`cmd //c echo $new_path`
19779
19780  input_path="$new_path"
19781  # Check if we need to convert this using DOS-style short mode. If the path
19782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19783  # take no chances and rewrite it.
19784  # Note: m4 eats our [], so we need to use [ and ] instead.
19785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19786  if test "x$has_forbidden_chars" != x; then
19787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19789  fi
19790
19791    # Output is in $new_path
19792
19793  windows_path="$new_path"
19794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19795    unix_path=`$CYGPATH -u "$windows_path"`
19796    new_path="$unix_path"
19797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19799    new_path="$unix_path"
19800  fi
19801
19802    # remove trailing .exe if any
19803    new_path="${new_path/%.exe/}"
19804
19805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19807  fi
19808
19809    else
19810      # We're on a unix platform. Hooray! :)
19811      # First separate the path from the arguments. This will split at the first
19812      # space.
19813      complete="$FOUND_MAKE"
19814      path="${complete%% *}"
19815      tmp="$complete EOL"
19816      arguments="${tmp#* }"
19817
19818      # Cannot rely on the command "which" here since it doesn't always work.
19819      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19820      if test -z "$is_absolute_path"; then
19821        # Path to executable is not absolute. Find it.
19822        IFS_save="$IFS"
19823        IFS=:
19824        for p in $PATH; do
19825          if test -f "$p/$path" && test -x "$p/$path"; then
19826            new_path="$p/$path"
19827            break
19828          fi
19829        done
19830        IFS="$IFS_save"
19831      else
19832        # This is an absolute path, we can use it without further modifications.
19833        new_path="$path"
19834      fi
19835
19836      if test "x$new_path" = x; then
19837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19838$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19839        has_space=`$ECHO "$complete" | $GREP " "`
19840        if test "x$has_space" != x; then
19841          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19842$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19843        fi
19844        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19845      fi
19846    fi
19847
19848    # Now join together the path and the arguments once again
19849    if test "x$arguments" != xEOL; then
19850      new_complete="$new_path ${arguments% *}"
19851    else
19852      new_complete="$new_path"
19853    fi
19854
19855    if test "x$complete" != "x$new_complete"; then
19856      FOUND_MAKE="$new_complete"
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19858$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19859    fi
19860  fi
19861
19862        fi
19863      fi
19864    fi
19865  fi
19866
19867    fi
19868
19869    if test "x$FOUND_MAKE" = x; then
19870      if test "x$TOOLCHAIN_PATH" != x; then
19871        # We have a toolchain path, check that as well before giving up.
19872        OLD_PATH=$PATH
19873        PATH=$TOOLCHAIN_PATH:$PATH
19874        for ac_prog in gmake
19875do
19876  # Extract the first word of "$ac_prog", so it can be a program name with args.
19877set dummy $ac_prog; ac_word=$2
19878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19879$as_echo_n "checking for $ac_word... " >&6; }
19880if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19881  $as_echo_n "(cached) " >&6
19882else
19883  case $CHECK_TOOLSDIR_GMAKE in
19884  [\\/]* | ?:[\\/]*)
19885  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19886  ;;
19887  *)
19888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19889for as_dir in $PATH
19890do
19891  IFS=$as_save_IFS
19892  test -z "$as_dir" && as_dir=.
19893    for ac_exec_ext in '' $ac_executable_extensions; do
19894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19895    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19897    break 2
19898  fi
19899done
19900  done
19901IFS=$as_save_IFS
19902
19903  ;;
19904esac
19905fi
19906CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19907if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19909$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19910else
19911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19912$as_echo "no" >&6; }
19913fi
19914
19915
19916  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19917done
19918
19919
19920  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19921  DESCRIPTION="gmake in tools-dir"
19922
19923  # On Cygwin, we require a newer version of make than on other platforms
19924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19925    MAKE_VERSION_EXPR="-e 4\."
19926    MAKE_REQUIRED_VERSION="4.0"
19927   else
19928    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19929    MAKE_REQUIRED_VERSION="3.81"
19930  fi
19931
19932  if test "x$MAKE_CANDIDATE" != x; then
19933    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19934$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19935    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19936    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19937    if test "x$IS_GNU_MAKE" = x; then
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19939$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19940    else
19941      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19942      if test "x$IS_MODERN_MAKE" = x; then
19943        { $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
19944$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;}
19945      else
19946        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19947          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19948            MAKE_EXPECTED_ENV='cygwin'
19949          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19950            MAKE_EXPECTED_ENV='msys'
19951          else
19952            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19953          fi
19954          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19955          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19956        else
19957          # Not relevant for non-Windows
19958          IS_MAKE_CORRECT_ENV=true
19959        fi
19960        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19961          { $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
19962$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;}
19963        else
19964          FOUND_MAKE=$MAKE_CANDIDATE
19965
19966  # Only process if variable expands to non-empty
19967
19968  if test "x$FOUND_MAKE" != x; then
19969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19970
19971  # First separate the path from the arguments. This will split at the first
19972  # space.
19973  complete="$FOUND_MAKE"
19974  path="${complete%% *}"
19975  tmp="$complete EOL"
19976  arguments="${tmp#* }"
19977
19978  # Input might be given as Windows format, start by converting to
19979  # unix format.
19980  new_path=`$CYGPATH -u "$path"`
19981
19982  # Now try to locate executable using which
19983  new_path=`$WHICH "$new_path" 2> /dev/null`
19984  # bat and cmd files are not always considered executable in cygwin causing which
19985  # to not find them
19986  if test "x$new_path" = x \
19987      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19988      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19989    new_path=`$CYGPATH -u "$path"`
19990  fi
19991  if test "x$new_path" = x; then
19992    # Oops. Which didn't find the executable.
19993    # The splitting of arguments from the executable at a space might have been incorrect,
19994    # since paths with space are more likely in Windows. Give it another try with the whole
19995    # argument.
19996    path="$complete"
19997    arguments="EOL"
19998    new_path=`$CYGPATH -u "$path"`
19999    new_path=`$WHICH "$new_path" 2> /dev/null`
20000    # bat and cmd files are not always considered executable in cygwin causing which
20001    # to not find them
20002    if test "x$new_path" = x \
20003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20005      new_path=`$CYGPATH -u "$path"`
20006    fi
20007    if test "x$new_path" = x; then
20008      # It's still not found. Now this is an unrecoverable error.
20009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20010$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20011      has_space=`$ECHO "$complete" | $GREP " "`
20012      if test "x$has_space" != x; then
20013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20015      fi
20016      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20017    fi
20018  fi
20019
20020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20023  # "foo.exe" is OK but "foo" is an error.
20024  #
20025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20026  # It is also a way to make sure we got the proper file name for the real test later on.
20027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20028  if test "x$test_shortpath" = x; then
20029    # Short path failed, file does not exist as specified.
20030    # Try adding .exe or .cmd
20031    if test -f "${new_path}.exe"; then
20032      input_to_shortpath="${new_path}.exe"
20033    elif test -f "${new_path}.cmd"; then
20034      input_to_shortpath="${new_path}.cmd"
20035    else
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20040      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20041    fi
20042  else
20043    input_to_shortpath="$new_path"
20044  fi
20045
20046  # Call helper function which possibly converts this using DOS-style short mode.
20047  # If so, the updated path is stored in $new_path.
20048  new_path="$input_to_shortpath"
20049
20050  input_path="$input_to_shortpath"
20051  # Check if we need to convert this using DOS-style short mode. If the path
20052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20053  # take no chances and rewrite it.
20054  # Note: m4 eats our [], so we need to use [ and ] instead.
20055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20056  if test "x$has_forbidden_chars" != x; then
20057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20061      # Going to short mode and back again did indeed matter. Since short mode is
20062      # case insensitive, let's make it lowercase to improve readability.
20063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20064      # Now convert it back to Unix-style (cygpath)
20065      input_path=`$CYGPATH -u "$shortmode_path"`
20066      new_path="$input_path"
20067    fi
20068  fi
20069
20070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20071  if test "x$test_cygdrive_prefix" = x; then
20072    # As a simple fix, exclude /usr/bin since it's not a real path.
20073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20075      # a path prefixed by /cygdrive for fixpath to work.
20076      new_path="$CYGWIN_ROOT_PATH$input_path"
20077    fi
20078  fi
20079
20080  # remove trailing .exe if any
20081  new_path="${new_path/%.exe/}"
20082
20083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20084
20085  # First separate the path from the arguments. This will split at the first
20086  # space.
20087  complete="$FOUND_MAKE"
20088  path="${complete%% *}"
20089  tmp="$complete EOL"
20090  arguments="${tmp#* }"
20091
20092  # Input might be given as Windows format, start by converting to
20093  # unix format.
20094  new_path="$path"
20095
20096  windows_path="$new_path"
20097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20098    unix_path=`$CYGPATH -u "$windows_path"`
20099    new_path="$unix_path"
20100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20102    new_path="$unix_path"
20103  fi
20104
20105
20106  # Now try to locate executable using which
20107  new_path=`$WHICH "$new_path" 2> /dev/null`
20108
20109  if test "x$new_path" = x; then
20110    # Oops. Which didn't find the executable.
20111    # The splitting of arguments from the executable at a space might have been incorrect,
20112    # since paths with space are more likely in Windows. Give it another try with the whole
20113    # argument.
20114    path="$complete"
20115    arguments="EOL"
20116    new_path="$path"
20117
20118  windows_path="$new_path"
20119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20120    unix_path=`$CYGPATH -u "$windows_path"`
20121    new_path="$unix_path"
20122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20124    new_path="$unix_path"
20125  fi
20126
20127
20128    new_path=`$WHICH "$new_path" 2> /dev/null`
20129    # bat and cmd files are not always considered executable in MSYS causing which
20130    # to not find them
20131    if test "x$new_path" = x \
20132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20134      new_path="$path"
20135
20136  windows_path="$new_path"
20137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138    unix_path=`$CYGPATH -u "$windows_path"`
20139    new_path="$unix_path"
20140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142    new_path="$unix_path"
20143  fi
20144
20145    fi
20146
20147    if test "x$new_path" = x; then
20148      # It's still not found. Now this is an unrecoverable error.
20149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20150$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20151      has_space=`$ECHO "$complete" | $GREP " "`
20152      if test "x$has_space" != x; then
20153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20155      fi
20156      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20157    fi
20158  fi
20159
20160  # Now new_path has a complete unix path to the binary
20161  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20162    # Keep paths in /bin as-is, but remove trailing .exe if any
20163    new_path="${new_path/%.exe/}"
20164    # Do not save /bin paths to all_fixpath_prefixes!
20165  else
20166    # Not in mixed or Windows style, start by that.
20167    new_path=`cmd //c echo $new_path`
20168
20169  input_path="$new_path"
20170  # Check if we need to convert this using DOS-style short mode. If the path
20171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20172  # take no chances and rewrite it.
20173  # Note: m4 eats our [], so we need to use [ and ] instead.
20174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20175  if test "x$has_forbidden_chars" != x; then
20176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20178  fi
20179
20180    # Output is in $new_path
20181
20182  windows_path="$new_path"
20183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20184    unix_path=`$CYGPATH -u "$windows_path"`
20185    new_path="$unix_path"
20186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20188    new_path="$unix_path"
20189  fi
20190
20191    # remove trailing .exe if any
20192    new_path="${new_path/%.exe/}"
20193
20194    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20195    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20196  fi
20197
20198    else
20199      # We're on a unix platform. Hooray! :)
20200      # First separate the path from the arguments. This will split at the first
20201      # space.
20202      complete="$FOUND_MAKE"
20203      path="${complete%% *}"
20204      tmp="$complete EOL"
20205      arguments="${tmp#* }"
20206
20207      # Cannot rely on the command "which" here since it doesn't always work.
20208      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20209      if test -z "$is_absolute_path"; then
20210        # Path to executable is not absolute. Find it.
20211        IFS_save="$IFS"
20212        IFS=:
20213        for p in $PATH; do
20214          if test -f "$p/$path" && test -x "$p/$path"; then
20215            new_path="$p/$path"
20216            break
20217          fi
20218        done
20219        IFS="$IFS_save"
20220      else
20221        # This is an absolute path, we can use it without further modifications.
20222        new_path="$path"
20223      fi
20224
20225      if test "x$new_path" = x; then
20226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20228        has_space=`$ECHO "$complete" | $GREP " "`
20229        if test "x$has_space" != x; then
20230          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20231$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20232        fi
20233        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20234      fi
20235    fi
20236
20237    # Now join together the path and the arguments once again
20238    if test "x$arguments" != xEOL; then
20239      new_complete="$new_path ${arguments% *}"
20240    else
20241      new_complete="$new_path"
20242    fi
20243
20244    if test "x$complete" != "x$new_complete"; then
20245      FOUND_MAKE="$new_complete"
20246      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20247$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20248    fi
20249  fi
20250
20251        fi
20252      fi
20253    fi
20254  fi
20255
20256        if test "x$FOUND_MAKE" = x; then
20257          for ac_prog in make
20258do
20259  # Extract the first word of "$ac_prog", so it can be a program name with args.
20260set dummy $ac_prog; ac_word=$2
20261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20262$as_echo_n "checking for $ac_word... " >&6; }
20263if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20264  $as_echo_n "(cached) " >&6
20265else
20266  case $CHECK_TOOLSDIR_MAKE in
20267  [\\/]* | ?:[\\/]*)
20268  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20269  ;;
20270  *)
20271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20272for as_dir in $PATH
20273do
20274  IFS=$as_save_IFS
20275  test -z "$as_dir" && as_dir=.
20276    for ac_exec_ext in '' $ac_executable_extensions; do
20277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20278    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20280    break 2
20281  fi
20282done
20283  done
20284IFS=$as_save_IFS
20285
20286  ;;
20287esac
20288fi
20289CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20290if test -n "$CHECK_TOOLSDIR_MAKE"; then
20291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20292$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20293else
20294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20295$as_echo "no" >&6; }
20296fi
20297
20298
20299  test -n "$CHECK_TOOLSDIR_MAKE" && break
20300done
20301
20302
20303  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20304  DESCRIPTION="make in tools-dir"
20305
20306  # On Cygwin, we require a newer version of make than on other platforms
20307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20308    MAKE_VERSION_EXPR="-e 4\."
20309    MAKE_REQUIRED_VERSION="4.0"
20310   else
20311    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20312    MAKE_REQUIRED_VERSION="3.81"
20313  fi
20314
20315  if test "x$MAKE_CANDIDATE" != x; then
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20317$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20318    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20319    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20320    if test "x$IS_GNU_MAKE" = x; then
20321      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20322$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20323    else
20324      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20325      if test "x$IS_MODERN_MAKE" = x; then
20326        { $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
20327$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;}
20328      else
20329        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20330          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20331            MAKE_EXPECTED_ENV='cygwin'
20332          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20333            MAKE_EXPECTED_ENV='msys'
20334          else
20335            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20336          fi
20337          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20338          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20339        else
20340          # Not relevant for non-Windows
20341          IS_MAKE_CORRECT_ENV=true
20342        fi
20343        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20344          { $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
20345$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;}
20346        else
20347          FOUND_MAKE=$MAKE_CANDIDATE
20348
20349  # Only process if variable expands to non-empty
20350
20351  if test "x$FOUND_MAKE" != x; then
20352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353
20354  # First separate the path from the arguments. This will split at the first
20355  # space.
20356  complete="$FOUND_MAKE"
20357  path="${complete%% *}"
20358  tmp="$complete EOL"
20359  arguments="${tmp#* }"
20360
20361  # Input might be given as Windows format, start by converting to
20362  # unix format.
20363  new_path=`$CYGPATH -u "$path"`
20364
20365  # Now try to locate executable using which
20366  new_path=`$WHICH "$new_path" 2> /dev/null`
20367  # bat and cmd files are not always considered executable in cygwin causing which
20368  # to not find them
20369  if test "x$new_path" = x \
20370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20372    new_path=`$CYGPATH -u "$path"`
20373  fi
20374  if test "x$new_path" = x; then
20375    # Oops. Which didn't find the executable.
20376    # The splitting of arguments from the executable at a space might have been incorrect,
20377    # since paths with space are more likely in Windows. Give it another try with the whole
20378    # argument.
20379    path="$complete"
20380    arguments="EOL"
20381    new_path=`$CYGPATH -u "$path"`
20382    new_path=`$WHICH "$new_path" 2> /dev/null`
20383    # bat and cmd files are not always considered executable in cygwin causing which
20384    # to not find them
20385    if test "x$new_path" = x \
20386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20388      new_path=`$CYGPATH -u "$path"`
20389    fi
20390    if test "x$new_path" = x; then
20391      # It's still not found. Now this is an unrecoverable error.
20392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20394      has_space=`$ECHO "$complete" | $GREP " "`
20395      if test "x$has_space" != x; then
20396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20398      fi
20399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20400    fi
20401  fi
20402
20403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20406  # "foo.exe" is OK but "foo" is an error.
20407  #
20408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20409  # It is also a way to make sure we got the proper file name for the real test later on.
20410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20411  if test "x$test_shortpath" = x; then
20412    # Short path failed, file does not exist as specified.
20413    # Try adding .exe or .cmd
20414    if test -f "${new_path}.exe"; then
20415      input_to_shortpath="${new_path}.exe"
20416    elif test -f "${new_path}.cmd"; then
20417      input_to_shortpath="${new_path}.cmd"
20418    else
20419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20420$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20423      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20424    fi
20425  else
20426    input_to_shortpath="$new_path"
20427  fi
20428
20429  # Call helper function which possibly converts this using DOS-style short mode.
20430  # If so, the updated path is stored in $new_path.
20431  new_path="$input_to_shortpath"
20432
20433  input_path="$input_to_shortpath"
20434  # Check if we need to convert this using DOS-style short mode. If the path
20435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20436  # take no chances and rewrite it.
20437  # Note: m4 eats our [], so we need to use [ and ] instead.
20438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20439  if test "x$has_forbidden_chars" != x; then
20440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20444      # Going to short mode and back again did indeed matter. Since short mode is
20445      # case insensitive, let's make it lowercase to improve readability.
20446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20447      # Now convert it back to Unix-style (cygpath)
20448      input_path=`$CYGPATH -u "$shortmode_path"`
20449      new_path="$input_path"
20450    fi
20451  fi
20452
20453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20454  if test "x$test_cygdrive_prefix" = x; then
20455    # As a simple fix, exclude /usr/bin since it's not a real path.
20456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20458      # a path prefixed by /cygdrive for fixpath to work.
20459      new_path="$CYGWIN_ROOT_PATH$input_path"
20460    fi
20461  fi
20462
20463  # remove trailing .exe if any
20464  new_path="${new_path/%.exe/}"
20465
20466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20467
20468  # First separate the path from the arguments. This will split at the first
20469  # space.
20470  complete="$FOUND_MAKE"
20471  path="${complete%% *}"
20472  tmp="$complete EOL"
20473  arguments="${tmp#* }"
20474
20475  # Input might be given as Windows format, start by converting to
20476  # unix format.
20477  new_path="$path"
20478
20479  windows_path="$new_path"
20480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20481    unix_path=`$CYGPATH -u "$windows_path"`
20482    new_path="$unix_path"
20483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20485    new_path="$unix_path"
20486  fi
20487
20488
20489  # Now try to locate executable using which
20490  new_path=`$WHICH "$new_path" 2> /dev/null`
20491
20492  if test "x$new_path" = x; then
20493    # Oops. Which didn't find the executable.
20494    # The splitting of arguments from the executable at a space might have been incorrect,
20495    # since paths with space are more likely in Windows. Give it another try with the whole
20496    # argument.
20497    path="$complete"
20498    arguments="EOL"
20499    new_path="$path"
20500
20501  windows_path="$new_path"
20502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20503    unix_path=`$CYGPATH -u "$windows_path"`
20504    new_path="$unix_path"
20505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20507    new_path="$unix_path"
20508  fi
20509
20510
20511    new_path=`$WHICH "$new_path" 2> /dev/null`
20512    # bat and cmd files are not always considered executable in MSYS causing which
20513    # to not find them
20514    if test "x$new_path" = x \
20515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20517      new_path="$path"
20518
20519  windows_path="$new_path"
20520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20521    unix_path=`$CYGPATH -u "$windows_path"`
20522    new_path="$unix_path"
20523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20525    new_path="$unix_path"
20526  fi
20527
20528    fi
20529
20530    if test "x$new_path" = x; then
20531      # It's still not found. Now this is an unrecoverable error.
20532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20534      has_space=`$ECHO "$complete" | $GREP " "`
20535      if test "x$has_space" != x; then
20536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20538      fi
20539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20540    fi
20541  fi
20542
20543  # Now new_path has a complete unix path to the binary
20544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20545    # Keep paths in /bin as-is, but remove trailing .exe if any
20546    new_path="${new_path/%.exe/}"
20547    # Do not save /bin paths to all_fixpath_prefixes!
20548  else
20549    # Not in mixed or Windows style, start by that.
20550    new_path=`cmd //c echo $new_path`
20551
20552  input_path="$new_path"
20553  # Check if we need to convert this using DOS-style short mode. If the path
20554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20555  # take no chances and rewrite it.
20556  # Note: m4 eats our [], so we need to use [ and ] instead.
20557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20558  if test "x$has_forbidden_chars" != x; then
20559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20561  fi
20562
20563    # Output is in $new_path
20564
20565  windows_path="$new_path"
20566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20567    unix_path=`$CYGPATH -u "$windows_path"`
20568    new_path="$unix_path"
20569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20571    new_path="$unix_path"
20572  fi
20573
20574    # remove trailing .exe if any
20575    new_path="${new_path/%.exe/}"
20576
20577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20579  fi
20580
20581    else
20582      # We're on a unix platform. Hooray! :)
20583      # First separate the path from the arguments. This will split at the first
20584      # space.
20585      complete="$FOUND_MAKE"
20586      path="${complete%% *}"
20587      tmp="$complete EOL"
20588      arguments="${tmp#* }"
20589
20590      # Cannot rely on the command "which" here since it doesn't always work.
20591      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20592      if test -z "$is_absolute_path"; then
20593        # Path to executable is not absolute. Find it.
20594        IFS_save="$IFS"
20595        IFS=:
20596        for p in $PATH; do
20597          if test -f "$p/$path" && test -x "$p/$path"; then
20598            new_path="$p/$path"
20599            break
20600          fi
20601        done
20602        IFS="$IFS_save"
20603      else
20604        # This is an absolute path, we can use it without further modifications.
20605        new_path="$path"
20606      fi
20607
20608      if test "x$new_path" = x; then
20609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20611        has_space=`$ECHO "$complete" | $GREP " "`
20612        if test "x$has_space" != x; then
20613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20615        fi
20616        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20617      fi
20618    fi
20619
20620    # Now join together the path and the arguments once again
20621    if test "x$arguments" != xEOL; then
20622      new_complete="$new_path ${arguments% *}"
20623    else
20624      new_complete="$new_path"
20625    fi
20626
20627    if test "x$complete" != "x$new_complete"; then
20628      FOUND_MAKE="$new_complete"
20629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20630$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20631    fi
20632  fi
20633
20634        fi
20635      fi
20636    fi
20637  fi
20638
20639        fi
20640        PATH=$OLD_PATH
20641      fi
20642    fi
20643
20644    if test "x$FOUND_MAKE" = x; then
20645      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
20646    fi
20647
20648    else
20649      # If it succeeded, then it was overridden by the user. We will use it
20650      # for the tool.
20651
20652      # First remove it from the list of overridden variables, so we can test
20653      # for unknown variables in the end.
20654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20655
20656      # Check if we try to supply an empty value
20657      if test "x$MAKE" = x; then
20658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20659$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20661$as_echo_n "checking for MAKE... " >&6; }
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20663$as_echo "disabled" >&6; }
20664      else
20665        # Check if the provided tool contains a complete path.
20666        tool_specified="$MAKE"
20667        tool_basename="${tool_specified##*/}"
20668        if test "x$tool_basename" = "x$tool_specified"; then
20669          # A command without a complete path is provided, search $PATH.
20670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20671$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20672          # Extract the first word of "$tool_basename", so it can be a program name with args.
20673set dummy $tool_basename; ac_word=$2
20674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20675$as_echo_n "checking for $ac_word... " >&6; }
20676if ${ac_cv_path_MAKE+:} false; then :
20677  $as_echo_n "(cached) " >&6
20678else
20679  case $MAKE in
20680  [\\/]* | ?:[\\/]*)
20681  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20682  ;;
20683  *)
20684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20685for as_dir in $PATH
20686do
20687  IFS=$as_save_IFS
20688  test -z "$as_dir" && as_dir=.
20689    for ac_exec_ext in '' $ac_executable_extensions; do
20690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20691    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20693    break 2
20694  fi
20695done
20696  done
20697IFS=$as_save_IFS
20698
20699  ;;
20700esac
20701fi
20702MAKE=$ac_cv_path_MAKE
20703if test -n "$MAKE"; then
20704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20705$as_echo "$MAKE" >&6; }
20706else
20707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20708$as_echo "no" >&6; }
20709fi
20710
20711
20712          if test "x$MAKE" = x; then
20713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20714          fi
20715        else
20716          # Otherwise we believe it is a complete path. Use it as it is.
20717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20718$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20720$as_echo_n "checking for MAKE... " >&6; }
20721          if test ! -x "$tool_specified"; then
20722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20723$as_echo "not found" >&6; }
20724            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20725          fi
20726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20727$as_echo "$tool_specified" >&6; }
20728        fi
20729      fi
20730    fi
20731
20732    # If MAKE was set by user, verify the version
20733
20734  MAKE_CANDIDATE=""$MAKE""
20735  DESCRIPTION="user supplied MAKE=$MAKE"
20736
20737  # On Cygwin, we require a newer version of make than on other platforms
20738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739    MAKE_VERSION_EXPR="-e 4\."
20740    MAKE_REQUIRED_VERSION="4.0"
20741   else
20742    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20743    MAKE_REQUIRED_VERSION="3.81"
20744  fi
20745
20746  if test "x$MAKE_CANDIDATE" != x; then
20747    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20748$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20749    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20750    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20751    if test "x$IS_GNU_MAKE" = x; then
20752      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20753$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20754    else
20755      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20756      if test "x$IS_MODERN_MAKE" = x; then
20757        { $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
20758$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;}
20759      else
20760        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20761          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20762            MAKE_EXPECTED_ENV='cygwin'
20763          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20764            MAKE_EXPECTED_ENV='msys'
20765          else
20766            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20767          fi
20768          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20769          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20770        else
20771          # Not relevant for non-Windows
20772          IS_MAKE_CORRECT_ENV=true
20773        fi
20774        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20775          { $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
20776$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;}
20777        else
20778          FOUND_MAKE=$MAKE_CANDIDATE
20779
20780  # Only process if variable expands to non-empty
20781
20782  if test "x$FOUND_MAKE" != x; then
20783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20784
20785  # First separate the path from the arguments. This will split at the first
20786  # space.
20787  complete="$FOUND_MAKE"
20788  path="${complete%% *}"
20789  tmp="$complete EOL"
20790  arguments="${tmp#* }"
20791
20792  # Input might be given as Windows format, start by converting to
20793  # unix format.
20794  new_path=`$CYGPATH -u "$path"`
20795
20796  # Now try to locate executable using which
20797  new_path=`$WHICH "$new_path" 2> /dev/null`
20798  # bat and cmd files are not always considered executable in cygwin causing which
20799  # to not find them
20800  if test "x$new_path" = x \
20801      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20802      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20803    new_path=`$CYGPATH -u "$path"`
20804  fi
20805  if test "x$new_path" = x; then
20806    # Oops. Which didn't find the executable.
20807    # The splitting of arguments from the executable at a space might have been incorrect,
20808    # since paths with space are more likely in Windows. Give it another try with the whole
20809    # argument.
20810    path="$complete"
20811    arguments="EOL"
20812    new_path=`$CYGPATH -u "$path"`
20813    new_path=`$WHICH "$new_path" 2> /dev/null`
20814    # bat and cmd files are not always considered executable in cygwin causing which
20815    # to not find them
20816    if test "x$new_path" = x \
20817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20819      new_path=`$CYGPATH -u "$path"`
20820    fi
20821    if test "x$new_path" = x; then
20822      # It's still not found. Now this is an unrecoverable error.
20823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20824$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20825      has_space=`$ECHO "$complete" | $GREP " "`
20826      if test "x$has_space" != x; then
20827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20829      fi
20830      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20831    fi
20832  fi
20833
20834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20837  # "foo.exe" is OK but "foo" is an error.
20838  #
20839  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20840  # It is also a way to make sure we got the proper file name for the real test later on.
20841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20842  if test "x$test_shortpath" = x; then
20843    # Short path failed, file does not exist as specified.
20844    # Try adding .exe or .cmd
20845    if test -f "${new_path}.exe"; then
20846      input_to_shortpath="${new_path}.exe"
20847    elif test -f "${new_path}.cmd"; then
20848      input_to_shortpath="${new_path}.cmd"
20849    else
20850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20851$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20854      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20855    fi
20856  else
20857    input_to_shortpath="$new_path"
20858  fi
20859
20860  # Call helper function which possibly converts this using DOS-style short mode.
20861  # If so, the updated path is stored in $new_path.
20862  new_path="$input_to_shortpath"
20863
20864  input_path="$input_to_shortpath"
20865  # Check if we need to convert this using DOS-style short mode. If the path
20866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20867  # take no chances and rewrite it.
20868  # Note: m4 eats our [], so we need to use [ and ] instead.
20869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20870  if test "x$has_forbidden_chars" != x; then
20871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20875      # Going to short mode and back again did indeed matter. Since short mode is
20876      # case insensitive, let's make it lowercase to improve readability.
20877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20878      # Now convert it back to Unix-style (cygpath)
20879      input_path=`$CYGPATH -u "$shortmode_path"`
20880      new_path="$input_path"
20881    fi
20882  fi
20883
20884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20885  if test "x$test_cygdrive_prefix" = x; then
20886    # As a simple fix, exclude /usr/bin since it's not a real path.
20887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20889      # a path prefixed by /cygdrive for fixpath to work.
20890      new_path="$CYGWIN_ROOT_PATH$input_path"
20891    fi
20892  fi
20893
20894  # remove trailing .exe if any
20895  new_path="${new_path/%.exe/}"
20896
20897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898
20899  # First separate the path from the arguments. This will split at the first
20900  # space.
20901  complete="$FOUND_MAKE"
20902  path="${complete%% *}"
20903  tmp="$complete EOL"
20904  arguments="${tmp#* }"
20905
20906  # Input might be given as Windows format, start by converting to
20907  # unix format.
20908  new_path="$path"
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919
20920  # Now try to locate executable using which
20921  new_path=`$WHICH "$new_path" 2> /dev/null`
20922
20923  if test "x$new_path" = x; then
20924    # Oops. Which didn't find the executable.
20925    # The splitting of arguments from the executable at a space might have been incorrect,
20926    # since paths with space are more likely in Windows. Give it another try with the whole
20927    # argument.
20928    path="$complete"
20929    arguments="EOL"
20930    new_path="$path"
20931
20932  windows_path="$new_path"
20933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20934    unix_path=`$CYGPATH -u "$windows_path"`
20935    new_path="$unix_path"
20936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20938    new_path="$unix_path"
20939  fi
20940
20941
20942    new_path=`$WHICH "$new_path" 2> /dev/null`
20943    # bat and cmd files are not always considered executable in MSYS causing which
20944    # to not find them
20945    if test "x$new_path" = x \
20946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20948      new_path="$path"
20949
20950  windows_path="$new_path"
20951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20952    unix_path=`$CYGPATH -u "$windows_path"`
20953    new_path="$unix_path"
20954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20956    new_path="$unix_path"
20957  fi
20958
20959    fi
20960
20961    if test "x$new_path" = x; then
20962      # It's still not found. Now this is an unrecoverable error.
20963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20965      has_space=`$ECHO "$complete" | $GREP " "`
20966      if test "x$has_space" != x; then
20967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20969      fi
20970      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20971    fi
20972  fi
20973
20974  # Now new_path has a complete unix path to the binary
20975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20976    # Keep paths in /bin as-is, but remove trailing .exe if any
20977    new_path="${new_path/%.exe/}"
20978    # Do not save /bin paths to all_fixpath_prefixes!
20979  else
20980    # Not in mixed or Windows style, start by that.
20981    new_path=`cmd //c echo $new_path`
20982
20983  input_path="$new_path"
20984  # Check if we need to convert this using DOS-style short mode. If the path
20985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20986  # take no chances and rewrite it.
20987  # Note: m4 eats our [], so we need to use [ and ] instead.
20988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20989  if test "x$has_forbidden_chars" != x; then
20990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20992  fi
20993
20994    # Output is in $new_path
20995
20996  windows_path="$new_path"
20997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998    unix_path=`$CYGPATH -u "$windows_path"`
20999    new_path="$unix_path"
21000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21002    new_path="$unix_path"
21003  fi
21004
21005    # remove trailing .exe if any
21006    new_path="${new_path/%.exe/}"
21007
21008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21010  fi
21011
21012    else
21013      # We're on a unix platform. Hooray! :)
21014      # First separate the path from the arguments. This will split at the first
21015      # space.
21016      complete="$FOUND_MAKE"
21017      path="${complete%% *}"
21018      tmp="$complete EOL"
21019      arguments="${tmp#* }"
21020
21021      # Cannot rely on the command "which" here since it doesn't always work.
21022      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21023      if test -z "$is_absolute_path"; then
21024        # Path to executable is not absolute. Find it.
21025        IFS_save="$IFS"
21026        IFS=:
21027        for p in $PATH; do
21028          if test -f "$p/$path" && test -x "$p/$path"; then
21029            new_path="$p/$path"
21030            break
21031          fi
21032        done
21033        IFS="$IFS_save"
21034      else
21035        # This is an absolute path, we can use it without further modifications.
21036        new_path="$path"
21037      fi
21038
21039      if test "x$new_path" = x; then
21040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21041$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21042        has_space=`$ECHO "$complete" | $GREP " "`
21043        if test "x$has_space" != x; then
21044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21046        fi
21047        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21048      fi
21049    fi
21050
21051    # Now join together the path and the arguments once again
21052    if test "x$arguments" != xEOL; then
21053      new_complete="$new_path ${arguments% *}"
21054    else
21055      new_complete="$new_path"
21056    fi
21057
21058    if test "x$complete" != "x$new_complete"; then
21059      FOUND_MAKE="$new_complete"
21060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21061$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21062    fi
21063  fi
21064
21065        fi
21066      fi
21067    fi
21068  fi
21069
21070    if test "x$FOUND_MAKE" = x; then
21071      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21072    fi
21073
21074  fi
21075
21076
21077  MAKE=$FOUND_MAKE
21078
21079  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21080$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21081
21082
21083  # Check if make supports the output sync option and if so, setup using it.
21084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21085$as_echo_n "checking if make --output-sync is supported... " >&6; }
21086  if $MAKE --version -O > /dev/null 2>&1; then
21087    OUTPUT_SYNC_SUPPORTED=true
21088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21089$as_echo "yes" >&6; }
21090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21091$as_echo_n "checking for output-sync value... " >&6; }
21092
21093# Check whether --with-output-sync was given.
21094if test "${with_output_sync+set}" = set; then :
21095  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21096fi
21097
21098    if test "x$OUTPUT_SYNC" = "x"; then
21099      OUTPUT_SYNC=none
21100    fi
21101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21102$as_echo "$OUTPUT_SYNC" >&6; }
21103    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21104      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21105    fi
21106  else
21107    OUTPUT_SYNC_SUPPORTED=false
21108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21109$as_echo "no" >&6; }
21110  fi
21111
21112
21113
21114
21115
21116
21117  # Test if find supports -delete
21118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21119$as_echo_n "checking if find supports -delete... " >&6; }
21120  FIND_DELETE="-delete"
21121
21122  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21123
21124  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21125
21126  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21127  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21128    # No, it does not.
21129    $RM $DELETEDIR/TestIfFindSupportsDelete
21130    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21131      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21132      FIND_DELETE="-print | $XARGS $RM"
21133    else
21134      FIND_DELETE="-exec $RM \{\} \+"
21135    fi
21136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21137$as_echo "no" >&6; }
21138  else
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21140$as_echo "yes" >&6; }
21141  fi
21142  $RMDIR $DELETEDIR
21143
21144
21145
21146  # Test which kind of tar was found
21147  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21148    TAR_TYPE="gnu"
21149  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21150    TAR_TYPE="bsd"
21151  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21152    TAR_TYPE="solaris"
21153  fi
21154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21155$as_echo_n "checking what type of tar was found... " >&6; }
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21157$as_echo "$TAR_TYPE" >&6; }
21158
21159  TAR_CREATE_FILE_PARAM=""
21160
21161  if test "x$TAR_TYPE" = "xgnu"; then
21162    TAR_INCLUDE_PARAM="T"
21163    TAR_SUPPORTS_TRANSFORM="true"
21164    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21165      # When using gnu tar for Solaris targets, need to use compatibility mode
21166      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21167    fi
21168  else
21169    TAR_INCLUDE_PARAM="I"
21170    TAR_SUPPORTS_TRANSFORM="false"
21171  fi
21172
21173
21174
21175
21176
21177
21178  # These tools might not be installed by default,
21179  # need hint on how to install them.
21180
21181
21182
21183  # Publish this variable in the help.
21184
21185
21186  if [ -z "${UNZIP+x}" ]; then
21187    # The variable is not set by user, try to locate tool using the code snippet
21188    for ac_prog in unzip
21189do
21190  # Extract the first word of "$ac_prog", so it can be a program name with args.
21191set dummy $ac_prog; ac_word=$2
21192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21193$as_echo_n "checking for $ac_word... " >&6; }
21194if ${ac_cv_path_UNZIP+:} false; then :
21195  $as_echo_n "(cached) " >&6
21196else
21197  case $UNZIP in
21198  [\\/]* | ?:[\\/]*)
21199  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21200  ;;
21201  *)
21202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21203for as_dir in $PATH
21204do
21205  IFS=$as_save_IFS
21206  test -z "$as_dir" && as_dir=.
21207    for ac_exec_ext in '' $ac_executable_extensions; do
21208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21209    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21211    break 2
21212  fi
21213done
21214  done
21215IFS=$as_save_IFS
21216
21217  ;;
21218esac
21219fi
21220UNZIP=$ac_cv_path_UNZIP
21221if test -n "$UNZIP"; then
21222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21223$as_echo "$UNZIP" >&6; }
21224else
21225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21226$as_echo "no" >&6; }
21227fi
21228
21229
21230  test -n "$UNZIP" && break
21231done
21232
21233  else
21234    # The variable is set, but is it from the command line or the environment?
21235
21236    # Try to remove the string !UNZIP! from our list.
21237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21239      # If it failed, the variable was not from the command line. Ignore it,
21240      # but warn the user (except for BASH, which is always set by the calling BASH).
21241      if test "xUNZIP" != xBASH; then
21242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21243$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21244      fi
21245      # Try to locate tool using the code snippet
21246      for ac_prog in unzip
21247do
21248  # Extract the first word of "$ac_prog", so it can be a program name with args.
21249set dummy $ac_prog; ac_word=$2
21250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21251$as_echo_n "checking for $ac_word... " >&6; }
21252if ${ac_cv_path_UNZIP+:} false; then :
21253  $as_echo_n "(cached) " >&6
21254else
21255  case $UNZIP in
21256  [\\/]* | ?:[\\/]*)
21257  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21258  ;;
21259  *)
21260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21261for as_dir in $PATH
21262do
21263  IFS=$as_save_IFS
21264  test -z "$as_dir" && as_dir=.
21265    for ac_exec_ext in '' $ac_executable_extensions; do
21266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21267    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21269    break 2
21270  fi
21271done
21272  done
21273IFS=$as_save_IFS
21274
21275  ;;
21276esac
21277fi
21278UNZIP=$ac_cv_path_UNZIP
21279if test -n "$UNZIP"; then
21280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21281$as_echo "$UNZIP" >&6; }
21282else
21283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21284$as_echo "no" >&6; }
21285fi
21286
21287
21288  test -n "$UNZIP" && break
21289done
21290
21291    else
21292      # If it succeeded, then it was overridden by the user. We will use it
21293      # for the tool.
21294
21295      # First remove it from the list of overridden variables, so we can test
21296      # for unknown variables in the end.
21297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21298
21299      # Check if we try to supply an empty value
21300      if test "x$UNZIP" = x; then
21301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21302$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21304$as_echo_n "checking for UNZIP... " >&6; }
21305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21306$as_echo "disabled" >&6; }
21307      else
21308        # Check if the provided tool contains a complete path.
21309        tool_specified="$UNZIP"
21310        tool_basename="${tool_specified##*/}"
21311        if test "x$tool_basename" = "x$tool_specified"; then
21312          # A command without a complete path is provided, search $PATH.
21313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21314$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21315          # Extract the first word of "$tool_basename", so it can be a program name with args.
21316set dummy $tool_basename; ac_word=$2
21317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21318$as_echo_n "checking for $ac_word... " >&6; }
21319if ${ac_cv_path_UNZIP+:} false; then :
21320  $as_echo_n "(cached) " >&6
21321else
21322  case $UNZIP in
21323  [\\/]* | ?:[\\/]*)
21324  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21325  ;;
21326  *)
21327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21328for as_dir in $PATH
21329do
21330  IFS=$as_save_IFS
21331  test -z "$as_dir" && as_dir=.
21332    for ac_exec_ext in '' $ac_executable_extensions; do
21333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21334    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21336    break 2
21337  fi
21338done
21339  done
21340IFS=$as_save_IFS
21341
21342  ;;
21343esac
21344fi
21345UNZIP=$ac_cv_path_UNZIP
21346if test -n "$UNZIP"; then
21347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21348$as_echo "$UNZIP" >&6; }
21349else
21350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21351$as_echo "no" >&6; }
21352fi
21353
21354
21355          if test "x$UNZIP" = x; then
21356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21357          fi
21358        else
21359          # Otherwise we believe it is a complete path. Use it as it is.
21360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21361$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21363$as_echo_n "checking for UNZIP... " >&6; }
21364          if test ! -x "$tool_specified"; then
21365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21366$as_echo "not found" >&6; }
21367            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21368          fi
21369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21370$as_echo "$tool_specified" >&6; }
21371        fi
21372      fi
21373    fi
21374
21375  fi
21376
21377
21378
21379  if test "x$UNZIP" = x; then
21380    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21381  fi
21382
21383
21384  # Since zip uses "ZIP" as a environment variable for passing options, we need
21385  # to name our variable differently, hence ZIPEXE.
21386
21387
21388
21389  # Publish this variable in the help.
21390
21391
21392  if [ -z "${ZIPEXE+x}" ]; then
21393    # The variable is not set by user, try to locate tool using the code snippet
21394    for ac_prog in zip
21395do
21396  # Extract the first word of "$ac_prog", so it can be a program name with args.
21397set dummy $ac_prog; ac_word=$2
21398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21399$as_echo_n "checking for $ac_word... " >&6; }
21400if ${ac_cv_path_ZIPEXE+:} false; then :
21401  $as_echo_n "(cached) " >&6
21402else
21403  case $ZIPEXE in
21404  [\\/]* | ?:[\\/]*)
21405  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21406  ;;
21407  *)
21408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21409for as_dir in $PATH
21410do
21411  IFS=$as_save_IFS
21412  test -z "$as_dir" && as_dir=.
21413    for ac_exec_ext in '' $ac_executable_extensions; do
21414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21415    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21417    break 2
21418  fi
21419done
21420  done
21421IFS=$as_save_IFS
21422
21423  ;;
21424esac
21425fi
21426ZIPEXE=$ac_cv_path_ZIPEXE
21427if test -n "$ZIPEXE"; then
21428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21429$as_echo "$ZIPEXE" >&6; }
21430else
21431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21432$as_echo "no" >&6; }
21433fi
21434
21435
21436  test -n "$ZIPEXE" && break
21437done
21438
21439  else
21440    # The variable is set, but is it from the command line or the environment?
21441
21442    # Try to remove the string !ZIPEXE! from our list.
21443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21445      # If it failed, the variable was not from the command line. Ignore it,
21446      # but warn the user (except for BASH, which is always set by the calling BASH).
21447      if test "xZIPEXE" != xBASH; then
21448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21449$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21450      fi
21451      # Try to locate tool using the code snippet
21452      for ac_prog in zip
21453do
21454  # Extract the first word of "$ac_prog", so it can be a program name with args.
21455set dummy $ac_prog; ac_word=$2
21456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21457$as_echo_n "checking for $ac_word... " >&6; }
21458if ${ac_cv_path_ZIPEXE+:} false; then :
21459  $as_echo_n "(cached) " >&6
21460else
21461  case $ZIPEXE in
21462  [\\/]* | ?:[\\/]*)
21463  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21464  ;;
21465  *)
21466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21467for as_dir in $PATH
21468do
21469  IFS=$as_save_IFS
21470  test -z "$as_dir" && as_dir=.
21471    for ac_exec_ext in '' $ac_executable_extensions; do
21472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21473    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21475    break 2
21476  fi
21477done
21478  done
21479IFS=$as_save_IFS
21480
21481  ;;
21482esac
21483fi
21484ZIPEXE=$ac_cv_path_ZIPEXE
21485if test -n "$ZIPEXE"; then
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21487$as_echo "$ZIPEXE" >&6; }
21488else
21489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21490$as_echo "no" >&6; }
21491fi
21492
21493
21494  test -n "$ZIPEXE" && break
21495done
21496
21497    else
21498      # If it succeeded, then it was overridden by the user. We will use it
21499      # for the tool.
21500
21501      # First remove it from the list of overridden variables, so we can test
21502      # for unknown variables in the end.
21503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21504
21505      # Check if we try to supply an empty value
21506      if test "x$ZIPEXE" = x; then
21507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21508$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21510$as_echo_n "checking for ZIPEXE... " >&6; }
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21512$as_echo "disabled" >&6; }
21513      else
21514        # Check if the provided tool contains a complete path.
21515        tool_specified="$ZIPEXE"
21516        tool_basename="${tool_specified##*/}"
21517        if test "x$tool_basename" = "x$tool_specified"; then
21518          # A command without a complete path is provided, search $PATH.
21519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21520$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21521          # Extract the first word of "$tool_basename", so it can be a program name with args.
21522set dummy $tool_basename; ac_word=$2
21523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21524$as_echo_n "checking for $ac_word... " >&6; }
21525if ${ac_cv_path_ZIPEXE+:} false; then :
21526  $as_echo_n "(cached) " >&6
21527else
21528  case $ZIPEXE in
21529  [\\/]* | ?:[\\/]*)
21530  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21531  ;;
21532  *)
21533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21534for as_dir in $PATH
21535do
21536  IFS=$as_save_IFS
21537  test -z "$as_dir" && as_dir=.
21538    for ac_exec_ext in '' $ac_executable_extensions; do
21539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21540    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21542    break 2
21543  fi
21544done
21545  done
21546IFS=$as_save_IFS
21547
21548  ;;
21549esac
21550fi
21551ZIPEXE=$ac_cv_path_ZIPEXE
21552if test -n "$ZIPEXE"; then
21553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21554$as_echo "$ZIPEXE" >&6; }
21555else
21556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21557$as_echo "no" >&6; }
21558fi
21559
21560
21561          if test "x$ZIPEXE" = x; then
21562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21563          fi
21564        else
21565          # Otherwise we believe it is a complete path. Use it as it is.
21566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21567$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21569$as_echo_n "checking for ZIPEXE... " >&6; }
21570          if test ! -x "$tool_specified"; then
21571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21572$as_echo "not found" >&6; }
21573            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21574          fi
21575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21576$as_echo "$tool_specified" >&6; }
21577        fi
21578      fi
21579    fi
21580
21581  fi
21582
21583
21584
21585  if test "x$ZIPEXE" = x; then
21586    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21587  fi
21588
21589
21590
21591  # Non-required basic tools
21592
21593
21594
21595  # Publish this variable in the help.
21596
21597
21598  if [ -z "${LDD+x}" ]; then
21599    # The variable is not set by user, try to locate tool using the code snippet
21600    for ac_prog in ldd
21601do
21602  # Extract the first word of "$ac_prog", so it can be a program name with args.
21603set dummy $ac_prog; ac_word=$2
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21605$as_echo_n "checking for $ac_word... " >&6; }
21606if ${ac_cv_path_LDD+:} false; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  case $LDD in
21610  [\\/]* | ?:[\\/]*)
21611  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21612  ;;
21613  *)
21614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21615for as_dir in $PATH
21616do
21617  IFS=$as_save_IFS
21618  test -z "$as_dir" && as_dir=.
21619    for ac_exec_ext in '' $ac_executable_extensions; do
21620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21621    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21623    break 2
21624  fi
21625done
21626  done
21627IFS=$as_save_IFS
21628
21629  ;;
21630esac
21631fi
21632LDD=$ac_cv_path_LDD
21633if test -n "$LDD"; then
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21635$as_echo "$LDD" >&6; }
21636else
21637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21638$as_echo "no" >&6; }
21639fi
21640
21641
21642  test -n "$LDD" && break
21643done
21644
21645  else
21646    # The variable is set, but is it from the command line or the environment?
21647
21648    # Try to remove the string !LDD! from our list.
21649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21651      # If it failed, the variable was not from the command line. Ignore it,
21652      # but warn the user (except for BASH, which is always set by the calling BASH).
21653      if test "xLDD" != xBASH; then
21654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21655$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21656      fi
21657      # Try to locate tool using the code snippet
21658      for ac_prog in ldd
21659do
21660  # Extract the first word of "$ac_prog", so it can be a program name with args.
21661set dummy $ac_prog; ac_word=$2
21662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21663$as_echo_n "checking for $ac_word... " >&6; }
21664if ${ac_cv_path_LDD+:} false; then :
21665  $as_echo_n "(cached) " >&6
21666else
21667  case $LDD in
21668  [\\/]* | ?:[\\/]*)
21669  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21670  ;;
21671  *)
21672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21673for as_dir in $PATH
21674do
21675  IFS=$as_save_IFS
21676  test -z "$as_dir" && as_dir=.
21677    for ac_exec_ext in '' $ac_executable_extensions; do
21678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21679    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21681    break 2
21682  fi
21683done
21684  done
21685IFS=$as_save_IFS
21686
21687  ;;
21688esac
21689fi
21690LDD=$ac_cv_path_LDD
21691if test -n "$LDD"; then
21692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21693$as_echo "$LDD" >&6; }
21694else
21695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21696$as_echo "no" >&6; }
21697fi
21698
21699
21700  test -n "$LDD" && break
21701done
21702
21703    else
21704      # If it succeeded, then it was overridden by the user. We will use it
21705      # for the tool.
21706
21707      # First remove it from the list of overridden variables, so we can test
21708      # for unknown variables in the end.
21709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21710
21711      # Check if we try to supply an empty value
21712      if test "x$LDD" = x; then
21713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21714$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21716$as_echo_n "checking for LDD... " >&6; }
21717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21718$as_echo "disabled" >&6; }
21719      else
21720        # Check if the provided tool contains a complete path.
21721        tool_specified="$LDD"
21722        tool_basename="${tool_specified##*/}"
21723        if test "x$tool_basename" = "x$tool_specified"; then
21724          # A command without a complete path is provided, search $PATH.
21725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21726$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21727          # Extract the first word of "$tool_basename", so it can be a program name with args.
21728set dummy $tool_basename; ac_word=$2
21729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21730$as_echo_n "checking for $ac_word... " >&6; }
21731if ${ac_cv_path_LDD+:} false; then :
21732  $as_echo_n "(cached) " >&6
21733else
21734  case $LDD in
21735  [\\/]* | ?:[\\/]*)
21736  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21737  ;;
21738  *)
21739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21740for as_dir in $PATH
21741do
21742  IFS=$as_save_IFS
21743  test -z "$as_dir" && as_dir=.
21744    for ac_exec_ext in '' $ac_executable_extensions; do
21745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21746    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21748    break 2
21749  fi
21750done
21751  done
21752IFS=$as_save_IFS
21753
21754  ;;
21755esac
21756fi
21757LDD=$ac_cv_path_LDD
21758if test -n "$LDD"; then
21759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21760$as_echo "$LDD" >&6; }
21761else
21762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21763$as_echo "no" >&6; }
21764fi
21765
21766
21767          if test "x$LDD" = x; then
21768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21769          fi
21770        else
21771          # Otherwise we believe it is a complete path. Use it as it is.
21772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21773$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21775$as_echo_n "checking for LDD... " >&6; }
21776          if test ! -x "$tool_specified"; then
21777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21778$as_echo "not found" >&6; }
21779            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21780          fi
21781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21782$as_echo "$tool_specified" >&6; }
21783        fi
21784      fi
21785    fi
21786
21787  fi
21788
21789
21790  if test "x$LDD" = "x"; then
21791    # List shared lib dependencies is used for
21792    # debug output and checking for forbidden dependencies.
21793    # We can build without it.
21794    LDD="true"
21795  fi
21796
21797
21798  # Publish this variable in the help.
21799
21800
21801  if [ -z "${OTOOL+x}" ]; then
21802    # The variable is not set by user, try to locate tool using the code snippet
21803    for ac_prog in otool
21804do
21805  # Extract the first word of "$ac_prog", so it can be a program name with args.
21806set dummy $ac_prog; ac_word=$2
21807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21808$as_echo_n "checking for $ac_word... " >&6; }
21809if ${ac_cv_path_OTOOL+:} false; then :
21810  $as_echo_n "(cached) " >&6
21811else
21812  case $OTOOL in
21813  [\\/]* | ?:[\\/]*)
21814  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21815  ;;
21816  *)
21817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818for as_dir in $PATH
21819do
21820  IFS=$as_save_IFS
21821  test -z "$as_dir" && as_dir=.
21822    for ac_exec_ext in '' $ac_executable_extensions; do
21823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21824    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826    break 2
21827  fi
21828done
21829  done
21830IFS=$as_save_IFS
21831
21832  ;;
21833esac
21834fi
21835OTOOL=$ac_cv_path_OTOOL
21836if test -n "$OTOOL"; then
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21838$as_echo "$OTOOL" >&6; }
21839else
21840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21841$as_echo "no" >&6; }
21842fi
21843
21844
21845  test -n "$OTOOL" && break
21846done
21847
21848  else
21849    # The variable is set, but is it from the command line or the environment?
21850
21851    # Try to remove the string !OTOOL! from our list.
21852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21854      # If it failed, the variable was not from the command line. Ignore it,
21855      # but warn the user (except for BASH, which is always set by the calling BASH).
21856      if test "xOTOOL" != xBASH; then
21857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21858$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21859      fi
21860      # Try to locate tool using the code snippet
21861      for ac_prog in otool
21862do
21863  # Extract the first word of "$ac_prog", so it can be a program name with args.
21864set dummy $ac_prog; ac_word=$2
21865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866$as_echo_n "checking for $ac_word... " >&6; }
21867if ${ac_cv_path_OTOOL+:} false; then :
21868  $as_echo_n "(cached) " >&6
21869else
21870  case $OTOOL in
21871  [\\/]* | ?:[\\/]*)
21872  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21873  ;;
21874  *)
21875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21876for as_dir in $PATH
21877do
21878  IFS=$as_save_IFS
21879  test -z "$as_dir" && as_dir=.
21880    for ac_exec_ext in '' $ac_executable_extensions; do
21881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21882    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21884    break 2
21885  fi
21886done
21887  done
21888IFS=$as_save_IFS
21889
21890  ;;
21891esac
21892fi
21893OTOOL=$ac_cv_path_OTOOL
21894if test -n "$OTOOL"; then
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21896$as_echo "$OTOOL" >&6; }
21897else
21898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21899$as_echo "no" >&6; }
21900fi
21901
21902
21903  test -n "$OTOOL" && break
21904done
21905
21906    else
21907      # If it succeeded, then it was overridden by the user. We will use it
21908      # for the tool.
21909
21910      # First remove it from the list of overridden variables, so we can test
21911      # for unknown variables in the end.
21912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21913
21914      # Check if we try to supply an empty value
21915      if test "x$OTOOL" = x; then
21916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21917$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21919$as_echo_n "checking for OTOOL... " >&6; }
21920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21921$as_echo "disabled" >&6; }
21922      else
21923        # Check if the provided tool contains a complete path.
21924        tool_specified="$OTOOL"
21925        tool_basename="${tool_specified##*/}"
21926        if test "x$tool_basename" = "x$tool_specified"; then
21927          # A command without a complete path is provided, search $PATH.
21928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21929$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21930          # Extract the first word of "$tool_basename", so it can be a program name with args.
21931set dummy $tool_basename; ac_word=$2
21932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21933$as_echo_n "checking for $ac_word... " >&6; }
21934if ${ac_cv_path_OTOOL+:} false; then :
21935  $as_echo_n "(cached) " >&6
21936else
21937  case $OTOOL in
21938  [\\/]* | ?:[\\/]*)
21939  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21940  ;;
21941  *)
21942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21943for as_dir in $PATH
21944do
21945  IFS=$as_save_IFS
21946  test -z "$as_dir" && as_dir=.
21947    for ac_exec_ext in '' $ac_executable_extensions; do
21948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21949    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21951    break 2
21952  fi
21953done
21954  done
21955IFS=$as_save_IFS
21956
21957  ;;
21958esac
21959fi
21960OTOOL=$ac_cv_path_OTOOL
21961if test -n "$OTOOL"; then
21962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21963$as_echo "$OTOOL" >&6; }
21964else
21965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21966$as_echo "no" >&6; }
21967fi
21968
21969
21970          if test "x$OTOOL" = x; then
21971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21972          fi
21973        else
21974          # Otherwise we believe it is a complete path. Use it as it is.
21975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21976$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21978$as_echo_n "checking for OTOOL... " >&6; }
21979          if test ! -x "$tool_specified"; then
21980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21981$as_echo "not found" >&6; }
21982            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21983          fi
21984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21985$as_echo "$tool_specified" >&6; }
21986        fi
21987      fi
21988    fi
21989
21990  fi
21991
21992
21993  if test "x$OTOOL" = "x"; then
21994    OTOOL="true"
21995  fi
21996
21997
21998  # Publish this variable in the help.
21999
22000
22001  if [ -z "${READELF+x}" ]; then
22002    # The variable is not set by user, try to locate tool using the code snippet
22003    for ac_prog in greadelf readelf
22004do
22005  # Extract the first word of "$ac_prog", so it can be a program name with args.
22006set dummy $ac_prog; ac_word=$2
22007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008$as_echo_n "checking for $ac_word... " >&6; }
22009if ${ac_cv_path_READELF+:} false; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012  case $READELF in
22013  [\\/]* | ?:[\\/]*)
22014  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22015  ;;
22016  *)
22017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22018for as_dir in $PATH
22019do
22020  IFS=$as_save_IFS
22021  test -z "$as_dir" && as_dir=.
22022    for ac_exec_ext in '' $ac_executable_extensions; do
22023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22024    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22026    break 2
22027  fi
22028done
22029  done
22030IFS=$as_save_IFS
22031
22032  ;;
22033esac
22034fi
22035READELF=$ac_cv_path_READELF
22036if test -n "$READELF"; then
22037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22038$as_echo "$READELF" >&6; }
22039else
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22041$as_echo "no" >&6; }
22042fi
22043
22044
22045  test -n "$READELF" && break
22046done
22047
22048  else
22049    # The variable is set, but is it from the command line or the environment?
22050
22051    # Try to remove the string !READELF! from our list.
22052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22054      # If it failed, the variable was not from the command line. Ignore it,
22055      # but warn the user (except for BASH, which is always set by the calling BASH).
22056      if test "xREADELF" != xBASH; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22058$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22059      fi
22060      # Try to locate tool using the code snippet
22061      for ac_prog in greadelf readelf
22062do
22063  # Extract the first word of "$ac_prog", so it can be a program name with args.
22064set dummy $ac_prog; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_path_READELF+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  case $READELF in
22071  [\\/]* | ?:[\\/]*)
22072  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22073  ;;
22074  *)
22075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22076for as_dir in $PATH
22077do
22078  IFS=$as_save_IFS
22079  test -z "$as_dir" && as_dir=.
22080    for ac_exec_ext in '' $ac_executable_extensions; do
22081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22082    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22084    break 2
22085  fi
22086done
22087  done
22088IFS=$as_save_IFS
22089
22090  ;;
22091esac
22092fi
22093READELF=$ac_cv_path_READELF
22094if test -n "$READELF"; then
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22096$as_echo "$READELF" >&6; }
22097else
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22099$as_echo "no" >&6; }
22100fi
22101
22102
22103  test -n "$READELF" && break
22104done
22105
22106    else
22107      # If it succeeded, then it was overridden by the user. We will use it
22108      # for the tool.
22109
22110      # First remove it from the list of overridden variables, so we can test
22111      # for unknown variables in the end.
22112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22113
22114      # Check if we try to supply an empty value
22115      if test "x$READELF" = x; then
22116        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22117$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22119$as_echo_n "checking for READELF... " >&6; }
22120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22121$as_echo "disabled" >&6; }
22122      else
22123        # Check if the provided tool contains a complete path.
22124        tool_specified="$READELF"
22125        tool_basename="${tool_specified##*/}"
22126        if test "x$tool_basename" = "x$tool_specified"; then
22127          # A command without a complete path is provided, search $PATH.
22128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22129$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22130          # Extract the first word of "$tool_basename", so it can be a program name with args.
22131set dummy $tool_basename; ac_word=$2
22132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22133$as_echo_n "checking for $ac_word... " >&6; }
22134if ${ac_cv_path_READELF+:} false; then :
22135  $as_echo_n "(cached) " >&6
22136else
22137  case $READELF in
22138  [\\/]* | ?:[\\/]*)
22139  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22140  ;;
22141  *)
22142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22143for as_dir in $PATH
22144do
22145  IFS=$as_save_IFS
22146  test -z "$as_dir" && as_dir=.
22147    for ac_exec_ext in '' $ac_executable_extensions; do
22148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22149    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22151    break 2
22152  fi
22153done
22154  done
22155IFS=$as_save_IFS
22156
22157  ;;
22158esac
22159fi
22160READELF=$ac_cv_path_READELF
22161if test -n "$READELF"; then
22162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22163$as_echo "$READELF" >&6; }
22164else
22165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22166$as_echo "no" >&6; }
22167fi
22168
22169
22170          if test "x$READELF" = x; then
22171            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22172          fi
22173        else
22174          # Otherwise we believe it is a complete path. Use it as it is.
22175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22176$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22177          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22178$as_echo_n "checking for READELF... " >&6; }
22179          if test ! -x "$tool_specified"; then
22180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22181$as_echo "not found" >&6; }
22182            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22183          fi
22184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22185$as_echo "$tool_specified" >&6; }
22186        fi
22187      fi
22188    fi
22189
22190  fi
22191
22192
22193
22194
22195  # Publish this variable in the help.
22196
22197
22198  if [ -z "${HG+x}" ]; then
22199    # The variable is not set by user, try to locate tool using the code snippet
22200    for ac_prog in hg
22201do
22202  # Extract the first word of "$ac_prog", so it can be a program name with args.
22203set dummy $ac_prog; ac_word=$2
22204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22205$as_echo_n "checking for $ac_word... " >&6; }
22206if ${ac_cv_path_HG+:} false; then :
22207  $as_echo_n "(cached) " >&6
22208else
22209  case $HG in
22210  [\\/]* | ?:[\\/]*)
22211  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22212  ;;
22213  *)
22214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22215for as_dir in $PATH
22216do
22217  IFS=$as_save_IFS
22218  test -z "$as_dir" && as_dir=.
22219    for ac_exec_ext in '' $ac_executable_extensions; do
22220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22221    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22223    break 2
22224  fi
22225done
22226  done
22227IFS=$as_save_IFS
22228
22229  ;;
22230esac
22231fi
22232HG=$ac_cv_path_HG
22233if test -n "$HG"; then
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22235$as_echo "$HG" >&6; }
22236else
22237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22238$as_echo "no" >&6; }
22239fi
22240
22241
22242  test -n "$HG" && break
22243done
22244
22245  else
22246    # The variable is set, but is it from the command line or the environment?
22247
22248    # Try to remove the string !HG! from our list.
22249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22251      # If it failed, the variable was not from the command line. Ignore it,
22252      # but warn the user (except for BASH, which is always set by the calling BASH).
22253      if test "xHG" != xBASH; then
22254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22255$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22256      fi
22257      # Try to locate tool using the code snippet
22258      for ac_prog in hg
22259do
22260  # Extract the first word of "$ac_prog", so it can be a program name with args.
22261set dummy $ac_prog; ac_word=$2
22262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22263$as_echo_n "checking for $ac_word... " >&6; }
22264if ${ac_cv_path_HG+:} false; then :
22265  $as_echo_n "(cached) " >&6
22266else
22267  case $HG in
22268  [\\/]* | ?:[\\/]*)
22269  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22270  ;;
22271  *)
22272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22273for as_dir in $PATH
22274do
22275  IFS=$as_save_IFS
22276  test -z "$as_dir" && as_dir=.
22277    for ac_exec_ext in '' $ac_executable_extensions; do
22278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22279    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22281    break 2
22282  fi
22283done
22284  done
22285IFS=$as_save_IFS
22286
22287  ;;
22288esac
22289fi
22290HG=$ac_cv_path_HG
22291if test -n "$HG"; then
22292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22293$as_echo "$HG" >&6; }
22294else
22295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22296$as_echo "no" >&6; }
22297fi
22298
22299
22300  test -n "$HG" && break
22301done
22302
22303    else
22304      # If it succeeded, then it was overridden by the user. We will use it
22305      # for the tool.
22306
22307      # First remove it from the list of overridden variables, so we can test
22308      # for unknown variables in the end.
22309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22310
22311      # Check if we try to supply an empty value
22312      if test "x$HG" = x; then
22313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22314$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22316$as_echo_n "checking for HG... " >&6; }
22317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22318$as_echo "disabled" >&6; }
22319      else
22320        # Check if the provided tool contains a complete path.
22321        tool_specified="$HG"
22322        tool_basename="${tool_specified##*/}"
22323        if test "x$tool_basename" = "x$tool_specified"; then
22324          # A command without a complete path is provided, search $PATH.
22325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22326$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22327          # Extract the first word of "$tool_basename", so it can be a program name with args.
22328set dummy $tool_basename; ac_word=$2
22329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22330$as_echo_n "checking for $ac_word... " >&6; }
22331if ${ac_cv_path_HG+:} false; then :
22332  $as_echo_n "(cached) " >&6
22333else
22334  case $HG in
22335  [\\/]* | ?:[\\/]*)
22336  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22337  ;;
22338  *)
22339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22340for as_dir in $PATH
22341do
22342  IFS=$as_save_IFS
22343  test -z "$as_dir" && as_dir=.
22344    for ac_exec_ext in '' $ac_executable_extensions; do
22345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22346    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22348    break 2
22349  fi
22350done
22351  done
22352IFS=$as_save_IFS
22353
22354  ;;
22355esac
22356fi
22357HG=$ac_cv_path_HG
22358if test -n "$HG"; then
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22360$as_echo "$HG" >&6; }
22361else
22362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22363$as_echo "no" >&6; }
22364fi
22365
22366
22367          if test "x$HG" = x; then
22368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22369          fi
22370        else
22371          # Otherwise we believe it is a complete path. Use it as it is.
22372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22373$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22375$as_echo_n "checking for HG... " >&6; }
22376          if test ! -x "$tool_specified"; then
22377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22378$as_echo "not found" >&6; }
22379            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22380          fi
22381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22382$as_echo "$tool_specified" >&6; }
22383        fi
22384      fi
22385    fi
22386
22387  fi
22388
22389
22390
22391
22392  # Publish this variable in the help.
22393
22394
22395  if [ -z "${STAT+x}" ]; then
22396    # The variable is not set by user, try to locate tool using the code snippet
22397    for ac_prog in stat
22398do
22399  # Extract the first word of "$ac_prog", so it can be a program name with args.
22400set dummy $ac_prog; ac_word=$2
22401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22402$as_echo_n "checking for $ac_word... " >&6; }
22403if ${ac_cv_path_STAT+:} false; then :
22404  $as_echo_n "(cached) " >&6
22405else
22406  case $STAT in
22407  [\\/]* | ?:[\\/]*)
22408  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22409  ;;
22410  *)
22411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22412for as_dir in $PATH
22413do
22414  IFS=$as_save_IFS
22415  test -z "$as_dir" && as_dir=.
22416    for ac_exec_ext in '' $ac_executable_extensions; do
22417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22418    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22420    break 2
22421  fi
22422done
22423  done
22424IFS=$as_save_IFS
22425
22426  ;;
22427esac
22428fi
22429STAT=$ac_cv_path_STAT
22430if test -n "$STAT"; then
22431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22432$as_echo "$STAT" >&6; }
22433else
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22435$as_echo "no" >&6; }
22436fi
22437
22438
22439  test -n "$STAT" && break
22440done
22441
22442  else
22443    # The variable is set, but is it from the command line or the environment?
22444
22445    # Try to remove the string !STAT! from our list.
22446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22448      # If it failed, the variable was not from the command line. Ignore it,
22449      # but warn the user (except for BASH, which is always set by the calling BASH).
22450      if test "xSTAT" != xBASH; then
22451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22452$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22453      fi
22454      # Try to locate tool using the code snippet
22455      for ac_prog in stat
22456do
22457  # Extract the first word of "$ac_prog", so it can be a program name with args.
22458set dummy $ac_prog; ac_word=$2
22459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22460$as_echo_n "checking for $ac_word... " >&6; }
22461if ${ac_cv_path_STAT+:} false; then :
22462  $as_echo_n "(cached) " >&6
22463else
22464  case $STAT in
22465  [\\/]* | ?:[\\/]*)
22466  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22467  ;;
22468  *)
22469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22470for as_dir in $PATH
22471do
22472  IFS=$as_save_IFS
22473  test -z "$as_dir" && as_dir=.
22474    for ac_exec_ext in '' $ac_executable_extensions; do
22475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22476    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22478    break 2
22479  fi
22480done
22481  done
22482IFS=$as_save_IFS
22483
22484  ;;
22485esac
22486fi
22487STAT=$ac_cv_path_STAT
22488if test -n "$STAT"; then
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22490$as_echo "$STAT" >&6; }
22491else
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22493$as_echo "no" >&6; }
22494fi
22495
22496
22497  test -n "$STAT" && break
22498done
22499
22500    else
22501      # If it succeeded, then it was overridden by the user. We will use it
22502      # for the tool.
22503
22504      # First remove it from the list of overridden variables, so we can test
22505      # for unknown variables in the end.
22506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22507
22508      # Check if we try to supply an empty value
22509      if test "x$STAT" = x; then
22510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22511$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22513$as_echo_n "checking for STAT... " >&6; }
22514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22515$as_echo "disabled" >&6; }
22516      else
22517        # Check if the provided tool contains a complete path.
22518        tool_specified="$STAT"
22519        tool_basename="${tool_specified##*/}"
22520        if test "x$tool_basename" = "x$tool_specified"; then
22521          # A command without a complete path is provided, search $PATH.
22522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22523$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22524          # Extract the first word of "$tool_basename", so it can be a program name with args.
22525set dummy $tool_basename; ac_word=$2
22526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22527$as_echo_n "checking for $ac_word... " >&6; }
22528if ${ac_cv_path_STAT+:} false; then :
22529  $as_echo_n "(cached) " >&6
22530else
22531  case $STAT in
22532  [\\/]* | ?:[\\/]*)
22533  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22534  ;;
22535  *)
22536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22537for as_dir in $PATH
22538do
22539  IFS=$as_save_IFS
22540  test -z "$as_dir" && as_dir=.
22541    for ac_exec_ext in '' $ac_executable_extensions; do
22542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22543    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22545    break 2
22546  fi
22547done
22548  done
22549IFS=$as_save_IFS
22550
22551  ;;
22552esac
22553fi
22554STAT=$ac_cv_path_STAT
22555if test -n "$STAT"; then
22556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22557$as_echo "$STAT" >&6; }
22558else
22559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22560$as_echo "no" >&6; }
22561fi
22562
22563
22564          if test "x$STAT" = x; then
22565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22566          fi
22567        else
22568          # Otherwise we believe it is a complete path. Use it as it is.
22569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22570$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22572$as_echo_n "checking for STAT... " >&6; }
22573          if test ! -x "$tool_specified"; then
22574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22575$as_echo "not found" >&6; }
22576            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22577          fi
22578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22579$as_echo "$tool_specified" >&6; }
22580        fi
22581      fi
22582    fi
22583
22584  fi
22585
22586
22587
22588
22589  # Publish this variable in the help.
22590
22591
22592  if [ -z "${TIME+x}" ]; then
22593    # The variable is not set by user, try to locate tool using the code snippet
22594    for ac_prog in time
22595do
22596  # Extract the first word of "$ac_prog", so it can be a program name with args.
22597set dummy $ac_prog; ac_word=$2
22598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22599$as_echo_n "checking for $ac_word... " >&6; }
22600if ${ac_cv_path_TIME+:} false; then :
22601  $as_echo_n "(cached) " >&6
22602else
22603  case $TIME in
22604  [\\/]* | ?:[\\/]*)
22605  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22606  ;;
22607  *)
22608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22609for as_dir in $PATH
22610do
22611  IFS=$as_save_IFS
22612  test -z "$as_dir" && as_dir=.
22613    for ac_exec_ext in '' $ac_executable_extensions; do
22614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22615    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22617    break 2
22618  fi
22619done
22620  done
22621IFS=$as_save_IFS
22622
22623  ;;
22624esac
22625fi
22626TIME=$ac_cv_path_TIME
22627if test -n "$TIME"; then
22628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22629$as_echo "$TIME" >&6; }
22630else
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22632$as_echo "no" >&6; }
22633fi
22634
22635
22636  test -n "$TIME" && break
22637done
22638
22639  else
22640    # The variable is set, but is it from the command line or the environment?
22641
22642    # Try to remove the string !TIME! from our list.
22643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22645      # If it failed, the variable was not from the command line. Ignore it,
22646      # but warn the user (except for BASH, which is always set by the calling BASH).
22647      if test "xTIME" != xBASH; then
22648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22649$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22650      fi
22651      # Try to locate tool using the code snippet
22652      for ac_prog in time
22653do
22654  # Extract the first word of "$ac_prog", so it can be a program name with args.
22655set dummy $ac_prog; ac_word=$2
22656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22657$as_echo_n "checking for $ac_word... " >&6; }
22658if ${ac_cv_path_TIME+:} false; then :
22659  $as_echo_n "(cached) " >&6
22660else
22661  case $TIME in
22662  [\\/]* | ?:[\\/]*)
22663  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22664  ;;
22665  *)
22666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22667for as_dir in $PATH
22668do
22669  IFS=$as_save_IFS
22670  test -z "$as_dir" && as_dir=.
22671    for ac_exec_ext in '' $ac_executable_extensions; do
22672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22673    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22675    break 2
22676  fi
22677done
22678  done
22679IFS=$as_save_IFS
22680
22681  ;;
22682esac
22683fi
22684TIME=$ac_cv_path_TIME
22685if test -n "$TIME"; then
22686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22687$as_echo "$TIME" >&6; }
22688else
22689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22690$as_echo "no" >&6; }
22691fi
22692
22693
22694  test -n "$TIME" && break
22695done
22696
22697    else
22698      # If it succeeded, then it was overridden by the user. We will use it
22699      # for the tool.
22700
22701      # First remove it from the list of overridden variables, so we can test
22702      # for unknown variables in the end.
22703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22704
22705      # Check if we try to supply an empty value
22706      if test "x$TIME" = x; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22708$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22710$as_echo_n "checking for TIME... " >&6; }
22711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22712$as_echo "disabled" >&6; }
22713      else
22714        # Check if the provided tool contains a complete path.
22715        tool_specified="$TIME"
22716        tool_basename="${tool_specified##*/}"
22717        if test "x$tool_basename" = "x$tool_specified"; then
22718          # A command without a complete path is provided, search $PATH.
22719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22720$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22721          # Extract the first word of "$tool_basename", so it can be a program name with args.
22722set dummy $tool_basename; ac_word=$2
22723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22724$as_echo_n "checking for $ac_word... " >&6; }
22725if ${ac_cv_path_TIME+:} false; then :
22726  $as_echo_n "(cached) " >&6
22727else
22728  case $TIME in
22729  [\\/]* | ?:[\\/]*)
22730  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22731  ;;
22732  *)
22733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22734for as_dir in $PATH
22735do
22736  IFS=$as_save_IFS
22737  test -z "$as_dir" && as_dir=.
22738    for ac_exec_ext in '' $ac_executable_extensions; do
22739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22740    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22742    break 2
22743  fi
22744done
22745  done
22746IFS=$as_save_IFS
22747
22748  ;;
22749esac
22750fi
22751TIME=$ac_cv_path_TIME
22752if test -n "$TIME"; then
22753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22754$as_echo "$TIME" >&6; }
22755else
22756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22757$as_echo "no" >&6; }
22758fi
22759
22760
22761          if test "x$TIME" = x; then
22762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22763          fi
22764        else
22765          # Otherwise we believe it is a complete path. Use it as it is.
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22767$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22769$as_echo_n "checking for TIME... " >&6; }
22770          if test ! -x "$tool_specified"; then
22771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22772$as_echo "not found" >&6; }
22773            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22774          fi
22775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22776$as_echo "$tool_specified" >&6; }
22777        fi
22778      fi
22779    fi
22780
22781  fi
22782
22783
22784  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22785  # be in the user path.
22786
22787
22788  # Publish this variable in the help.
22789
22790
22791  if [ -z "${DTRACE+x}" ]; then
22792    # The variable is not set by user, try to locate tool using the code snippet
22793    for ac_prog in dtrace
22794do
22795  # Extract the first word of "$ac_prog", so it can be a program name with args.
22796set dummy $ac_prog; ac_word=$2
22797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22798$as_echo_n "checking for $ac_word... " >&6; }
22799if ${ac_cv_path_DTRACE+:} false; then :
22800  $as_echo_n "(cached) " >&6
22801else
22802  case $DTRACE in
22803  [\\/]* | ?:[\\/]*)
22804  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22805  ;;
22806  *)
22807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22808as_dummy="$PATH:/usr/sbin"
22809for as_dir in $as_dummy
22810do
22811  IFS=$as_save_IFS
22812  test -z "$as_dir" && as_dir=.
22813    for ac_exec_ext in '' $ac_executable_extensions; do
22814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22815    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22817    break 2
22818  fi
22819done
22820  done
22821IFS=$as_save_IFS
22822
22823  ;;
22824esac
22825fi
22826DTRACE=$ac_cv_path_DTRACE
22827if test -n "$DTRACE"; then
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22829$as_echo "$DTRACE" >&6; }
22830else
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22832$as_echo "no" >&6; }
22833fi
22834
22835
22836  test -n "$DTRACE" && break
22837done
22838
22839  else
22840    # The variable is set, but is it from the command line or the environment?
22841
22842    # Try to remove the string !DTRACE! from our list.
22843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22845      # If it failed, the variable was not from the command line. Ignore it,
22846      # but warn the user (except for BASH, which is always set by the calling BASH).
22847      if test "xDTRACE" != xBASH; then
22848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22849$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22850      fi
22851      # Try to locate tool using the code snippet
22852      for ac_prog in dtrace
22853do
22854  # Extract the first word of "$ac_prog", so it can be a program name with args.
22855set dummy $ac_prog; ac_word=$2
22856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22857$as_echo_n "checking for $ac_word... " >&6; }
22858if ${ac_cv_path_DTRACE+:} false; then :
22859  $as_echo_n "(cached) " >&6
22860else
22861  case $DTRACE in
22862  [\\/]* | ?:[\\/]*)
22863  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22864  ;;
22865  *)
22866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22867as_dummy="$PATH:/usr/sbin"
22868for as_dir in $as_dummy
22869do
22870  IFS=$as_save_IFS
22871  test -z "$as_dir" && as_dir=.
22872    for ac_exec_ext in '' $ac_executable_extensions; do
22873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22874    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22876    break 2
22877  fi
22878done
22879  done
22880IFS=$as_save_IFS
22881
22882  ;;
22883esac
22884fi
22885DTRACE=$ac_cv_path_DTRACE
22886if test -n "$DTRACE"; then
22887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22888$as_echo "$DTRACE" >&6; }
22889else
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22891$as_echo "no" >&6; }
22892fi
22893
22894
22895  test -n "$DTRACE" && break
22896done
22897
22898    else
22899      # If it succeeded, then it was overridden by the user. We will use it
22900      # for the tool.
22901
22902      # First remove it from the list of overridden variables, so we can test
22903      # for unknown variables in the end.
22904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22905
22906      # Check if we try to supply an empty value
22907      if test "x$DTRACE" = x; then
22908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22909$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22911$as_echo_n "checking for DTRACE... " >&6; }
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22913$as_echo "disabled" >&6; }
22914      else
22915        # Check if the provided tool contains a complete path.
22916        tool_specified="$DTRACE"
22917        tool_basename="${tool_specified##*/}"
22918        if test "x$tool_basename" = "x$tool_specified"; then
22919          # A command without a complete path is provided, search $PATH.
22920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22921$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22922          # Extract the first word of "$tool_basename", so it can be a program name with args.
22923set dummy $tool_basename; ac_word=$2
22924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22925$as_echo_n "checking for $ac_word... " >&6; }
22926if ${ac_cv_path_DTRACE+:} false; then :
22927  $as_echo_n "(cached) " >&6
22928else
22929  case $DTRACE in
22930  [\\/]* | ?:[\\/]*)
22931  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22932  ;;
22933  *)
22934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22935for as_dir in $PATH
22936do
22937  IFS=$as_save_IFS
22938  test -z "$as_dir" && as_dir=.
22939    for ac_exec_ext in '' $ac_executable_extensions; do
22940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22941    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22943    break 2
22944  fi
22945done
22946  done
22947IFS=$as_save_IFS
22948
22949  ;;
22950esac
22951fi
22952DTRACE=$ac_cv_path_DTRACE
22953if test -n "$DTRACE"; then
22954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22955$as_echo "$DTRACE" >&6; }
22956else
22957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22958$as_echo "no" >&6; }
22959fi
22960
22961
22962          if test "x$DTRACE" = x; then
22963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22964          fi
22965        else
22966          # Otherwise we believe it is a complete path. Use it as it is.
22967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22968$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22970$as_echo_n "checking for DTRACE... " >&6; }
22971          if test ! -x "$tool_specified"; then
22972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22973$as_echo "not found" >&6; }
22974            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22975          fi
22976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22977$as_echo "$tool_specified" >&6; }
22978        fi
22979      fi
22980    fi
22981
22982  fi
22983
22984
22985
22986
22987  # Publish this variable in the help.
22988
22989
22990  if [ -z "${PATCH+x}" ]; then
22991    # The variable is not set by user, try to locate tool using the code snippet
22992    for ac_prog in gpatch patch
22993do
22994  # Extract the first word of "$ac_prog", so it can be a program name with args.
22995set dummy $ac_prog; ac_word=$2
22996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22997$as_echo_n "checking for $ac_word... " >&6; }
22998if ${ac_cv_path_PATCH+:} false; then :
22999  $as_echo_n "(cached) " >&6
23000else
23001  case $PATCH in
23002  [\\/]* | ?:[\\/]*)
23003  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23004  ;;
23005  *)
23006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23007for as_dir in $PATH
23008do
23009  IFS=$as_save_IFS
23010  test -z "$as_dir" && as_dir=.
23011    for ac_exec_ext in '' $ac_executable_extensions; do
23012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23013    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23015    break 2
23016  fi
23017done
23018  done
23019IFS=$as_save_IFS
23020
23021  ;;
23022esac
23023fi
23024PATCH=$ac_cv_path_PATCH
23025if test -n "$PATCH"; then
23026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23027$as_echo "$PATCH" >&6; }
23028else
23029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23030$as_echo "no" >&6; }
23031fi
23032
23033
23034  test -n "$PATCH" && break
23035done
23036
23037  else
23038    # The variable is set, but is it from the command line or the environment?
23039
23040    # Try to remove the string !PATCH! from our list.
23041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23043      # If it failed, the variable was not from the command line. Ignore it,
23044      # but warn the user (except for BASH, which is always set by the calling BASH).
23045      if test "xPATCH" != xBASH; then
23046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23047$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23048      fi
23049      # Try to locate tool using the code snippet
23050      for ac_prog in gpatch patch
23051do
23052  # Extract the first word of "$ac_prog", so it can be a program name with args.
23053set dummy $ac_prog; ac_word=$2
23054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23055$as_echo_n "checking for $ac_word... " >&6; }
23056if ${ac_cv_path_PATCH+:} false; then :
23057  $as_echo_n "(cached) " >&6
23058else
23059  case $PATCH in
23060  [\\/]* | ?:[\\/]*)
23061  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23062  ;;
23063  *)
23064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23065for as_dir in $PATH
23066do
23067  IFS=$as_save_IFS
23068  test -z "$as_dir" && as_dir=.
23069    for ac_exec_ext in '' $ac_executable_extensions; do
23070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23071    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23073    break 2
23074  fi
23075done
23076  done
23077IFS=$as_save_IFS
23078
23079  ;;
23080esac
23081fi
23082PATCH=$ac_cv_path_PATCH
23083if test -n "$PATCH"; then
23084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23085$as_echo "$PATCH" >&6; }
23086else
23087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23088$as_echo "no" >&6; }
23089fi
23090
23091
23092  test -n "$PATCH" && break
23093done
23094
23095    else
23096      # If it succeeded, then it was overridden by the user. We will use it
23097      # for the tool.
23098
23099      # First remove it from the list of overridden variables, so we can test
23100      # for unknown variables in the end.
23101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23102
23103      # Check if we try to supply an empty value
23104      if test "x$PATCH" = x; then
23105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23106$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23108$as_echo_n "checking for PATCH... " >&6; }
23109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23110$as_echo "disabled" >&6; }
23111      else
23112        # Check if the provided tool contains a complete path.
23113        tool_specified="$PATCH"
23114        tool_basename="${tool_specified##*/}"
23115        if test "x$tool_basename" = "x$tool_specified"; then
23116          # A command without a complete path is provided, search $PATH.
23117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23118$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23119          # Extract the first word of "$tool_basename", so it can be a program name with args.
23120set dummy $tool_basename; ac_word=$2
23121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23122$as_echo_n "checking for $ac_word... " >&6; }
23123if ${ac_cv_path_PATCH+:} false; then :
23124  $as_echo_n "(cached) " >&6
23125else
23126  case $PATCH in
23127  [\\/]* | ?:[\\/]*)
23128  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23129  ;;
23130  *)
23131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23132for as_dir in $PATH
23133do
23134  IFS=$as_save_IFS
23135  test -z "$as_dir" && as_dir=.
23136    for ac_exec_ext in '' $ac_executable_extensions; do
23137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23138    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23140    break 2
23141  fi
23142done
23143  done
23144IFS=$as_save_IFS
23145
23146  ;;
23147esac
23148fi
23149PATCH=$ac_cv_path_PATCH
23150if test -n "$PATCH"; then
23151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23152$as_echo "$PATCH" >&6; }
23153else
23154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155$as_echo "no" >&6; }
23156fi
23157
23158
23159          if test "x$PATCH" = x; then
23160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23161          fi
23162        else
23163          # Otherwise we believe it is a complete path. Use it as it is.
23164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23165$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23167$as_echo_n "checking for PATCH... " >&6; }
23168          if test ! -x "$tool_specified"; then
23169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23170$as_echo "not found" >&6; }
23171            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23172          fi
23173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23174$as_echo "$tool_specified" >&6; }
23175        fi
23176      fi
23177    fi
23178
23179  fi
23180
23181
23182  # Check if it's GNU time
23183  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23184  if test "x$IS_GNU_TIME" != x; then
23185    IS_GNU_TIME=yes
23186  else
23187    IS_GNU_TIME=no
23188  fi
23189
23190
23191  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23192
23193
23194
23195  # Publish this variable in the help.
23196
23197
23198  if [ -z "${DSYMUTIL+x}" ]; then
23199    # The variable is not set by user, try to locate tool using the code snippet
23200    for ac_prog in dsymutil
23201do
23202  # Extract the first word of "$ac_prog", so it can be a program name with args.
23203set dummy $ac_prog; ac_word=$2
23204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23205$as_echo_n "checking for $ac_word... " >&6; }
23206if ${ac_cv_path_DSYMUTIL+:} false; then :
23207  $as_echo_n "(cached) " >&6
23208else
23209  case $DSYMUTIL in
23210  [\\/]* | ?:[\\/]*)
23211  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23212  ;;
23213  *)
23214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23215for as_dir in $PATH
23216do
23217  IFS=$as_save_IFS
23218  test -z "$as_dir" && as_dir=.
23219    for ac_exec_ext in '' $ac_executable_extensions; do
23220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23221    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23223    break 2
23224  fi
23225done
23226  done
23227IFS=$as_save_IFS
23228
23229  ;;
23230esac
23231fi
23232DSYMUTIL=$ac_cv_path_DSYMUTIL
23233if test -n "$DSYMUTIL"; then
23234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23235$as_echo "$DSYMUTIL" >&6; }
23236else
23237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23238$as_echo "no" >&6; }
23239fi
23240
23241
23242  test -n "$DSYMUTIL" && break
23243done
23244
23245  else
23246    # The variable is set, but is it from the command line or the environment?
23247
23248    # Try to remove the string !DSYMUTIL! from our list.
23249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23251      # If it failed, the variable was not from the command line. Ignore it,
23252      # but warn the user (except for BASH, which is always set by the calling BASH).
23253      if test "xDSYMUTIL" != xBASH; then
23254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23255$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23256      fi
23257      # Try to locate tool using the code snippet
23258      for ac_prog in dsymutil
23259do
23260  # Extract the first word of "$ac_prog", so it can be a program name with args.
23261set dummy $ac_prog; ac_word=$2
23262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23263$as_echo_n "checking for $ac_word... " >&6; }
23264if ${ac_cv_path_DSYMUTIL+:} false; then :
23265  $as_echo_n "(cached) " >&6
23266else
23267  case $DSYMUTIL in
23268  [\\/]* | ?:[\\/]*)
23269  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23270  ;;
23271  *)
23272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23273for as_dir in $PATH
23274do
23275  IFS=$as_save_IFS
23276  test -z "$as_dir" && as_dir=.
23277    for ac_exec_ext in '' $ac_executable_extensions; do
23278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23279    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23281    break 2
23282  fi
23283done
23284  done
23285IFS=$as_save_IFS
23286
23287  ;;
23288esac
23289fi
23290DSYMUTIL=$ac_cv_path_DSYMUTIL
23291if test -n "$DSYMUTIL"; then
23292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23293$as_echo "$DSYMUTIL" >&6; }
23294else
23295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23296$as_echo "no" >&6; }
23297fi
23298
23299
23300  test -n "$DSYMUTIL" && break
23301done
23302
23303    else
23304      # If it succeeded, then it was overridden by the user. We will use it
23305      # for the tool.
23306
23307      # First remove it from the list of overridden variables, so we can test
23308      # for unknown variables in the end.
23309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23310
23311      # Check if we try to supply an empty value
23312      if test "x$DSYMUTIL" = x; then
23313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23314$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23316$as_echo_n "checking for DSYMUTIL... " >&6; }
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23318$as_echo "disabled" >&6; }
23319      else
23320        # Check if the provided tool contains a complete path.
23321        tool_specified="$DSYMUTIL"
23322        tool_basename="${tool_specified##*/}"
23323        if test "x$tool_basename" = "x$tool_specified"; then
23324          # A command without a complete path is provided, search $PATH.
23325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23326$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23327          # Extract the first word of "$tool_basename", so it can be a program name with args.
23328set dummy $tool_basename; ac_word=$2
23329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23330$as_echo_n "checking for $ac_word... " >&6; }
23331if ${ac_cv_path_DSYMUTIL+:} false; then :
23332  $as_echo_n "(cached) " >&6
23333else
23334  case $DSYMUTIL in
23335  [\\/]* | ?:[\\/]*)
23336  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23337  ;;
23338  *)
23339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23340for as_dir in $PATH
23341do
23342  IFS=$as_save_IFS
23343  test -z "$as_dir" && as_dir=.
23344    for ac_exec_ext in '' $ac_executable_extensions; do
23345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23346    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23348    break 2
23349  fi
23350done
23351  done
23352IFS=$as_save_IFS
23353
23354  ;;
23355esac
23356fi
23357DSYMUTIL=$ac_cv_path_DSYMUTIL
23358if test -n "$DSYMUTIL"; then
23359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23360$as_echo "$DSYMUTIL" >&6; }
23361else
23362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23363$as_echo "no" >&6; }
23364fi
23365
23366
23367          if test "x$DSYMUTIL" = x; then
23368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23369          fi
23370        else
23371          # Otherwise we believe it is a complete path. Use it as it is.
23372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23373$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23375$as_echo_n "checking for DSYMUTIL... " >&6; }
23376          if test ! -x "$tool_specified"; then
23377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23378$as_echo "not found" >&6; }
23379            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23380          fi
23381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23382$as_echo "$tool_specified" >&6; }
23383        fi
23384      fi
23385    fi
23386
23387  fi
23388
23389
23390
23391  if test "x$DSYMUTIL" = x; then
23392    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23393  fi
23394
23395
23396
23397
23398
23399  # Publish this variable in the help.
23400
23401
23402  if [ -z "${XATTR+x}" ]; then
23403    # The variable is not set by user, try to locate tool using the code snippet
23404    for ac_prog in xattr
23405do
23406  # Extract the first word of "$ac_prog", so it can be a program name with args.
23407set dummy $ac_prog; ac_word=$2
23408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23409$as_echo_n "checking for $ac_word... " >&6; }
23410if ${ac_cv_path_XATTR+:} false; then :
23411  $as_echo_n "(cached) " >&6
23412else
23413  case $XATTR in
23414  [\\/]* | ?:[\\/]*)
23415  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23416  ;;
23417  *)
23418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23419for as_dir in $PATH
23420do
23421  IFS=$as_save_IFS
23422  test -z "$as_dir" && as_dir=.
23423    for ac_exec_ext in '' $ac_executable_extensions; do
23424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23425    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23427    break 2
23428  fi
23429done
23430  done
23431IFS=$as_save_IFS
23432
23433  ;;
23434esac
23435fi
23436XATTR=$ac_cv_path_XATTR
23437if test -n "$XATTR"; then
23438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23439$as_echo "$XATTR" >&6; }
23440else
23441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23442$as_echo "no" >&6; }
23443fi
23444
23445
23446  test -n "$XATTR" && break
23447done
23448
23449  else
23450    # The variable is set, but is it from the command line or the environment?
23451
23452    # Try to remove the string !XATTR! from our list.
23453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23455      # If it failed, the variable was not from the command line. Ignore it,
23456      # but warn the user (except for BASH, which is always set by the calling BASH).
23457      if test "xXATTR" != xBASH; then
23458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23459$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23460      fi
23461      # Try to locate tool using the code snippet
23462      for ac_prog in xattr
23463do
23464  # Extract the first word of "$ac_prog", so it can be a program name with args.
23465set dummy $ac_prog; ac_word=$2
23466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23467$as_echo_n "checking for $ac_word... " >&6; }
23468if ${ac_cv_path_XATTR+:} false; then :
23469  $as_echo_n "(cached) " >&6
23470else
23471  case $XATTR in
23472  [\\/]* | ?:[\\/]*)
23473  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23474  ;;
23475  *)
23476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23477for as_dir in $PATH
23478do
23479  IFS=$as_save_IFS
23480  test -z "$as_dir" && as_dir=.
23481    for ac_exec_ext in '' $ac_executable_extensions; do
23482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23483    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23485    break 2
23486  fi
23487done
23488  done
23489IFS=$as_save_IFS
23490
23491  ;;
23492esac
23493fi
23494XATTR=$ac_cv_path_XATTR
23495if test -n "$XATTR"; then
23496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23497$as_echo "$XATTR" >&6; }
23498else
23499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23500$as_echo "no" >&6; }
23501fi
23502
23503
23504  test -n "$XATTR" && break
23505done
23506
23507    else
23508      # If it succeeded, then it was overridden by the user. We will use it
23509      # for the tool.
23510
23511      # First remove it from the list of overridden variables, so we can test
23512      # for unknown variables in the end.
23513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23514
23515      # Check if we try to supply an empty value
23516      if test "x$XATTR" = x; then
23517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23518$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23520$as_echo_n "checking for XATTR... " >&6; }
23521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23522$as_echo "disabled" >&6; }
23523      else
23524        # Check if the provided tool contains a complete path.
23525        tool_specified="$XATTR"
23526        tool_basename="${tool_specified##*/}"
23527        if test "x$tool_basename" = "x$tool_specified"; then
23528          # A command without a complete path is provided, search $PATH.
23529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23530$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23531          # Extract the first word of "$tool_basename", so it can be a program name with args.
23532set dummy $tool_basename; ac_word=$2
23533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23534$as_echo_n "checking for $ac_word... " >&6; }
23535if ${ac_cv_path_XATTR+:} false; then :
23536  $as_echo_n "(cached) " >&6
23537else
23538  case $XATTR in
23539  [\\/]* | ?:[\\/]*)
23540  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23541  ;;
23542  *)
23543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23544for as_dir in $PATH
23545do
23546  IFS=$as_save_IFS
23547  test -z "$as_dir" && as_dir=.
23548    for ac_exec_ext in '' $ac_executable_extensions; do
23549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23550    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23552    break 2
23553  fi
23554done
23555  done
23556IFS=$as_save_IFS
23557
23558  ;;
23559esac
23560fi
23561XATTR=$ac_cv_path_XATTR
23562if test -n "$XATTR"; then
23563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23564$as_echo "$XATTR" >&6; }
23565else
23566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23567$as_echo "no" >&6; }
23568fi
23569
23570
23571          if test "x$XATTR" = x; then
23572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23573          fi
23574        else
23575          # Otherwise we believe it is a complete path. Use it as it is.
23576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23577$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23579$as_echo_n "checking for XATTR... " >&6; }
23580          if test ! -x "$tool_specified"; then
23581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23582$as_echo "not found" >&6; }
23583            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23584          fi
23585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23586$as_echo "$tool_specified" >&6; }
23587        fi
23588      fi
23589    fi
23590
23591  fi
23592
23593
23594
23595  if test "x$XATTR" = x; then
23596    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23597  fi
23598
23599
23600
23601
23602  # Publish this variable in the help.
23603
23604
23605  if [ -z "${CODESIGN+x}" ]; then
23606    # The variable is not set by user, try to locate tool using the code snippet
23607    for ac_prog in codesign
23608do
23609  # Extract the first word of "$ac_prog", so it can be a program name with args.
23610set dummy $ac_prog; ac_word=$2
23611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23612$as_echo_n "checking for $ac_word... " >&6; }
23613if ${ac_cv_path_CODESIGN+:} false; then :
23614  $as_echo_n "(cached) " >&6
23615else
23616  case $CODESIGN in
23617  [\\/]* | ?:[\\/]*)
23618  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23619  ;;
23620  *)
23621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23622for as_dir in $PATH
23623do
23624  IFS=$as_save_IFS
23625  test -z "$as_dir" && as_dir=.
23626    for ac_exec_ext in '' $ac_executable_extensions; do
23627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23628    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23630    break 2
23631  fi
23632done
23633  done
23634IFS=$as_save_IFS
23635
23636  ;;
23637esac
23638fi
23639CODESIGN=$ac_cv_path_CODESIGN
23640if test -n "$CODESIGN"; then
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23642$as_echo "$CODESIGN" >&6; }
23643else
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23645$as_echo "no" >&6; }
23646fi
23647
23648
23649  test -n "$CODESIGN" && break
23650done
23651
23652  else
23653    # The variable is set, but is it from the command line or the environment?
23654
23655    # Try to remove the string !CODESIGN! from our list.
23656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23658      # If it failed, the variable was not from the command line. Ignore it,
23659      # but warn the user (except for BASH, which is always set by the calling BASH).
23660      if test "xCODESIGN" != xBASH; then
23661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23662$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23663      fi
23664      # Try to locate tool using the code snippet
23665      for ac_prog in codesign
23666do
23667  # Extract the first word of "$ac_prog", so it can be a program name with args.
23668set dummy $ac_prog; ac_word=$2
23669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23670$as_echo_n "checking for $ac_word... " >&6; }
23671if ${ac_cv_path_CODESIGN+:} false; then :
23672  $as_echo_n "(cached) " >&6
23673else
23674  case $CODESIGN in
23675  [\\/]* | ?:[\\/]*)
23676  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23677  ;;
23678  *)
23679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23680for as_dir in $PATH
23681do
23682  IFS=$as_save_IFS
23683  test -z "$as_dir" && as_dir=.
23684    for ac_exec_ext in '' $ac_executable_extensions; do
23685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23686    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23688    break 2
23689  fi
23690done
23691  done
23692IFS=$as_save_IFS
23693
23694  ;;
23695esac
23696fi
23697CODESIGN=$ac_cv_path_CODESIGN
23698if test -n "$CODESIGN"; then
23699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23700$as_echo "$CODESIGN" >&6; }
23701else
23702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23703$as_echo "no" >&6; }
23704fi
23705
23706
23707  test -n "$CODESIGN" && break
23708done
23709
23710    else
23711      # If it succeeded, then it was overridden by the user. We will use it
23712      # for the tool.
23713
23714      # First remove it from the list of overridden variables, so we can test
23715      # for unknown variables in the end.
23716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23717
23718      # Check if we try to supply an empty value
23719      if test "x$CODESIGN" = x; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23721$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23723$as_echo_n "checking for CODESIGN... " >&6; }
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23725$as_echo "disabled" >&6; }
23726      else
23727        # Check if the provided tool contains a complete path.
23728        tool_specified="$CODESIGN"
23729        tool_basename="${tool_specified##*/}"
23730        if test "x$tool_basename" = "x$tool_specified"; then
23731          # A command without a complete path is provided, search $PATH.
23732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23733$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23734          # Extract the first word of "$tool_basename", so it can be a program name with args.
23735set dummy $tool_basename; ac_word=$2
23736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23737$as_echo_n "checking for $ac_word... " >&6; }
23738if ${ac_cv_path_CODESIGN+:} false; then :
23739  $as_echo_n "(cached) " >&6
23740else
23741  case $CODESIGN in
23742  [\\/]* | ?:[\\/]*)
23743  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23744  ;;
23745  *)
23746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23747for as_dir in $PATH
23748do
23749  IFS=$as_save_IFS
23750  test -z "$as_dir" && as_dir=.
23751    for ac_exec_ext in '' $ac_executable_extensions; do
23752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23753    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23755    break 2
23756  fi
23757done
23758  done
23759IFS=$as_save_IFS
23760
23761  ;;
23762esac
23763fi
23764CODESIGN=$ac_cv_path_CODESIGN
23765if test -n "$CODESIGN"; then
23766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23767$as_echo "$CODESIGN" >&6; }
23768else
23769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23770$as_echo "no" >&6; }
23771fi
23772
23773
23774          if test "x$CODESIGN" = x; then
23775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23776          fi
23777        else
23778          # Otherwise we believe it is a complete path. Use it as it is.
23779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23780$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23782$as_echo_n "checking for CODESIGN... " >&6; }
23783          if test ! -x "$tool_specified"; then
23784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23785$as_echo "not found" >&6; }
23786            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23787          fi
23788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23789$as_echo "$tool_specified" >&6; }
23790        fi
23791      fi
23792    fi
23793
23794  fi
23795
23796
23797    if test "x$CODESIGN" != "x"; then
23798      # Verify that the openjdk_codesign certificate is present
23799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23800$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23801      $RM codesign-testfile
23802      $TOUCH codesign-testfile
23803      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23804      $RM codesign-testfile
23805      if test "x$CODESIGN" = x; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807$as_echo "no" >&6; }
23808      else
23809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23810$as_echo "yes" >&6; }
23811      fi
23812    fi
23813
23814
23815
23816  # Publish this variable in the help.
23817
23818
23819  if [ -z "${SETFILE+x}" ]; then
23820    # The variable is not set by user, try to locate tool using the code snippet
23821    for ac_prog in SetFile
23822do
23823  # Extract the first word of "$ac_prog", so it can be a program name with args.
23824set dummy $ac_prog; ac_word=$2
23825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23826$as_echo_n "checking for $ac_word... " >&6; }
23827if ${ac_cv_path_SETFILE+:} false; then :
23828  $as_echo_n "(cached) " >&6
23829else
23830  case $SETFILE in
23831  [\\/]* | ?:[\\/]*)
23832  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23833  ;;
23834  *)
23835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23836for as_dir in $PATH
23837do
23838  IFS=$as_save_IFS
23839  test -z "$as_dir" && as_dir=.
23840    for ac_exec_ext in '' $ac_executable_extensions; do
23841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23842    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23844    break 2
23845  fi
23846done
23847  done
23848IFS=$as_save_IFS
23849
23850  ;;
23851esac
23852fi
23853SETFILE=$ac_cv_path_SETFILE
23854if test -n "$SETFILE"; then
23855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23856$as_echo "$SETFILE" >&6; }
23857else
23858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23859$as_echo "no" >&6; }
23860fi
23861
23862
23863  test -n "$SETFILE" && break
23864done
23865
23866  else
23867    # The variable is set, but is it from the command line or the environment?
23868
23869    # Try to remove the string !SETFILE! from our list.
23870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23872      # If it failed, the variable was not from the command line. Ignore it,
23873      # but warn the user (except for BASH, which is always set by the calling BASH).
23874      if test "xSETFILE" != xBASH; then
23875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23876$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23877      fi
23878      # Try to locate tool using the code snippet
23879      for ac_prog in SetFile
23880do
23881  # Extract the first word of "$ac_prog", so it can be a program name with args.
23882set dummy $ac_prog; ac_word=$2
23883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23884$as_echo_n "checking for $ac_word... " >&6; }
23885if ${ac_cv_path_SETFILE+:} false; then :
23886  $as_echo_n "(cached) " >&6
23887else
23888  case $SETFILE in
23889  [\\/]* | ?:[\\/]*)
23890  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23891  ;;
23892  *)
23893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23894for as_dir in $PATH
23895do
23896  IFS=$as_save_IFS
23897  test -z "$as_dir" && as_dir=.
23898    for ac_exec_ext in '' $ac_executable_extensions; do
23899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23900    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23902    break 2
23903  fi
23904done
23905  done
23906IFS=$as_save_IFS
23907
23908  ;;
23909esac
23910fi
23911SETFILE=$ac_cv_path_SETFILE
23912if test -n "$SETFILE"; then
23913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23914$as_echo "$SETFILE" >&6; }
23915else
23916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23917$as_echo "no" >&6; }
23918fi
23919
23920
23921  test -n "$SETFILE" && break
23922done
23923
23924    else
23925      # If it succeeded, then it was overridden by the user. We will use it
23926      # for the tool.
23927
23928      # First remove it from the list of overridden variables, so we can test
23929      # for unknown variables in the end.
23930      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23931
23932      # Check if we try to supply an empty value
23933      if test "x$SETFILE" = x; then
23934        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23935$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23937$as_echo_n "checking for SETFILE... " >&6; }
23938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23939$as_echo "disabled" >&6; }
23940      else
23941        # Check if the provided tool contains a complete path.
23942        tool_specified="$SETFILE"
23943        tool_basename="${tool_specified##*/}"
23944        if test "x$tool_basename" = "x$tool_specified"; then
23945          # A command without a complete path is provided, search $PATH.
23946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23947$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23948          # Extract the first word of "$tool_basename", so it can be a program name with args.
23949set dummy $tool_basename; ac_word=$2
23950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23951$as_echo_n "checking for $ac_word... " >&6; }
23952if ${ac_cv_path_SETFILE+:} false; then :
23953  $as_echo_n "(cached) " >&6
23954else
23955  case $SETFILE in
23956  [\\/]* | ?:[\\/]*)
23957  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23958  ;;
23959  *)
23960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23961for as_dir in $PATH
23962do
23963  IFS=$as_save_IFS
23964  test -z "$as_dir" && as_dir=.
23965    for ac_exec_ext in '' $ac_executable_extensions; do
23966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23967    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23969    break 2
23970  fi
23971done
23972  done
23973IFS=$as_save_IFS
23974
23975  ;;
23976esac
23977fi
23978SETFILE=$ac_cv_path_SETFILE
23979if test -n "$SETFILE"; then
23980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23981$as_echo "$SETFILE" >&6; }
23982else
23983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23984$as_echo "no" >&6; }
23985fi
23986
23987
23988          if test "x$SETFILE" = x; then
23989            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23990          fi
23991        else
23992          # Otherwise we believe it is a complete path. Use it as it is.
23993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23994$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23996$as_echo_n "checking for SETFILE... " >&6; }
23997          if test ! -x "$tool_specified"; then
23998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23999$as_echo "not found" >&6; }
24000            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24001          fi
24002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24003$as_echo "$tool_specified" >&6; }
24004        fi
24005      fi
24006    fi
24007
24008  fi
24009
24010
24011
24012  if test "x$SETFILE" = x; then
24013    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24014  fi
24015
24016
24017  fi
24018
24019
24020  # Test if bash supports pipefail.
24021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24022$as_echo_n "checking if bash supports pipefail... " >&6; }
24023  if ${BASH} -c 'set -o pipefail'; then
24024    BASH_ARGS="$BASH_ARGS -o pipefail"
24025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24026$as_echo "yes" >&6; }
24027  else
24028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24029$as_echo "no" >&6; }
24030  fi
24031
24032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24033$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24034  if ${BASH} -e -c 'true'; then
24035    BASH_ARGS="$BASH_ARGS -e"
24036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24037$as_echo "yes" >&6; }
24038  else
24039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24040$as_echo "no" >&6; }
24041  fi
24042
24043
24044
24045
24046# Check if pkg-config is available.
24047
24048
24049if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24050	if test -n "$ac_tool_prefix"; then
24051  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24052set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24054$as_echo_n "checking for $ac_word... " >&6; }
24055if ${ac_cv_path_PKG_CONFIG+:} false; then :
24056  $as_echo_n "(cached) " >&6
24057else
24058  case $PKG_CONFIG in
24059  [\\/]* | ?:[\\/]*)
24060  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24061  ;;
24062  *)
24063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24064for as_dir in $PATH
24065do
24066  IFS=$as_save_IFS
24067  test -z "$as_dir" && as_dir=.
24068    for ac_exec_ext in '' $ac_executable_extensions; do
24069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24070    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24072    break 2
24073  fi
24074done
24075  done
24076IFS=$as_save_IFS
24077
24078  ;;
24079esac
24080fi
24081PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24082if test -n "$PKG_CONFIG"; then
24083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24084$as_echo "$PKG_CONFIG" >&6; }
24085else
24086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24087$as_echo "no" >&6; }
24088fi
24089
24090
24091fi
24092if test -z "$ac_cv_path_PKG_CONFIG"; then
24093  ac_pt_PKG_CONFIG=$PKG_CONFIG
24094  # Extract the first word of "pkg-config", so it can be a program name with args.
24095set dummy pkg-config; ac_word=$2
24096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24097$as_echo_n "checking for $ac_word... " >&6; }
24098if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24099  $as_echo_n "(cached) " >&6
24100else
24101  case $ac_pt_PKG_CONFIG in
24102  [\\/]* | ?:[\\/]*)
24103  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24104  ;;
24105  *)
24106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24107for as_dir in $PATH
24108do
24109  IFS=$as_save_IFS
24110  test -z "$as_dir" && as_dir=.
24111    for ac_exec_ext in '' $ac_executable_extensions; do
24112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24113    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24115    break 2
24116  fi
24117done
24118  done
24119IFS=$as_save_IFS
24120
24121  ;;
24122esac
24123fi
24124ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24125if test -n "$ac_pt_PKG_CONFIG"; then
24126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24127$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24128else
24129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24130$as_echo "no" >&6; }
24131fi
24132
24133  if test "x$ac_pt_PKG_CONFIG" = x; then
24134    PKG_CONFIG=""
24135  else
24136    case $cross_compiling:$ac_tool_warned in
24137yes:)
24138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24140ac_tool_warned=yes ;;
24141esac
24142    PKG_CONFIG=$ac_pt_PKG_CONFIG
24143  fi
24144else
24145  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24146fi
24147
24148fi
24149if test -n "$PKG_CONFIG"; then
24150	_pkg_min_version=0.9.0
24151	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24152$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24153	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24154		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24155$as_echo "yes" >&6; }
24156	else
24157		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24158$as_echo "no" >&6; }
24159		PKG_CONFIG=""
24160	fi
24161
24162fi
24163
24164# After basic tools have been setup, we can check build os specific details.
24165
24166  ###############################################################################
24167
24168  # Note that this is the build platform OS version!
24169
24170  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24171  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24172  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24173  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24174
24175
24176
24177
24178
24179# Misc basic settings
24180
24181
24182# Check whether --with-default-make-target was given.
24183if test "${with_default_make_target+set}" = set; then :
24184  withval=$with_default_make_target;
24185fi
24186
24187  if test "x$with_default_make_target" = "x" \
24188      || test "x$with_default_make_target" = "xyes"; then
24189    DEFAULT_MAKE_TARGET="exploded-image"
24190  elif test "x$with_default_make_target" = "xno"; then
24191    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24192  else
24193    DEFAULT_MAKE_TARGET="$with_default_make_target"
24194  fi
24195
24196
24197
24198
24199###############################################################################
24200#
24201# Determine OpenJDK variants, options and version numbers.
24202#
24203###############################################################################
24204
24205# We need build & target for this.
24206
24207  # Should we build a JDK without a graphical UI?
24208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24209$as_echo_n "checking headless only... " >&6; }
24210  # Check whether --enable-headless-only was given.
24211if test "${enable_headless_only+set}" = set; then :
24212  enableval=$enable_headless_only;
24213fi
24214
24215
24216  if test "x$enable_headless_only" = "xyes"; then
24217    ENABLE_HEADLESS_ONLY="true"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24219$as_echo "yes" >&6; }
24220  elif test "x$enable_headless_only" = "xno"; then
24221    ENABLE_HEADLESS_ONLY="false"
24222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24223$as_echo "no" >&6; }
24224  elif test "x$enable_headless_only" = "x"; then
24225    ENABLE_HEADLESS_ONLY="false"
24226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24227$as_echo "no" >&6; }
24228  else
24229    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24230  fi
24231
24232
24233
24234  # Choose cacerts source file
24235
24236# Check whether --with-cacerts-file was given.
24237if test "${with_cacerts_file+set}" = set; then :
24238  withval=$with_cacerts_file;
24239fi
24240
24241  if test "x$with_cacerts_file" != x; then
24242    CACERTS_FILE=$with_cacerts_file
24243  fi
24244
24245
24246  # Enable or disable unlimited crypto
24247  # Check whether --enable-unlimited-crypto was given.
24248if test "${enable_unlimited_crypto+set}" = set; then :
24249  enableval=$enable_unlimited_crypto;
24250else
24251  enable_unlimited_crypto=yes
24252fi
24253
24254  if test "x$enable_unlimited_crypto" = "xyes"; then
24255    UNLIMITED_CRYPTO=true
24256  else
24257    UNLIMITED_CRYPTO=false
24258  fi
24259
24260
24261  # Should we build the serviceability agent (SA)?
24262  INCLUDE_SA=true
24263  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24264    INCLUDE_SA=false
24265  fi
24266  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24267    INCLUDE_SA=false
24268  fi
24269
24270
24271  # Compress jars
24272  COMPRESS_JARS=false
24273
24274
24275
24276  # Setup default copyright year. Mostly overridden when building close to a new year.
24277
24278# Check whether --with-copyright-year was given.
24279if test "${with_copyright_year+set}" = set; then :
24280  withval=$with_copyright_year;
24281fi
24282
24283  if test "x$with_copyright_year" = xyes; then
24284    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24285  elif test "x$with_copyright_year" != x; then
24286    COPYRIGHT_YEAR="$with_copyright_year"
24287  else
24288    COPYRIGHT_YEAR=`$DATE +'%Y'`
24289  fi
24290
24291
24292
24293  # Check whether --enable-keep-packaged-modules was given.
24294if test "${enable_keep_packaged_modules+set}" = set; then :
24295  enableval=$enable_keep_packaged_modules;
24296fi
24297
24298
24299  if test "x$enable_keep_packaged_modules" = "xyes"; then
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24301$as_echo_n "checking if packaged modules are kept... " >&6; }
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24303$as_echo "yes" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=true
24305  elif test "x$enable_keep_packaged_modules" = "xno"; then
24306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24307$as_echo_n "checking if packaged modules are kept... " >&6; }
24308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24309$as_echo "no" >&6; }
24310    JLINK_KEEP_PACKAGED_MODULES=false
24311  elif test "x$enable_keep_packaged_modules" = "x"; then
24312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24313$as_echo "yes (default)" >&6; }
24314    JLINK_KEEP_PACKAGED_MODULES=true
24315  else
24316    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24317  fi
24318
24319
24320
24321
24322  # Warn user that old version arguments are deprecated.
24323
24324
24325# Check whether --with-milestone was given.
24326if test "${with_milestone+set}" = set; then :
24327  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24328$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24329fi
24330
24331
24332
24333
24334# Check whether --with-update-version was given.
24335if test "${with_update_version+set}" = set; then :
24336  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24337$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24338fi
24339
24340
24341
24342
24343# Check whether --with-user-release-suffix was given.
24344if test "${with_user_release_suffix+set}" = set; then :
24345  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
24346$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24347fi
24348
24349
24350
24351
24352# Check whether --with-build-number was given.
24353if test "${with_build_number+set}" = set; then :
24354  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24355$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24356fi
24357
24358
24359
24360  # Source the version numbers file
24361  . $AUTOCONF_DIR/version-numbers
24362
24363  # Some non-version number information is set in that file
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373  # Override version from arguments
24374
24375  # If --with-version-string is set, process it first. It is possible to
24376  # override parts with more specific flags, since these are processed later.
24377
24378# Check whether --with-version-string was given.
24379if test "${with_version_string+set}" = set; then :
24380  withval=$with_version_string;
24381fi
24382
24383  if test "x$with_version_string" = xyes; then
24384    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24385  elif test "x$with_version_string" != x; then
24386    # Additional [] needed to keep m4 from mangling shell constructs.
24387    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24388      VERSION_MAJOR=${BASH_REMATCH[1]}
24389      VERSION_MINOR=${BASH_REMATCH[3]}
24390      VERSION_SECURITY=${BASH_REMATCH[5]}
24391      VERSION_PATCH=${BASH_REMATCH[7]}
24392      VERSION_PRE=${BASH_REMATCH[9]}
24393      version_plus_separator=${BASH_REMATCH[11]}
24394      VERSION_BUILD=${BASH_REMATCH[12]}
24395      VERSION_OPT=${BASH_REMATCH[14]}
24396      # Unspecified numerical fields are interpreted as 0.
24397      if test "x$VERSION_MINOR" = x; then
24398        VERSION_MINOR=0
24399      fi
24400      if test "x$VERSION_SECURITY" = x; then
24401        VERSION_SECURITY=0
24402      fi
24403      if test "x$VERSION_PATCH" = x; then
24404        VERSION_PATCH=0
24405      fi
24406      if test "x$version_plus_separator" != x \
24407          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24408        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24409      fi
24410      # Stop the version part process from setting default values.
24411      # We still allow them to explicitly override though.
24412      NO_DEFAULT_VERSION_PARTS=true
24413    else
24414      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24415    fi
24416  fi
24417
24418
24419# Check whether --with-version-pre was given.
24420if test "${with_version_pre+set}" = set; then :
24421  withval=$with_version_pre; with_version_pre_present=true
24422else
24423  with_version_pre_present=false
24424fi
24425
24426
24427  if test "x$with_version_pre_present" = xtrue; then
24428    if test "x$with_version_pre" = xyes; then
24429      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24430    elif test "x$with_version_pre" = xno; then
24431      # Interpret --without-* as empty string instead of the literal "no"
24432      VERSION_PRE=
24433    else
24434      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24435       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24436      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24438$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24439      fi
24440    fi
24441  else
24442    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24443      # Default is to use "internal" as pre
24444      VERSION_PRE="internal"
24445    fi
24446  fi
24447
24448
24449# Check whether --with-version-opt was given.
24450if test "${with_version_opt+set}" = set; then :
24451  withval=$with_version_opt; with_version_opt_present=true
24452else
24453  with_version_opt_present=false
24454fi
24455
24456
24457  if test "x$with_version_opt_present" = xtrue; then
24458    if test "x$with_version_opt" = xyes; then
24459      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24460    elif test "x$with_version_opt" = xno; then
24461      # Interpret --without-* as empty string instead of the literal "no"
24462      VERSION_OPT=
24463    else
24464      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24465       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24466      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24468$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24469      fi
24470    fi
24471  else
24472    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24473      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24474      # Outer [ ] to quote m4.
24475       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24476      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24477    fi
24478  fi
24479
24480
24481# Check whether --with-version-build was given.
24482if test "${with_version_build+set}" = set; then :
24483  withval=$with_version_build; with_version_build_present=true
24484else
24485  with_version_build_present=false
24486fi
24487
24488
24489  if test "x$with_version_build_present" = xtrue; then
24490    if test "x$with_version_build" = xyes; then
24491      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24492    elif test "x$with_version_build" = xno; then
24493      # Interpret --without-* as empty string instead of the literal "no"
24494      VERSION_BUILD=
24495    elif test "x$with_version_build" = x; then
24496      VERSION_BUILD=
24497    else
24498
24499  # Additional [] needed to keep m4 from mangling shell constructs.
24500  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24501    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24502  fi
24503  # Extract the version number without leading zeros.
24504  cleaned_value=${BASH_REMATCH[1]}
24505  if test "x$cleaned_value" = x; then
24506    # Special case for zero
24507    cleaned_value=${BASH_REMATCH[2]}
24508  fi
24509
24510  if test $cleaned_value -gt 255; then
24511    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24512  fi
24513  if test "x$cleaned_value" != "x$with_version_build"; then
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24515$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24516  fi
24517  VERSION_BUILD=$cleaned_value
24518
24519    fi
24520  else
24521    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24522      # Default is to not have a build number.
24523      VERSION_BUILD=""
24524      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24525      VERSION_BUILD=0
24526    fi
24527  fi
24528
24529
24530# Check whether --with-version-major was given.
24531if test "${with_version_major+set}" = set; then :
24532  withval=$with_version_major; with_version_major_present=true
24533else
24534  with_version_major_present=false
24535fi
24536
24537
24538  if test "x$with_version_major_present" = xtrue; then
24539    if test "x$with_version_major" = xyes; then
24540      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24541    else
24542
24543  # Additional [] needed to keep m4 from mangling shell constructs.
24544  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24545    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24546  fi
24547  # Extract the version number without leading zeros.
24548  cleaned_value=${BASH_REMATCH[1]}
24549  if test "x$cleaned_value" = x; then
24550    # Special case for zero
24551    cleaned_value=${BASH_REMATCH[2]}
24552  fi
24553
24554  if test $cleaned_value -gt 255; then
24555    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24556  fi
24557  if test "x$cleaned_value" != "x$with_version_major"; then
24558    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24559$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24560  fi
24561  VERSION_MAJOR=$cleaned_value
24562
24563    fi
24564  else
24565    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24566      # Default is to get value from version-numbers
24567      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24568    fi
24569  fi
24570
24571
24572# Check whether --with-version-minor was given.
24573if test "${with_version_minor+set}" = set; then :
24574  withval=$with_version_minor; with_version_minor_present=true
24575else
24576  with_version_minor_present=false
24577fi
24578
24579
24580  if test "x$with_version_minor_present" = xtrue; then
24581    if test "x$with_version_minor" = xyes; then
24582      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24583    elif test "x$with_version_minor" = xno; then
24584      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24585      VERSION_MINOR=0
24586    elif test "x$with_version_minor" = x; then
24587      VERSION_MINOR=0
24588    else
24589
24590  # Additional [] needed to keep m4 from mangling shell constructs.
24591  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24592    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24593  fi
24594  # Extract the version number without leading zeros.
24595  cleaned_value=${BASH_REMATCH[1]}
24596  if test "x$cleaned_value" = x; then
24597    # Special case for zero
24598    cleaned_value=${BASH_REMATCH[2]}
24599  fi
24600
24601  if test $cleaned_value -gt 255; then
24602    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24603  fi
24604  if test "x$cleaned_value" != "x$with_version_minor"; then
24605    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24606$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24607  fi
24608  VERSION_MINOR=$cleaned_value
24609
24610    fi
24611  else
24612    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24613      # Default is 0, if unspecified
24614      VERSION_MINOR=0
24615    fi
24616  fi
24617
24618
24619# Check whether --with-version-security was given.
24620if test "${with_version_security+set}" = set; then :
24621  withval=$with_version_security; with_version_security_present=true
24622else
24623  with_version_security_present=false
24624fi
24625
24626
24627  if test "x$with_version_security_present" = xtrue; then
24628    if test "x$with_version_security" = xyes; then
24629      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24630    elif test "x$with_version_security" = xno; then
24631      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24632      VERSION_SECURITY=0
24633    elif test "x$with_version_security" = x; then
24634      VERSION_SECURITY=0
24635    else
24636
24637  # Additional [] needed to keep m4 from mangling shell constructs.
24638  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24639    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24640  fi
24641  # Extract the version number without leading zeros.
24642  cleaned_value=${BASH_REMATCH[1]}
24643  if test "x$cleaned_value" = x; then
24644    # Special case for zero
24645    cleaned_value=${BASH_REMATCH[2]}
24646  fi
24647
24648  if test $cleaned_value -gt 255; then
24649    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24650  fi
24651  if test "x$cleaned_value" != "x$with_version_security"; then
24652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24653$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24654  fi
24655  VERSION_SECURITY=$cleaned_value
24656
24657    fi
24658  else
24659    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24660      # Default is 0, if unspecified
24661      VERSION_SECURITY=0
24662    fi
24663  fi
24664
24665
24666# Check whether --with-version-patch was given.
24667if test "${with_version_patch+set}" = set; then :
24668  withval=$with_version_patch; with_version_patch_present=true
24669else
24670  with_version_patch_present=false
24671fi
24672
24673
24674  if test "x$with_version_patch_present" = xtrue; then
24675    if test "x$with_version_patch" = xyes; then
24676      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24677    elif test "x$with_version_patch" = xno; then
24678      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24679      VERSION_PATCH=0
24680    elif test "x$with_version_patch" = x; then
24681      VERSION_PATCH=0
24682    else
24683
24684  # Additional [] needed to keep m4 from mangling shell constructs.
24685  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24686    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24687  fi
24688  # Extract the version number without leading zeros.
24689  cleaned_value=${BASH_REMATCH[1]}
24690  if test "x$cleaned_value" = x; then
24691    # Special case for zero
24692    cleaned_value=${BASH_REMATCH[2]}
24693  fi
24694
24695  if test $cleaned_value -gt 255; then
24696    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24697  fi
24698  if test "x$cleaned_value" != "x$with_version_patch"; then
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24700$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24701  fi
24702  VERSION_PATCH=$cleaned_value
24703
24704    fi
24705  else
24706    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24707      # Default is 0, if unspecified
24708      VERSION_PATCH=0
24709    fi
24710  fi
24711
24712  # Calculate derived version properties
24713
24714  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24715  if test "x$VERSION_PRE" = x; then
24716    VERSION_IS_GA=true
24717  else
24718    VERSION_IS_GA=false
24719  fi
24720
24721  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24722  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24723
24724  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24725  # Strip trailing zeroes from stripped_version_number
24726  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24727  VERSION_NUMBER=$stripped_version_number
24728
24729  # The complete version string, with additional build information
24730  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24731    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24732  else
24733    # If either build or opt is set, we need a + separator
24734    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24735  fi
24736
24737  # The short version string, just VERSION_NUMBER and PRE, if present.
24738  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24739
24740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24741$as_echo_n "checking for version string... " >&6; }
24742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24743$as_echo "$VERSION_STRING" >&6; }
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759###############################################################################
24760#
24761# Setup BootJDK, used to bootstrap the build.
24762#
24763###############################################################################
24764
24765
24766  BOOT_JDK_FOUND=no
24767
24768# Check whether --with-boot-jdk was given.
24769if test "${with_boot_jdk+set}" = set; then :
24770  withval=$with_boot_jdk;
24771fi
24772
24773
24774  # We look for the Boot JDK through various means, going from more certain to
24775  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24776  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24777  # must check if this is indeed valid; otherwise we'll continue looking.
24778
24779  # Test: Is bootjdk explicitly set by command line arguments?
24780
24781  if test "x$BOOT_JDK_FOUND" = xno; then
24782    # Now execute the test
24783
24784  if test "x$with_boot_jdk" != x; then
24785    BOOT_JDK=$with_boot_jdk
24786    BOOT_JDK_FOUND=maybe
24787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24788$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24789  fi
24790
24791
24792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24794      # Do we have a bin/java?
24795      if test ! -x "$BOOT_JDK/bin/java"; then
24796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24798        BOOT_JDK_FOUND=no
24799      else
24800        # Do we have a bin/javac?
24801        if test ! -x "$BOOT_JDK/bin/javac"; then
24802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24806          BOOT_JDK_FOUND=no
24807        else
24808          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24809          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24810
24811          # Extra M4 quote needed to protect [] in grep expression.
24812          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24813          if test "x$FOUND_CORRECT_VERSION" = x; then
24814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24816            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24818            BOOT_JDK_FOUND=no
24819          else
24820            # We're done! :-)
24821            BOOT_JDK_FOUND=yes
24822
24823  # Only process if variable expands to non-empty
24824
24825  if test "x$BOOT_JDK" != x; then
24826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24827
24828  # Input might be given as Windows format, start by converting to
24829  # unix format.
24830  path="$BOOT_JDK"
24831  new_path=`$CYGPATH -u "$path"`
24832
24833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24836  # "foo.exe" is OK but "foo" is an error.
24837  #
24838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24839  # It is also a way to make sure we got the proper file name for the real test later on.
24840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24841  if test "x$test_shortpath" = x; then
24842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24845  fi
24846
24847  # Call helper function which possibly converts this using DOS-style short mode.
24848  # If so, the updated path is stored in $new_path.
24849
24850  input_path="$new_path"
24851  # Check if we need to convert this using DOS-style short mode. If the path
24852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24853  # take no chances and rewrite it.
24854  # Note: m4 eats our [], so we need to use [ and ] instead.
24855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24856  if test "x$has_forbidden_chars" != x; then
24857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24861      # Going to short mode and back again did indeed matter. Since short mode is
24862      # case insensitive, let's make it lowercase to improve readability.
24863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24864      # Now convert it back to Unix-style (cygpath)
24865      input_path=`$CYGPATH -u "$shortmode_path"`
24866      new_path="$input_path"
24867    fi
24868  fi
24869
24870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24871  if test "x$test_cygdrive_prefix" = x; then
24872    # As a simple fix, exclude /usr/bin since it's not a real path.
24873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24875      # a path prefixed by /cygdrive for fixpath to work.
24876      new_path="$CYGWIN_ROOT_PATH$input_path"
24877    fi
24878  fi
24879
24880
24881  if test "x$path" != "x$new_path"; then
24882    BOOT_JDK="$new_path"
24883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24885  fi
24886
24887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24888
24889  path="$BOOT_JDK"
24890  has_colon=`$ECHO $path | $GREP ^.:`
24891  new_path="$path"
24892  if test "x$has_colon" = x; then
24893    # Not in mixed or Windows style, start by that.
24894    new_path=`cmd //c echo $path`
24895  fi
24896
24897
24898  input_path="$new_path"
24899  # Check if we need to convert this using DOS-style short mode. If the path
24900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24901  # take no chances and rewrite it.
24902  # Note: m4 eats our [], so we need to use [ and ] instead.
24903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24904  if test "x$has_forbidden_chars" != x; then
24905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24907  fi
24908
24909
24910  windows_path="$new_path"
24911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912    unix_path=`$CYGPATH -u "$windows_path"`
24913    new_path="$unix_path"
24914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24916    new_path="$unix_path"
24917  fi
24918
24919  if test "x$path" != "x$new_path"; then
24920    BOOT_JDK="$new_path"
24921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24923  fi
24924
24925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24927
24928    else
24929      # We're on a unix platform. Hooray! :)
24930      path="$BOOT_JDK"
24931      has_space=`$ECHO "$path" | $GREP " "`
24932      if test "x$has_space" != x; then
24933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24936      fi
24937
24938      # Use eval to expand a potential ~
24939      eval path="$path"
24940      if test ! -f "$path" && test ! -d "$path"; then
24941        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24942      fi
24943
24944      if test -d "$path"; then
24945        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24946      else
24947        dir="`$DIRNAME "$path"`"
24948        base="`$BASENAME "$path"`"
24949        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24950      fi
24951    fi
24952  fi
24953
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24955$as_echo_n "checking for Boot JDK... " >&6; }
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24957$as_echo "$BOOT_JDK" >&6; }
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24959$as_echo_n "checking Boot JDK version... " >&6; }
24960            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24962$as_echo "$BOOT_JDK_VERSION" >&6; }
24963          fi # end check jdk version
24964        fi # end check javac
24965      fi # end check java
24966    fi # end check boot jdk found
24967  fi
24968
24969  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24970    # Having specified an argument which is incorrect will produce an instant failure;
24971    # we should not go on looking
24972    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24973  fi
24974
24975  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24976
24977  if test "x$BOOT_JDK_FOUND" = xno; then
24978    # Now execute the test
24979
24980  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24981    # First check at user selected default
24982
24983  if test "x$BOOT_JDK_FOUND" = xno; then
24984    # Now execute the test
24985
24986  if test -x /usr/libexec/java_home; then
24987    BOOT_JDK=`/usr/libexec/java_home `
24988    BOOT_JDK_FOUND=maybe
24989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24990$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24991  fi
24992
24993
24994    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24995    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24996      # Do we have a bin/java?
24997      if test ! -x "$BOOT_JDK/bin/java"; then
24998        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25000        BOOT_JDK_FOUND=no
25001      else
25002        # Do we have a bin/javac?
25003        if test ! -x "$BOOT_JDK/bin/javac"; then
25004          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25006          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25007$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25008          BOOT_JDK_FOUND=no
25009        else
25010          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25011          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25012
25013          # Extra M4 quote needed to protect [] in grep expression.
25014          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25015          if test "x$FOUND_CORRECT_VERSION" = x; then
25016            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25019$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25020            BOOT_JDK_FOUND=no
25021          else
25022            # We're done! :-)
25023            BOOT_JDK_FOUND=yes
25024
25025  # Only process if variable expands to non-empty
25026
25027  if test "x$BOOT_JDK" != x; then
25028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25029
25030  # Input might be given as Windows format, start by converting to
25031  # unix format.
25032  path="$BOOT_JDK"
25033  new_path=`$CYGPATH -u "$path"`
25034
25035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25038  # "foo.exe" is OK but "foo" is an error.
25039  #
25040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25041  # It is also a way to make sure we got the proper file name for the real test later on.
25042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25043  if test "x$test_shortpath" = x; then
25044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25046    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25047  fi
25048
25049  # Call helper function which possibly converts this using DOS-style short mode.
25050  # If so, the updated path is stored in $new_path.
25051
25052  input_path="$new_path"
25053  # Check if we need to convert this using DOS-style short mode. If the path
25054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25055  # take no chances and rewrite it.
25056  # Note: m4 eats our [], so we need to use [ and ] instead.
25057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25058  if test "x$has_forbidden_chars" != x; then
25059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25063      # Going to short mode and back again did indeed matter. Since short mode is
25064      # case insensitive, let's make it lowercase to improve readability.
25065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25066      # Now convert it back to Unix-style (cygpath)
25067      input_path=`$CYGPATH -u "$shortmode_path"`
25068      new_path="$input_path"
25069    fi
25070  fi
25071
25072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25073  if test "x$test_cygdrive_prefix" = x; then
25074    # As a simple fix, exclude /usr/bin since it's not a real path.
25075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25077      # a path prefixed by /cygdrive for fixpath to work.
25078      new_path="$CYGWIN_ROOT_PATH$input_path"
25079    fi
25080  fi
25081
25082
25083  if test "x$path" != "x$new_path"; then
25084    BOOT_JDK="$new_path"
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25087  fi
25088
25089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25090
25091  path="$BOOT_JDK"
25092  has_colon=`$ECHO $path | $GREP ^.:`
25093  new_path="$path"
25094  if test "x$has_colon" = x; then
25095    # Not in mixed or Windows style, start by that.
25096    new_path=`cmd //c echo $path`
25097  fi
25098
25099
25100  input_path="$new_path"
25101  # Check if we need to convert this using DOS-style short mode. If the path
25102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25103  # take no chances and rewrite it.
25104  # Note: m4 eats our [], so we need to use [ and ] instead.
25105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25106  if test "x$has_forbidden_chars" != x; then
25107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25109  fi
25110
25111
25112  windows_path="$new_path"
25113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25114    unix_path=`$CYGPATH -u "$windows_path"`
25115    new_path="$unix_path"
25116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25118    new_path="$unix_path"
25119  fi
25120
25121  if test "x$path" != "x$new_path"; then
25122    BOOT_JDK="$new_path"
25123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25125  fi
25126
25127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25129
25130    else
25131      # We're on a unix platform. Hooray! :)
25132      path="$BOOT_JDK"
25133      has_space=`$ECHO "$path" | $GREP " "`
25134      if test "x$has_space" != x; then
25135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25138      fi
25139
25140      # Use eval to expand a potential ~
25141      eval path="$path"
25142      if test ! -f "$path" && test ! -d "$path"; then
25143        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25144      fi
25145
25146      if test -d "$path"; then
25147        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25148      else
25149        dir="`$DIRNAME "$path"`"
25150        base="`$BASENAME "$path"`"
25151        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25152      fi
25153    fi
25154  fi
25155
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25157$as_echo_n "checking for Boot JDK... " >&6; }
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25159$as_echo "$BOOT_JDK" >&6; }
25160            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25161$as_echo_n "checking Boot JDK version... " >&6; }
25162            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25164$as_echo "$BOOT_JDK_VERSION" >&6; }
25165          fi # end check jdk version
25166        fi # end check javac
25167      fi # end check java
25168    fi # end check boot jdk found
25169  fi
25170
25171    # If that did not work out (e.g. too old), try explicit versions instead
25172
25173  if test "x$BOOT_JDK_FOUND" = xno; then
25174    # Now execute the test
25175
25176  if test -x /usr/libexec/java_home; then
25177    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25178    BOOT_JDK_FOUND=maybe
25179    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25180$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25181  fi
25182
25183
25184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25186      # Do we have a bin/java?
25187      if test ! -x "$BOOT_JDK/bin/java"; then
25188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25190        BOOT_JDK_FOUND=no
25191      else
25192        # Do we have a bin/javac?
25193        if test ! -x "$BOOT_JDK/bin/javac"; then
25194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25198          BOOT_JDK_FOUND=no
25199        else
25200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25202
25203          # Extra M4 quote needed to protect [] in grep expression.
25204          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25205          if test "x$FOUND_CORRECT_VERSION" = x; then
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25210            BOOT_JDK_FOUND=no
25211          else
25212            # We're done! :-)
25213            BOOT_JDK_FOUND=yes
25214
25215  # Only process if variable expands to non-empty
25216
25217  if test "x$BOOT_JDK" != x; then
25218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25219
25220  # Input might be given as Windows format, start by converting to
25221  # unix format.
25222  path="$BOOT_JDK"
25223  new_path=`$CYGPATH -u "$path"`
25224
25225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25228  # "foo.exe" is OK but "foo" is an error.
25229  #
25230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25231  # It is also a way to make sure we got the proper file name for the real test later on.
25232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25233  if test "x$test_shortpath" = x; then
25234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25237  fi
25238
25239  # Call helper function which possibly converts this using DOS-style short mode.
25240  # If so, the updated path is stored in $new_path.
25241
25242  input_path="$new_path"
25243  # Check if we need to convert this using DOS-style short mode. If the path
25244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25245  # take no chances and rewrite it.
25246  # Note: m4 eats our [], so we need to use [ and ] instead.
25247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25248  if test "x$has_forbidden_chars" != x; then
25249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25253      # Going to short mode and back again did indeed matter. Since short mode is
25254      # case insensitive, let's make it lowercase to improve readability.
25255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25256      # Now convert it back to Unix-style (cygpath)
25257      input_path=`$CYGPATH -u "$shortmode_path"`
25258      new_path="$input_path"
25259    fi
25260  fi
25261
25262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25263  if test "x$test_cygdrive_prefix" = x; then
25264    # As a simple fix, exclude /usr/bin since it's not a real path.
25265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25267      # a path prefixed by /cygdrive for fixpath to work.
25268      new_path="$CYGWIN_ROOT_PATH$input_path"
25269    fi
25270  fi
25271
25272
25273  if test "x$path" != "x$new_path"; then
25274    BOOT_JDK="$new_path"
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25277  fi
25278
25279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25280
25281  path="$BOOT_JDK"
25282  has_colon=`$ECHO $path | $GREP ^.:`
25283  new_path="$path"
25284  if test "x$has_colon" = x; then
25285    # Not in mixed or Windows style, start by that.
25286    new_path=`cmd //c echo $path`
25287  fi
25288
25289
25290  input_path="$new_path"
25291  # Check if we need to convert this using DOS-style short mode. If the path
25292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25293  # take no chances and rewrite it.
25294  # Note: m4 eats our [], so we need to use [ and ] instead.
25295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25296  if test "x$has_forbidden_chars" != x; then
25297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25299  fi
25300
25301
25302  windows_path="$new_path"
25303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25304    unix_path=`$CYGPATH -u "$windows_path"`
25305    new_path="$unix_path"
25306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25308    new_path="$unix_path"
25309  fi
25310
25311  if test "x$path" != "x$new_path"; then
25312    BOOT_JDK="$new_path"
25313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25315  fi
25316
25317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25319
25320    else
25321      # We're on a unix platform. Hooray! :)
25322      path="$BOOT_JDK"
25323      has_space=`$ECHO "$path" | $GREP " "`
25324      if test "x$has_space" != x; then
25325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25328      fi
25329
25330      # Use eval to expand a potential ~
25331      eval path="$path"
25332      if test ! -f "$path" && test ! -d "$path"; then
25333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25334      fi
25335
25336      if test -d "$path"; then
25337        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25338      else
25339        dir="`$DIRNAME "$path"`"
25340        base="`$BASENAME "$path"`"
25341        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25342      fi
25343    fi
25344  fi
25345
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25347$as_echo_n "checking for Boot JDK... " >&6; }
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25349$as_echo "$BOOT_JDK" >&6; }
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25351$as_echo_n "checking Boot JDK version... " >&6; }
25352            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25354$as_echo "$BOOT_JDK_VERSION" >&6; }
25355          fi # end check jdk version
25356        fi # end check javac
25357      fi # end check java
25358    fi # end check boot jdk found
25359  fi
25360
25361
25362  if test "x$BOOT_JDK_FOUND" = xno; then
25363    # Now execute the test
25364
25365  if test -x /usr/libexec/java_home; then
25366    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25367    BOOT_JDK_FOUND=maybe
25368    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25369$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25370  fi
25371
25372
25373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25375      # Do we have a bin/java?
25376      if test ! -x "$BOOT_JDK/bin/java"; then
25377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25379        BOOT_JDK_FOUND=no
25380      else
25381        # Do we have a bin/javac?
25382        if test ! -x "$BOOT_JDK/bin/javac"; then
25383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25387          BOOT_JDK_FOUND=no
25388        else
25389          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25390          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25391
25392          # Extra M4 quote needed to protect [] in grep expression.
25393          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25394          if test "x$FOUND_CORRECT_VERSION" = x; then
25395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25397            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25398$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25399            BOOT_JDK_FOUND=no
25400          else
25401            # We're done! :-)
25402            BOOT_JDK_FOUND=yes
25403
25404  # Only process if variable expands to non-empty
25405
25406  if test "x$BOOT_JDK" != x; then
25407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25408
25409  # Input might be given as Windows format, start by converting to
25410  # unix format.
25411  path="$BOOT_JDK"
25412  new_path=`$CYGPATH -u "$path"`
25413
25414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25417  # "foo.exe" is OK but "foo" is an error.
25418  #
25419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25420  # It is also a way to make sure we got the proper file name for the real test later on.
25421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25422  if test "x$test_shortpath" = x; then
25423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25426  fi
25427
25428  # Call helper function which possibly converts this using DOS-style short mode.
25429  # If so, the updated path is stored in $new_path.
25430
25431  input_path="$new_path"
25432  # Check if we need to convert this using DOS-style short mode. If the path
25433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25434  # take no chances and rewrite it.
25435  # Note: m4 eats our [], so we need to use [ and ] instead.
25436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25437  if test "x$has_forbidden_chars" != x; then
25438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25442      # Going to short mode and back again did indeed matter. Since short mode is
25443      # case insensitive, let's make it lowercase to improve readability.
25444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25445      # Now convert it back to Unix-style (cygpath)
25446      input_path=`$CYGPATH -u "$shortmode_path"`
25447      new_path="$input_path"
25448    fi
25449  fi
25450
25451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25452  if test "x$test_cygdrive_prefix" = x; then
25453    # As a simple fix, exclude /usr/bin since it's not a real path.
25454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25456      # a path prefixed by /cygdrive for fixpath to work.
25457      new_path="$CYGWIN_ROOT_PATH$input_path"
25458    fi
25459  fi
25460
25461
25462  if test "x$path" != "x$new_path"; then
25463    BOOT_JDK="$new_path"
25464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25466  fi
25467
25468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25469
25470  path="$BOOT_JDK"
25471  has_colon=`$ECHO $path | $GREP ^.:`
25472  new_path="$path"
25473  if test "x$has_colon" = x; then
25474    # Not in mixed or Windows style, start by that.
25475    new_path=`cmd //c echo $path`
25476  fi
25477
25478
25479  input_path="$new_path"
25480  # Check if we need to convert this using DOS-style short mode. If the path
25481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25482  # take no chances and rewrite it.
25483  # Note: m4 eats our [], so we need to use [ and ] instead.
25484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25485  if test "x$has_forbidden_chars" != x; then
25486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25488  fi
25489
25490
25491  windows_path="$new_path"
25492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25493    unix_path=`$CYGPATH -u "$windows_path"`
25494    new_path="$unix_path"
25495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25497    new_path="$unix_path"
25498  fi
25499
25500  if test "x$path" != "x$new_path"; then
25501    BOOT_JDK="$new_path"
25502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25504  fi
25505
25506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25508
25509    else
25510      # We're on a unix platform. Hooray! :)
25511      path="$BOOT_JDK"
25512      has_space=`$ECHO "$path" | $GREP " "`
25513      if test "x$has_space" != x; then
25514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25517      fi
25518
25519      # Use eval to expand a potential ~
25520      eval path="$path"
25521      if test ! -f "$path" && test ! -d "$path"; then
25522        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25523      fi
25524
25525      if test -d "$path"; then
25526        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25527      else
25528        dir="`$DIRNAME "$path"`"
25529        base="`$BASENAME "$path"`"
25530        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25531      fi
25532    fi
25533  fi
25534
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25536$as_echo_n "checking for Boot JDK... " >&6; }
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25538$as_echo "$BOOT_JDK" >&6; }
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25540$as_echo_n "checking Boot JDK version... " >&6; }
25541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25543$as_echo "$BOOT_JDK_VERSION" >&6; }
25544          fi # end check jdk version
25545        fi # end check javac
25546      fi # end check java
25547    fi # end check boot jdk found
25548  fi
25549
25550
25551  if test "x$BOOT_JDK_FOUND" = xno; then
25552    # Now execute the test
25553
25554  if test -x /usr/libexec/java_home; then
25555    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25556    BOOT_JDK_FOUND=maybe
25557    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25558$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25559  fi
25560
25561
25562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25564      # Do we have a bin/java?
25565      if test ! -x "$BOOT_JDK/bin/java"; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25568        BOOT_JDK_FOUND=no
25569      else
25570        # Do we have a bin/javac?
25571        if test ! -x "$BOOT_JDK/bin/javac"; then
25572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25576          BOOT_JDK_FOUND=no
25577        else
25578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25580
25581          # Extra M4 quote needed to protect [] in grep expression.
25582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25583          if test "x$FOUND_CORRECT_VERSION" = x; then
25584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25588            BOOT_JDK_FOUND=no
25589          else
25590            # We're done! :-)
25591            BOOT_JDK_FOUND=yes
25592
25593  # Only process if variable expands to non-empty
25594
25595  if test "x$BOOT_JDK" != x; then
25596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25597
25598  # Input might be given as Windows format, start by converting to
25599  # unix format.
25600  path="$BOOT_JDK"
25601  new_path=`$CYGPATH -u "$path"`
25602
25603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25606  # "foo.exe" is OK but "foo" is an error.
25607  #
25608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25609  # It is also a way to make sure we got the proper file name for the real test later on.
25610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25611  if test "x$test_shortpath" = x; then
25612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25615  fi
25616
25617  # Call helper function which possibly converts this using DOS-style short mode.
25618  # If so, the updated path is stored in $new_path.
25619
25620  input_path="$new_path"
25621  # Check if we need to convert this using DOS-style short mode. If the path
25622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25623  # take no chances and rewrite it.
25624  # Note: m4 eats our [], so we need to use [ and ] instead.
25625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25626  if test "x$has_forbidden_chars" != x; then
25627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25631      # Going to short mode and back again did indeed matter. Since short mode is
25632      # case insensitive, let's make it lowercase to improve readability.
25633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25634      # Now convert it back to Unix-style (cygpath)
25635      input_path=`$CYGPATH -u "$shortmode_path"`
25636      new_path="$input_path"
25637    fi
25638  fi
25639
25640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25641  if test "x$test_cygdrive_prefix" = x; then
25642    # As a simple fix, exclude /usr/bin since it's not a real path.
25643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25645      # a path prefixed by /cygdrive for fixpath to work.
25646      new_path="$CYGWIN_ROOT_PATH$input_path"
25647    fi
25648  fi
25649
25650
25651  if test "x$path" != "x$new_path"; then
25652    BOOT_JDK="$new_path"
25653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25655  fi
25656
25657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25658
25659  path="$BOOT_JDK"
25660  has_colon=`$ECHO $path | $GREP ^.:`
25661  new_path="$path"
25662  if test "x$has_colon" = x; then
25663    # Not in mixed or Windows style, start by that.
25664    new_path=`cmd //c echo $path`
25665  fi
25666
25667
25668  input_path="$new_path"
25669  # Check if we need to convert this using DOS-style short mode. If the path
25670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25671  # take no chances and rewrite it.
25672  # Note: m4 eats our [], so we need to use [ and ] instead.
25673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25674  if test "x$has_forbidden_chars" != x; then
25675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25677  fi
25678
25679
25680  windows_path="$new_path"
25681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25682    unix_path=`$CYGPATH -u "$windows_path"`
25683    new_path="$unix_path"
25684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25686    new_path="$unix_path"
25687  fi
25688
25689  if test "x$path" != "x$new_path"; then
25690    BOOT_JDK="$new_path"
25691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25693  fi
25694
25695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25697
25698    else
25699      # We're on a unix platform. Hooray! :)
25700      path="$BOOT_JDK"
25701      has_space=`$ECHO "$path" | $GREP " "`
25702      if test "x$has_space" != x; then
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25706      fi
25707
25708      # Use eval to expand a potential ~
25709      eval path="$path"
25710      if test ! -f "$path" && test ! -d "$path"; then
25711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25712      fi
25713
25714      if test -d "$path"; then
25715        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25716      else
25717        dir="`$DIRNAME "$path"`"
25718        base="`$BASENAME "$path"`"
25719        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25720      fi
25721    fi
25722  fi
25723
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25725$as_echo_n "checking for Boot JDK... " >&6; }
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25727$as_echo "$BOOT_JDK" >&6; }
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25729$as_echo_n "checking Boot JDK version... " >&6; }
25730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25732$as_echo "$BOOT_JDK_VERSION" >&6; }
25733          fi # end check jdk version
25734        fi # end check javac
25735      fi # end check java
25736    fi # end check boot jdk found
25737  fi
25738
25739  fi
25740
25741
25742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25744      # Do we have a bin/java?
25745      if test ! -x "$BOOT_JDK/bin/java"; then
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25748        BOOT_JDK_FOUND=no
25749      else
25750        # Do we have a bin/javac?
25751        if test ! -x "$BOOT_JDK/bin/javac"; then
25752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25756          BOOT_JDK_FOUND=no
25757        else
25758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25760
25761          # Extra M4 quote needed to protect [] in grep expression.
25762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25763          if test "x$FOUND_CORRECT_VERSION" = x; then
25764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25768            BOOT_JDK_FOUND=no
25769          else
25770            # We're done! :-)
25771            BOOT_JDK_FOUND=yes
25772
25773  # Only process if variable expands to non-empty
25774
25775  if test "x$BOOT_JDK" != x; then
25776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25777
25778  # Input might be given as Windows format, start by converting to
25779  # unix format.
25780  path="$BOOT_JDK"
25781  new_path=`$CYGPATH -u "$path"`
25782
25783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25786  # "foo.exe" is OK but "foo" is an error.
25787  #
25788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25789  # It is also a way to make sure we got the proper file name for the real test later on.
25790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25791  if test "x$test_shortpath" = x; then
25792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25795  fi
25796
25797  # Call helper function which possibly converts this using DOS-style short mode.
25798  # If so, the updated path is stored in $new_path.
25799
25800  input_path="$new_path"
25801  # Check if we need to convert this using DOS-style short mode. If the path
25802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25803  # take no chances and rewrite it.
25804  # Note: m4 eats our [], so we need to use [ and ] instead.
25805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25806  if test "x$has_forbidden_chars" != x; then
25807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25811      # Going to short mode and back again did indeed matter. Since short mode is
25812      # case insensitive, let's make it lowercase to improve readability.
25813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25814      # Now convert it back to Unix-style (cygpath)
25815      input_path=`$CYGPATH -u "$shortmode_path"`
25816      new_path="$input_path"
25817    fi
25818  fi
25819
25820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25821  if test "x$test_cygdrive_prefix" = x; then
25822    # As a simple fix, exclude /usr/bin since it's not a real path.
25823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25825      # a path prefixed by /cygdrive for fixpath to work.
25826      new_path="$CYGWIN_ROOT_PATH$input_path"
25827    fi
25828  fi
25829
25830
25831  if test "x$path" != "x$new_path"; then
25832    BOOT_JDK="$new_path"
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25835  fi
25836
25837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25838
25839  path="$BOOT_JDK"
25840  has_colon=`$ECHO $path | $GREP ^.:`
25841  new_path="$path"
25842  if test "x$has_colon" = x; then
25843    # Not in mixed or Windows style, start by that.
25844    new_path=`cmd //c echo $path`
25845  fi
25846
25847
25848  input_path="$new_path"
25849  # Check if we need to convert this using DOS-style short mode. If the path
25850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25851  # take no chances and rewrite it.
25852  # Note: m4 eats our [], so we need to use [ and ] instead.
25853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25854  if test "x$has_forbidden_chars" != x; then
25855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25857  fi
25858
25859
25860  windows_path="$new_path"
25861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862    unix_path=`$CYGPATH -u "$windows_path"`
25863    new_path="$unix_path"
25864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25866    new_path="$unix_path"
25867  fi
25868
25869  if test "x$path" != "x$new_path"; then
25870    BOOT_JDK="$new_path"
25871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25873  fi
25874
25875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25877
25878    else
25879      # We're on a unix platform. Hooray! :)
25880      path="$BOOT_JDK"
25881      has_space=`$ECHO "$path" | $GREP " "`
25882      if test "x$has_space" != x; then
25883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25886      fi
25887
25888      # Use eval to expand a potential ~
25889      eval path="$path"
25890      if test ! -f "$path" && test ! -d "$path"; then
25891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25892      fi
25893
25894      if test -d "$path"; then
25895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25896      else
25897        dir="`$DIRNAME "$path"`"
25898        base="`$BASENAME "$path"`"
25899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25900      fi
25901    fi
25902  fi
25903
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25905$as_echo_n "checking for Boot JDK... " >&6; }
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25907$as_echo "$BOOT_JDK" >&6; }
25908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25909$as_echo_n "checking Boot JDK version... " >&6; }
25910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25912$as_echo "$BOOT_JDK_VERSION" >&6; }
25913          fi # end check jdk version
25914        fi # end check javac
25915      fi # end check java
25916    fi # end check boot jdk found
25917  fi
25918
25919
25920  # Test: Is $JAVA_HOME set?
25921
25922  if test "x$BOOT_JDK_FOUND" = xno; then
25923    # Now execute the test
25924
25925  if test "x$JAVA_HOME" != x; then
25926    JAVA_HOME_PROCESSED="$JAVA_HOME"
25927
25928  # Only process if variable expands to non-empty
25929
25930  if test "x$JAVA_HOME_PROCESSED" != x; then
25931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25932
25933  # Input might be given as Windows format, start by converting to
25934  # unix format.
25935  path="$JAVA_HOME_PROCESSED"
25936  new_path=`$CYGPATH -u "$path"`
25937
25938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25941  # "foo.exe" is OK but "foo" is an error.
25942  #
25943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25944  # It is also a way to make sure we got the proper file name for the real test later on.
25945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25946  if test "x$test_shortpath" = x; then
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25948$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25949    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25950  fi
25951
25952  # Call helper function which possibly converts this using DOS-style short mode.
25953  # If so, the updated path is stored in $new_path.
25954
25955  input_path="$new_path"
25956  # Check if we need to convert this using DOS-style short mode. If the path
25957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25958  # take no chances and rewrite it.
25959  # Note: m4 eats our [], so we need to use [ and ] instead.
25960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25961  if test "x$has_forbidden_chars" != x; then
25962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25966      # Going to short mode and back again did indeed matter. Since short mode is
25967      # case insensitive, let's make it lowercase to improve readability.
25968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25969      # Now convert it back to Unix-style (cygpath)
25970      input_path=`$CYGPATH -u "$shortmode_path"`
25971      new_path="$input_path"
25972    fi
25973  fi
25974
25975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25976  if test "x$test_cygdrive_prefix" = x; then
25977    # As a simple fix, exclude /usr/bin since it's not a real path.
25978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25980      # a path prefixed by /cygdrive for fixpath to work.
25981      new_path="$CYGWIN_ROOT_PATH$input_path"
25982    fi
25983  fi
25984
25985
25986  if test "x$path" != "x$new_path"; then
25987    JAVA_HOME_PROCESSED="$new_path"
25988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25989$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25990  fi
25991
25992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25993
25994  path="$JAVA_HOME_PROCESSED"
25995  has_colon=`$ECHO $path | $GREP ^.:`
25996  new_path="$path"
25997  if test "x$has_colon" = x; then
25998    # Not in mixed or Windows style, start by that.
25999    new_path=`cmd //c echo $path`
26000  fi
26001
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012  fi
26013
26014
26015  windows_path="$new_path"
26016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26017    unix_path=`$CYGPATH -u "$windows_path"`
26018    new_path="$unix_path"
26019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26021    new_path="$unix_path"
26022  fi
26023
26024  if test "x$path" != "x$new_path"; then
26025    JAVA_HOME_PROCESSED="$new_path"
26026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26027$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26028  fi
26029
26030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26032
26033    else
26034      # We're on a unix platform. Hooray! :)
26035      path="$JAVA_HOME_PROCESSED"
26036      has_space=`$ECHO "$path" | $GREP " "`
26037      if test "x$has_space" != x; then
26038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26039$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26040        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26041      fi
26042
26043      # Use eval to expand a potential ~
26044      eval path="$path"
26045      if test ! -f "$path" && test ! -d "$path"; then
26046        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26047      fi
26048
26049      if test -d "$path"; then
26050        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26051      else
26052        dir="`$DIRNAME "$path"`"
26053        base="`$BASENAME "$path"`"
26054        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26055      fi
26056    fi
26057  fi
26058
26059    if test ! -d "$JAVA_HOME_PROCESSED"; then
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26061$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26062    else
26063      # Aha, the user has set a JAVA_HOME
26064      # let us use that as the Boot JDK.
26065      BOOT_JDK="$JAVA_HOME_PROCESSED"
26066      BOOT_JDK_FOUND=maybe
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26068$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26069    fi
26070  fi
26071
26072
26073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26075      # Do we have a bin/java?
26076      if test ! -x "$BOOT_JDK/bin/java"; then
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26079        BOOT_JDK_FOUND=no
26080      else
26081        # Do we have a bin/javac?
26082        if test ! -x "$BOOT_JDK/bin/javac"; then
26083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26087          BOOT_JDK_FOUND=no
26088        else
26089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26091
26092          # Extra M4 quote needed to protect [] in grep expression.
26093          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26094          if test "x$FOUND_CORRECT_VERSION" = x; then
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26099            BOOT_JDK_FOUND=no
26100          else
26101            # We're done! :-)
26102            BOOT_JDK_FOUND=yes
26103
26104  # Only process if variable expands to non-empty
26105
26106  if test "x$BOOT_JDK" != x; then
26107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26108
26109  # Input might be given as Windows format, start by converting to
26110  # unix format.
26111  path="$BOOT_JDK"
26112  new_path=`$CYGPATH -u "$path"`
26113
26114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26117  # "foo.exe" is OK but "foo" is an error.
26118  #
26119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26120  # It is also a way to make sure we got the proper file name for the real test later on.
26121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26122  if test "x$test_shortpath" = x; then
26123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26126  fi
26127
26128  # Call helper function which possibly converts this using DOS-style short mode.
26129  # If so, the updated path is stored in $new_path.
26130
26131  input_path="$new_path"
26132  # Check if we need to convert this using DOS-style short mode. If the path
26133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26134  # take no chances and rewrite it.
26135  # Note: m4 eats our [], so we need to use [ and ] instead.
26136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26137  if test "x$has_forbidden_chars" != x; then
26138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26142      # Going to short mode and back again did indeed matter. Since short mode is
26143      # case insensitive, let's make it lowercase to improve readability.
26144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26145      # Now convert it back to Unix-style (cygpath)
26146      input_path=`$CYGPATH -u "$shortmode_path"`
26147      new_path="$input_path"
26148    fi
26149  fi
26150
26151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26152  if test "x$test_cygdrive_prefix" = x; then
26153    # As a simple fix, exclude /usr/bin since it's not a real path.
26154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26156      # a path prefixed by /cygdrive for fixpath to work.
26157      new_path="$CYGWIN_ROOT_PATH$input_path"
26158    fi
26159  fi
26160
26161
26162  if test "x$path" != "x$new_path"; then
26163    BOOT_JDK="$new_path"
26164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26166  fi
26167
26168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26169
26170  path="$BOOT_JDK"
26171  has_colon=`$ECHO $path | $GREP ^.:`
26172  new_path="$path"
26173  if test "x$has_colon" = x; then
26174    # Not in mixed or Windows style, start by that.
26175    new_path=`cmd //c echo $path`
26176  fi
26177
26178
26179  input_path="$new_path"
26180  # Check if we need to convert this using DOS-style short mode. If the path
26181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26182  # take no chances and rewrite it.
26183  # Note: m4 eats our [], so we need to use [ and ] instead.
26184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26185  if test "x$has_forbidden_chars" != x; then
26186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26188  fi
26189
26190
26191  windows_path="$new_path"
26192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26193    unix_path=`$CYGPATH -u "$windows_path"`
26194    new_path="$unix_path"
26195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26197    new_path="$unix_path"
26198  fi
26199
26200  if test "x$path" != "x$new_path"; then
26201    BOOT_JDK="$new_path"
26202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26204  fi
26205
26206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26208
26209    else
26210      # We're on a unix platform. Hooray! :)
26211      path="$BOOT_JDK"
26212      has_space=`$ECHO "$path" | $GREP " "`
26213      if test "x$has_space" != x; then
26214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26217      fi
26218
26219      # Use eval to expand a potential ~
26220      eval path="$path"
26221      if test ! -f "$path" && test ! -d "$path"; then
26222        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26223      fi
26224
26225      if test -d "$path"; then
26226        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26227      else
26228        dir="`$DIRNAME "$path"`"
26229        base="`$BASENAME "$path"`"
26230        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26231      fi
26232    fi
26233  fi
26234
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26236$as_echo_n "checking for Boot JDK... " >&6; }
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26238$as_echo "$BOOT_JDK" >&6; }
26239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26240$as_echo_n "checking Boot JDK version... " >&6; }
26241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26243$as_echo "$BOOT_JDK_VERSION" >&6; }
26244          fi # end check jdk version
26245        fi # end check javac
26246      fi # end check java
26247    fi # end check boot jdk found
26248  fi
26249
26250
26251  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26252
26253  if test "x$BOOT_JDK_FOUND" = xno; then
26254    # Now execute the test
26255
26256  # Extract the first word of "javac", so it can be a program name with args.
26257set dummy javac; ac_word=$2
26258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26259$as_echo_n "checking for $ac_word... " >&6; }
26260if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26261  $as_echo_n "(cached) " >&6
26262else
26263  case $JAVAC_CHECK in
26264  [\\/]* | ?:[\\/]*)
26265  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26266  ;;
26267  *)
26268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26269for as_dir in $PATH
26270do
26271  IFS=$as_save_IFS
26272  test -z "$as_dir" && as_dir=.
26273    for ac_exec_ext in '' $ac_executable_extensions; do
26274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26275    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26277    break 2
26278  fi
26279done
26280  done
26281IFS=$as_save_IFS
26282
26283  ;;
26284esac
26285fi
26286JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26287if test -n "$JAVAC_CHECK"; then
26288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26289$as_echo "$JAVAC_CHECK" >&6; }
26290else
26291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26292$as_echo "no" >&6; }
26293fi
26294
26295
26296  # Extract the first word of "java", so it can be a program name with args.
26297set dummy java; ac_word=$2
26298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26299$as_echo_n "checking for $ac_word... " >&6; }
26300if ${ac_cv_path_JAVA_CHECK+:} false; then :
26301  $as_echo_n "(cached) " >&6
26302else
26303  case $JAVA_CHECK in
26304  [\\/]* | ?:[\\/]*)
26305  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26306  ;;
26307  *)
26308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26309for as_dir in $PATH
26310do
26311  IFS=$as_save_IFS
26312  test -z "$as_dir" && as_dir=.
26313    for ac_exec_ext in '' $ac_executable_extensions; do
26314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26315    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26317    break 2
26318  fi
26319done
26320  done
26321IFS=$as_save_IFS
26322
26323  ;;
26324esac
26325fi
26326JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26327if test -n "$JAVA_CHECK"; then
26328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26329$as_echo "$JAVA_CHECK" >&6; }
26330else
26331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26332$as_echo "no" >&6; }
26333fi
26334
26335
26336  BINARY="$JAVAC_CHECK"
26337  if test "x$JAVAC_CHECK" = x; then
26338    BINARY="$JAVA_CHECK"
26339  fi
26340  if test "x$BINARY" != x; then
26341    # So there is a java(c) binary, it might be part of a JDK.
26342    # Lets find the JDK/JRE directory by following symbolic links.
26343    # Linux/GNU systems often have links from /usr/bin/java to
26344    # /etc/alternatives/java to the real JDK binary.
26345
26346  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26347    # Follow a chain of symbolic links. Use readlink
26348    # where it exists, else fall back to horribly
26349    # complicated shell code.
26350    if test "x$READLINK_TESTED" != yes; then
26351      # On MacOSX there is a readlink tool with a different
26352      # purpose than the GNU readlink tool. Check the found readlink.
26353      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26354      if test "x$ISGNU" = x; then
26355        # A readlink that we do not know how to use.
26356        # Are there other non-GNU readlinks out there?
26357        READLINK_TESTED=yes
26358        READLINK=
26359      fi
26360    fi
26361
26362    if test "x$READLINK" != x; then
26363      BINARY=`$READLINK -f $BINARY`
26364    else
26365      # Save the current directory for restoring afterwards
26366      STARTDIR=$PWD
26367      COUNTER=0
26368      sym_link_dir=`$DIRNAME $BINARY`
26369      sym_link_file=`$BASENAME $BINARY`
26370      cd $sym_link_dir
26371      # Use -P flag to resolve symlinks in directories.
26372      cd `$THEPWDCMD -P`
26373      sym_link_dir=`$THEPWDCMD -P`
26374      # Resolve file symlinks
26375      while test $COUNTER -lt 20; do
26376        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26377        if test "x$ISLINK" == x; then
26378          # This is not a symbolic link! We are done!
26379          break
26380        fi
26381        # Again resolve directory symlinks since the target of the just found
26382        # link could be in a different directory
26383        cd `$DIRNAME $ISLINK`
26384        sym_link_dir=`$THEPWDCMD -P`
26385        sym_link_file=`$BASENAME $ISLINK`
26386        let COUNTER=COUNTER+1
26387      done
26388      cd $STARTDIR
26389      BINARY=$sym_link_dir/$sym_link_file
26390    fi
26391  fi
26392
26393    BOOT_JDK=`dirname "$BINARY"`
26394    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26395    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26396      # Looks like we found ourselves an JDK
26397      BOOT_JDK_FOUND=maybe
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26399$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26400    fi
26401  fi
26402
26403
26404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26406      # Do we have a bin/java?
26407      if test ! -x "$BOOT_JDK/bin/java"; then
26408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26410        BOOT_JDK_FOUND=no
26411      else
26412        # Do we have a bin/javac?
26413        if test ! -x "$BOOT_JDK/bin/javac"; then
26414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26418          BOOT_JDK_FOUND=no
26419        else
26420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26422
26423          # Extra M4 quote needed to protect [] in grep expression.
26424          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26425          if test "x$FOUND_CORRECT_VERSION" = x; then
26426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26430            BOOT_JDK_FOUND=no
26431          else
26432            # We're done! :-)
26433            BOOT_JDK_FOUND=yes
26434
26435  # Only process if variable expands to non-empty
26436
26437  if test "x$BOOT_JDK" != x; then
26438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26439
26440  # Input might be given as Windows format, start by converting to
26441  # unix format.
26442  path="$BOOT_JDK"
26443  new_path=`$CYGPATH -u "$path"`
26444
26445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26448  # "foo.exe" is OK but "foo" is an error.
26449  #
26450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26451  # It is also a way to make sure we got the proper file name for the real test later on.
26452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26453  if test "x$test_shortpath" = x; then
26454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26457  fi
26458
26459  # Call helper function which possibly converts this using DOS-style short mode.
26460  # If so, the updated path is stored in $new_path.
26461
26462  input_path="$new_path"
26463  # Check if we need to convert this using DOS-style short mode. If the path
26464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26465  # take no chances and rewrite it.
26466  # Note: m4 eats our [], so we need to use [ and ] instead.
26467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26468  if test "x$has_forbidden_chars" != x; then
26469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26473      # Going to short mode and back again did indeed matter. Since short mode is
26474      # case insensitive, let's make it lowercase to improve readability.
26475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26476      # Now convert it back to Unix-style (cygpath)
26477      input_path=`$CYGPATH -u "$shortmode_path"`
26478      new_path="$input_path"
26479    fi
26480  fi
26481
26482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26483  if test "x$test_cygdrive_prefix" = x; then
26484    # As a simple fix, exclude /usr/bin since it's not a real path.
26485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26487      # a path prefixed by /cygdrive for fixpath to work.
26488      new_path="$CYGWIN_ROOT_PATH$input_path"
26489    fi
26490  fi
26491
26492
26493  if test "x$path" != "x$new_path"; then
26494    BOOT_JDK="$new_path"
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26497  fi
26498
26499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26500
26501  path="$BOOT_JDK"
26502  has_colon=`$ECHO $path | $GREP ^.:`
26503  new_path="$path"
26504  if test "x$has_colon" = x; then
26505    # Not in mixed or Windows style, start by that.
26506    new_path=`cmd //c echo $path`
26507  fi
26508
26509
26510  input_path="$new_path"
26511  # Check if we need to convert this using DOS-style short mode. If the path
26512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26513  # take no chances and rewrite it.
26514  # Note: m4 eats our [], so we need to use [ and ] instead.
26515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26516  if test "x$has_forbidden_chars" != x; then
26517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26519  fi
26520
26521
26522  windows_path="$new_path"
26523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26524    unix_path=`$CYGPATH -u "$windows_path"`
26525    new_path="$unix_path"
26526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26528    new_path="$unix_path"
26529  fi
26530
26531  if test "x$path" != "x$new_path"; then
26532    BOOT_JDK="$new_path"
26533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26535  fi
26536
26537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26539
26540    else
26541      # We're on a unix platform. Hooray! :)
26542      path="$BOOT_JDK"
26543      has_space=`$ECHO "$path" | $GREP " "`
26544      if test "x$has_space" != x; then
26545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26548      fi
26549
26550      # Use eval to expand a potential ~
26551      eval path="$path"
26552      if test ! -f "$path" && test ! -d "$path"; then
26553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26554      fi
26555
26556      if test -d "$path"; then
26557        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26558      else
26559        dir="`$DIRNAME "$path"`"
26560        base="`$BASENAME "$path"`"
26561        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26562      fi
26563    fi
26564  fi
26565
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26567$as_echo_n "checking for Boot JDK... " >&6; }
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26569$as_echo "$BOOT_JDK" >&6; }
26570            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26571$as_echo_n "checking Boot JDK version... " >&6; }
26572            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26574$as_echo "$BOOT_JDK_VERSION" >&6; }
26575          fi # end check jdk version
26576        fi # end check javac
26577      fi # end check java
26578    fi # end check boot jdk found
26579  fi
26580
26581
26582  # Test: Is there a JDK installed in default, well-known locations?
26583
26584  if test "x$BOOT_JDK_FOUND" = xno; then
26585    # Now execute the test
26586
26587  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26588
26589  if test "x$BOOT_JDK_FOUND" = xno; then
26590    # Now execute the test
26591
26592  if test "x$ProgramW6432" != x; then
26593    VIRTUAL_DIR="$ProgramW6432/Java"
26594
26595  windows_path="$VIRTUAL_DIR"
26596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26597    unix_path=`$CYGPATH -u "$windows_path"`
26598    VIRTUAL_DIR="$unix_path"
26599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26601    VIRTUAL_DIR="$unix_path"
26602  fi
26603
26604
26605  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26606  BOOT_JDK_SUFFIX=""
26607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26608  if test "x$ALL_JDKS_FOUND" != x; then
26609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26610
26611  if test "x$BOOT_JDK_FOUND" = xno; then
26612    # Now execute the test
26613
26614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26615        if test -d "$BOOT_JDK"; then
26616          BOOT_JDK_FOUND=maybe
26617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26619        fi
26620
26621
26622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26624      # Do we have a bin/java?
26625      if test ! -x "$BOOT_JDK/bin/java"; then
26626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26628        BOOT_JDK_FOUND=no
26629      else
26630        # Do we have a bin/javac?
26631        if test ! -x "$BOOT_JDK/bin/javac"; then
26632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26636          BOOT_JDK_FOUND=no
26637        else
26638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26640
26641          # Extra M4 quote needed to protect [] in grep expression.
26642          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26643          if test "x$FOUND_CORRECT_VERSION" = x; then
26644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26648            BOOT_JDK_FOUND=no
26649          else
26650            # We're done! :-)
26651            BOOT_JDK_FOUND=yes
26652
26653  # Only process if variable expands to non-empty
26654
26655  if test "x$BOOT_JDK" != x; then
26656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26657
26658  # Input might be given as Windows format, start by converting to
26659  # unix format.
26660  path="$BOOT_JDK"
26661  new_path=`$CYGPATH -u "$path"`
26662
26663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26666  # "foo.exe" is OK but "foo" is an error.
26667  #
26668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26669  # It is also a way to make sure we got the proper file name for the real test later on.
26670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26671  if test "x$test_shortpath" = x; then
26672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26675  fi
26676
26677  # Call helper function which possibly converts this using DOS-style short mode.
26678  # If so, the updated path is stored in $new_path.
26679
26680  input_path="$new_path"
26681  # Check if we need to convert this using DOS-style short mode. If the path
26682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26683  # take no chances and rewrite it.
26684  # Note: m4 eats our [], so we need to use [ and ] instead.
26685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26686  if test "x$has_forbidden_chars" != x; then
26687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26691      # Going to short mode and back again did indeed matter. Since short mode is
26692      # case insensitive, let's make it lowercase to improve readability.
26693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26694      # Now convert it back to Unix-style (cygpath)
26695      input_path=`$CYGPATH -u "$shortmode_path"`
26696      new_path="$input_path"
26697    fi
26698  fi
26699
26700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26701  if test "x$test_cygdrive_prefix" = x; then
26702    # As a simple fix, exclude /usr/bin since it's not a real path.
26703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26705      # a path prefixed by /cygdrive for fixpath to work.
26706      new_path="$CYGWIN_ROOT_PATH$input_path"
26707    fi
26708  fi
26709
26710
26711  if test "x$path" != "x$new_path"; then
26712    BOOT_JDK="$new_path"
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26715  fi
26716
26717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26718
26719  path="$BOOT_JDK"
26720  has_colon=`$ECHO $path | $GREP ^.:`
26721  new_path="$path"
26722  if test "x$has_colon" = x; then
26723    # Not in mixed or Windows style, start by that.
26724    new_path=`cmd //c echo $path`
26725  fi
26726
26727
26728  input_path="$new_path"
26729  # Check if we need to convert this using DOS-style short mode. If the path
26730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26731  # take no chances and rewrite it.
26732  # Note: m4 eats our [], so we need to use [ and ] instead.
26733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26734  if test "x$has_forbidden_chars" != x; then
26735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26737  fi
26738
26739
26740  windows_path="$new_path"
26741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742    unix_path=`$CYGPATH -u "$windows_path"`
26743    new_path="$unix_path"
26744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26746    new_path="$unix_path"
26747  fi
26748
26749  if test "x$path" != "x$new_path"; then
26750    BOOT_JDK="$new_path"
26751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26753  fi
26754
26755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26757
26758    else
26759      # We're on a unix platform. Hooray! :)
26760      path="$BOOT_JDK"
26761      has_space=`$ECHO "$path" | $GREP " "`
26762      if test "x$has_space" != x; then
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26766      fi
26767
26768      # Use eval to expand a potential ~
26769      eval path="$path"
26770      if test ! -f "$path" && test ! -d "$path"; then
26771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26772      fi
26773
26774      if test -d "$path"; then
26775        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26776      else
26777        dir="`$DIRNAME "$path"`"
26778        base="`$BASENAME "$path"`"
26779        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26780      fi
26781    fi
26782  fi
26783
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26785$as_echo_n "checking for Boot JDK... " >&6; }
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26787$as_echo "$BOOT_JDK" >&6; }
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26789$as_echo_n "checking Boot JDK version... " >&6; }
26790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26792$as_echo "$BOOT_JDK_VERSION" >&6; }
26793          fi # end check jdk version
26794        fi # end check javac
26795      fi # end check java
26796    fi # end check boot jdk found
26797  fi
26798
26799    done
26800  fi
26801
26802  fi
26803
26804
26805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26807      # Do we have a bin/java?
26808      if test ! -x "$BOOT_JDK/bin/java"; then
26809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26811        BOOT_JDK_FOUND=no
26812      else
26813        # Do we have a bin/javac?
26814        if test ! -x "$BOOT_JDK/bin/javac"; then
26815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26819          BOOT_JDK_FOUND=no
26820        else
26821          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26822          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26823
26824          # Extra M4 quote needed to protect [] in grep expression.
26825          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26826          if test "x$FOUND_CORRECT_VERSION" = x; then
26827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26829            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26830$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26831            BOOT_JDK_FOUND=no
26832          else
26833            # We're done! :-)
26834            BOOT_JDK_FOUND=yes
26835
26836  # Only process if variable expands to non-empty
26837
26838  if test "x$BOOT_JDK" != x; then
26839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26840
26841  # Input might be given as Windows format, start by converting to
26842  # unix format.
26843  path="$BOOT_JDK"
26844  new_path=`$CYGPATH -u "$path"`
26845
26846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26849  # "foo.exe" is OK but "foo" is an error.
26850  #
26851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26852  # It is also a way to make sure we got the proper file name for the real test later on.
26853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26854  if test "x$test_shortpath" = x; then
26855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26857    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26858  fi
26859
26860  # Call helper function which possibly converts this using DOS-style short mode.
26861  # If so, the updated path is stored in $new_path.
26862
26863  input_path="$new_path"
26864  # Check if we need to convert this using DOS-style short mode. If the path
26865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26866  # take no chances and rewrite it.
26867  # Note: m4 eats our [], so we need to use [ and ] instead.
26868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26869  if test "x$has_forbidden_chars" != x; then
26870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26874      # Going to short mode and back again did indeed matter. Since short mode is
26875      # case insensitive, let's make it lowercase to improve readability.
26876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26877      # Now convert it back to Unix-style (cygpath)
26878      input_path=`$CYGPATH -u "$shortmode_path"`
26879      new_path="$input_path"
26880    fi
26881  fi
26882
26883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26884  if test "x$test_cygdrive_prefix" = x; then
26885    # As a simple fix, exclude /usr/bin since it's not a real path.
26886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26888      # a path prefixed by /cygdrive for fixpath to work.
26889      new_path="$CYGWIN_ROOT_PATH$input_path"
26890    fi
26891  fi
26892
26893
26894  if test "x$path" != "x$new_path"; then
26895    BOOT_JDK="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26898  fi
26899
26900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26901
26902  path="$BOOT_JDK"
26903  has_colon=`$ECHO $path | $GREP ^.:`
26904  new_path="$path"
26905  if test "x$has_colon" = x; then
26906    # Not in mixed or Windows style, start by that.
26907    new_path=`cmd //c echo $path`
26908  fi
26909
26910
26911  input_path="$new_path"
26912  # Check if we need to convert this using DOS-style short mode. If the path
26913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26914  # take no chances and rewrite it.
26915  # Note: m4 eats our [], so we need to use [ and ] instead.
26916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26917  if test "x$has_forbidden_chars" != x; then
26918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26920  fi
26921
26922
26923  windows_path="$new_path"
26924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26925    unix_path=`$CYGPATH -u "$windows_path"`
26926    new_path="$unix_path"
26927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26929    new_path="$unix_path"
26930  fi
26931
26932  if test "x$path" != "x$new_path"; then
26933    BOOT_JDK="$new_path"
26934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26936  fi
26937
26938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26940
26941    else
26942      # We're on a unix platform. Hooray! :)
26943      path="$BOOT_JDK"
26944      has_space=`$ECHO "$path" | $GREP " "`
26945      if test "x$has_space" != x; then
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26949      fi
26950
26951      # Use eval to expand a potential ~
26952      eval path="$path"
26953      if test ! -f "$path" && test ! -d "$path"; then
26954        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26955      fi
26956
26957      if test -d "$path"; then
26958        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26959      else
26960        dir="`$DIRNAME "$path"`"
26961        base="`$BASENAME "$path"`"
26962        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26963      fi
26964    fi
26965  fi
26966
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26968$as_echo_n "checking for Boot JDK... " >&6; }
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26970$as_echo "$BOOT_JDK" >&6; }
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26972$as_echo_n "checking Boot JDK version... " >&6; }
26973            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26975$as_echo "$BOOT_JDK_VERSION" >&6; }
26976          fi # end check jdk version
26977        fi # end check javac
26978      fi # end check java
26979    fi # end check boot jdk found
26980  fi
26981
26982
26983  if test "x$BOOT_JDK_FOUND" = xno; then
26984    # Now execute the test
26985
26986  if test "x$PROGRAMW6432" != x; then
26987    VIRTUAL_DIR="$PROGRAMW6432/Java"
26988
26989  windows_path="$VIRTUAL_DIR"
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991    unix_path=`$CYGPATH -u "$windows_path"`
26992    VIRTUAL_DIR="$unix_path"
26993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995    VIRTUAL_DIR="$unix_path"
26996  fi
26997
26998
26999  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27000  BOOT_JDK_SUFFIX=""
27001  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27002  if test "x$ALL_JDKS_FOUND" != x; then
27003    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27004
27005  if test "x$BOOT_JDK_FOUND" = xno; then
27006    # Now execute the test
27007
27008        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27009        if test -d "$BOOT_JDK"; then
27010          BOOT_JDK_FOUND=maybe
27011          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27012$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27013        fi
27014
27015
27016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27018      # Do we have a bin/java?
27019      if test ! -x "$BOOT_JDK/bin/java"; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27022        BOOT_JDK_FOUND=no
27023      else
27024        # Do we have a bin/javac?
27025        if test ! -x "$BOOT_JDK/bin/javac"; then
27026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27030          BOOT_JDK_FOUND=no
27031        else
27032          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27033          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27034
27035          # Extra M4 quote needed to protect [] in grep expression.
27036          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27037          if test "x$FOUND_CORRECT_VERSION" = x; then
27038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27040            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27041$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27042            BOOT_JDK_FOUND=no
27043          else
27044            # We're done! :-)
27045            BOOT_JDK_FOUND=yes
27046
27047  # Only process if variable expands to non-empty
27048
27049  if test "x$BOOT_JDK" != x; then
27050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051
27052  # Input might be given as Windows format, start by converting to
27053  # unix format.
27054  path="$BOOT_JDK"
27055  new_path=`$CYGPATH -u "$path"`
27056
27057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27060  # "foo.exe" is OK but "foo" is an error.
27061  #
27062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27063  # It is also a way to make sure we got the proper file name for the real test later on.
27064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27065  if test "x$test_shortpath" = x; then
27066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27069  fi
27070
27071  # Call helper function which possibly converts this using DOS-style short mode.
27072  # If so, the updated path is stored in $new_path.
27073
27074  input_path="$new_path"
27075  # Check if we need to convert this using DOS-style short mode. If the path
27076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27077  # take no chances and rewrite it.
27078  # Note: m4 eats our [], so we need to use [ and ] instead.
27079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27080  if test "x$has_forbidden_chars" != x; then
27081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27085      # Going to short mode and back again did indeed matter. Since short mode is
27086      # case insensitive, let's make it lowercase to improve readability.
27087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27088      # Now convert it back to Unix-style (cygpath)
27089      input_path=`$CYGPATH -u "$shortmode_path"`
27090      new_path="$input_path"
27091    fi
27092  fi
27093
27094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27095  if test "x$test_cygdrive_prefix" = x; then
27096    # As a simple fix, exclude /usr/bin since it's not a real path.
27097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27099      # a path prefixed by /cygdrive for fixpath to work.
27100      new_path="$CYGWIN_ROOT_PATH$input_path"
27101    fi
27102  fi
27103
27104
27105  if test "x$path" != "x$new_path"; then
27106    BOOT_JDK="$new_path"
27107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27109  fi
27110
27111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27112
27113  path="$BOOT_JDK"
27114  has_colon=`$ECHO $path | $GREP ^.:`
27115  new_path="$path"
27116  if test "x$has_colon" = x; then
27117    # Not in mixed or Windows style, start by that.
27118    new_path=`cmd //c echo $path`
27119  fi
27120
27121
27122  input_path="$new_path"
27123  # Check if we need to convert this using DOS-style short mode. If the path
27124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27125  # take no chances and rewrite it.
27126  # Note: m4 eats our [], so we need to use [ and ] instead.
27127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27128  if test "x$has_forbidden_chars" != x; then
27129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27131  fi
27132
27133
27134  windows_path="$new_path"
27135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27136    unix_path=`$CYGPATH -u "$windows_path"`
27137    new_path="$unix_path"
27138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27140    new_path="$unix_path"
27141  fi
27142
27143  if test "x$path" != "x$new_path"; then
27144    BOOT_JDK="$new_path"
27145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27147  fi
27148
27149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27151
27152    else
27153      # We're on a unix platform. Hooray! :)
27154      path="$BOOT_JDK"
27155      has_space=`$ECHO "$path" | $GREP " "`
27156      if test "x$has_space" != x; then
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27160      fi
27161
27162      # Use eval to expand a potential ~
27163      eval path="$path"
27164      if test ! -f "$path" && test ! -d "$path"; then
27165        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27166      fi
27167
27168      if test -d "$path"; then
27169        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27170      else
27171        dir="`$DIRNAME "$path"`"
27172        base="`$BASENAME "$path"`"
27173        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27174      fi
27175    fi
27176  fi
27177
27178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27179$as_echo_n "checking for Boot JDK... " >&6; }
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27181$as_echo "$BOOT_JDK" >&6; }
27182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27183$as_echo_n "checking Boot JDK version... " >&6; }
27184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27186$as_echo "$BOOT_JDK_VERSION" >&6; }
27187          fi # end check jdk version
27188        fi # end check javac
27189      fi # end check java
27190    fi # end check boot jdk found
27191  fi
27192
27193    done
27194  fi
27195
27196  fi
27197
27198
27199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27201      # Do we have a bin/java?
27202      if test ! -x "$BOOT_JDK/bin/java"; then
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27205        BOOT_JDK_FOUND=no
27206      else
27207        # Do we have a bin/javac?
27208        if test ! -x "$BOOT_JDK/bin/javac"; then
27209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27213          BOOT_JDK_FOUND=no
27214        else
27215          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27216          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27217
27218          # Extra M4 quote needed to protect [] in grep expression.
27219          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27220          if test "x$FOUND_CORRECT_VERSION" = x; then
27221            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27223            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27224$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27225            BOOT_JDK_FOUND=no
27226          else
27227            # We're done! :-)
27228            BOOT_JDK_FOUND=yes
27229
27230  # Only process if variable expands to non-empty
27231
27232  if test "x$BOOT_JDK" != x; then
27233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234
27235  # Input might be given as Windows format, start by converting to
27236  # unix format.
27237  path="$BOOT_JDK"
27238  new_path=`$CYGPATH -u "$path"`
27239
27240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27243  # "foo.exe" is OK but "foo" is an error.
27244  #
27245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27246  # It is also a way to make sure we got the proper file name for the real test later on.
27247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27248  if test "x$test_shortpath" = x; then
27249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27251    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27252  fi
27253
27254  # Call helper function which possibly converts this using DOS-style short mode.
27255  # If so, the updated path is stored in $new_path.
27256
27257  input_path="$new_path"
27258  # Check if we need to convert this using DOS-style short mode. If the path
27259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27260  # take no chances and rewrite it.
27261  # Note: m4 eats our [], so we need to use [ and ] instead.
27262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27263  if test "x$has_forbidden_chars" != x; then
27264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27268      # Going to short mode and back again did indeed matter. Since short mode is
27269      # case insensitive, let's make it lowercase to improve readability.
27270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27271      # Now convert it back to Unix-style (cygpath)
27272      input_path=`$CYGPATH -u "$shortmode_path"`
27273      new_path="$input_path"
27274    fi
27275  fi
27276
27277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27278  if test "x$test_cygdrive_prefix" = x; then
27279    # As a simple fix, exclude /usr/bin since it's not a real path.
27280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27282      # a path prefixed by /cygdrive for fixpath to work.
27283      new_path="$CYGWIN_ROOT_PATH$input_path"
27284    fi
27285  fi
27286
27287
27288  if test "x$path" != "x$new_path"; then
27289    BOOT_JDK="$new_path"
27290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27292  fi
27293
27294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27295
27296  path="$BOOT_JDK"
27297  has_colon=`$ECHO $path | $GREP ^.:`
27298  new_path="$path"
27299  if test "x$has_colon" = x; then
27300    # Not in mixed or Windows style, start by that.
27301    new_path=`cmd //c echo $path`
27302  fi
27303
27304
27305  input_path="$new_path"
27306  # Check if we need to convert this using DOS-style short mode. If the path
27307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27308  # take no chances and rewrite it.
27309  # Note: m4 eats our [], so we need to use [ and ] instead.
27310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27311  if test "x$has_forbidden_chars" != x; then
27312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27314  fi
27315
27316
27317  windows_path="$new_path"
27318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27319    unix_path=`$CYGPATH -u "$windows_path"`
27320    new_path="$unix_path"
27321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27323    new_path="$unix_path"
27324  fi
27325
27326  if test "x$path" != "x$new_path"; then
27327    BOOT_JDK="$new_path"
27328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27330  fi
27331
27332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27334
27335    else
27336      # We're on a unix platform. Hooray! :)
27337      path="$BOOT_JDK"
27338      has_space=`$ECHO "$path" | $GREP " "`
27339      if test "x$has_space" != x; then
27340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27343      fi
27344
27345      # Use eval to expand a potential ~
27346      eval path="$path"
27347      if test ! -f "$path" && test ! -d "$path"; then
27348        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27349      fi
27350
27351      if test -d "$path"; then
27352        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27353      else
27354        dir="`$DIRNAME "$path"`"
27355        base="`$BASENAME "$path"`"
27356        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27357      fi
27358    fi
27359  fi
27360
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27362$as_echo_n "checking for Boot JDK... " >&6; }
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27364$as_echo "$BOOT_JDK" >&6; }
27365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27366$as_echo_n "checking Boot JDK version... " >&6; }
27367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27369$as_echo "$BOOT_JDK_VERSION" >&6; }
27370          fi # end check jdk version
27371        fi # end check javac
27372      fi # end check java
27373    fi # end check boot jdk found
27374  fi
27375
27376
27377  if test "x$BOOT_JDK_FOUND" = xno; then
27378    # Now execute the test
27379
27380  if test "x$PROGRAMFILES" != x; then
27381    VIRTUAL_DIR="$PROGRAMFILES/Java"
27382
27383  windows_path="$VIRTUAL_DIR"
27384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385    unix_path=`$CYGPATH -u "$windows_path"`
27386    VIRTUAL_DIR="$unix_path"
27387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389    VIRTUAL_DIR="$unix_path"
27390  fi
27391
27392
27393  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27394  BOOT_JDK_SUFFIX=""
27395  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27396  if test "x$ALL_JDKS_FOUND" != x; then
27397    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27398
27399  if test "x$BOOT_JDK_FOUND" = xno; then
27400    # Now execute the test
27401
27402        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27403        if test -d "$BOOT_JDK"; then
27404          BOOT_JDK_FOUND=maybe
27405          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27406$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27407        fi
27408
27409
27410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27412      # Do we have a bin/java?
27413      if test ! -x "$BOOT_JDK/bin/java"; then
27414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27416        BOOT_JDK_FOUND=no
27417      else
27418        # Do we have a bin/javac?
27419        if test ! -x "$BOOT_JDK/bin/javac"; then
27420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27424          BOOT_JDK_FOUND=no
27425        else
27426          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27427          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27428
27429          # Extra M4 quote needed to protect [] in grep expression.
27430          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27431          if test "x$FOUND_CORRECT_VERSION" = x; then
27432            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27435$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27436            BOOT_JDK_FOUND=no
27437          else
27438            # We're done! :-)
27439            BOOT_JDK_FOUND=yes
27440
27441  # Only process if variable expands to non-empty
27442
27443  if test "x$BOOT_JDK" != x; then
27444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27445
27446  # Input might be given as Windows format, start by converting to
27447  # unix format.
27448  path="$BOOT_JDK"
27449  new_path=`$CYGPATH -u "$path"`
27450
27451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27454  # "foo.exe" is OK but "foo" is an error.
27455  #
27456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27457  # It is also a way to make sure we got the proper file name for the real test later on.
27458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27459  if test "x$test_shortpath" = x; then
27460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27462    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27463  fi
27464
27465  # Call helper function which possibly converts this using DOS-style short mode.
27466  # If so, the updated path is stored in $new_path.
27467
27468  input_path="$new_path"
27469  # Check if we need to convert this using DOS-style short mode. If the path
27470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27471  # take no chances and rewrite it.
27472  # Note: m4 eats our [], so we need to use [ and ] instead.
27473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27474  if test "x$has_forbidden_chars" != x; then
27475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27479      # Going to short mode and back again did indeed matter. Since short mode is
27480      # case insensitive, let's make it lowercase to improve readability.
27481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27482      # Now convert it back to Unix-style (cygpath)
27483      input_path=`$CYGPATH -u "$shortmode_path"`
27484      new_path="$input_path"
27485    fi
27486  fi
27487
27488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27489  if test "x$test_cygdrive_prefix" = x; then
27490    # As a simple fix, exclude /usr/bin since it's not a real path.
27491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27493      # a path prefixed by /cygdrive for fixpath to work.
27494      new_path="$CYGWIN_ROOT_PATH$input_path"
27495    fi
27496  fi
27497
27498
27499  if test "x$path" != "x$new_path"; then
27500    BOOT_JDK="$new_path"
27501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27503  fi
27504
27505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506
27507  path="$BOOT_JDK"
27508  has_colon=`$ECHO $path | $GREP ^.:`
27509  new_path="$path"
27510  if test "x$has_colon" = x; then
27511    # Not in mixed or Windows style, start by that.
27512    new_path=`cmd //c echo $path`
27513  fi
27514
27515
27516  input_path="$new_path"
27517  # Check if we need to convert this using DOS-style short mode. If the path
27518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27519  # take no chances and rewrite it.
27520  # Note: m4 eats our [], so we need to use [ and ] instead.
27521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27522  if test "x$has_forbidden_chars" != x; then
27523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27525  fi
27526
27527
27528  windows_path="$new_path"
27529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27530    unix_path=`$CYGPATH -u "$windows_path"`
27531    new_path="$unix_path"
27532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27534    new_path="$unix_path"
27535  fi
27536
27537  if test "x$path" != "x$new_path"; then
27538    BOOT_JDK="$new_path"
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27541  fi
27542
27543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27545
27546    else
27547      # We're on a unix platform. Hooray! :)
27548      path="$BOOT_JDK"
27549      has_space=`$ECHO "$path" | $GREP " "`
27550      if test "x$has_space" != x; then
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27554      fi
27555
27556      # Use eval to expand a potential ~
27557      eval path="$path"
27558      if test ! -f "$path" && test ! -d "$path"; then
27559        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27560      fi
27561
27562      if test -d "$path"; then
27563        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27564      else
27565        dir="`$DIRNAME "$path"`"
27566        base="`$BASENAME "$path"`"
27567        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27568      fi
27569    fi
27570  fi
27571
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27573$as_echo_n "checking for Boot JDK... " >&6; }
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27575$as_echo "$BOOT_JDK" >&6; }
27576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27577$as_echo_n "checking Boot JDK version... " >&6; }
27578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27580$as_echo "$BOOT_JDK_VERSION" >&6; }
27581          fi # end check jdk version
27582        fi # end check javac
27583      fi # end check java
27584    fi # end check boot jdk found
27585  fi
27586
27587    done
27588  fi
27589
27590  fi
27591
27592
27593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27595      # Do we have a bin/java?
27596      if test ! -x "$BOOT_JDK/bin/java"; then
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27599        BOOT_JDK_FOUND=no
27600      else
27601        # Do we have a bin/javac?
27602        if test ! -x "$BOOT_JDK/bin/javac"; then
27603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27607          BOOT_JDK_FOUND=no
27608        else
27609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27611
27612          # Extra M4 quote needed to protect [] in grep expression.
27613          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27614          if test "x$FOUND_CORRECT_VERSION" = x; then
27615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27619            BOOT_JDK_FOUND=no
27620          else
27621            # We're done! :-)
27622            BOOT_JDK_FOUND=yes
27623
27624  # Only process if variable expands to non-empty
27625
27626  if test "x$BOOT_JDK" != x; then
27627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628
27629  # Input might be given as Windows format, start by converting to
27630  # unix format.
27631  path="$BOOT_JDK"
27632  new_path=`$CYGPATH -u "$path"`
27633
27634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27637  # "foo.exe" is OK but "foo" is an error.
27638  #
27639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27640  # It is also a way to make sure we got the proper file name for the real test later on.
27641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27642  if test "x$test_shortpath" = x; then
27643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27646  fi
27647
27648  # Call helper function which possibly converts this using DOS-style short mode.
27649  # If so, the updated path is stored in $new_path.
27650
27651  input_path="$new_path"
27652  # Check if we need to convert this using DOS-style short mode. If the path
27653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27654  # take no chances and rewrite it.
27655  # Note: m4 eats our [], so we need to use [ and ] instead.
27656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27657  if test "x$has_forbidden_chars" != x; then
27658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27662      # Going to short mode and back again did indeed matter. Since short mode is
27663      # case insensitive, let's make it lowercase to improve readability.
27664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27665      # Now convert it back to Unix-style (cygpath)
27666      input_path=`$CYGPATH -u "$shortmode_path"`
27667      new_path="$input_path"
27668    fi
27669  fi
27670
27671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27672  if test "x$test_cygdrive_prefix" = x; then
27673    # As a simple fix, exclude /usr/bin since it's not a real path.
27674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27676      # a path prefixed by /cygdrive for fixpath to work.
27677      new_path="$CYGWIN_ROOT_PATH$input_path"
27678    fi
27679  fi
27680
27681
27682  if test "x$path" != "x$new_path"; then
27683    BOOT_JDK="$new_path"
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27686  fi
27687
27688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689
27690  path="$BOOT_JDK"
27691  has_colon=`$ECHO $path | $GREP ^.:`
27692  new_path="$path"
27693  if test "x$has_colon" = x; then
27694    # Not in mixed or Windows style, start by that.
27695    new_path=`cmd //c echo $path`
27696  fi
27697
27698
27699  input_path="$new_path"
27700  # Check if we need to convert this using DOS-style short mode. If the path
27701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27702  # take no chances and rewrite it.
27703  # Note: m4 eats our [], so we need to use [ and ] instead.
27704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27705  if test "x$has_forbidden_chars" != x; then
27706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27708  fi
27709
27710
27711  windows_path="$new_path"
27712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713    unix_path=`$CYGPATH -u "$windows_path"`
27714    new_path="$unix_path"
27715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27717    new_path="$unix_path"
27718  fi
27719
27720  if test "x$path" != "x$new_path"; then
27721    BOOT_JDK="$new_path"
27722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27724  fi
27725
27726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27728
27729    else
27730      # We're on a unix platform. Hooray! :)
27731      path="$BOOT_JDK"
27732      has_space=`$ECHO "$path" | $GREP " "`
27733      if test "x$has_space" != x; then
27734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27737      fi
27738
27739      # Use eval to expand a potential ~
27740      eval path="$path"
27741      if test ! -f "$path" && test ! -d "$path"; then
27742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27743      fi
27744
27745      if test -d "$path"; then
27746        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27747      else
27748        dir="`$DIRNAME "$path"`"
27749        base="`$BASENAME "$path"`"
27750        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27751      fi
27752    fi
27753  fi
27754
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27756$as_echo_n "checking for Boot JDK... " >&6; }
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27758$as_echo "$BOOT_JDK" >&6; }
27759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27760$as_echo_n "checking Boot JDK version... " >&6; }
27761            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27763$as_echo "$BOOT_JDK_VERSION" >&6; }
27764          fi # end check jdk version
27765        fi # end check javac
27766      fi # end check java
27767    fi # end check boot jdk found
27768  fi
27769
27770
27771  if test "x$BOOT_JDK_FOUND" = xno; then
27772    # Now execute the test
27773
27774  if test "x$ProgramFiles" != x; then
27775    VIRTUAL_DIR="$ProgramFiles/Java"
27776
27777  windows_path="$VIRTUAL_DIR"
27778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27779    unix_path=`$CYGPATH -u "$windows_path"`
27780    VIRTUAL_DIR="$unix_path"
27781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27783    VIRTUAL_DIR="$unix_path"
27784  fi
27785
27786
27787  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27788  BOOT_JDK_SUFFIX=""
27789  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27790  if test "x$ALL_JDKS_FOUND" != x; then
27791    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27792
27793  if test "x$BOOT_JDK_FOUND" = xno; then
27794    # Now execute the test
27795
27796        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27797        if test -d "$BOOT_JDK"; then
27798          BOOT_JDK_FOUND=maybe
27799          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27800$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27801        fi
27802
27803
27804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27806      # Do we have a bin/java?
27807      if test ! -x "$BOOT_JDK/bin/java"; then
27808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27810        BOOT_JDK_FOUND=no
27811      else
27812        # Do we have a bin/javac?
27813        if test ! -x "$BOOT_JDK/bin/javac"; then
27814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27818          BOOT_JDK_FOUND=no
27819        else
27820          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27821          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27822
27823          # Extra M4 quote needed to protect [] in grep expression.
27824          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27825          if test "x$FOUND_CORRECT_VERSION" = x; then
27826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27828            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27829$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27830            BOOT_JDK_FOUND=no
27831          else
27832            # We're done! :-)
27833            BOOT_JDK_FOUND=yes
27834
27835  # Only process if variable expands to non-empty
27836
27837  if test "x$BOOT_JDK" != x; then
27838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27839
27840  # Input might be given as Windows format, start by converting to
27841  # unix format.
27842  path="$BOOT_JDK"
27843  new_path=`$CYGPATH -u "$path"`
27844
27845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27848  # "foo.exe" is OK but "foo" is an error.
27849  #
27850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27851  # It is also a way to make sure we got the proper file name for the real test later on.
27852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27853  if test "x$test_shortpath" = x; then
27854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27857  fi
27858
27859  # Call helper function which possibly converts this using DOS-style short mode.
27860  # If so, the updated path is stored in $new_path.
27861
27862  input_path="$new_path"
27863  # Check if we need to convert this using DOS-style short mode. If the path
27864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27865  # take no chances and rewrite it.
27866  # Note: m4 eats our [], so we need to use [ and ] instead.
27867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27868  if test "x$has_forbidden_chars" != x; then
27869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27873      # Going to short mode and back again did indeed matter. Since short mode is
27874      # case insensitive, let's make it lowercase to improve readability.
27875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27876      # Now convert it back to Unix-style (cygpath)
27877      input_path=`$CYGPATH -u "$shortmode_path"`
27878      new_path="$input_path"
27879    fi
27880  fi
27881
27882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27883  if test "x$test_cygdrive_prefix" = x; then
27884    # As a simple fix, exclude /usr/bin since it's not a real path.
27885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27887      # a path prefixed by /cygdrive for fixpath to work.
27888      new_path="$CYGWIN_ROOT_PATH$input_path"
27889    fi
27890  fi
27891
27892
27893  if test "x$path" != "x$new_path"; then
27894    BOOT_JDK="$new_path"
27895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27897  fi
27898
27899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900
27901  path="$BOOT_JDK"
27902  has_colon=`$ECHO $path | $GREP ^.:`
27903  new_path="$path"
27904  if test "x$has_colon" = x; then
27905    # Not in mixed or Windows style, start by that.
27906    new_path=`cmd //c echo $path`
27907  fi
27908
27909
27910  input_path="$new_path"
27911  # Check if we need to convert this using DOS-style short mode. If the path
27912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27913  # take no chances and rewrite it.
27914  # Note: m4 eats our [], so we need to use [ and ] instead.
27915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27916  if test "x$has_forbidden_chars" != x; then
27917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27919  fi
27920
27921
27922  windows_path="$new_path"
27923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27924    unix_path=`$CYGPATH -u "$windows_path"`
27925    new_path="$unix_path"
27926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27928    new_path="$unix_path"
27929  fi
27930
27931  if test "x$path" != "x$new_path"; then
27932    BOOT_JDK="$new_path"
27933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27935  fi
27936
27937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27939
27940    else
27941      # We're on a unix platform. Hooray! :)
27942      path="$BOOT_JDK"
27943      has_space=`$ECHO "$path" | $GREP " "`
27944      if test "x$has_space" != x; then
27945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27948      fi
27949
27950      # Use eval to expand a potential ~
27951      eval path="$path"
27952      if test ! -f "$path" && test ! -d "$path"; then
27953        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27954      fi
27955
27956      if test -d "$path"; then
27957        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27958      else
27959        dir="`$DIRNAME "$path"`"
27960        base="`$BASENAME "$path"`"
27961        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27962      fi
27963    fi
27964  fi
27965
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27967$as_echo_n "checking for Boot JDK... " >&6; }
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27969$as_echo "$BOOT_JDK" >&6; }
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27971$as_echo_n "checking Boot JDK version... " >&6; }
27972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27974$as_echo "$BOOT_JDK_VERSION" >&6; }
27975          fi # end check jdk version
27976        fi # end check javac
27977      fi # end check java
27978    fi # end check boot jdk found
27979  fi
27980
27981    done
27982  fi
27983
27984  fi
27985
27986
27987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27989      # Do we have a bin/java?
27990      if test ! -x "$BOOT_JDK/bin/java"; then
27991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27993        BOOT_JDK_FOUND=no
27994      else
27995        # Do we have a bin/javac?
27996        if test ! -x "$BOOT_JDK/bin/javac"; then
27997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28001          BOOT_JDK_FOUND=no
28002        else
28003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28005
28006          # Extra M4 quote needed to protect [] in grep expression.
28007          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28008          if test "x$FOUND_CORRECT_VERSION" = x; then
28009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28013            BOOT_JDK_FOUND=no
28014          else
28015            # We're done! :-)
28016            BOOT_JDK_FOUND=yes
28017
28018  # Only process if variable expands to non-empty
28019
28020  if test "x$BOOT_JDK" != x; then
28021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28022
28023  # Input might be given as Windows format, start by converting to
28024  # unix format.
28025  path="$BOOT_JDK"
28026  new_path=`$CYGPATH -u "$path"`
28027
28028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28031  # "foo.exe" is OK but "foo" is an error.
28032  #
28033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28034  # It is also a way to make sure we got the proper file name for the real test later on.
28035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28036  if test "x$test_shortpath" = x; then
28037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28040  fi
28041
28042  # Call helper function which possibly converts this using DOS-style short mode.
28043  # If so, the updated path is stored in $new_path.
28044
28045  input_path="$new_path"
28046  # Check if we need to convert this using DOS-style short mode. If the path
28047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28048  # take no chances and rewrite it.
28049  # Note: m4 eats our [], so we need to use [ and ] instead.
28050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28051  if test "x$has_forbidden_chars" != x; then
28052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28056      # Going to short mode and back again did indeed matter. Since short mode is
28057      # case insensitive, let's make it lowercase to improve readability.
28058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28059      # Now convert it back to Unix-style (cygpath)
28060      input_path=`$CYGPATH -u "$shortmode_path"`
28061      new_path="$input_path"
28062    fi
28063  fi
28064
28065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28066  if test "x$test_cygdrive_prefix" = x; then
28067    # As a simple fix, exclude /usr/bin since it's not a real path.
28068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28070      # a path prefixed by /cygdrive for fixpath to work.
28071      new_path="$CYGWIN_ROOT_PATH$input_path"
28072    fi
28073  fi
28074
28075
28076  if test "x$path" != "x$new_path"; then
28077    BOOT_JDK="$new_path"
28078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28080  fi
28081
28082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083
28084  path="$BOOT_JDK"
28085  has_colon=`$ECHO $path | $GREP ^.:`
28086  new_path="$path"
28087  if test "x$has_colon" = x; then
28088    # Not in mixed or Windows style, start by that.
28089    new_path=`cmd //c echo $path`
28090  fi
28091
28092
28093  input_path="$new_path"
28094  # Check if we need to convert this using DOS-style short mode. If the path
28095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28096  # take no chances and rewrite it.
28097  # Note: m4 eats our [], so we need to use [ and ] instead.
28098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28099  if test "x$has_forbidden_chars" != x; then
28100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28102  fi
28103
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114  if test "x$path" != "x$new_path"; then
28115    BOOT_JDK="$new_path"
28116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28118  fi
28119
28120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28122
28123    else
28124      # We're on a unix platform. Hooray! :)
28125      path="$BOOT_JDK"
28126      has_space=`$ECHO "$path" | $GREP " "`
28127      if test "x$has_space" != x; then
28128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28131      fi
28132
28133      # Use eval to expand a potential ~
28134      eval path="$path"
28135      if test ! -f "$path" && test ! -d "$path"; then
28136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28137      fi
28138
28139      if test -d "$path"; then
28140        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28141      else
28142        dir="`$DIRNAME "$path"`"
28143        base="`$BASENAME "$path"`"
28144        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28145      fi
28146    fi
28147  fi
28148
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28150$as_echo_n "checking for Boot JDK... " >&6; }
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28152$as_echo "$BOOT_JDK" >&6; }
28153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28154$as_echo_n "checking Boot JDK version... " >&6; }
28155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28157$as_echo "$BOOT_JDK_VERSION" >&6; }
28158          fi # end check jdk version
28159        fi # end check javac
28160      fi # end check java
28161    fi # end check boot jdk found
28162  fi
28163
28164
28165  if test "x$BOOT_JDK_FOUND" = xno; then
28166    # Now execute the test
28167
28168  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28169  BOOT_JDK_SUFFIX=""
28170  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28171  if test "x$ALL_JDKS_FOUND" != x; then
28172    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28173
28174  if test "x$BOOT_JDK_FOUND" = xno; then
28175    # Now execute the test
28176
28177        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28178        if test -d "$BOOT_JDK"; then
28179          BOOT_JDK_FOUND=maybe
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28181$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28182        fi
28183
28184
28185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28187      # Do we have a bin/java?
28188      if test ! -x "$BOOT_JDK/bin/java"; then
28189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28191        BOOT_JDK_FOUND=no
28192      else
28193        # Do we have a bin/javac?
28194        if test ! -x "$BOOT_JDK/bin/javac"; then
28195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28199          BOOT_JDK_FOUND=no
28200        else
28201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28203
28204          # Extra M4 quote needed to protect [] in grep expression.
28205          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28206          if test "x$FOUND_CORRECT_VERSION" = x; then
28207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28211            BOOT_JDK_FOUND=no
28212          else
28213            # We're done! :-)
28214            BOOT_JDK_FOUND=yes
28215
28216  # Only process if variable expands to non-empty
28217
28218  if test "x$BOOT_JDK" != x; then
28219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220
28221  # Input might be given as Windows format, start by converting to
28222  # unix format.
28223  path="$BOOT_JDK"
28224  new_path=`$CYGPATH -u "$path"`
28225
28226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28229  # "foo.exe" is OK but "foo" is an error.
28230  #
28231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28232  # It is also a way to make sure we got the proper file name for the real test later on.
28233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28234  if test "x$test_shortpath" = x; then
28235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28238  fi
28239
28240  # Call helper function which possibly converts this using DOS-style short mode.
28241  # If so, the updated path is stored in $new_path.
28242
28243  input_path="$new_path"
28244  # Check if we need to convert this using DOS-style short mode. If the path
28245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28246  # take no chances and rewrite it.
28247  # Note: m4 eats our [], so we need to use [ and ] instead.
28248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28249  if test "x$has_forbidden_chars" != x; then
28250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28254      # Going to short mode and back again did indeed matter. Since short mode is
28255      # case insensitive, let's make it lowercase to improve readability.
28256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28257      # Now convert it back to Unix-style (cygpath)
28258      input_path=`$CYGPATH -u "$shortmode_path"`
28259      new_path="$input_path"
28260    fi
28261  fi
28262
28263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28264  if test "x$test_cygdrive_prefix" = x; then
28265    # As a simple fix, exclude /usr/bin since it's not a real path.
28266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28268      # a path prefixed by /cygdrive for fixpath to work.
28269      new_path="$CYGWIN_ROOT_PATH$input_path"
28270    fi
28271  fi
28272
28273
28274  if test "x$path" != "x$new_path"; then
28275    BOOT_JDK="$new_path"
28276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28278  fi
28279
28280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28281
28282  path="$BOOT_JDK"
28283  has_colon=`$ECHO $path | $GREP ^.:`
28284  new_path="$path"
28285  if test "x$has_colon" = x; then
28286    # Not in mixed or Windows style, start by that.
28287    new_path=`cmd //c echo $path`
28288  fi
28289
28290
28291  input_path="$new_path"
28292  # Check if we need to convert this using DOS-style short mode. If the path
28293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28294  # take no chances and rewrite it.
28295  # Note: m4 eats our [], so we need to use [ and ] instead.
28296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28297  if test "x$has_forbidden_chars" != x; then
28298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28300  fi
28301
28302
28303  windows_path="$new_path"
28304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28305    unix_path=`$CYGPATH -u "$windows_path"`
28306    new_path="$unix_path"
28307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28309    new_path="$unix_path"
28310  fi
28311
28312  if test "x$path" != "x$new_path"; then
28313    BOOT_JDK="$new_path"
28314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28316  fi
28317
28318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28320
28321    else
28322      # We're on a unix platform. Hooray! :)
28323      path="$BOOT_JDK"
28324      has_space=`$ECHO "$path" | $GREP " "`
28325      if test "x$has_space" != x; then
28326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28329      fi
28330
28331      # Use eval to expand a potential ~
28332      eval path="$path"
28333      if test ! -f "$path" && test ! -d "$path"; then
28334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28335      fi
28336
28337      if test -d "$path"; then
28338        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28339      else
28340        dir="`$DIRNAME "$path"`"
28341        base="`$BASENAME "$path"`"
28342        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28343      fi
28344    fi
28345  fi
28346
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28348$as_echo_n "checking for Boot JDK... " >&6; }
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28350$as_echo "$BOOT_JDK" >&6; }
28351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28352$as_echo_n "checking Boot JDK version... " >&6; }
28353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28355$as_echo "$BOOT_JDK_VERSION" >&6; }
28356          fi # end check jdk version
28357        fi # end check javac
28358      fi # end check java
28359    fi # end check boot jdk found
28360  fi
28361
28362    done
28363  fi
28364
28365
28366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28368      # Do we have a bin/java?
28369      if test ! -x "$BOOT_JDK/bin/java"; then
28370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28372        BOOT_JDK_FOUND=no
28373      else
28374        # Do we have a bin/javac?
28375        if test ! -x "$BOOT_JDK/bin/javac"; then
28376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28380          BOOT_JDK_FOUND=no
28381        else
28382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28384
28385          # Extra M4 quote needed to protect [] in grep expression.
28386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28387          if test "x$FOUND_CORRECT_VERSION" = x; then
28388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28392            BOOT_JDK_FOUND=no
28393          else
28394            # We're done! :-)
28395            BOOT_JDK_FOUND=yes
28396
28397  # Only process if variable expands to non-empty
28398
28399  if test "x$BOOT_JDK" != x; then
28400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28401
28402  # Input might be given as Windows format, start by converting to
28403  # unix format.
28404  path="$BOOT_JDK"
28405  new_path=`$CYGPATH -u "$path"`
28406
28407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28410  # "foo.exe" is OK but "foo" is an error.
28411  #
28412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28413  # It is also a way to make sure we got the proper file name for the real test later on.
28414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28415  if test "x$test_shortpath" = x; then
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423
28424  input_path="$new_path"
28425  # Check if we need to convert this using DOS-style short mode. If the path
28426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28427  # take no chances and rewrite it.
28428  # Note: m4 eats our [], so we need to use [ and ] instead.
28429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28430  if test "x$has_forbidden_chars" != x; then
28431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28435      # Going to short mode and back again did indeed matter. Since short mode is
28436      # case insensitive, let's make it lowercase to improve readability.
28437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28438      # Now convert it back to Unix-style (cygpath)
28439      input_path=`$CYGPATH -u "$shortmode_path"`
28440      new_path="$input_path"
28441    fi
28442  fi
28443
28444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28445  if test "x$test_cygdrive_prefix" = x; then
28446    # As a simple fix, exclude /usr/bin since it's not a real path.
28447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28449      # a path prefixed by /cygdrive for fixpath to work.
28450      new_path="$CYGWIN_ROOT_PATH$input_path"
28451    fi
28452  fi
28453
28454
28455  if test "x$path" != "x$new_path"; then
28456    BOOT_JDK="$new_path"
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28459  fi
28460
28461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28462
28463  path="$BOOT_JDK"
28464  has_colon=`$ECHO $path | $GREP ^.:`
28465  new_path="$path"
28466  if test "x$has_colon" = x; then
28467    # Not in mixed or Windows style, start by that.
28468    new_path=`cmd //c echo $path`
28469  fi
28470
28471
28472  input_path="$new_path"
28473  # Check if we need to convert this using DOS-style short mode. If the path
28474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28475  # take no chances and rewrite it.
28476  # Note: m4 eats our [], so we need to use [ and ] instead.
28477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28478  if test "x$has_forbidden_chars" != x; then
28479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28481  fi
28482
28483
28484  windows_path="$new_path"
28485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486    unix_path=`$CYGPATH -u "$windows_path"`
28487    new_path="$unix_path"
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28490    new_path="$unix_path"
28491  fi
28492
28493  if test "x$path" != "x$new_path"; then
28494    BOOT_JDK="$new_path"
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28497  fi
28498
28499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28501
28502    else
28503      # We're on a unix platform. Hooray! :)
28504      path="$BOOT_JDK"
28505      has_space=`$ECHO "$path" | $GREP " "`
28506      if test "x$has_space" != x; then
28507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28510      fi
28511
28512      # Use eval to expand a potential ~
28513      eval path="$path"
28514      if test ! -f "$path" && test ! -d "$path"; then
28515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28516      fi
28517
28518      if test -d "$path"; then
28519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28520      else
28521        dir="`$DIRNAME "$path"`"
28522        base="`$BASENAME "$path"`"
28523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28524      fi
28525    fi
28526  fi
28527
28528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28529$as_echo_n "checking for Boot JDK... " >&6; }
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28531$as_echo "$BOOT_JDK" >&6; }
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28533$as_echo_n "checking Boot JDK version... " >&6; }
28534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28536$as_echo "$BOOT_JDK_VERSION" >&6; }
28537          fi # end check jdk version
28538        fi # end check javac
28539      fi # end check java
28540    fi # end check boot jdk found
28541  fi
28542
28543  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28544
28545  if test "x$BOOT_JDK_FOUND" = xno; then
28546    # Now execute the test
28547
28548  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28549  BOOT_JDK_SUFFIX="/Contents/Home"
28550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28551  if test "x$ALL_JDKS_FOUND" != x; then
28552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28558        if test -d "$BOOT_JDK"; then
28559          BOOT_JDK_FOUND=maybe
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28562        fi
28563
28564
28565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28567      # Do we have a bin/java?
28568      if test ! -x "$BOOT_JDK/bin/java"; then
28569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28571        BOOT_JDK_FOUND=no
28572      else
28573        # Do we have a bin/javac?
28574        if test ! -x "$BOOT_JDK/bin/javac"; then
28575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28579          BOOT_JDK_FOUND=no
28580        else
28581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28583
28584          # Extra M4 quote needed to protect [] in grep expression.
28585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28586          if test "x$FOUND_CORRECT_VERSION" = x; then
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28591            BOOT_JDK_FOUND=no
28592          else
28593            # We're done! :-)
28594            BOOT_JDK_FOUND=yes
28595
28596  # Only process if variable expands to non-empty
28597
28598  if test "x$BOOT_JDK" != x; then
28599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600
28601  # Input might be given as Windows format, start by converting to
28602  # unix format.
28603  path="$BOOT_JDK"
28604  new_path=`$CYGPATH -u "$path"`
28605
28606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28609  # "foo.exe" is OK but "foo" is an error.
28610  #
28611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28612  # It is also a way to make sure we got the proper file name for the real test later on.
28613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28614  if test "x$test_shortpath" = x; then
28615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28618  fi
28619
28620  # Call helper function which possibly converts this using DOS-style short mode.
28621  # If so, the updated path is stored in $new_path.
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28634      # Going to short mode and back again did indeed matter. Since short mode is
28635      # case insensitive, let's make it lowercase to improve readability.
28636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28637      # Now convert it back to Unix-style (cygpath)
28638      input_path=`$CYGPATH -u "$shortmode_path"`
28639      new_path="$input_path"
28640    fi
28641  fi
28642
28643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28644  if test "x$test_cygdrive_prefix" = x; then
28645    # As a simple fix, exclude /usr/bin since it's not a real path.
28646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28648      # a path prefixed by /cygdrive for fixpath to work.
28649      new_path="$CYGWIN_ROOT_PATH$input_path"
28650    fi
28651  fi
28652
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28661
28662  path="$BOOT_JDK"
28663  has_colon=`$ECHO $path | $GREP ^.:`
28664  new_path="$path"
28665  if test "x$has_colon" = x; then
28666    # Not in mixed or Windows style, start by that.
28667    new_path=`cmd //c echo $path`
28668  fi
28669
28670
28671  input_path="$new_path"
28672  # Check if we need to convert this using DOS-style short mode. If the path
28673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28674  # take no chances and rewrite it.
28675  # Note: m4 eats our [], so we need to use [ and ] instead.
28676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28677  if test "x$has_forbidden_chars" != x; then
28678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28680  fi
28681
28682
28683  windows_path="$new_path"
28684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685    unix_path=`$CYGPATH -u "$windows_path"`
28686    new_path="$unix_path"
28687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28689    new_path="$unix_path"
28690  fi
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700
28701    else
28702      # We're on a unix platform. Hooray! :)
28703      path="$BOOT_JDK"
28704      has_space=`$ECHO "$path" | $GREP " "`
28705      if test "x$has_space" != x; then
28706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28709      fi
28710
28711      # Use eval to expand a potential ~
28712      eval path="$path"
28713      if test ! -f "$path" && test ! -d "$path"; then
28714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28715      fi
28716
28717      if test -d "$path"; then
28718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28719      else
28720        dir="`$DIRNAME "$path"`"
28721        base="`$BASENAME "$path"`"
28722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28723      fi
28724    fi
28725  fi
28726
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28728$as_echo_n "checking for Boot JDK... " >&6; }
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28730$as_echo "$BOOT_JDK" >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28732$as_echo_n "checking Boot JDK version... " >&6; }
28733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28735$as_echo "$BOOT_JDK_VERSION" >&6; }
28736          fi # end check jdk version
28737        fi # end check javac
28738      fi # end check java
28739    fi # end check boot jdk found
28740  fi
28741
28742    done
28743  fi
28744
28745
28746    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28747    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28748      # Do we have a bin/java?
28749      if test ! -x "$BOOT_JDK/bin/java"; then
28750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28752        BOOT_JDK_FOUND=no
28753      else
28754        # Do we have a bin/javac?
28755        if test ! -x "$BOOT_JDK/bin/javac"; then
28756          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28759$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28760          BOOT_JDK_FOUND=no
28761        else
28762          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28763          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28764
28765          # Extra M4 quote needed to protect [] in grep expression.
28766          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28767          if test "x$FOUND_CORRECT_VERSION" = x; then
28768            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28771$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28772            BOOT_JDK_FOUND=no
28773          else
28774            # We're done! :-)
28775            BOOT_JDK_FOUND=yes
28776
28777  # Only process if variable expands to non-empty
28778
28779  if test "x$BOOT_JDK" != x; then
28780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28781
28782  # Input might be given as Windows format, start by converting to
28783  # unix format.
28784  path="$BOOT_JDK"
28785  new_path=`$CYGPATH -u "$path"`
28786
28787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28790  # "foo.exe" is OK but "foo" is an error.
28791  #
28792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28793  # It is also a way to make sure we got the proper file name for the real test later on.
28794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28795  if test "x$test_shortpath" = x; then
28796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28798    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28799  fi
28800
28801  # Call helper function which possibly converts this using DOS-style short mode.
28802  # If so, the updated path is stored in $new_path.
28803
28804  input_path="$new_path"
28805  # Check if we need to convert this using DOS-style short mode. If the path
28806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28807  # take no chances and rewrite it.
28808  # Note: m4 eats our [], so we need to use [ and ] instead.
28809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28810  if test "x$has_forbidden_chars" != x; then
28811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28815      # Going to short mode and back again did indeed matter. Since short mode is
28816      # case insensitive, let's make it lowercase to improve readability.
28817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28818      # Now convert it back to Unix-style (cygpath)
28819      input_path=`$CYGPATH -u "$shortmode_path"`
28820      new_path="$input_path"
28821    fi
28822  fi
28823
28824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28825  if test "x$test_cygdrive_prefix" = x; then
28826    # As a simple fix, exclude /usr/bin since it's not a real path.
28827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28829      # a path prefixed by /cygdrive for fixpath to work.
28830      new_path="$CYGWIN_ROOT_PATH$input_path"
28831    fi
28832  fi
28833
28834
28835  if test "x$path" != "x$new_path"; then
28836    BOOT_JDK="$new_path"
28837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28839  fi
28840
28841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28842
28843  path="$BOOT_JDK"
28844  has_colon=`$ECHO $path | $GREP ^.:`
28845  new_path="$path"
28846  if test "x$has_colon" = x; then
28847    # Not in mixed or Windows style, start by that.
28848    new_path=`cmd //c echo $path`
28849  fi
28850
28851
28852  input_path="$new_path"
28853  # Check if we need to convert this using DOS-style short mode. If the path
28854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28855  # take no chances and rewrite it.
28856  # Note: m4 eats our [], so we need to use [ and ] instead.
28857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28858  if test "x$has_forbidden_chars" != x; then
28859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28861  fi
28862
28863
28864  windows_path="$new_path"
28865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28866    unix_path=`$CYGPATH -u "$windows_path"`
28867    new_path="$unix_path"
28868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28870    new_path="$unix_path"
28871  fi
28872
28873  if test "x$path" != "x$new_path"; then
28874    BOOT_JDK="$new_path"
28875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28877  fi
28878
28879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28881
28882    else
28883      # We're on a unix platform. Hooray! :)
28884      path="$BOOT_JDK"
28885      has_space=`$ECHO "$path" | $GREP " "`
28886      if test "x$has_space" != x; then
28887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28890      fi
28891
28892      # Use eval to expand a potential ~
28893      eval path="$path"
28894      if test ! -f "$path" && test ! -d "$path"; then
28895        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28896      fi
28897
28898      if test -d "$path"; then
28899        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28900      else
28901        dir="`$DIRNAME "$path"`"
28902        base="`$BASENAME "$path"`"
28903        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28904      fi
28905    fi
28906  fi
28907
28908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28909$as_echo_n "checking for Boot JDK... " >&6; }
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28911$as_echo "$BOOT_JDK" >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28913$as_echo_n "checking Boot JDK version... " >&6; }
28914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28916$as_echo "$BOOT_JDK_VERSION" >&6; }
28917          fi # end check jdk version
28918        fi # end check javac
28919      fi # end check java
28920    fi # end check boot jdk found
28921  fi
28922
28923
28924  if test "x$BOOT_JDK_FOUND" = xno; then
28925    # Now execute the test
28926
28927  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28928  BOOT_JDK_SUFFIX="/Contents/Home"
28929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28930  if test "x$ALL_JDKS_FOUND" != x; then
28931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28932
28933  if test "x$BOOT_JDK_FOUND" = xno; then
28934    # Now execute the test
28935
28936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28937        if test -d "$BOOT_JDK"; then
28938          BOOT_JDK_FOUND=maybe
28939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28941        fi
28942
28943
28944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28946      # Do we have a bin/java?
28947      if test ! -x "$BOOT_JDK/bin/java"; then
28948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28950        BOOT_JDK_FOUND=no
28951      else
28952        # Do we have a bin/javac?
28953        if test ! -x "$BOOT_JDK/bin/javac"; then
28954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28958          BOOT_JDK_FOUND=no
28959        else
28960          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28961          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28962
28963          # Extra M4 quote needed to protect [] in grep expression.
28964          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28965          if test "x$FOUND_CORRECT_VERSION" = x; then
28966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28969$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28970            BOOT_JDK_FOUND=no
28971          else
28972            # We're done! :-)
28973            BOOT_JDK_FOUND=yes
28974
28975  # Only process if variable expands to non-empty
28976
28977  if test "x$BOOT_JDK" != x; then
28978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28979
28980  # Input might be given as Windows format, start by converting to
28981  # unix format.
28982  path="$BOOT_JDK"
28983  new_path=`$CYGPATH -u "$path"`
28984
28985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28988  # "foo.exe" is OK but "foo" is an error.
28989  #
28990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28991  # It is also a way to make sure we got the proper file name for the real test later on.
28992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28993  if test "x$test_shortpath" = x; then
28994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28997  fi
28998
28999  # Call helper function which possibly converts this using DOS-style short mode.
29000  # If so, the updated path is stored in $new_path.
29001
29002  input_path="$new_path"
29003  # Check if we need to convert this using DOS-style short mode. If the path
29004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29005  # take no chances and rewrite it.
29006  # Note: m4 eats our [], so we need to use [ and ] instead.
29007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29008  if test "x$has_forbidden_chars" != x; then
29009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29013      # Going to short mode and back again did indeed matter. Since short mode is
29014      # case insensitive, let's make it lowercase to improve readability.
29015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29016      # Now convert it back to Unix-style (cygpath)
29017      input_path=`$CYGPATH -u "$shortmode_path"`
29018      new_path="$input_path"
29019    fi
29020  fi
29021
29022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29023  if test "x$test_cygdrive_prefix" = x; then
29024    # As a simple fix, exclude /usr/bin since it's not a real path.
29025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29027      # a path prefixed by /cygdrive for fixpath to work.
29028      new_path="$CYGWIN_ROOT_PATH$input_path"
29029    fi
29030  fi
29031
29032
29033  if test "x$path" != "x$new_path"; then
29034    BOOT_JDK="$new_path"
29035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29037  fi
29038
29039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29040
29041  path="$BOOT_JDK"
29042  has_colon=`$ECHO $path | $GREP ^.:`
29043  new_path="$path"
29044  if test "x$has_colon" = x; then
29045    # Not in mixed or Windows style, start by that.
29046    new_path=`cmd //c echo $path`
29047  fi
29048
29049
29050  input_path="$new_path"
29051  # Check if we need to convert this using DOS-style short mode. If the path
29052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29053  # take no chances and rewrite it.
29054  # Note: m4 eats our [], so we need to use [ and ] instead.
29055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29056  if test "x$has_forbidden_chars" != x; then
29057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29059  fi
29060
29061
29062  windows_path="$new_path"
29063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29064    unix_path=`$CYGPATH -u "$windows_path"`
29065    new_path="$unix_path"
29066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29068    new_path="$unix_path"
29069  fi
29070
29071  if test "x$path" != "x$new_path"; then
29072    BOOT_JDK="$new_path"
29073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29075  fi
29076
29077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29079
29080    else
29081      # We're on a unix platform. Hooray! :)
29082      path="$BOOT_JDK"
29083      has_space=`$ECHO "$path" | $GREP " "`
29084      if test "x$has_space" != x; then
29085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29088      fi
29089
29090      # Use eval to expand a potential ~
29091      eval path="$path"
29092      if test ! -f "$path" && test ! -d "$path"; then
29093        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29094      fi
29095
29096      if test -d "$path"; then
29097        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29098      else
29099        dir="`$DIRNAME "$path"`"
29100        base="`$BASENAME "$path"`"
29101        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29102      fi
29103    fi
29104  fi
29105
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29107$as_echo_n "checking for Boot JDK... " >&6; }
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29109$as_echo "$BOOT_JDK" >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29111$as_echo_n "checking Boot JDK version... " >&6; }
29112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29114$as_echo "$BOOT_JDK_VERSION" >&6; }
29115          fi # end check jdk version
29116        fi # end check javac
29117      fi # end check java
29118    fi # end check boot jdk found
29119  fi
29120
29121    done
29122  fi
29123
29124
29125    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29126    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29127      # Do we have a bin/java?
29128      if test ! -x "$BOOT_JDK/bin/java"; then
29129        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29131        BOOT_JDK_FOUND=no
29132      else
29133        # Do we have a bin/javac?
29134        if test ! -x "$BOOT_JDK/bin/javac"; then
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29138$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29139          BOOT_JDK_FOUND=no
29140        else
29141          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29142          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29143
29144          # Extra M4 quote needed to protect [] in grep expression.
29145          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29146          if test "x$FOUND_CORRECT_VERSION" = x; then
29147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29150$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29151            BOOT_JDK_FOUND=no
29152          else
29153            # We're done! :-)
29154            BOOT_JDK_FOUND=yes
29155
29156  # Only process if variable expands to non-empty
29157
29158  if test "x$BOOT_JDK" != x; then
29159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29160
29161  # Input might be given as Windows format, start by converting to
29162  # unix format.
29163  path="$BOOT_JDK"
29164  new_path=`$CYGPATH -u "$path"`
29165
29166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29169  # "foo.exe" is OK but "foo" is an error.
29170  #
29171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29172  # It is also a way to make sure we got the proper file name for the real test later on.
29173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29174  if test "x$test_shortpath" = x; then
29175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29176$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29177    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29178  fi
29179
29180  # Call helper function which possibly converts this using DOS-style short mode.
29181  # If so, the updated path is stored in $new_path.
29182
29183  input_path="$new_path"
29184  # Check if we need to convert this using DOS-style short mode. If the path
29185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29186  # take no chances and rewrite it.
29187  # Note: m4 eats our [], so we need to use [ and ] instead.
29188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29189  if test "x$has_forbidden_chars" != x; then
29190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29194      # Going to short mode and back again did indeed matter. Since short mode is
29195      # case insensitive, let's make it lowercase to improve readability.
29196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29197      # Now convert it back to Unix-style (cygpath)
29198      input_path=`$CYGPATH -u "$shortmode_path"`
29199      new_path="$input_path"
29200    fi
29201  fi
29202
29203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29204  if test "x$test_cygdrive_prefix" = x; then
29205    # As a simple fix, exclude /usr/bin since it's not a real path.
29206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29208      # a path prefixed by /cygdrive for fixpath to work.
29209      new_path="$CYGWIN_ROOT_PATH$input_path"
29210    fi
29211  fi
29212
29213
29214  if test "x$path" != "x$new_path"; then
29215    BOOT_JDK="$new_path"
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29218  fi
29219
29220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29221
29222  path="$BOOT_JDK"
29223  has_colon=`$ECHO $path | $GREP ^.:`
29224  new_path="$path"
29225  if test "x$has_colon" = x; then
29226    # Not in mixed or Windows style, start by that.
29227    new_path=`cmd //c echo $path`
29228  fi
29229
29230
29231  input_path="$new_path"
29232  # Check if we need to convert this using DOS-style short mode. If the path
29233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29234  # take no chances and rewrite it.
29235  # Note: m4 eats our [], so we need to use [ and ] instead.
29236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29237  if test "x$has_forbidden_chars" != x; then
29238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29240  fi
29241
29242
29243  windows_path="$new_path"
29244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29245    unix_path=`$CYGPATH -u "$windows_path"`
29246    new_path="$unix_path"
29247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29249    new_path="$unix_path"
29250  fi
29251
29252  if test "x$path" != "x$new_path"; then
29253    BOOT_JDK="$new_path"
29254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29256  fi
29257
29258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29260
29261    else
29262      # We're on a unix platform. Hooray! :)
29263      path="$BOOT_JDK"
29264      has_space=`$ECHO "$path" | $GREP " "`
29265      if test "x$has_space" != x; then
29266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29269      fi
29270
29271      # Use eval to expand a potential ~
29272      eval path="$path"
29273      if test ! -f "$path" && test ! -d "$path"; then
29274        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29275      fi
29276
29277      if test -d "$path"; then
29278        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29279      else
29280        dir="`$DIRNAME "$path"`"
29281        base="`$BASENAME "$path"`"
29282        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29283      fi
29284    fi
29285  fi
29286
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29288$as_echo_n "checking for Boot JDK... " >&6; }
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29290$as_echo "$BOOT_JDK" >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29292$as_echo_n "checking Boot JDK version... " >&6; }
29293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29295$as_echo "$BOOT_JDK_VERSION" >&6; }
29296          fi # end check jdk version
29297        fi # end check javac
29298      fi # end check java
29299    fi # end check boot jdk found
29300  fi
29301
29302  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29303
29304  if test "x$BOOT_JDK_FOUND" = xno; then
29305    # Now execute the test
29306
29307  BOOT_JDK_PREFIX="/usr/lib/jvm"
29308  BOOT_JDK_SUFFIX=""
29309  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29310  if test "x$ALL_JDKS_FOUND" != x; then
29311    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29312
29313  if test "x$BOOT_JDK_FOUND" = xno; then
29314    # Now execute the test
29315
29316        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29317        if test -d "$BOOT_JDK"; then
29318          BOOT_JDK_FOUND=maybe
29319          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29320$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29321        fi
29322
29323
29324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29326      # Do we have a bin/java?
29327      if test ! -x "$BOOT_JDK/bin/java"; then
29328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29330        BOOT_JDK_FOUND=no
29331      else
29332        # Do we have a bin/javac?
29333        if test ! -x "$BOOT_JDK/bin/javac"; then
29334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29338          BOOT_JDK_FOUND=no
29339        else
29340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29342
29343          # Extra M4 quote needed to protect [] in grep expression.
29344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29345          if test "x$FOUND_CORRECT_VERSION" = x; then
29346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29350            BOOT_JDK_FOUND=no
29351          else
29352            # We're done! :-)
29353            BOOT_JDK_FOUND=yes
29354
29355  # Only process if variable expands to non-empty
29356
29357  if test "x$BOOT_JDK" != x; then
29358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29359
29360  # Input might be given as Windows format, start by converting to
29361  # unix format.
29362  path="$BOOT_JDK"
29363  new_path=`$CYGPATH -u "$path"`
29364
29365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29368  # "foo.exe" is OK but "foo" is an error.
29369  #
29370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29371  # It is also a way to make sure we got the proper file name for the real test later on.
29372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29373  if test "x$test_shortpath" = x; then
29374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29377  fi
29378
29379  # Call helper function which possibly converts this using DOS-style short mode.
29380  # If so, the updated path is stored in $new_path.
29381
29382  input_path="$new_path"
29383  # Check if we need to convert this using DOS-style short mode. If the path
29384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29385  # take no chances and rewrite it.
29386  # Note: m4 eats our [], so we need to use [ and ] instead.
29387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29388  if test "x$has_forbidden_chars" != x; then
29389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29393      # Going to short mode and back again did indeed matter. Since short mode is
29394      # case insensitive, let's make it lowercase to improve readability.
29395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29396      # Now convert it back to Unix-style (cygpath)
29397      input_path=`$CYGPATH -u "$shortmode_path"`
29398      new_path="$input_path"
29399    fi
29400  fi
29401
29402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29403  if test "x$test_cygdrive_prefix" = x; then
29404    # As a simple fix, exclude /usr/bin since it's not a real path.
29405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29407      # a path prefixed by /cygdrive for fixpath to work.
29408      new_path="$CYGWIN_ROOT_PATH$input_path"
29409    fi
29410  fi
29411
29412
29413  if test "x$path" != "x$new_path"; then
29414    BOOT_JDK="$new_path"
29415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29417  fi
29418
29419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29420
29421  path="$BOOT_JDK"
29422  has_colon=`$ECHO $path | $GREP ^.:`
29423  new_path="$path"
29424  if test "x$has_colon" = x; then
29425    # Not in mixed or Windows style, start by that.
29426    new_path=`cmd //c echo $path`
29427  fi
29428
29429
29430  input_path="$new_path"
29431  # Check if we need to convert this using DOS-style short mode. If the path
29432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29433  # take no chances and rewrite it.
29434  # Note: m4 eats our [], so we need to use [ and ] instead.
29435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29436  if test "x$has_forbidden_chars" != x; then
29437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29439  fi
29440
29441
29442  windows_path="$new_path"
29443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29444    unix_path=`$CYGPATH -u "$windows_path"`
29445    new_path="$unix_path"
29446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29448    new_path="$unix_path"
29449  fi
29450
29451  if test "x$path" != "x$new_path"; then
29452    BOOT_JDK="$new_path"
29453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29455  fi
29456
29457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29459
29460    else
29461      # We're on a unix platform. Hooray! :)
29462      path="$BOOT_JDK"
29463      has_space=`$ECHO "$path" | $GREP " "`
29464      if test "x$has_space" != x; then
29465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29468      fi
29469
29470      # Use eval to expand a potential ~
29471      eval path="$path"
29472      if test ! -f "$path" && test ! -d "$path"; then
29473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29474      fi
29475
29476      if test -d "$path"; then
29477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29478      else
29479        dir="`$DIRNAME "$path"`"
29480        base="`$BASENAME "$path"`"
29481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29482      fi
29483    fi
29484  fi
29485
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29487$as_echo_n "checking for Boot JDK... " >&6; }
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29489$as_echo "$BOOT_JDK" >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29491$as_echo_n "checking Boot JDK version... " >&6; }
29492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29494$as_echo "$BOOT_JDK_VERSION" >&6; }
29495          fi # end check jdk version
29496        fi # end check javac
29497      fi # end check java
29498    fi # end check boot jdk found
29499  fi
29500
29501    done
29502  fi
29503
29504
29505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29507      # Do we have a bin/java?
29508      if test ! -x "$BOOT_JDK/bin/java"; then
29509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29511        BOOT_JDK_FOUND=no
29512      else
29513        # Do we have a bin/javac?
29514        if test ! -x "$BOOT_JDK/bin/javac"; then
29515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29519          BOOT_JDK_FOUND=no
29520        else
29521          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29522          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29523
29524          # Extra M4 quote needed to protect [] in grep expression.
29525          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29526          if test "x$FOUND_CORRECT_VERSION" = x; then
29527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29530$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29531            BOOT_JDK_FOUND=no
29532          else
29533            # We're done! :-)
29534            BOOT_JDK_FOUND=yes
29535
29536  # Only process if variable expands to non-empty
29537
29538  if test "x$BOOT_JDK" != x; then
29539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29540
29541  # Input might be given as Windows format, start by converting to
29542  # unix format.
29543  path="$BOOT_JDK"
29544  new_path=`$CYGPATH -u "$path"`
29545
29546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29549  # "foo.exe" is OK but "foo" is an error.
29550  #
29551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29552  # It is also a way to make sure we got the proper file name for the real test later on.
29553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29554  if test "x$test_shortpath" = x; then
29555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29558  fi
29559
29560  # Call helper function which possibly converts this using DOS-style short mode.
29561  # If so, the updated path is stored in $new_path.
29562
29563  input_path="$new_path"
29564  # Check if we need to convert this using DOS-style short mode. If the path
29565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29566  # take no chances and rewrite it.
29567  # Note: m4 eats our [], so we need to use [ and ] instead.
29568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29569  if test "x$has_forbidden_chars" != x; then
29570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29574      # Going to short mode and back again did indeed matter. Since short mode is
29575      # case insensitive, let's make it lowercase to improve readability.
29576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29577      # Now convert it back to Unix-style (cygpath)
29578      input_path=`$CYGPATH -u "$shortmode_path"`
29579      new_path="$input_path"
29580    fi
29581  fi
29582
29583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29584  if test "x$test_cygdrive_prefix" = x; then
29585    # As a simple fix, exclude /usr/bin since it's not a real path.
29586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29588      # a path prefixed by /cygdrive for fixpath to work.
29589      new_path="$CYGWIN_ROOT_PATH$input_path"
29590    fi
29591  fi
29592
29593
29594  if test "x$path" != "x$new_path"; then
29595    BOOT_JDK="$new_path"
29596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29598  fi
29599
29600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29601
29602  path="$BOOT_JDK"
29603  has_colon=`$ECHO $path | $GREP ^.:`
29604  new_path="$path"
29605  if test "x$has_colon" = x; then
29606    # Not in mixed or Windows style, start by that.
29607    new_path=`cmd //c echo $path`
29608  fi
29609
29610
29611  input_path="$new_path"
29612  # Check if we need to convert this using DOS-style short mode. If the path
29613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29614  # take no chances and rewrite it.
29615  # Note: m4 eats our [], so we need to use [ and ] instead.
29616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29617  if test "x$has_forbidden_chars" != x; then
29618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29620  fi
29621
29622
29623  windows_path="$new_path"
29624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29625    unix_path=`$CYGPATH -u "$windows_path"`
29626    new_path="$unix_path"
29627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29629    new_path="$unix_path"
29630  fi
29631
29632  if test "x$path" != "x$new_path"; then
29633    BOOT_JDK="$new_path"
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29636  fi
29637
29638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29640
29641    else
29642      # We're on a unix platform. Hooray! :)
29643      path="$BOOT_JDK"
29644      has_space=`$ECHO "$path" | $GREP " "`
29645      if test "x$has_space" != x; then
29646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29649      fi
29650
29651      # Use eval to expand a potential ~
29652      eval path="$path"
29653      if test ! -f "$path" && test ! -d "$path"; then
29654        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29655      fi
29656
29657      if test -d "$path"; then
29658        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29659      else
29660        dir="`$DIRNAME "$path"`"
29661        base="`$BASENAME "$path"`"
29662        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29663      fi
29664    fi
29665  fi
29666
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29668$as_echo_n "checking for Boot JDK... " >&6; }
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29670$as_echo "$BOOT_JDK" >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29672$as_echo_n "checking Boot JDK version... " >&6; }
29673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29675$as_echo "$BOOT_JDK_VERSION" >&6; }
29676          fi # end check jdk version
29677        fi # end check javac
29678      fi # end check java
29679    fi # end check boot jdk found
29680  fi
29681
29682  fi
29683
29684
29685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29687      # Do we have a bin/java?
29688      if test ! -x "$BOOT_JDK/bin/java"; then
29689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29691        BOOT_JDK_FOUND=no
29692      else
29693        # Do we have a bin/javac?
29694        if test ! -x "$BOOT_JDK/bin/javac"; then
29695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29699          BOOT_JDK_FOUND=no
29700        else
29701          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29702          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29703
29704          # Extra M4 quote needed to protect [] in grep expression.
29705          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29706          if test "x$FOUND_CORRECT_VERSION" = x; then
29707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29710$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29711            BOOT_JDK_FOUND=no
29712          else
29713            # We're done! :-)
29714            BOOT_JDK_FOUND=yes
29715
29716  # Only process if variable expands to non-empty
29717
29718  if test "x$BOOT_JDK" != x; then
29719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29720
29721  # Input might be given as Windows format, start by converting to
29722  # unix format.
29723  path="$BOOT_JDK"
29724  new_path=`$CYGPATH -u "$path"`
29725
29726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29729  # "foo.exe" is OK but "foo" is an error.
29730  #
29731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29732  # It is also a way to make sure we got the proper file name for the real test later on.
29733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29734  if test "x$test_shortpath" = x; then
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29738  fi
29739
29740  # Call helper function which possibly converts this using DOS-style short mode.
29741  # If so, the updated path is stored in $new_path.
29742
29743  input_path="$new_path"
29744  # Check if we need to convert this using DOS-style short mode. If the path
29745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29746  # take no chances and rewrite it.
29747  # Note: m4 eats our [], so we need to use [ and ] instead.
29748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29749  if test "x$has_forbidden_chars" != x; then
29750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29754      # Going to short mode and back again did indeed matter. Since short mode is
29755      # case insensitive, let's make it lowercase to improve readability.
29756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29757      # Now convert it back to Unix-style (cygpath)
29758      input_path=`$CYGPATH -u "$shortmode_path"`
29759      new_path="$input_path"
29760    fi
29761  fi
29762
29763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29764  if test "x$test_cygdrive_prefix" = x; then
29765    # As a simple fix, exclude /usr/bin since it's not a real path.
29766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29768      # a path prefixed by /cygdrive for fixpath to work.
29769      new_path="$CYGWIN_ROOT_PATH$input_path"
29770    fi
29771  fi
29772
29773
29774  if test "x$path" != "x$new_path"; then
29775    BOOT_JDK="$new_path"
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29778  fi
29779
29780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29781
29782  path="$BOOT_JDK"
29783  has_colon=`$ECHO $path | $GREP ^.:`
29784  new_path="$path"
29785  if test "x$has_colon" = x; then
29786    # Not in mixed or Windows style, start by that.
29787    new_path=`cmd //c echo $path`
29788  fi
29789
29790
29791  input_path="$new_path"
29792  # Check if we need to convert this using DOS-style short mode. If the path
29793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29794  # take no chances and rewrite it.
29795  # Note: m4 eats our [], so we need to use [ and ] instead.
29796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29797  if test "x$has_forbidden_chars" != x; then
29798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29800  fi
29801
29802
29803  windows_path="$new_path"
29804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29805    unix_path=`$CYGPATH -u "$windows_path"`
29806    new_path="$unix_path"
29807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29809    new_path="$unix_path"
29810  fi
29811
29812  if test "x$path" != "x$new_path"; then
29813    BOOT_JDK="$new_path"
29814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29816  fi
29817
29818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29820
29821    else
29822      # We're on a unix platform. Hooray! :)
29823      path="$BOOT_JDK"
29824      has_space=`$ECHO "$path" | $GREP " "`
29825      if test "x$has_space" != x; then
29826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29829      fi
29830
29831      # Use eval to expand a potential ~
29832      eval path="$path"
29833      if test ! -f "$path" && test ! -d "$path"; then
29834        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29835      fi
29836
29837      if test -d "$path"; then
29838        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29839      else
29840        dir="`$DIRNAME "$path"`"
29841        base="`$BASENAME "$path"`"
29842        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29843      fi
29844    fi
29845  fi
29846
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29848$as_echo_n "checking for Boot JDK... " >&6; }
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29850$as_echo "$BOOT_JDK" >&6; }
29851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29852$as_echo_n "checking Boot JDK version... " >&6; }
29853            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29855$as_echo "$BOOT_JDK_VERSION" >&6; }
29856          fi # end check jdk version
29857        fi # end check javac
29858      fi # end check java
29859    fi # end check boot jdk found
29860  fi
29861
29862
29863  # If we haven't found anything yet, we've truly lost. Give up.
29864  if test "x$BOOT_JDK_FOUND" = xno; then
29865
29866  # Print a helpful message on how to acquire the necessary build dependency.
29867  # openjdk is the help tag: freetype, cups, alsa etc
29868  MISSING_DEPENDENCY=openjdk
29869
29870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29871    cygwin_help $MISSING_DEPENDENCY
29872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29873    msys_help $MISSING_DEPENDENCY
29874  else
29875    PKGHANDLER_COMMAND=
29876
29877    case $PKGHANDLER in
29878      apt-get)
29879        apt_help     $MISSING_DEPENDENCY ;;
29880      yum)
29881        yum_help     $MISSING_DEPENDENCY ;;
29882      port)
29883        port_help    $MISSING_DEPENDENCY ;;
29884      pkgutil)
29885        pkgutil_help $MISSING_DEPENDENCY ;;
29886      pkgadd)
29887        pkgadd_help  $MISSING_DEPENDENCY ;;
29888    esac
29889
29890    if test "x$PKGHANDLER_COMMAND" != x; then
29891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29892    fi
29893  fi
29894
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29896$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29897    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29898$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29899    as_fn_error $? "Cannot continue" "$LINENO" 5
29900  fi
29901
29902
29903
29904  # Setup tools from the Boot JDK.
29905
29906  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29907
29908  # Publish this variable in the help.
29909
29910
29911  if [ -z "${JAVA+x}" ]; then
29912    # The variable is not set by user, try to locate tool using the code snippet
29913
29914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29915$as_echo_n "checking for java in Boot JDK... " >&6; }
29916      JAVA=$BOOT_JDK/bin/java
29917      if test ! -x $JAVA; then
29918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29919$as_echo "not found" >&6; }
29920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29922        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29923      fi
29924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29925$as_echo "ok" >&6; }
29926
29927
29928  else
29929    # The variable is set, but is it from the command line or the environment?
29930
29931    # Try to remove the string !JAVA! from our list.
29932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29934      # If it failed, the variable was not from the command line. Ignore it,
29935      # but warn the user (except for BASH, which is always set by the calling BASH).
29936      if test "xJAVA" != xBASH; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29938$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29939      fi
29940      # Try to locate tool using the code snippet
29941
29942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29943$as_echo_n "checking for java in Boot JDK... " >&6; }
29944      JAVA=$BOOT_JDK/bin/java
29945      if test ! -x $JAVA; then
29946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29947$as_echo "not found" >&6; }
29948        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29949$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29950        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29951      fi
29952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29953$as_echo "ok" >&6; }
29954
29955
29956    else
29957      # If it succeeded, then it was overridden by the user. We will use it
29958      # for the tool.
29959
29960      # First remove it from the list of overridden variables, so we can test
29961      # for unknown variables in the end.
29962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29963
29964      # Check if we try to supply an empty value
29965      if test "x$JAVA" = x; then
29966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29967$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29969$as_echo_n "checking for JAVA... " >&6; }
29970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29971$as_echo "disabled" >&6; }
29972      else
29973        # Check if the provided tool contains a complete path.
29974        tool_specified="$JAVA"
29975        tool_basename="${tool_specified##*/}"
29976        if test "x$tool_basename" = "x$tool_specified"; then
29977          # A command without a complete path is provided, search $PATH.
29978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29979$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29980          # Extract the first word of "$tool_basename", so it can be a program name with args.
29981set dummy $tool_basename; ac_word=$2
29982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29983$as_echo_n "checking for $ac_word... " >&6; }
29984if ${ac_cv_path_JAVA+:} false; then :
29985  $as_echo_n "(cached) " >&6
29986else
29987  case $JAVA in
29988  [\\/]* | ?:[\\/]*)
29989  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29990  ;;
29991  *)
29992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29993for as_dir in $PATH
29994do
29995  IFS=$as_save_IFS
29996  test -z "$as_dir" && as_dir=.
29997    for ac_exec_ext in '' $ac_executable_extensions; do
29998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29999    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30001    break 2
30002  fi
30003done
30004  done
30005IFS=$as_save_IFS
30006
30007  ;;
30008esac
30009fi
30010JAVA=$ac_cv_path_JAVA
30011if test -n "$JAVA"; then
30012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30013$as_echo "$JAVA" >&6; }
30014else
30015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30016$as_echo "no" >&6; }
30017fi
30018
30019
30020          if test "x$JAVA" = x; then
30021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30022          fi
30023        else
30024          # Otherwise we believe it is a complete path. Use it as it is.
30025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30026$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30028$as_echo_n "checking for JAVA... " >&6; }
30029          if test ! -x "$tool_specified"; then
30030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30031$as_echo "not found" >&6; }
30032            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30033          fi
30034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30035$as_echo "$tool_specified" >&6; }
30036        fi
30037      fi
30038    fi
30039
30040  fi
30041
30042
30043
30044  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30045
30046  # Publish this variable in the help.
30047
30048
30049  if [ -z "${JAVAC+x}" ]; then
30050    # The variable is not set by user, try to locate tool using the code snippet
30051
30052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30053$as_echo_n "checking for javac in Boot JDK... " >&6; }
30054      JAVAC=$BOOT_JDK/bin/javac
30055      if test ! -x $JAVAC; then
30056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30057$as_echo "not found" >&6; }
30058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30060        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30061      fi
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30063$as_echo "ok" >&6; }
30064
30065
30066  else
30067    # The variable is set, but is it from the command line or the environment?
30068
30069    # Try to remove the string !JAVAC! from our list.
30070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30072      # If it failed, the variable was not from the command line. Ignore it,
30073      # but warn the user (except for BASH, which is always set by the calling BASH).
30074      if test "xJAVAC" != xBASH; then
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30076$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30077      fi
30078      # Try to locate tool using the code snippet
30079
30080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30081$as_echo_n "checking for javac in Boot JDK... " >&6; }
30082      JAVAC=$BOOT_JDK/bin/javac
30083      if test ! -x $JAVAC; then
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30085$as_echo "not found" >&6; }
30086        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30087$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30088        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30089      fi
30090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30091$as_echo "ok" >&6; }
30092
30093
30094    else
30095      # If it succeeded, then it was overridden by the user. We will use it
30096      # for the tool.
30097
30098      # First remove it from the list of overridden variables, so we can test
30099      # for unknown variables in the end.
30100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30101
30102      # Check if we try to supply an empty value
30103      if test "x$JAVAC" = x; then
30104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30105$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30107$as_echo_n "checking for JAVAC... " >&6; }
30108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30109$as_echo "disabled" >&6; }
30110      else
30111        # Check if the provided tool contains a complete path.
30112        tool_specified="$JAVAC"
30113        tool_basename="${tool_specified##*/}"
30114        if test "x$tool_basename" = "x$tool_specified"; then
30115          # A command without a complete path is provided, search $PATH.
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30117$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30118          # Extract the first word of "$tool_basename", so it can be a program name with args.
30119set dummy $tool_basename; ac_word=$2
30120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30121$as_echo_n "checking for $ac_word... " >&6; }
30122if ${ac_cv_path_JAVAC+:} false; then :
30123  $as_echo_n "(cached) " >&6
30124else
30125  case $JAVAC in
30126  [\\/]* | ?:[\\/]*)
30127  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30128  ;;
30129  *)
30130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30131for as_dir in $PATH
30132do
30133  IFS=$as_save_IFS
30134  test -z "$as_dir" && as_dir=.
30135    for ac_exec_ext in '' $ac_executable_extensions; do
30136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30137    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30139    break 2
30140  fi
30141done
30142  done
30143IFS=$as_save_IFS
30144
30145  ;;
30146esac
30147fi
30148JAVAC=$ac_cv_path_JAVAC
30149if test -n "$JAVAC"; then
30150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30151$as_echo "$JAVAC" >&6; }
30152else
30153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30154$as_echo "no" >&6; }
30155fi
30156
30157
30158          if test "x$JAVAC" = x; then
30159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30160          fi
30161        else
30162          # Otherwise we believe it is a complete path. Use it as it is.
30163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30164$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30166$as_echo_n "checking for JAVAC... " >&6; }
30167          if test ! -x "$tool_specified"; then
30168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30169$as_echo "not found" >&6; }
30170            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30171          fi
30172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30173$as_echo "$tool_specified" >&6; }
30174        fi
30175      fi
30176    fi
30177
30178  fi
30179
30180
30181
30182  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30183
30184  # Publish this variable in the help.
30185
30186
30187  if [ -z "${JAVAH+x}" ]; then
30188    # The variable is not set by user, try to locate tool using the code snippet
30189
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30191$as_echo_n "checking for javah in Boot JDK... " >&6; }
30192      JAVAH=$BOOT_JDK/bin/javah
30193      if test ! -x $JAVAH; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30195$as_echo "not found" >&6; }
30196        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30197$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30198        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30199      fi
30200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30201$as_echo "ok" >&6; }
30202
30203
30204  else
30205    # The variable is set, but is it from the command line or the environment?
30206
30207    # Try to remove the string !JAVAH! from our list.
30208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30210      # If it failed, the variable was not from the command line. Ignore it,
30211      # but warn the user (except for BASH, which is always set by the calling BASH).
30212      if test "xJAVAH" != xBASH; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30214$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30215      fi
30216      # Try to locate tool using the code snippet
30217
30218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30219$as_echo_n "checking for javah in Boot JDK... " >&6; }
30220      JAVAH=$BOOT_JDK/bin/javah
30221      if test ! -x $JAVAH; then
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30223$as_echo "not found" >&6; }
30224        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30225$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30226        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30227      fi
30228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30229$as_echo "ok" >&6; }
30230
30231
30232    else
30233      # If it succeeded, then it was overridden by the user. We will use it
30234      # for the tool.
30235
30236      # First remove it from the list of overridden variables, so we can test
30237      # for unknown variables in the end.
30238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30239
30240      # Check if we try to supply an empty value
30241      if test "x$JAVAH" = x; then
30242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30243$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30245$as_echo_n "checking for JAVAH... " >&6; }
30246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30247$as_echo "disabled" >&6; }
30248      else
30249        # Check if the provided tool contains a complete path.
30250        tool_specified="$JAVAH"
30251        tool_basename="${tool_specified##*/}"
30252        if test "x$tool_basename" = "x$tool_specified"; then
30253          # A command without a complete path is provided, search $PATH.
30254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30255$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30256          # Extract the first word of "$tool_basename", so it can be a program name with args.
30257set dummy $tool_basename; ac_word=$2
30258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30259$as_echo_n "checking for $ac_word... " >&6; }
30260if ${ac_cv_path_JAVAH+:} false; then :
30261  $as_echo_n "(cached) " >&6
30262else
30263  case $JAVAH in
30264  [\\/]* | ?:[\\/]*)
30265  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30266  ;;
30267  *)
30268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30269for as_dir in $PATH
30270do
30271  IFS=$as_save_IFS
30272  test -z "$as_dir" && as_dir=.
30273    for ac_exec_ext in '' $ac_executable_extensions; do
30274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30275    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30277    break 2
30278  fi
30279done
30280  done
30281IFS=$as_save_IFS
30282
30283  ;;
30284esac
30285fi
30286JAVAH=$ac_cv_path_JAVAH
30287if test -n "$JAVAH"; then
30288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30289$as_echo "$JAVAH" >&6; }
30290else
30291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30292$as_echo "no" >&6; }
30293fi
30294
30295
30296          if test "x$JAVAH" = x; then
30297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30298          fi
30299        else
30300          # Otherwise we believe it is a complete path. Use it as it is.
30301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30302$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30304$as_echo_n "checking for JAVAH... " >&6; }
30305          if test ! -x "$tool_specified"; then
30306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30307$as_echo "not found" >&6; }
30308            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30309          fi
30310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30311$as_echo "$tool_specified" >&6; }
30312        fi
30313      fi
30314    fi
30315
30316  fi
30317
30318
30319
30320  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30321
30322  # Publish this variable in the help.
30323
30324
30325  if [ -z "${JAR+x}" ]; then
30326    # The variable is not set by user, try to locate tool using the code snippet
30327
30328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30329$as_echo_n "checking for jar in Boot JDK... " >&6; }
30330      JAR=$BOOT_JDK/bin/jar
30331      if test ! -x $JAR; then
30332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30333$as_echo "not found" >&6; }
30334        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30335$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30336        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30337      fi
30338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30339$as_echo "ok" >&6; }
30340
30341
30342  else
30343    # The variable is set, but is it from the command line or the environment?
30344
30345    # Try to remove the string !JAR! from our list.
30346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30348      # If it failed, the variable was not from the command line. Ignore it,
30349      # but warn the user (except for BASH, which is always set by the calling BASH).
30350      if test "xJAR" != xBASH; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30352$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30353      fi
30354      # Try to locate tool using the code snippet
30355
30356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30357$as_echo_n "checking for jar in Boot JDK... " >&6; }
30358      JAR=$BOOT_JDK/bin/jar
30359      if test ! -x $JAR; then
30360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30361$as_echo "not found" >&6; }
30362        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30363$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30364        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30365      fi
30366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30367$as_echo "ok" >&6; }
30368
30369
30370    else
30371      # If it succeeded, then it was overridden by the user. We will use it
30372      # for the tool.
30373
30374      # First remove it from the list of overridden variables, so we can test
30375      # for unknown variables in the end.
30376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30377
30378      # Check if we try to supply an empty value
30379      if test "x$JAR" = x; then
30380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30381$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30383$as_echo_n "checking for JAR... " >&6; }
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30385$as_echo "disabled" >&6; }
30386      else
30387        # Check if the provided tool contains a complete path.
30388        tool_specified="$JAR"
30389        tool_basename="${tool_specified##*/}"
30390        if test "x$tool_basename" = "x$tool_specified"; then
30391          # A command without a complete path is provided, search $PATH.
30392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30393$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30394          # Extract the first word of "$tool_basename", so it can be a program name with args.
30395set dummy $tool_basename; ac_word=$2
30396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30397$as_echo_n "checking for $ac_word... " >&6; }
30398if ${ac_cv_path_JAR+:} false; then :
30399  $as_echo_n "(cached) " >&6
30400else
30401  case $JAR in
30402  [\\/]* | ?:[\\/]*)
30403  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30404  ;;
30405  *)
30406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30407for as_dir in $PATH
30408do
30409  IFS=$as_save_IFS
30410  test -z "$as_dir" && as_dir=.
30411    for ac_exec_ext in '' $ac_executable_extensions; do
30412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30413    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30415    break 2
30416  fi
30417done
30418  done
30419IFS=$as_save_IFS
30420
30421  ;;
30422esac
30423fi
30424JAR=$ac_cv_path_JAR
30425if test -n "$JAR"; then
30426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30427$as_echo "$JAR" >&6; }
30428else
30429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30430$as_echo "no" >&6; }
30431fi
30432
30433
30434          if test "x$JAR" = x; then
30435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30436          fi
30437        else
30438          # Otherwise we believe it is a complete path. Use it as it is.
30439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30440$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30442$as_echo_n "checking for JAR... " >&6; }
30443          if test ! -x "$tool_specified"; then
30444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30445$as_echo "not found" >&6; }
30446            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30447          fi
30448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30449$as_echo "$tool_specified" >&6; }
30450        fi
30451      fi
30452    fi
30453
30454  fi
30455
30456
30457
30458  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30459
30460  # Publish this variable in the help.
30461
30462
30463  if [ -z "${JARSIGNER+x}" ]; then
30464    # The variable is not set by user, try to locate tool using the code snippet
30465
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30467$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30468      JARSIGNER=$BOOT_JDK/bin/jarsigner
30469      if test ! -x $JARSIGNER; then
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30471$as_echo "not found" >&6; }
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30473$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30474        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30475      fi
30476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30477$as_echo "ok" >&6; }
30478
30479
30480  else
30481    # The variable is set, but is it from the command line or the environment?
30482
30483    # Try to remove the string !JARSIGNER! from our list.
30484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30486      # If it failed, the variable was not from the command line. Ignore it,
30487      # but warn the user (except for BASH, which is always set by the calling BASH).
30488      if test "xJARSIGNER" != xBASH; then
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30490$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30491      fi
30492      # Try to locate tool using the code snippet
30493
30494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30495$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30496      JARSIGNER=$BOOT_JDK/bin/jarsigner
30497      if test ! -x $JARSIGNER; then
30498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30499$as_echo "not found" >&6; }
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30501$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30502        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30503      fi
30504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30505$as_echo "ok" >&6; }
30506
30507
30508    else
30509      # If it succeeded, then it was overridden by the user. We will use it
30510      # for the tool.
30511
30512      # First remove it from the list of overridden variables, so we can test
30513      # for unknown variables in the end.
30514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30515
30516      # Check if we try to supply an empty value
30517      if test "x$JARSIGNER" = x; then
30518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30519$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30521$as_echo_n "checking for JARSIGNER... " >&6; }
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30523$as_echo "disabled" >&6; }
30524      else
30525        # Check if the provided tool contains a complete path.
30526        tool_specified="$JARSIGNER"
30527        tool_basename="${tool_specified##*/}"
30528        if test "x$tool_basename" = "x$tool_specified"; then
30529          # A command without a complete path is provided, search $PATH.
30530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30531$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30532          # Extract the first word of "$tool_basename", so it can be a program name with args.
30533set dummy $tool_basename; ac_word=$2
30534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30535$as_echo_n "checking for $ac_word... " >&6; }
30536if ${ac_cv_path_JARSIGNER+:} false; then :
30537  $as_echo_n "(cached) " >&6
30538else
30539  case $JARSIGNER in
30540  [\\/]* | ?:[\\/]*)
30541  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30542  ;;
30543  *)
30544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30545for as_dir in $PATH
30546do
30547  IFS=$as_save_IFS
30548  test -z "$as_dir" && as_dir=.
30549    for ac_exec_ext in '' $ac_executable_extensions; do
30550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30551    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30553    break 2
30554  fi
30555done
30556  done
30557IFS=$as_save_IFS
30558
30559  ;;
30560esac
30561fi
30562JARSIGNER=$ac_cv_path_JARSIGNER
30563if test -n "$JARSIGNER"; then
30564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30565$as_echo "$JARSIGNER" >&6; }
30566else
30567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30568$as_echo "no" >&6; }
30569fi
30570
30571
30572          if test "x$JARSIGNER" = x; then
30573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30574          fi
30575        else
30576          # Otherwise we believe it is a complete path. Use it as it is.
30577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30578$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30580$as_echo_n "checking for JARSIGNER... " >&6; }
30581          if test ! -x "$tool_specified"; then
30582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30583$as_echo "not found" >&6; }
30584            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30585          fi
30586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30587$as_echo "$tool_specified" >&6; }
30588        fi
30589      fi
30590    fi
30591
30592  fi
30593
30594
30595
30596  # Finally, set some other options...
30597
30598  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30599  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30600
30601
30602
30603  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30604  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30605  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30606  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30607  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30608  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30609    dummy="$dummy --patch-module foo=bar"
30610    JVM_ARG_OK=true
30611  else
30612    $ECHO "Arg failed:" >&5
30613    $ECHO "$OUTPUT" >&5
30614    JVM_ARG_OK=false
30615  fi
30616
30617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30618$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30619  if test "x$JVM_ARG_OK" = "xtrue"; then
30620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30621$as_echo "yes" >&6; }
30622    BOOT_JDK_MODULAR="true"
30623  else
30624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30625$as_echo "no" >&6; }
30626    BOOT_JDK_MODULAR="false"
30627  fi
30628
30629
30630
30631
30632  # Check if the boot jdk is 32 or 64 bit
30633  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30634    BOOT_JDK_BITS="64"
30635  else
30636    BOOT_JDK_BITS="32"
30637  fi
30638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30639$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30641$as_echo "$BOOT_JDK_BITS" >&6; }
30642
30643
30644
30645
30646# Check whether --with-build-jdk was given.
30647if test "${with_build_jdk+set}" = set; then :
30648  withval=$with_build_jdk;
30649fi
30650
30651
30652  CREATE_BUILDJDK=false
30653  EXTERNAL_BUILDJDK=false
30654  BUILD_JDK_FOUND="no"
30655  if test "x$with_build_jdk" != "x"; then
30656
30657  if test "x$BUILD_JDK_FOUND" = xno; then
30658    # Execute the test
30659
30660       if test "x$with_build_jdk" != x; then
30661         BUILD_JDK=$with_build_jdk
30662         BUILD_JDK_FOUND=maybe
30663         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30664$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30665       fi
30666
30667    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30668    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30669      # Do we have a bin/java?
30670      if test ! -x "$BUILD_JDK/bin/java"; then
30671        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30672$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30673        BUILD_JDK_FOUND=no
30674      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30676$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30677        BUILD_JDK_FOUND=no
30678      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30680$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30681        BUILD_JDK_FOUND=no
30682      elif test ! -x "$BUILD_JDK/bin/javac"; then
30683        # Do we have a bin/javac?
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30685$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30687$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30688        BUILD_JDK_FOUND=no
30689      else
30690        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30691        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30692
30693        # Extra M4 quote needed to protect [] in grep expression.
30694        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30695        if test "x$FOUND_CORRECT_VERSION" = x; then
30696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30697$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30698          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30699$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30700          BUILD_JDK_FOUND=no
30701        else
30702          # We're done!
30703          BUILD_JDK_FOUND=yes
30704
30705  # Only process if variable expands to non-empty
30706
30707  if test "x$BUILD_JDK" != x; then
30708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30709
30710  # Input might be given as Windows format, start by converting to
30711  # unix format.
30712  path="$BUILD_JDK"
30713  new_path=`$CYGPATH -u "$path"`
30714
30715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30718  # "foo.exe" is OK but "foo" is an error.
30719  #
30720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30721  # It is also a way to make sure we got the proper file name for the real test later on.
30722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30723  if test "x$test_shortpath" = x; then
30724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30725$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30726    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30727  fi
30728
30729  # Call helper function which possibly converts this using DOS-style short mode.
30730  # If so, the updated path is stored in $new_path.
30731
30732  input_path="$new_path"
30733  # Check if we need to convert this using DOS-style short mode. If the path
30734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30735  # take no chances and rewrite it.
30736  # Note: m4 eats our [], so we need to use [ and ] instead.
30737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30738  if test "x$has_forbidden_chars" != x; then
30739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30743      # Going to short mode and back again did indeed matter. Since short mode is
30744      # case insensitive, let's make it lowercase to improve readability.
30745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30746      # Now convert it back to Unix-style (cygpath)
30747      input_path=`$CYGPATH -u "$shortmode_path"`
30748      new_path="$input_path"
30749    fi
30750  fi
30751
30752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30753  if test "x$test_cygdrive_prefix" = x; then
30754    # As a simple fix, exclude /usr/bin since it's not a real path.
30755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30757      # a path prefixed by /cygdrive for fixpath to work.
30758      new_path="$CYGWIN_ROOT_PATH$input_path"
30759    fi
30760  fi
30761
30762
30763  if test "x$path" != "x$new_path"; then
30764    BUILD_JDK="$new_path"
30765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30766$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30767  fi
30768
30769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30770
30771  path="$BUILD_JDK"
30772  has_colon=`$ECHO $path | $GREP ^.:`
30773  new_path="$path"
30774  if test "x$has_colon" = x; then
30775    # Not in mixed or Windows style, start by that.
30776    new_path=`cmd //c echo $path`
30777  fi
30778
30779
30780  input_path="$new_path"
30781  # Check if we need to convert this using DOS-style short mode. If the path
30782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30783  # take no chances and rewrite it.
30784  # Note: m4 eats our [], so we need to use [ and ] instead.
30785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30786  if test "x$has_forbidden_chars" != x; then
30787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30789  fi
30790
30791
30792  windows_path="$new_path"
30793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30794    unix_path=`$CYGPATH -u "$windows_path"`
30795    new_path="$unix_path"
30796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30798    new_path="$unix_path"
30799  fi
30800
30801  if test "x$path" != "x$new_path"; then
30802    BUILD_JDK="$new_path"
30803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30804$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30805  fi
30806
30807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30809
30810    else
30811      # We're on a unix platform. Hooray! :)
30812      path="$BUILD_JDK"
30813      has_space=`$ECHO "$path" | $GREP " "`
30814      if test "x$has_space" != x; then
30815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30816$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30818      fi
30819
30820      # Use eval to expand a potential ~
30821      eval path="$path"
30822      if test ! -f "$path" && test ! -d "$path"; then
30823        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30824      fi
30825
30826      if test -d "$path"; then
30827        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30828      else
30829        dir="`$DIRNAME "$path"`"
30830        base="`$BASENAME "$path"`"
30831        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30832      fi
30833    fi
30834  fi
30835
30836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30837$as_echo_n "checking for Build JDK... " >&6; }
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30839$as_echo "$BUILD_JDK" >&6; }
30840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30841$as_echo_n "checking Build JDK version... " >&6; }
30842          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30844$as_echo "$BUILD_JDK_VERSION" >&6; }
30845        fi # end check jdk version
30846      fi # end check java
30847    fi # end check build jdk found
30848  fi
30849
30850    EXTERNAL_BUILDJDK=true
30851  else
30852    if test "x$COMPILE_TYPE" = "xcross"; then
30853      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30854      BUILD_JDK_FOUND=yes
30855      CREATE_BUILDJDK=true
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30857$as_echo_n "checking for Build JDK... " >&6; }
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30859$as_echo "yes, will build it for the host platform" >&6; }
30860    else
30861      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30862      BUILD_JDK_FOUND=yes
30863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30864$as_echo_n "checking for Build JDK... " >&6; }
30865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30866$as_echo "yes, will use output dir" >&6; }
30867    fi
30868  fi
30869
30870  JMOD="$BUILD_JDK/bin/jmod"
30871  JLINK="$BUILD_JDK/bin/jlink"
30872
30873
30874
30875  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30877$as_echo_n "checking for Build JDK... " >&6; }
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30879$as_echo "no" >&6; }
30880    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30881  fi
30882
30883
30884
30885
30886
30887
30888###############################################################################
30889#
30890# Configure the sources to use. We can add or override individual directories.
30891#
30892###############################################################################
30893
30894
30895  # Where are the sources.
30896  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30897  CORBA_TOPDIR="$SRC_ROOT/corba"
30898  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30899  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30900  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30901  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30902  JDK_TOPDIR="$SRC_ROOT/jdk"
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912  # This feature is no longer supported.
30913
30914
30915
30916# Check whether --with-add-source-root was given.
30917if test "${with_add_source_root+set}" = set; then :
30918  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
30919$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30920fi
30921
30922
30923
30924
30925# Check whether --with-override-source-root was given.
30926if test "${with_override_source_root+set}" = set; then :
30927  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
30928$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-adds-and-overrides was given.
30935if test "${with_adds_and_overrides+set}" = set; then :
30936  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
30937$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-override-langtools was given.
30944if test "${with_override_langtools+set}" = set; then :
30945  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30946$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-corba was given.
30953if test "${with_override_corba+set}" = set; then :
30954  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-jaxp was given.
30962if test "${with_override_jaxp+set}" = set; then :
30963  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-jaxws was given.
30971if test "${with_override_jaxws+set}" = set; then :
30972  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-hotspot was given.
30980if test "${with_override_hotspot+set}" = set; then :
30981  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-nashorn was given.
30989if test "${with_override_nashorn+set}" = set; then :
30990  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30991$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997# Check whether --with-override-jdk was given.
30998if test "${with_override_jdk+set}" = set; then :
30999  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31000$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31001fi
31002
31003
31004
31005
31006  BUILD_OUTPUT="$OUTPUT_ROOT"
31007
31008  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31009
31010
31011
31012# Check whether --with-import_hotspot was given.
31013if test "${with_import_hotspot+set}" = set; then :
31014  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31015$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31016fi
31017
31018
31019
31020
31021
31022
31023# Check whether --with-import-modules was given.
31024if test "${with_import_modules+set}" = set; then :
31025  withval=$with_import_modules;
31026fi
31027
31028
31029  if test "x$with_import_modules" != x \
31030      && test "x$with_import_modules" != "xno"; then
31031    if test -d "$with_import_modules"; then
31032      IMPORT_MODULES_TOPDIR="$with_import_modules"
31033
31034  # Only process if variable expands to non-empty
31035
31036  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31038
31039  # Input might be given as Windows format, start by converting to
31040  # unix format.
31041  path="$IMPORT_MODULES_TOPDIR"
31042  new_path=`$CYGPATH -u "$path"`
31043
31044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31047  # "foo.exe" is OK but "foo" is an error.
31048  #
31049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31050  # It is also a way to make sure we got the proper file name for the real test later on.
31051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31052  if test "x$test_shortpath" = x; then
31053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31054$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31055    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31056  fi
31057
31058  # Call helper function which possibly converts this using DOS-style short mode.
31059  # If so, the updated path is stored in $new_path.
31060
31061  input_path="$new_path"
31062  # Check if we need to convert this using DOS-style short mode. If the path
31063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31064  # take no chances and rewrite it.
31065  # Note: m4 eats our [], so we need to use [ and ] instead.
31066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31067  if test "x$has_forbidden_chars" != x; then
31068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31072      # Going to short mode and back again did indeed matter. Since short mode is
31073      # case insensitive, let's make it lowercase to improve readability.
31074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31075      # Now convert it back to Unix-style (cygpath)
31076      input_path=`$CYGPATH -u "$shortmode_path"`
31077      new_path="$input_path"
31078    fi
31079  fi
31080
31081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31082  if test "x$test_cygdrive_prefix" = x; then
31083    # As a simple fix, exclude /usr/bin since it's not a real path.
31084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31086      # a path prefixed by /cygdrive for fixpath to work.
31087      new_path="$CYGWIN_ROOT_PATH$input_path"
31088    fi
31089  fi
31090
31091
31092  if test "x$path" != "x$new_path"; then
31093    IMPORT_MODULES_TOPDIR="$new_path"
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31095$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31096  fi
31097
31098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31099
31100  path="$IMPORT_MODULES_TOPDIR"
31101  has_colon=`$ECHO $path | $GREP ^.:`
31102  new_path="$path"
31103  if test "x$has_colon" = x; then
31104    # Not in mixed or Windows style, start by that.
31105    new_path=`cmd //c echo $path`
31106  fi
31107
31108
31109  input_path="$new_path"
31110  # Check if we need to convert this using DOS-style short mode. If the path
31111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31112  # take no chances and rewrite it.
31113  # Note: m4 eats our [], so we need to use [ and ] instead.
31114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31115  if test "x$has_forbidden_chars" != x; then
31116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31118  fi
31119
31120
31121  windows_path="$new_path"
31122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31123    unix_path=`$CYGPATH -u "$windows_path"`
31124    new_path="$unix_path"
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31127    new_path="$unix_path"
31128  fi
31129
31130  if test "x$path" != "x$new_path"; then
31131    IMPORT_MODULES_TOPDIR="$new_path"
31132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31133$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31134  fi
31135
31136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31138
31139    else
31140      # We're on a unix platform. Hooray! :)
31141      path="$IMPORT_MODULES_TOPDIR"
31142      has_space=`$ECHO "$path" | $GREP " "`
31143      if test "x$has_space" != x; then
31144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31145$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31147      fi
31148
31149      # Use eval to expand a potential ~
31150      eval path="$path"
31151      if test ! -f "$path" && test ! -d "$path"; then
31152        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31153      fi
31154
31155      if test -d "$path"; then
31156        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31157      else
31158        dir="`$DIRNAME "$path"`"
31159        base="`$BASENAME "$path"`"
31160        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31161      fi
31162    fi
31163  fi
31164
31165    elif test -e "$with_import_modules"; then
31166      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31167      $RM -rf "$IMPORT_MODULES_TOPDIR"
31168      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31169      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31170        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31171      fi
31172    else
31173      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31174    fi
31175  fi
31176
31177  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31178    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31179  fi
31180  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31181    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31182  fi
31183  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31184    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31185  fi
31186  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31187    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31188  fi
31189  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31190    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31191  fi
31192  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31193    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31194  fi
31195  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31196    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31197  fi
31198  # Workaround for using different imported module-info.java in Jake due to a
31199  # change in format. Remove once new format is standard in JDK 9 and javafx
31200  # delivers just that.
31201  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31202    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31203  fi
31204  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31205    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31206  fi
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216###############################################################################
31217#
31218# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31219# native code.
31220#
31221###############################################################################
31222
31223# See if we are doing a complete static build or not
31224
31225  # Check whether --enable-static-build was given.
31226if test "${enable_static_build+set}" = set; then :
31227  enableval=$enable_static_build;
31228fi
31229
31230  STATIC_BUILD=false
31231  if test "x$enable_static_build" = "xyes"; then
31232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31233$as_echo_n "checking if static build is enabled... " >&6; }
31234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31235$as_echo "yes" >&6; }
31236    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31237      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31238    fi
31239    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31240    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31241    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31242    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31243    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31244    STATIC_BUILD=true
31245  elif test "x$enable_static_build" = "xno"; then
31246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31247$as_echo_n "checking if static build is enabled... " >&6; }
31248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31249$as_echo "no" >&6; }
31250  elif test "x$enable_static_build" != "x"; then
31251    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31252  fi
31253
31254
31255
31256
31257# First determine the toolchain type (compiler family)
31258
31259
31260# Check whether --with-toolchain-type was given.
31261if test "${with_toolchain_type+set}" = set; then :
31262  withval=$with_toolchain_type;
31263fi
31264
31265
31266  # Use indirect variable referencing
31267  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31268  VALID_TOOLCHAINS=${!toolchain_var_name}
31269
31270  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31271    if test -n "$XCODEBUILD"; then
31272      # On Mac OS X, default toolchain to clang after Xcode 5
31273      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31274      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31275      if test $? -ne 0; then
31276        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31277      fi
31278      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31279          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31280          $CUT -f 1 -d .`
31281      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31282$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31283      if test $XCODE_MAJOR_VERSION -ge 5; then
31284          DEFAULT_TOOLCHAIN="clang"
31285      else
31286          DEFAULT_TOOLCHAIN="gcc"
31287      fi
31288    else
31289      # If Xcode is not installed, but the command line tools are
31290      # then we can't run xcodebuild. On these systems we should
31291      # default to clang
31292      DEFAULT_TOOLCHAIN="clang"
31293    fi
31294  else
31295    # First toolchain type in the list is the default
31296    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31297  fi
31298
31299  if test "x$with_toolchain_type" = xlist; then
31300    # List all toolchains
31301    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31302$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31303    for toolchain in $VALID_TOOLCHAINS; do
31304      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31305      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31306      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31307    done
31308
31309    exit 0
31310  elif test "x$with_toolchain_type" != x; then
31311    # User override; check that it is valid
31312    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31313      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31314$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31315      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31316$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31317      as_fn_error $? "Cannot continue." "$LINENO" 5
31318    fi
31319    TOOLCHAIN_TYPE=$with_toolchain_type
31320  else
31321    # No flag given, use default
31322    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31323  fi
31324
31325
31326  TOOLCHAIN_CC_BINARY_clang="clang"
31327  TOOLCHAIN_CC_BINARY_gcc="gcc"
31328  TOOLCHAIN_CC_BINARY_microsoft="cl"
31329  TOOLCHAIN_CC_BINARY_solstudio="cc"
31330  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31331
31332  TOOLCHAIN_CXX_BINARY_clang="clang++"
31333  TOOLCHAIN_CXX_BINARY_gcc="g++"
31334  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31335  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31336  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31337
31338  # Use indirect variable referencing
31339  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31340  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31341  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31342  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31343  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31344  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31345  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31346  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31347
31348
31349  # Define filename patterns
31350  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31351    LIBRARY_PREFIX=
31352    SHARED_LIBRARY_SUFFIX='.dll'
31353    STATIC_LIBRARY_SUFFIX='.lib'
31354    SHARED_LIBRARY='$1.dll'
31355    STATIC_LIBRARY='$1.lib'
31356    OBJ_SUFFIX='.obj'
31357    EXE_SUFFIX='.exe'
31358  else
31359    LIBRARY_PREFIX=lib
31360    SHARED_LIBRARY_SUFFIX='.so'
31361    STATIC_LIBRARY_SUFFIX='.a'
31362    SHARED_LIBRARY='lib$1.so'
31363    STATIC_LIBRARY='lib$1.a'
31364    OBJ_SUFFIX='.o'
31365    EXE_SUFFIX=''
31366    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31367      # For full static builds, we're overloading the SHARED_LIBRARY
31368      # variables in order to limit the amount of changes required.
31369      # It would be better to remove SHARED and just use LIBRARY and
31370      # LIBRARY_SUFFIX for libraries that can be built either
31371      # shared or static and use STATIC_* for libraries that are
31372      # always built statically.
31373      if test "x$STATIC_BUILD" = xtrue; then
31374        SHARED_LIBRARY='lib$1.a'
31375        SHARED_LIBRARY_SUFFIX='.a'
31376      else
31377        SHARED_LIBRARY='lib$1.dylib'
31378        SHARED_LIBRARY_SUFFIX='.dylib'
31379      fi
31380    fi
31381  fi
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31393    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31394$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31395  else
31396    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31397$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31398  fi
31399
31400
31401# User supplied flags should be used when configure detects compilers
31402
31403  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31404    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31405$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31406  fi
31407
31408  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31409    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31410$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31411  fi
31412
31413  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31415$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31416  fi
31417
31418
31419# Check whether --with-extra-cflags was given.
31420if test "${with_extra_cflags+set}" = set; then :
31421  withval=$with_extra_cflags;
31422fi
31423
31424
31425
31426# Check whether --with-extra-cxxflags was given.
31427if test "${with_extra_cxxflags+set}" = set; then :
31428  withval=$with_extra_cxxflags;
31429fi
31430
31431
31432
31433# Check whether --with-extra-ldflags was given.
31434if test "${with_extra_ldflags+set}" = set; then :
31435  withval=$with_extra_ldflags;
31436fi
31437
31438
31439  EXTRA_CFLAGS="$with_extra_cflags"
31440  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31441  EXTRA_LDFLAGS="$with_extra_ldflags"
31442
31443  # Hotspot needs these set in their legacy form
31444  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31445  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31446  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456  # The global CFLAGS and LDLAGS variables are used by configure tests and
31457  # should include the extra parameters
31458  CFLAGS="$EXTRA_CFLAGS"
31459  CXXFLAGS="$EXTRA_CXXFLAGS"
31460  LDFLAGS="$EXTRA_LDFLAGS"
31461  CPPFLAGS=""
31462
31463# The sysroot cflags are needed for configure to be able to run the compilers
31464
31465  if test "x$SYSROOT" != "x"; then
31466    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31467      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31468        # Solaris Studio does not have a concept of sysroot. Instead we must
31469        # make sure the default include and lib dirs are appended to each
31470        # compile and link command line. Must also add -I-xbuiltin to enable
31471        # inlining of system functions and intrinsics.
31472        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31473        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31474            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31475      fi
31476    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31477      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31478      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31479    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31480      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31481      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31482    fi
31483    # Propagate the sysroot args to hotspot
31484    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31485    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31486    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31487    # The global CFLAGS and LDFLAGS variables need these for configure to function
31488    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31489    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31490    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31491    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31492  fi
31493
31494  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31495    # We also need -iframework<path>/System/Library/Frameworks
31496    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31497    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31499    # set this here so it doesn't have to be peppered throughout the forest
31500    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31501    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502  fi
31503
31504
31505
31506
31507
31508# Then detect the actual binaries needed
31509
31510  # FIXME: Is this needed?
31511  ac_ext=cpp
31512ac_cpp='$CXXCPP $CPPFLAGS'
31513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31516
31517
31518  # Store the CFLAGS etc passed to the configure script.
31519  ORG_CFLAGS="$CFLAGS"
31520  ORG_CXXFLAGS="$CXXFLAGS"
31521
31522  # autoconf magic only relies on PATH, so update it if tools dir is specified
31523  OLD_PATH="$PATH"
31524
31525  # On Windows, we need to detect the visual studio installation first.
31526  # This will change the PATH, but we need to keep that new PATH even
31527  # after toolchain detection is done, since the compiler (on x86) uses
31528  # it for DLL resolution in runtime.
31529  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31530      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31531
31532  # Store path to cygwin link.exe to help excluding it when searching for
31533  # VS linker. This must be done before changing the PATH when looking for VS.
31534  # Extract the first word of "link", so it can be a program name with args.
31535set dummy link; ac_word=$2
31536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31537$as_echo_n "checking for $ac_word... " >&6; }
31538if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31539  $as_echo_n "(cached) " >&6
31540else
31541  case $CYGWIN_LINK in
31542  [\\/]* | ?:[\\/]*)
31543  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31544  ;;
31545  *)
31546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31547for as_dir in $PATH
31548do
31549  IFS=$as_save_IFS
31550  test -z "$as_dir" && as_dir=.
31551    for ac_exec_ext in '' $ac_executable_extensions; do
31552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31553    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31555    break 2
31556  fi
31557done
31558  done
31559IFS=$as_save_IFS
31560
31561  ;;
31562esac
31563fi
31564CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31565if test -n "$CYGWIN_LINK"; then
31566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31567$as_echo "$CYGWIN_LINK" >&6; }
31568else
31569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31570$as_echo "no" >&6; }
31571fi
31572
31573
31574  if test "x$CYGWIN_LINK" != x; then
31575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31576$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31577    "$CYGWIN_LINK" --version > /dev/null
31578    if test $? -eq 0 ; then
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31580$as_echo "yes" >&6; }
31581    else
31582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31583$as_echo "no" >&6; }
31584      # This might be the VS linker. Don't exclude it later on.
31585      CYGWIN_LINK=""
31586    fi
31587  fi
31588
31589  # First-hand choice is to locate and run the vsvars bat file.
31590
31591
31592# Check whether --with-toolchain-version was given.
31593if test "${with_toolchain_version+set}" = set; then :
31594  withval=$with_toolchain_version;
31595fi
31596
31597
31598  if test "x$with_toolchain_version" = xlist; then
31599    # List all toolchains
31600    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31601$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31602    for version in $VALID_VS_VERSIONS; do
31603      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31604      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31605    done
31606
31607    exit 0
31608  elif test "x$DEVKIT_VS_VERSION" != x; then
31609    VS_VERSION=$DEVKIT_VS_VERSION
31610    TOOLCHAIN_VERSION=$VS_VERSION
31611    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31612    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31613    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31614    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31615    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31616    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31617
31618    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31619    # can still be exported as INCLUDE for compiler invocations without
31620    # SYSROOT_CFLAGS
31621    OLDIFS="$IFS"
31622    IFS=";"
31623    for i in $DEVKIT_VS_INCLUDE; do
31624      ipath=$i
31625
31626  unix_path="$ipath"
31627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31628    windows_path=`$CYGPATH -m "$unix_path"`
31629    ipath="$windows_path"
31630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31631    windows_path=`cmd //c echo $unix_path`
31632    ipath="$windows_path"
31633  fi
31634
31635      VS_INCLUDE="$VS_INCLUDE;$ipath"
31636    done
31637    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31638    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31639    for i in $DEVKIT_VS_LIB; do
31640      libpath=$i
31641
31642  unix_path="$libpath"
31643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31644    windows_path=`$CYGPATH -m "$unix_path"`
31645    libpath="$windows_path"
31646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31647    windows_path=`cmd //c echo $unix_path`
31648    libpath="$windows_path"
31649  fi
31650
31651      VS_LIB="$VS_LIB;$libpath"
31652    done
31653    IFS="$OLDIFS"
31654
31655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31656$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31657
31658  elif test "x$with_toolchain_version" != x; then
31659    # User override; check that it is valid
31660    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31661      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31662$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31663      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31664$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31665      as_fn_error $? "Cannot continue." "$LINENO" 5
31666    fi
31667    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31668  else
31669    # No flag given, use default
31670    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31671  fi
31672
31673  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31674
31675  VS_VERSION="$VS_VERSION"
31676  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31677  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31678  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31679  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31680
31681  # When using --with-tools-dir, assume it points to the correct and default
31682  # version of Visual Studio or that --with-toolchain-version was also set.
31683  if test "x$with_tools_dir" != x; then
31684
31685  if test "x$VS_ENV_CMD" = x; then
31686    VS_VERSION="${VS_VERSION}"
31687    VS_BASE="$with_tools_dir/../.."
31688    METHOD="--with-tools-dir"
31689
31690    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31691      VCVARSFILE="vc/bin/vcvars32.bat"
31692    else
31693      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31694    fi
31695
31696
31697  windows_path="$VS_BASE"
31698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31699    unix_path=`$CYGPATH -u "$windows_path"`
31700    VS_BASE="$unix_path"
31701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31703    VS_BASE="$unix_path"
31704  fi
31705
31706    if test -d "$VS_BASE"; then
31707      if test -f "$VS_BASE/$VCVARSFILE"; then
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31709$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31710        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31711        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31712        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31713        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31714      else
31715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31716$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31717        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31718$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31719      fi
31720    fi
31721  fi
31722
31723
31724  if test "x$VS_ENV_CMD" = x; then
31725    VS_VERSION="${VS_VERSION}"
31726    VS_BASE="$with_tools_dir/../../.."
31727    METHOD="--with-tools-dir"
31728
31729    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31730      VCVARSFILE="vc/bin/vcvars32.bat"
31731    else
31732      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31733    fi
31734
31735
31736  windows_path="$VS_BASE"
31737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31738    unix_path=`$CYGPATH -u "$windows_path"`
31739    VS_BASE="$unix_path"
31740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31742    VS_BASE="$unix_path"
31743  fi
31744
31745    if test -d "$VS_BASE"; then
31746      if test -f "$VS_BASE/$VCVARSFILE"; then
31747        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31748$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31749        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31750        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31751        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31752        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31753      else
31754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31755$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31757$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31758      fi
31759    fi
31760  fi
31761
31762    if test "x$VS_ENV_CMD" = x; then
31763      # Having specified an argument which is incorrect will produce an instant failure;
31764      # we should not go on looking
31765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31766$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31767      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31768$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31769      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31770$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31771      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31772    fi
31773  fi
31774
31775  VS_ENV_CMD=""
31776  VS_ENV_ARGS=""
31777
31778  if test "x$VS_COMNTOOLS" != x; then
31779
31780  if test "x$VS_ENV_CMD" = x; then
31781    VS_VERSION="${VS_VERSION}"
31782    VS_BASE="$VS_COMNTOOLS/../.."
31783    METHOD="$VS_COMNTOOLS_VAR variable"
31784
31785    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31786      VCVARSFILE="vc/bin/vcvars32.bat"
31787    else
31788      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31789    fi
31790
31791
31792  windows_path="$VS_BASE"
31793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31794    unix_path=`$CYGPATH -u "$windows_path"`
31795    VS_BASE="$unix_path"
31796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31798    VS_BASE="$unix_path"
31799  fi
31800
31801    if test -d "$VS_BASE"; then
31802      if test -f "$VS_BASE/$VCVARSFILE"; then
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31805        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31806        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31807        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31808        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31809      else
31810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31814      fi
31815    fi
31816  fi
31817
31818  fi
31819  if test "x$PROGRAMFILES" != x; then
31820
31821  if test "x$VS_ENV_CMD" = x; then
31822    VS_VERSION="${VS_VERSION}"
31823    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31824    METHOD="well-known name"
31825
31826    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31827      VCVARSFILE="vc/bin/vcvars32.bat"
31828    else
31829      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31830    fi
31831
31832
31833  windows_path="$VS_BASE"
31834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31835    unix_path=`$CYGPATH -u "$windows_path"`
31836    VS_BASE="$unix_path"
31837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31839    VS_BASE="$unix_path"
31840  fi
31841
31842    if test -d "$VS_BASE"; then
31843      if test -f "$VS_BASE/$VCVARSFILE"; then
31844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31845$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31846        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31847        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31848        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31849        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31850      else
31851        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31852$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31854$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31855      fi
31856    fi
31857  fi
31858
31859  fi
31860  # Work around the insanely named ProgramFiles(x86) env variable
31861  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31862  if test "x$PROGRAMFILES_X86" != x; then
31863
31864  if test "x$VS_ENV_CMD" = x; then
31865    VS_VERSION="${VS_VERSION}"
31866    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31867    METHOD="well-known name"
31868
31869    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31870      VCVARSFILE="vc/bin/vcvars32.bat"
31871    else
31872      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31873    fi
31874
31875
31876  windows_path="$VS_BASE"
31877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31878    unix_path=`$CYGPATH -u "$windows_path"`
31879    VS_BASE="$unix_path"
31880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31882    VS_BASE="$unix_path"
31883  fi
31884
31885    if test -d "$VS_BASE"; then
31886      if test -f "$VS_BASE/$VCVARSFILE"; then
31887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31888$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31889        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31890        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31891        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31892        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31893      else
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31895$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31896        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31897$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31898      fi
31899    fi
31900  fi
31901
31902  fi
31903
31904  if test "x$VS_ENV_CMD" = x; then
31905    VS_VERSION="${VS_VERSION}"
31906    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31907    METHOD="well-known name"
31908
31909    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31910      VCVARSFILE="vc/bin/vcvars32.bat"
31911    else
31912      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31913    fi
31914
31915
31916  windows_path="$VS_BASE"
31917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31918    unix_path=`$CYGPATH -u "$windows_path"`
31919    VS_BASE="$unix_path"
31920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31922    VS_BASE="$unix_path"
31923  fi
31924
31925    if test -d "$VS_BASE"; then
31926      if test -f "$VS_BASE/$VCVARSFILE"; then
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31928$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31929        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31930        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31931        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31932        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31933      else
31934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31935$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31937$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31938      fi
31939    fi
31940  fi
31941
31942
31943  if test "x$VS_ENV_CMD" = x; then
31944    VS_VERSION="${VS_VERSION}"
31945    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31946    METHOD="well-known name"
31947
31948    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31949      VCVARSFILE="vc/bin/vcvars32.bat"
31950    else
31951      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31952    fi
31953
31954
31955  windows_path="$VS_BASE"
31956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31957    unix_path=`$CYGPATH -u "$windows_path"`
31958    VS_BASE="$unix_path"
31959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31961    VS_BASE="$unix_path"
31962  fi
31963
31964    if test -d "$VS_BASE"; then
31965      if test -f "$VS_BASE/$VCVARSFILE"; then
31966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31967$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31968        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31969        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31970        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31971        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31972      else
31973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31974$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31976$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31977      fi
31978    fi
31979  fi
31980
31981
31982  if test "x$SDK_INSTALL_DIR" != x; then
31983    if test "x$ProgramW6432" != x; then
31984
31985  if test "x$VS_ENV_CMD" = x; then
31986    VS_VERSION="${VS_VERSION}"
31987    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31988    METHOD="well-known name"
31989
31990  windows_path="$WIN_SDK_BASE"
31991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31992    unix_path=`$CYGPATH -u "$windows_path"`
31993    WIN_SDK_BASE="$unix_path"
31994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31996    WIN_SDK_BASE="$unix_path"
31997  fi
31998
31999    if test -d "$WIN_SDK_BASE"; then
32000      # There have been cases of partial or broken SDK installations. A missing
32001      # lib dir is not going to work.
32002      if test ! -d "$WIN_SDK_BASE/lib"; then
32003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32005        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32006$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32007      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32010        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32011        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32012          VS_ENV_ARGS="/x86"
32013        else
32014          VS_ENV_ARGS="/x64"
32015        fi
32016        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32017        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32018        # TODO: improve detection for other versions of SDK
32019        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32020      else
32021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32024$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32025      fi
32026    fi
32027  fi
32028
32029    fi
32030    if test "x$PROGRAMW6432" != x; then
32031
32032  if test "x$VS_ENV_CMD" = x; then
32033    VS_VERSION="${VS_VERSION}"
32034    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32035    METHOD="well-known name"
32036
32037  windows_path="$WIN_SDK_BASE"
32038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039    unix_path=`$CYGPATH -u "$windows_path"`
32040    WIN_SDK_BASE="$unix_path"
32041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32043    WIN_SDK_BASE="$unix_path"
32044  fi
32045
32046    if test -d "$WIN_SDK_BASE"; then
32047      # There have been cases of partial or broken SDK installations. A missing
32048      # lib dir is not going to work.
32049      if test ! -d "$WIN_SDK_BASE/lib"; then
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32053$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32054      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32057        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32058        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32059          VS_ENV_ARGS="/x86"
32060        else
32061          VS_ENV_ARGS="/x64"
32062        fi
32063        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32064        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32065        # TODO: improve detection for other versions of SDK
32066        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32067      else
32068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32069$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32071$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32072      fi
32073    fi
32074  fi
32075
32076    fi
32077    if test "x$PROGRAMFILES" != x; then
32078
32079  if test "x$VS_ENV_CMD" = x; then
32080    VS_VERSION="${VS_VERSION}"
32081    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32082    METHOD="well-known name"
32083
32084  windows_path="$WIN_SDK_BASE"
32085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32086    unix_path=`$CYGPATH -u "$windows_path"`
32087    WIN_SDK_BASE="$unix_path"
32088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32090    WIN_SDK_BASE="$unix_path"
32091  fi
32092
32093    if test -d "$WIN_SDK_BASE"; then
32094      # There have been cases of partial or broken SDK installations. A missing
32095      # lib dir is not going to work.
32096      if test ! -d "$WIN_SDK_BASE/lib"; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32100$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32101      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32104        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32105        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32106          VS_ENV_ARGS="/x86"
32107        else
32108          VS_ENV_ARGS="/x64"
32109        fi
32110        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32111        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32112        # TODO: improve detection for other versions of SDK
32113        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32114      else
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32118$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32119      fi
32120    fi
32121  fi
32122
32123    fi
32124
32125  if test "x$VS_ENV_CMD" = x; then
32126    VS_VERSION="${VS_VERSION}"
32127    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32128    METHOD="well-known name"
32129
32130  windows_path="$WIN_SDK_BASE"
32131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32132    unix_path=`$CYGPATH -u "$windows_path"`
32133    WIN_SDK_BASE="$unix_path"
32134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32136    WIN_SDK_BASE="$unix_path"
32137  fi
32138
32139    if test -d "$WIN_SDK_BASE"; then
32140      # There have been cases of partial or broken SDK installations. A missing
32141      # lib dir is not going to work.
32142      if test ! -d "$WIN_SDK_BASE/lib"; then
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, lib dir is missing. Ignoring" >&5
32146$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32147      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32149$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32150        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32151        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32152          VS_ENV_ARGS="/x86"
32153        else
32154          VS_ENV_ARGS="/x64"
32155        fi
32156        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32157        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32158        # TODO: improve detection for other versions of SDK
32159        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32160      else
32161        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32162$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32163        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32164$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32165      fi
32166    fi
32167  fi
32168
32169
32170  if test "x$VS_ENV_CMD" = x; then
32171    VS_VERSION="${VS_VERSION}"
32172    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32173    METHOD="well-known name"
32174
32175  windows_path="$WIN_SDK_BASE"
32176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32177    unix_path=`$CYGPATH -u "$windows_path"`
32178    WIN_SDK_BASE="$unix_path"
32179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32181    WIN_SDK_BASE="$unix_path"
32182  fi
32183
32184    if test -d "$WIN_SDK_BASE"; then
32185      # There have been cases of partial or broken SDK installations. A missing
32186      # lib dir is not going to work.
32187      if test ! -d "$WIN_SDK_BASE/lib"; then
32188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32191$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32192      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32195        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32196        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32197          VS_ENV_ARGS="/x86"
32198        else
32199          VS_ENV_ARGS="/x64"
32200        fi
32201        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32202        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32203        # TODO: improve detection for other versions of SDK
32204        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32205      else
32206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32209$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32210      fi
32211    fi
32212  fi
32213
32214  fi
32215
32216    if test "x$VS_ENV_CMD" != x; then
32217      TOOLCHAIN_VERSION=$VS_VERSION
32218      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32219      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32220      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32221      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32222      # The rest of the variables are already evaled while probing
32223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32224$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32225      break
32226    fi
32227  done
32228
32229
32230  # If we have a devkit, skip all of the below.
32231  if test "x$DEVKIT_VS_VERSION" = x; then
32232    if test "x$VS_ENV_CMD" != x; then
32233      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32234
32235  # Only process if variable expands to non-empty
32236
32237  if test "x$VS_ENV_CMD" != x; then
32238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32239
32240  # First separate the path from the arguments. This will split at the first
32241  # space.
32242  complete="$VS_ENV_CMD"
32243  path="${complete%% *}"
32244  tmp="$complete EOL"
32245  arguments="${tmp#* }"
32246
32247  # Input might be given as Windows format, start by converting to
32248  # unix format.
32249  new_path=`$CYGPATH -u "$path"`
32250
32251  # Now try to locate executable using which
32252  new_path=`$WHICH "$new_path" 2> /dev/null`
32253  # bat and cmd files are not always considered executable in cygwin causing which
32254  # to not find them
32255  if test "x$new_path" = x \
32256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32258    new_path=`$CYGPATH -u "$path"`
32259  fi
32260  if test "x$new_path" = x; then
32261    # Oops. Which didn't find the executable.
32262    # The splitting of arguments from the executable at a space might have been incorrect,
32263    # since paths with space are more likely in Windows. Give it another try with the whole
32264    # argument.
32265    path="$complete"
32266    arguments="EOL"
32267    new_path=`$CYGPATH -u "$path"`
32268    new_path=`$WHICH "$new_path" 2> /dev/null`
32269    # bat and cmd files are not always considered executable in cygwin causing which
32270    # to not find them
32271    if test "x$new_path" = x \
32272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32274      new_path=`$CYGPATH -u "$path"`
32275    fi
32276    if test "x$new_path" = x; then
32277      # It's still not found. Now this is an unrecoverable error.
32278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32279$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32280      has_space=`$ECHO "$complete" | $GREP " "`
32281      if test "x$has_space" != x; then
32282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32284      fi
32285      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32286    fi
32287  fi
32288
32289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32292  # "foo.exe" is OK but "foo" is an error.
32293  #
32294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32295  # It is also a way to make sure we got the proper file name for the real test later on.
32296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32297  if test "x$test_shortpath" = x; then
32298    # Short path failed, file does not exist as specified.
32299    # Try adding .exe or .cmd
32300    if test -f "${new_path}.exe"; then
32301      input_to_shortpath="${new_path}.exe"
32302    elif test -f "${new_path}.cmd"; then
32303      input_to_shortpath="${new_path}.cmd"
32304    else
32305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32306$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32309      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32310    fi
32311  else
32312    input_to_shortpath="$new_path"
32313  fi
32314
32315  # Call helper function which possibly converts this using DOS-style short mode.
32316  # If so, the updated path is stored in $new_path.
32317  new_path="$input_to_shortpath"
32318
32319  input_path="$input_to_shortpath"
32320  # Check if we need to convert this using DOS-style short mode. If the path
32321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32322  # take no chances and rewrite it.
32323  # Note: m4 eats our [], so we need to use [ and ] instead.
32324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32325  if test "x$has_forbidden_chars" != x; then
32326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32330      # Going to short mode and back again did indeed matter. Since short mode is
32331      # case insensitive, let's make it lowercase to improve readability.
32332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32333      # Now convert it back to Unix-style (cygpath)
32334      input_path=`$CYGPATH -u "$shortmode_path"`
32335      new_path="$input_path"
32336    fi
32337  fi
32338
32339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32340  if test "x$test_cygdrive_prefix" = x; then
32341    # As a simple fix, exclude /usr/bin since it's not a real path.
32342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32344      # a path prefixed by /cygdrive for fixpath to work.
32345      new_path="$CYGWIN_ROOT_PATH$input_path"
32346    fi
32347  fi
32348
32349  # remove trailing .exe if any
32350  new_path="${new_path/%.exe/}"
32351
32352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32353
32354  # First separate the path from the arguments. This will split at the first
32355  # space.
32356  complete="$VS_ENV_CMD"
32357  path="${complete%% *}"
32358  tmp="$complete EOL"
32359  arguments="${tmp#* }"
32360
32361  # Input might be given as Windows format, start by converting to
32362  # unix format.
32363  new_path="$path"
32364
32365  windows_path="$new_path"
32366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32367    unix_path=`$CYGPATH -u "$windows_path"`
32368    new_path="$unix_path"
32369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32371    new_path="$unix_path"
32372  fi
32373
32374
32375  # Now try to locate executable using which
32376  new_path=`$WHICH "$new_path" 2> /dev/null`
32377
32378  if test "x$new_path" = x; then
32379    # Oops. Which didn't find the executable.
32380    # The splitting of arguments from the executable at a space might have been incorrect,
32381    # since paths with space are more likely in Windows. Give it another try with the whole
32382    # argument.
32383    path="$complete"
32384    arguments="EOL"
32385    new_path="$path"
32386
32387  windows_path="$new_path"
32388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32389    unix_path=`$CYGPATH -u "$windows_path"`
32390    new_path="$unix_path"
32391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32393    new_path="$unix_path"
32394  fi
32395
32396
32397    new_path=`$WHICH "$new_path" 2> /dev/null`
32398    # bat and cmd files are not always considered executable in MSYS causing which
32399    # to not find them
32400    if test "x$new_path" = x \
32401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32403      new_path="$path"
32404
32405  windows_path="$new_path"
32406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407    unix_path=`$CYGPATH -u "$windows_path"`
32408    new_path="$unix_path"
32409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32411    new_path="$unix_path"
32412  fi
32413
32414    fi
32415
32416    if test "x$new_path" = x; then
32417      # It's still not found. Now this is an unrecoverable error.
32418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32419$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32420      has_space=`$ECHO "$complete" | $GREP " "`
32421      if test "x$has_space" != x; then
32422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32424      fi
32425      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32426    fi
32427  fi
32428
32429  # Now new_path has a complete unix path to the binary
32430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32431    # Keep paths in /bin as-is, but remove trailing .exe if any
32432    new_path="${new_path/%.exe/}"
32433    # Do not save /bin paths to all_fixpath_prefixes!
32434  else
32435    # Not in mixed or Windows style, start by that.
32436    new_path=`cmd //c echo $new_path`
32437
32438  input_path="$new_path"
32439  # Check if we need to convert this using DOS-style short mode. If the path
32440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32441  # take no chances and rewrite it.
32442  # Note: m4 eats our [], so we need to use [ and ] instead.
32443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32444  if test "x$has_forbidden_chars" != x; then
32445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32447  fi
32448
32449    # Output is in $new_path
32450
32451  windows_path="$new_path"
32452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32453    unix_path=`$CYGPATH -u "$windows_path"`
32454    new_path="$unix_path"
32455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32457    new_path="$unix_path"
32458  fi
32459
32460    # remove trailing .exe if any
32461    new_path="${new_path/%.exe/}"
32462
32463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32465  fi
32466
32467    else
32468      # We're on a unix platform. Hooray! :)
32469      # First separate the path from the arguments. This will split at the first
32470      # space.
32471      complete="$VS_ENV_CMD"
32472      path="${complete%% *}"
32473      tmp="$complete EOL"
32474      arguments="${tmp#* }"
32475
32476      # Cannot rely on the command "which" here since it doesn't always work.
32477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32478      if test -z "$is_absolute_path"; then
32479        # Path to executable is not absolute. Find it.
32480        IFS_save="$IFS"
32481        IFS=:
32482        for p in $PATH; do
32483          if test -f "$p/$path" && test -x "$p/$path"; then
32484            new_path="$p/$path"
32485            break
32486          fi
32487        done
32488        IFS="$IFS_save"
32489      else
32490        # This is an absolute path, we can use it without further modifications.
32491        new_path="$path"
32492      fi
32493
32494      if test "x$new_path" = x; then
32495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32496$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32497        has_space=`$ECHO "$complete" | $GREP " "`
32498        if test "x$has_space" != x; then
32499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32501        fi
32502        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32503      fi
32504    fi
32505
32506    # Now join together the path and the arguments once again
32507    if test "x$arguments" != xEOL; then
32508      new_complete="$new_path ${arguments% *}"
32509    else
32510      new_complete="$new_path"
32511    fi
32512
32513    if test "x$complete" != "x$new_complete"; then
32514      VS_ENV_CMD="$new_complete"
32515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32516$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32517    fi
32518  fi
32519
32520
32521      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32522      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32523$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32524
32525      # We need to create a couple of temporary files.
32526      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32527      $MKDIR -p $VS_ENV_TMP_DIR
32528
32529      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32530      # Instead create a shell script which will set the relevant variables when run.
32531      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32532
32533  unix_path="$WINPATH_VS_ENV_CMD"
32534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32535    windows_path=`$CYGPATH -m "$unix_path"`
32536    WINPATH_VS_ENV_CMD="$windows_path"
32537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32538    windows_path=`cmd //c echo $unix_path`
32539    WINPATH_VS_ENV_CMD="$windows_path"
32540  fi
32541
32542      WINPATH_BASH="$BASH"
32543
32544  unix_path="$WINPATH_BASH"
32545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32546    windows_path=`$CYGPATH -m "$unix_path"`
32547    WINPATH_BASH="$windows_path"
32548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32549    windows_path=`cmd //c echo $unix_path`
32550    WINPATH_BASH="$windows_path"
32551  fi
32552
32553
32554      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32555      # script (executable by bash) that will setup the important variables.
32556      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32557      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32558      # This will end up something like:
32559      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32560      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32561      # These will end up something like:
32562      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32563      # The trailing space for everyone except PATH is no typo, but is needed due
32564      # to trailing \ in the Windows paths. These will be stripped later.
32565      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32568          >> $EXTRACT_VC_ENV_BAT_FILE
32569      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32572          >> $EXTRACT_VC_ENV_BAT_FILE
32573      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32574          >> $EXTRACT_VC_ENV_BAT_FILE
32575      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32576          >> $EXTRACT_VC_ENV_BAT_FILE
32577
32578      # Now execute the newly created bat file.
32579      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32580      # Change directory so we don't need to mess with Windows paths in redirects.
32581      cd $VS_ENV_TMP_DIR
32582      cmd /c extract-vs-env.bat | $CAT
32583      cd $CURDIR
32584
32585      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32587$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32588        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32589$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32591$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32592        as_fn_error $? "Cannot continue" "$LINENO" 5
32593      fi
32594
32595      # Now set all paths and other env variables. This will allow the rest of
32596      # the configure script to find and run the compiler in the proper way.
32597      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32598$as_echo "$as_me: Setting extracted environment variables" >&6;}
32599      . $VS_ENV_TMP_DIR/set-vs-env.sh
32600      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32601      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32602    else
32603      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32604      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32605$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32606    fi
32607  fi
32608
32609  # At this point, we should have correct variables in the environment, or we can't continue.
32610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32611$as_echo_n "checking for Visual Studio variables... " >&6; }
32612
32613  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32614      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32615    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32617$as_echo "present but broken" >&6; }
32618      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32619    else
32620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32621$as_echo "ok" >&6; }
32622      # Remove any trailing "\" ";" and " " from the variables.
32623      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32624      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32625      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32626      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32627      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32628      # Remove any paths containing # (typically F#) as that messes up make. This
32629      # is needed if visual studio was installed with F# support.
32630      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32631
32632
32633
32634
32635
32636      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32637      OLDIFS="$IFS"
32638      IFS=";"
32639      for i in $VS_INCLUDE; do
32640        ipath=$i
32641        # Only process non-empty elements
32642        if test "x$ipath" != x; then
32643          IFS="$OLDIFS"
32644          # Check that directory exists before calling fixup_path
32645          testpath=$ipath
32646
32647  windows_path="$testpath"
32648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32649    unix_path=`$CYGPATH -u "$windows_path"`
32650    testpath="$unix_path"
32651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32653    testpath="$unix_path"
32654  fi
32655
32656          if test -d "$testpath"; then
32657
32658  # Only process if variable expands to non-empty
32659
32660  if test "x$ipath" != x; then
32661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32662
32663  # Input might be given as Windows format, start by converting to
32664  # unix format.
32665  path="$ipath"
32666  new_path=`$CYGPATH -u "$path"`
32667
32668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32671  # "foo.exe" is OK but "foo" is an error.
32672  #
32673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32674  # It is also a way to make sure we got the proper file name for the real test later on.
32675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32676  if test "x$test_shortpath" = x; then
32677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32678$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32679    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32680  fi
32681
32682  # Call helper function which possibly converts this using DOS-style short mode.
32683  # If so, the updated path is stored in $new_path.
32684
32685  input_path="$new_path"
32686  # Check if we need to convert this using DOS-style short mode. If the path
32687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32688  # take no chances and rewrite it.
32689  # Note: m4 eats our [], so we need to use [ and ] instead.
32690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32691  if test "x$has_forbidden_chars" != x; then
32692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32696      # Going to short mode and back again did indeed matter. Since short mode is
32697      # case insensitive, let's make it lowercase to improve readability.
32698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32699      # Now convert it back to Unix-style (cygpath)
32700      input_path=`$CYGPATH -u "$shortmode_path"`
32701      new_path="$input_path"
32702    fi
32703  fi
32704
32705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32706  if test "x$test_cygdrive_prefix" = x; then
32707    # As a simple fix, exclude /usr/bin since it's not a real path.
32708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32710      # a path prefixed by /cygdrive for fixpath to work.
32711      new_path="$CYGWIN_ROOT_PATH$input_path"
32712    fi
32713  fi
32714
32715
32716  if test "x$path" != "x$new_path"; then
32717    ipath="$new_path"
32718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32719$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32720  fi
32721
32722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723
32724  path="$ipath"
32725  has_colon=`$ECHO $path | $GREP ^.:`
32726  new_path="$path"
32727  if test "x$has_colon" = x; then
32728    # Not in mixed or Windows style, start by that.
32729    new_path=`cmd //c echo $path`
32730  fi
32731
32732
32733  input_path="$new_path"
32734  # Check if we need to convert this using DOS-style short mode. If the path
32735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32736  # take no chances and rewrite it.
32737  # Note: m4 eats our [], so we need to use [ and ] instead.
32738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32739  if test "x$has_forbidden_chars" != x; then
32740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32742  fi
32743
32744
32745  windows_path="$new_path"
32746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32747    unix_path=`$CYGPATH -u "$windows_path"`
32748    new_path="$unix_path"
32749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32751    new_path="$unix_path"
32752  fi
32753
32754  if test "x$path" != "x$new_path"; then
32755    ipath="$new_path"
32756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32757$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32758  fi
32759
32760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32762
32763    else
32764      # We're on a unix platform. Hooray! :)
32765      path="$ipath"
32766      has_space=`$ECHO "$path" | $GREP " "`
32767      if test "x$has_space" != x; then
32768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32769$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32771      fi
32772
32773      # Use eval to expand a potential ~
32774      eval path="$path"
32775      if test ! -f "$path" && test ! -d "$path"; then
32776        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32777      fi
32778
32779      if test -d "$path"; then
32780        ipath="`cd "$path"; $THEPWDCMD -L`"
32781      else
32782        dir="`$DIRNAME "$path"`"
32783        base="`$BASENAME "$path"`"
32784        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32785      fi
32786    fi
32787  fi
32788
32789            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32790          fi
32791          IFS=";"
32792        fi
32793      done
32794      # Convert VS_LIB into SYSROOT_LDFLAGS
32795      for i in $VS_LIB; do
32796        libpath=$i
32797        # Only process non-empty elements
32798        if test "x$libpath" != x; then
32799          IFS="$OLDIFS"
32800          # Check that directory exists before calling fixup_path
32801          testpath=$libpath
32802
32803  windows_path="$testpath"
32804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32805    unix_path=`$CYGPATH -u "$windows_path"`
32806    testpath="$unix_path"
32807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32809    testpath="$unix_path"
32810  fi
32811
32812          if test -d "$testpath"; then
32813
32814  # Only process if variable expands to non-empty
32815
32816  if test "x$libpath" != x; then
32817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32818
32819  # Input might be given as Windows format, start by converting to
32820  # unix format.
32821  path="$libpath"
32822  new_path=`$CYGPATH -u "$path"`
32823
32824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32827  # "foo.exe" is OK but "foo" is an error.
32828  #
32829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32830  # It is also a way to make sure we got the proper file name for the real test later on.
32831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32832  if test "x$test_shortpath" = x; then
32833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32834$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32835    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32836  fi
32837
32838  # Call helper function which possibly converts this using DOS-style short mode.
32839  # If so, the updated path is stored in $new_path.
32840
32841  input_path="$new_path"
32842  # Check if we need to convert this using DOS-style short mode. If the path
32843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32844  # take no chances and rewrite it.
32845  # Note: m4 eats our [], so we need to use [ and ] instead.
32846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32847  if test "x$has_forbidden_chars" != x; then
32848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32852      # Going to short mode and back again did indeed matter. Since short mode is
32853      # case insensitive, let's make it lowercase to improve readability.
32854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32855      # Now convert it back to Unix-style (cygpath)
32856      input_path=`$CYGPATH -u "$shortmode_path"`
32857      new_path="$input_path"
32858    fi
32859  fi
32860
32861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32862  if test "x$test_cygdrive_prefix" = x; then
32863    # As a simple fix, exclude /usr/bin since it's not a real path.
32864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32866      # a path prefixed by /cygdrive for fixpath to work.
32867      new_path="$CYGWIN_ROOT_PATH$input_path"
32868    fi
32869  fi
32870
32871
32872  if test "x$path" != "x$new_path"; then
32873    libpath="$new_path"
32874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32875$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32876  fi
32877
32878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32879
32880  path="$libpath"
32881  has_colon=`$ECHO $path | $GREP ^.:`
32882  new_path="$path"
32883  if test "x$has_colon" = x; then
32884    # Not in mixed or Windows style, start by that.
32885    new_path=`cmd //c echo $path`
32886  fi
32887
32888
32889  input_path="$new_path"
32890  # Check if we need to convert this using DOS-style short mode. If the path
32891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32892  # take no chances and rewrite it.
32893  # Note: m4 eats our [], so we need to use [ and ] instead.
32894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32895  if test "x$has_forbidden_chars" != x; then
32896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32898  fi
32899
32900
32901  windows_path="$new_path"
32902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32903    unix_path=`$CYGPATH -u "$windows_path"`
32904    new_path="$unix_path"
32905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32907    new_path="$unix_path"
32908  fi
32909
32910  if test "x$path" != "x$new_path"; then
32911    libpath="$new_path"
32912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32913$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32914  fi
32915
32916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32918
32919    else
32920      # We're on a unix platform. Hooray! :)
32921      path="$libpath"
32922      has_space=`$ECHO "$path" | $GREP " "`
32923      if test "x$has_space" != x; then
32924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32925$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32927      fi
32928
32929      # Use eval to expand a potential ~
32930      eval path="$path"
32931      if test ! -f "$path" && test ! -d "$path"; then
32932        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32933      fi
32934
32935      if test -d "$path"; then
32936        libpath="`cd "$path"; $THEPWDCMD -L`"
32937      else
32938        dir="`$DIRNAME "$path"`"
32939        base="`$BASENAME "$path"`"
32940        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32941      fi
32942    fi
32943  fi
32944
32945            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32946          fi
32947          IFS=";"
32948        fi
32949      done
32950      IFS="$OLDIFS"
32951    fi
32952  else
32953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32954$as_echo "not found" >&6; }
32955
32956    if test "x$VS_ENV_CMD" = x; then
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32958$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32959      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32960$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32961    else
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32963$as_echo "$as_me: Running the extraction script failed." >&6;}
32964    fi
32965    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32966$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32967    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32968$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32969    as_fn_error $? "Cannot continue" "$LINENO" 5
32970  fi
32971
32972    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32973    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32974    PATH="$VS_PATH"
32975    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32976    export INCLUDE="$VS_INCLUDE"
32977    export LIB="$VS_LIB"
32978  else
32979    if test "x$XCODE_VERSION_OUTPUT" != x; then
32980      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32981      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32982      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32983    else
32984      # Currently we do not define this for other toolchains. This might change as the need arise.
32985      TOOLCHAIN_VERSION=
32986    fi
32987  fi
32988
32989
32990  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32991  # override all other locations.
32992  if test "x$TOOLCHAIN_PATH" != x; then
32993    PATH=$TOOLCHAIN_PATH:$PATH
32994  fi
32995
32996
32997  #
32998  # Setup the compilers (CC and CXX)
32999  #
33000
33001  COMPILER_NAME=C
33002  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33003
33004  if test "x$CC" != x; then
33005    # User has supplied compiler name already, always let that override.
33006    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33007$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33008    if test "x`basename $CC`" = "x$CC"; then
33009      # A command without a complete path is provided, search $PATH.
33010
33011      for ac_prog in $CC
33012do
33013  # Extract the first word of "$ac_prog", so it can be a program name with args.
33014set dummy $ac_prog; ac_word=$2
33015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33016$as_echo_n "checking for $ac_word... " >&6; }
33017if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33018  $as_echo_n "(cached) " >&6
33019else
33020  case $POTENTIAL_CC in
33021  [\\/]* | ?:[\\/]*)
33022  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33023  ;;
33024  *)
33025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33026for as_dir in $PATH
33027do
33028  IFS=$as_save_IFS
33029  test -z "$as_dir" && as_dir=.
33030    for ac_exec_ext in '' $ac_executable_extensions; do
33031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33032    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33034    break 2
33035  fi
33036done
33037  done
33038IFS=$as_save_IFS
33039
33040  ;;
33041esac
33042fi
33043POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33044if test -n "$POTENTIAL_CC"; then
33045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33046$as_echo "$POTENTIAL_CC" >&6; }
33047else
33048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33049$as_echo "no" >&6; }
33050fi
33051
33052
33053  test -n "$POTENTIAL_CC" && break
33054done
33055
33056      if test "x$POTENTIAL_CC" != x; then
33057        CC=$POTENTIAL_CC
33058      else
33059        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33060      fi
33061    else
33062      # Otherwise it might already be a complete path
33063      if test ! -x "$CC"; then
33064        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33065      fi
33066    fi
33067  else
33068    # No user supplied value. Locate compiler ourselves.
33069
33070    # If we are cross compiling, assume cross compilation tools follows the
33071    # cross compilation standard where they are prefixed with the autoconf
33072    # standard name for the target. For example the binary
33073    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33074    # If we are not cross compiling, then the default compiler name will be
33075    # used.
33076
33077    CC=
33078    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33079    # before checking the rest of the PATH.
33080    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33081    # step, this should not be necessary.
33082    if test -n "$TOOLCHAIN_PATH"; then
33083      PATH_save="$PATH"
33084      PATH="$TOOLCHAIN_PATH"
33085      for ac_prog in $SEARCH_LIST
33086do
33087  # Extract the first word of "$ac_prog", so it can be a program name with args.
33088set dummy $ac_prog; ac_word=$2
33089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33090$as_echo_n "checking for $ac_word... " >&6; }
33091if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33092  $as_echo_n "(cached) " >&6
33093else
33094  case $TOOLCHAIN_PATH_CC in
33095  [\\/]* | ?:[\\/]*)
33096  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33097  ;;
33098  *)
33099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33100for as_dir in $PATH
33101do
33102  IFS=$as_save_IFS
33103  test -z "$as_dir" && as_dir=.
33104    for ac_exec_ext in '' $ac_executable_extensions; do
33105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33106    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33108    break 2
33109  fi
33110done
33111  done
33112IFS=$as_save_IFS
33113
33114  ;;
33115esac
33116fi
33117TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33118if test -n "$TOOLCHAIN_PATH_CC"; then
33119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33120$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33121else
33122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33123$as_echo "no" >&6; }
33124fi
33125
33126
33127  test -n "$TOOLCHAIN_PATH_CC" && break
33128done
33129
33130      CC=$TOOLCHAIN_PATH_CC
33131      PATH="$PATH_save"
33132    fi
33133
33134    # AC_PATH_PROGS can't be run multiple times with the same variable,
33135    # so create a new name for this run.
33136    if test "x$CC" = x; then
33137      for ac_prog in $SEARCH_LIST
33138do
33139  # Extract the first word of "$ac_prog", so it can be a program name with args.
33140set dummy $ac_prog; ac_word=$2
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33142$as_echo_n "checking for $ac_word... " >&6; }
33143if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33144  $as_echo_n "(cached) " >&6
33145else
33146  case $POTENTIAL_CC in
33147  [\\/]* | ?:[\\/]*)
33148  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33149  ;;
33150  *)
33151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33152for as_dir in $PATH
33153do
33154  IFS=$as_save_IFS
33155  test -z "$as_dir" && as_dir=.
33156    for ac_exec_ext in '' $ac_executable_extensions; do
33157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33158    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33160    break 2
33161  fi
33162done
33163  done
33164IFS=$as_save_IFS
33165
33166  ;;
33167esac
33168fi
33169POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33170if test -n "$POTENTIAL_CC"; then
33171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33172$as_echo "$POTENTIAL_CC" >&6; }
33173else
33174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33175$as_echo "no" >&6; }
33176fi
33177
33178
33179  test -n "$POTENTIAL_CC" && break
33180done
33181
33182      CC=$POTENTIAL_CC
33183    fi
33184
33185    if test "x$CC" = x; then
33186
33187  # Print a helpful message on how to acquire the necessary build dependency.
33188  # devkit is the help tag: freetype, cups, alsa etc
33189  MISSING_DEPENDENCY=devkit
33190
33191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33192    cygwin_help $MISSING_DEPENDENCY
33193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33194    msys_help $MISSING_DEPENDENCY
33195  else
33196    PKGHANDLER_COMMAND=
33197
33198    case $PKGHANDLER in
33199      apt-get)
33200        apt_help     $MISSING_DEPENDENCY ;;
33201      yum)
33202        yum_help     $MISSING_DEPENDENCY ;;
33203      port)
33204        port_help    $MISSING_DEPENDENCY ;;
33205      pkgutil)
33206        pkgutil_help $MISSING_DEPENDENCY ;;
33207      pkgadd)
33208        pkgadd_help  $MISSING_DEPENDENCY ;;
33209    esac
33210
33211    if test "x$PKGHANDLER_COMMAND" != x; then
33212      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33213    fi
33214  fi
33215
33216      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33217    fi
33218  fi
33219
33220  # Now we have a compiler binary in CC. Make sure it's okay.
33221
33222  # Only process if variable expands to non-empty
33223
33224  if test "x$CC" != x; then
33225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33226
33227  # First separate the path from the arguments. This will split at the first
33228  # space.
33229  complete="$CC"
33230  path="${complete%% *}"
33231  tmp="$complete EOL"
33232  arguments="${tmp#* }"
33233
33234  # Input might be given as Windows format, start by converting to
33235  # unix format.
33236  new_path=`$CYGPATH -u "$path"`
33237
33238  # Now try to locate executable using which
33239  new_path=`$WHICH "$new_path" 2> /dev/null`
33240  # bat and cmd files are not always considered executable in cygwin causing which
33241  # to not find them
33242  if test "x$new_path" = x \
33243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33245    new_path=`$CYGPATH -u "$path"`
33246  fi
33247  if test "x$new_path" = x; then
33248    # Oops. Which didn't find the executable.
33249    # The splitting of arguments from the executable at a space might have been incorrect,
33250    # since paths with space are more likely in Windows. Give it another try with the whole
33251    # argument.
33252    path="$complete"
33253    arguments="EOL"
33254    new_path=`$CYGPATH -u "$path"`
33255    new_path=`$WHICH "$new_path" 2> /dev/null`
33256    # bat and cmd files are not always considered executable in cygwin causing which
33257    # to not find them
33258    if test "x$new_path" = x \
33259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33261      new_path=`$CYGPATH -u "$path"`
33262    fi
33263    if test "x$new_path" = x; then
33264      # It's still not found. Now this is an unrecoverable error.
33265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33266$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33267      has_space=`$ECHO "$complete" | $GREP " "`
33268      if test "x$has_space" != x; then
33269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33271      fi
33272      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33273    fi
33274  fi
33275
33276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33279  # "foo.exe" is OK but "foo" is an error.
33280  #
33281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33282  # It is also a way to make sure we got the proper file name for the real test later on.
33283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33284  if test "x$test_shortpath" = x; then
33285    # Short path failed, file does not exist as specified.
33286    # Try adding .exe or .cmd
33287    if test -f "${new_path}.exe"; then
33288      input_to_shortpath="${new_path}.exe"
33289    elif test -f "${new_path}.cmd"; then
33290      input_to_shortpath="${new_path}.cmd"
33291    else
33292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33293$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33296      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33297    fi
33298  else
33299    input_to_shortpath="$new_path"
33300  fi
33301
33302  # Call helper function which possibly converts this using DOS-style short mode.
33303  # If so, the updated path is stored in $new_path.
33304  new_path="$input_to_shortpath"
33305
33306  input_path="$input_to_shortpath"
33307  # Check if we need to convert this using DOS-style short mode. If the path
33308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33309  # take no chances and rewrite it.
33310  # Note: m4 eats our [], so we need to use [ and ] instead.
33311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33312  if test "x$has_forbidden_chars" != x; then
33313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33317      # Going to short mode and back again did indeed matter. Since short mode is
33318      # case insensitive, let's make it lowercase to improve readability.
33319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33320      # Now convert it back to Unix-style (cygpath)
33321      input_path=`$CYGPATH -u "$shortmode_path"`
33322      new_path="$input_path"
33323    fi
33324  fi
33325
33326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33327  if test "x$test_cygdrive_prefix" = x; then
33328    # As a simple fix, exclude /usr/bin since it's not a real path.
33329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33331      # a path prefixed by /cygdrive for fixpath to work.
33332      new_path="$CYGWIN_ROOT_PATH$input_path"
33333    fi
33334  fi
33335
33336  # remove trailing .exe if any
33337  new_path="${new_path/%.exe/}"
33338
33339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33340
33341  # First separate the path from the arguments. This will split at the first
33342  # space.
33343  complete="$CC"
33344  path="${complete%% *}"
33345  tmp="$complete EOL"
33346  arguments="${tmp#* }"
33347
33348  # Input might be given as Windows format, start by converting to
33349  # unix format.
33350  new_path="$path"
33351
33352  windows_path="$new_path"
33353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33354    unix_path=`$CYGPATH -u "$windows_path"`
33355    new_path="$unix_path"
33356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33358    new_path="$unix_path"
33359  fi
33360
33361
33362  # Now try to locate executable using which
33363  new_path=`$WHICH "$new_path" 2> /dev/null`
33364
33365  if test "x$new_path" = x; then
33366    # Oops. Which didn't find the executable.
33367    # The splitting of arguments from the executable at a space might have been incorrect,
33368    # since paths with space are more likely in Windows. Give it another try with the whole
33369    # argument.
33370    path="$complete"
33371    arguments="EOL"
33372    new_path="$path"
33373
33374  windows_path="$new_path"
33375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33376    unix_path=`$CYGPATH -u "$windows_path"`
33377    new_path="$unix_path"
33378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33380    new_path="$unix_path"
33381  fi
33382
33383
33384    new_path=`$WHICH "$new_path" 2> /dev/null`
33385    # bat and cmd files are not always considered executable in MSYS causing which
33386    # to not find them
33387    if test "x$new_path" = x \
33388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33390      new_path="$path"
33391
33392  windows_path="$new_path"
33393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33394    unix_path=`$CYGPATH -u "$windows_path"`
33395    new_path="$unix_path"
33396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33398    new_path="$unix_path"
33399  fi
33400
33401    fi
33402
33403    if test "x$new_path" = x; then
33404      # It's still not found. Now this is an unrecoverable error.
33405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33406$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33407      has_space=`$ECHO "$complete" | $GREP " "`
33408      if test "x$has_space" != x; then
33409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33411      fi
33412      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33413    fi
33414  fi
33415
33416  # Now new_path has a complete unix path to the binary
33417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33418    # Keep paths in /bin as-is, but remove trailing .exe if any
33419    new_path="${new_path/%.exe/}"
33420    # Do not save /bin paths to all_fixpath_prefixes!
33421  else
33422    # Not in mixed or Windows style, start by that.
33423    new_path=`cmd //c echo $new_path`
33424
33425  input_path="$new_path"
33426  # Check if we need to convert this using DOS-style short mode. If the path
33427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33428  # take no chances and rewrite it.
33429  # Note: m4 eats our [], so we need to use [ and ] instead.
33430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33431  if test "x$has_forbidden_chars" != x; then
33432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33434  fi
33435
33436    # Output is in $new_path
33437
33438  windows_path="$new_path"
33439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33440    unix_path=`$CYGPATH -u "$windows_path"`
33441    new_path="$unix_path"
33442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33444    new_path="$unix_path"
33445  fi
33446
33447    # remove trailing .exe if any
33448    new_path="${new_path/%.exe/}"
33449
33450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33452  fi
33453
33454    else
33455      # We're on a unix platform. Hooray! :)
33456      # First separate the path from the arguments. This will split at the first
33457      # space.
33458      complete="$CC"
33459      path="${complete%% *}"
33460      tmp="$complete EOL"
33461      arguments="${tmp#* }"
33462
33463      # Cannot rely on the command "which" here since it doesn't always work.
33464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33465      if test -z "$is_absolute_path"; then
33466        # Path to executable is not absolute. Find it.
33467        IFS_save="$IFS"
33468        IFS=:
33469        for p in $PATH; do
33470          if test -f "$p/$path" && test -x "$p/$path"; then
33471            new_path="$p/$path"
33472            break
33473          fi
33474        done
33475        IFS="$IFS_save"
33476      else
33477        # This is an absolute path, we can use it without further modifications.
33478        new_path="$path"
33479      fi
33480
33481      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
33487$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
33494    if test "x$arguments" != xEOL; then
33495      new_complete="$new_path ${arguments% *}"
33496    else
33497      new_complete="$new_path"
33498    fi
33499
33500    if test "x$complete" != "x$new_complete"; then
33501      CC="$new_complete"
33502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33503$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33504    fi
33505  fi
33506
33507  TEST_COMPILER="$CC"
33508
33509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33510$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33511  SYMLINK_ORIGINAL="$TEST_COMPILER"
33512
33513  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33514    # Follow a chain of symbolic links. Use readlink
33515    # where it exists, else fall back to horribly
33516    # complicated shell code.
33517    if test "x$READLINK_TESTED" != yes; then
33518      # On MacOSX there is a readlink tool with a different
33519      # purpose than the GNU readlink tool. Check the found readlink.
33520      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33521      if test "x$ISGNU" = x; then
33522        # A readlink that we do not know how to use.
33523        # Are there other non-GNU readlinks out there?
33524        READLINK_TESTED=yes
33525        READLINK=
33526      fi
33527    fi
33528
33529    if test "x$READLINK" != x; then
33530      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33531    else
33532      # Save the current directory for restoring afterwards
33533      STARTDIR=$PWD
33534      COUNTER=0
33535      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33536      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33537      cd $sym_link_dir
33538      # Use -P flag to resolve symlinks in directories.
33539      cd `$THEPWDCMD -P`
33540      sym_link_dir=`$THEPWDCMD -P`
33541      # Resolve file symlinks
33542      while test $COUNTER -lt 20; do
33543        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33544        if test "x$ISLINK" == x; then
33545          # This is not a symbolic link! We are done!
33546          break
33547        fi
33548        # Again resolve directory symlinks since the target of the just found
33549        # link could be in a different directory
33550        cd `$DIRNAME $ISLINK`
33551        sym_link_dir=`$THEPWDCMD -P`
33552        sym_link_file=`$BASENAME $ISLINK`
33553        let COUNTER=COUNTER+1
33554      done
33555      cd $STARTDIR
33556      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33557    fi
33558  fi
33559
33560  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33562$as_echo "no symlink" >&6; }
33563  else
33564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33565$as_echo "$SYMLINK_ORIGINAL" >&6; }
33566
33567    # We can't handle ccache by gcc wrappers, since we need to know if we're
33568    # using ccache. Instead ccache usage must be controlled by a configure option.
33569    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33570    if test "x$COMPILER_BASENAME" = "xccache"; then
33571      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33572$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33573      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33574    fi
33575  fi
33576
33577
33578  COMPILER=$CC
33579  COMPILER_NAME=$COMPILER_NAME
33580
33581  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33582    # cc -V output typically looks like
33583    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33584    # or
33585    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33586    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33587    # Check that this is likely to be the Solaris Studio cc.
33588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33589    if test $? -ne 0; then
33590      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33591      { $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
33592$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33593      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33594$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33596$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33597      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33598    fi
33599    # Remove usage instructions (if present), and
33600    # collapse compiler output into a single line
33601    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33602        $SED -e 's/ *[Uu]sage:.*//'`
33603    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33604        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33605  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33606    # xlc -qversion output typically looks like
33607    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33608    #     Version: 11.01.0000.0015
33609    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33610    # Check that this is likely to be the IBM XL C compiler.
33611    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33612    if test $? -ne 0; then
33613      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33614      { $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
33615$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33616      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33617$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33618      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33619$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33620      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33621    fi
33622    # Collapse compiler output into a single line
33623    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33624    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33625        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33626  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33627    # There is no specific version flag, but all output starts with a version string.
33628    # First line typically looks something like:
33629    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33630    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33631    # Check that this is likely to be Microsoft CL.EXE.
33632    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33633    if test $? -ne 0; then
33634      { $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
33635$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33636      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33637$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33638      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33639    fi
33640    # Collapse compiler output into a single line
33641    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33642    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33643        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33644  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33645    # gcc --version output typically looks like
33646    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33647    #     Copyright (C) 2013 Free Software Foundation, Inc.
33648    #     This is free software; see the source for copying conditions.  There is NO
33649    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33650    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33651    # Check that this is likely to be GCC.
33652    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33653    if test $? -ne 0; then
33654      { $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
33655$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33656      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33657$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33658      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33659    fi
33660    # Remove Copyright and legalese from version string, and
33661    # collapse into a single line
33662    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33663        $SED -e 's/ *Copyright .*//'`
33664    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33665        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33666  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33667    # clang --version output typically looks like
33668    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33669    #    clang version 3.3 (tags/RELEASE_33/final)
33670    # or
33671    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33672    #    Target: x86_64-pc-linux-gnu
33673    #    Thread model: posix
33674    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33675    # Check that this is likely to be clang
33676    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33677    if test $? -ne 0; then
33678      { $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
33679$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33680      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33681$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33682      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33683    fi
33684    # Collapse compiler output into a single line
33685    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33686    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33687        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33688  else
33689      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33690  fi
33691  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33692  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33693  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33694  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33695
33696  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33697$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33698
33699
33700  # Now that we have resolved CC ourself, let autoconf have its go at it
33701  ac_ext=c
33702ac_cpp='$CPP $CPPFLAGS'
33703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33705ac_compiler_gnu=$ac_cv_c_compiler_gnu
33706if test -n "$ac_tool_prefix"; then
33707  for ac_prog in $CC
33708  do
33709    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33710set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33712$as_echo_n "checking for $ac_word... " >&6; }
33713if ${ac_cv_prog_CC+:} false; then :
33714  $as_echo_n "(cached) " >&6
33715else
33716  if test -n "$CC"; then
33717  ac_cv_prog_CC="$CC" # Let the user override the test.
33718else
33719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33720for as_dir in $PATH
33721do
33722  IFS=$as_save_IFS
33723  test -z "$as_dir" && as_dir=.
33724    for ac_exec_ext in '' $ac_executable_extensions; do
33725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33726    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33728    break 2
33729  fi
33730done
33731  done
33732IFS=$as_save_IFS
33733
33734fi
33735fi
33736CC=$ac_cv_prog_CC
33737if test -n "$CC"; then
33738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33739$as_echo "$CC" >&6; }
33740else
33741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33742$as_echo "no" >&6; }
33743fi
33744
33745
33746    test -n "$CC" && break
33747  done
33748fi
33749if test -z "$CC"; then
33750  ac_ct_CC=$CC
33751  for ac_prog in $CC
33752do
33753  # Extract the first word of "$ac_prog", so it can be a program name with args.
33754set dummy $ac_prog; ac_word=$2
33755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33756$as_echo_n "checking for $ac_word... " >&6; }
33757if ${ac_cv_prog_ac_ct_CC+:} false; then :
33758  $as_echo_n "(cached) " >&6
33759else
33760  if test -n "$ac_ct_CC"; then
33761  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33762else
33763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33764for as_dir in $PATH
33765do
33766  IFS=$as_save_IFS
33767  test -z "$as_dir" && as_dir=.
33768    for ac_exec_ext in '' $ac_executable_extensions; do
33769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33770    ac_cv_prog_ac_ct_CC="$ac_prog"
33771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33772    break 2
33773  fi
33774done
33775  done
33776IFS=$as_save_IFS
33777
33778fi
33779fi
33780ac_ct_CC=$ac_cv_prog_ac_ct_CC
33781if test -n "$ac_ct_CC"; then
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33783$as_echo "$ac_ct_CC" >&6; }
33784else
33785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33786$as_echo "no" >&6; }
33787fi
33788
33789
33790  test -n "$ac_ct_CC" && break
33791done
33792
33793  if test "x$ac_ct_CC" = x; then
33794    CC=""
33795  else
33796    case $cross_compiling:$ac_tool_warned in
33797yes:)
33798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33800ac_tool_warned=yes ;;
33801esac
33802    CC=$ac_ct_CC
33803  fi
33804fi
33805
33806
33807test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33809as_fn_error $? "no acceptable C compiler found in \$PATH
33810See \`config.log' for more details" "$LINENO" 5; }
33811
33812# Provide some information about the compiler.
33813$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33814set X $ac_compile
33815ac_compiler=$2
33816for ac_option in --version -v -V -qversion; do
33817  { { ac_try="$ac_compiler $ac_option >&5"
33818case "(($ac_try" in
33819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33820  *) ac_try_echo=$ac_try;;
33821esac
33822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33823$as_echo "$ac_try_echo"; } >&5
33824  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33825  ac_status=$?
33826  if test -s conftest.err; then
33827    sed '10a\
33828... rest of stderr output deleted ...
33829         10q' conftest.err >conftest.er1
33830    cat conftest.er1 >&5
33831  fi
33832  rm -f conftest.er1 conftest.err
33833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33834  test $ac_status = 0; }
33835done
33836
33837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33838/* end confdefs.h.  */
33839
33840int
33841main ()
33842{
33843
33844  ;
33845  return 0;
33846}
33847_ACEOF
33848ac_clean_files_save=$ac_clean_files
33849ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33850# Try to create an executable without -o first, disregard a.out.
33851# It will help us diagnose broken compilers, and finding out an intuition
33852# of exeext.
33853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33854$as_echo_n "checking whether the C compiler works... " >&6; }
33855ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33856
33857# The possible output files:
33858ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33859
33860ac_rmfiles=
33861for ac_file in $ac_files
33862do
33863  case $ac_file in
33864    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33865    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33866  esac
33867done
33868rm -f $ac_rmfiles
33869
33870if { { ac_try="$ac_link_default"
33871case "(($ac_try" in
33872  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33873  *) ac_try_echo=$ac_try;;
33874esac
33875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33876$as_echo "$ac_try_echo"; } >&5
33877  (eval "$ac_link_default") 2>&5
33878  ac_status=$?
33879  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33880  test $ac_status = 0; }; then :
33881  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33882# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33883# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33884# so that the user can short-circuit this test for compilers unknown to
33885# Autoconf.
33886for ac_file in $ac_files ''
33887do
33888  test -f "$ac_file" || continue
33889  case $ac_file in
33890    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33891	;;
33892    [ab].out )
33893	# We found the default executable, but exeext='' is most
33894	# certainly right.
33895	break;;
33896    *.* )
33897	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33898	then :; else
33899	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33900	fi
33901	# We set ac_cv_exeext here because the later test for it is not
33902	# safe: cross compilers may not add the suffix if given an `-o'
33903	# argument, so we may need to know it at that point already.
33904	# Even if this section looks crufty: it has the advantage of
33905	# actually working.
33906	break;;
33907    * )
33908	break;;
33909  esac
33910done
33911test "$ac_cv_exeext" = no && ac_cv_exeext=
33912
33913else
33914  ac_file=''
33915fi
33916if test -z "$ac_file"; then :
33917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33918$as_echo "no" >&6; }
33919$as_echo "$as_me: failed program was:" >&5
33920sed 's/^/| /' conftest.$ac_ext >&5
33921
33922{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33924as_fn_error 77 "C compiler cannot create executables
33925See \`config.log' for more details" "$LINENO" 5; }
33926else
33927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33928$as_echo "yes" >&6; }
33929fi
33930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33931$as_echo_n "checking for C compiler default output file name... " >&6; }
33932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33933$as_echo "$ac_file" >&6; }
33934ac_exeext=$ac_cv_exeext
33935
33936rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33937ac_clean_files=$ac_clean_files_save
33938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33939$as_echo_n "checking for suffix of executables... " >&6; }
33940if { { ac_try="$ac_link"
33941case "(($ac_try" in
33942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33943  *) ac_try_echo=$ac_try;;
33944esac
33945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33946$as_echo "$ac_try_echo"; } >&5
33947  (eval "$ac_link") 2>&5
33948  ac_status=$?
33949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33950  test $ac_status = 0; }; then :
33951  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33952# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33953# work properly (i.e., refer to `conftest.exe'), while it won't with
33954# `rm'.
33955for ac_file in conftest.exe conftest conftest.*; do
33956  test -f "$ac_file" || continue
33957  case $ac_file in
33958    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33959    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33960	  break;;
33961    * ) break;;
33962  esac
33963done
33964else
33965  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33967as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33968See \`config.log' for more details" "$LINENO" 5; }
33969fi
33970rm -f conftest conftest$ac_cv_exeext
33971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33972$as_echo "$ac_cv_exeext" >&6; }
33973
33974rm -f conftest.$ac_ext
33975EXEEXT=$ac_cv_exeext
33976ac_exeext=$EXEEXT
33977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33978/* end confdefs.h.  */
33979#include <stdio.h>
33980int
33981main ()
33982{
33983FILE *f = fopen ("conftest.out", "w");
33984 return ferror (f) || fclose (f) != 0;
33985
33986  ;
33987  return 0;
33988}
33989_ACEOF
33990ac_clean_files="$ac_clean_files conftest.out"
33991# Check that the compiler produces executables we can run.  If not, either
33992# the compiler is broken, or we cross compile.
33993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33994$as_echo_n "checking whether we are cross compiling... " >&6; }
33995if test "$cross_compiling" != yes; then
33996  { { ac_try="$ac_link"
33997case "(($ac_try" in
33998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33999  *) ac_try_echo=$ac_try;;
34000esac
34001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34002$as_echo "$ac_try_echo"; } >&5
34003  (eval "$ac_link") 2>&5
34004  ac_status=$?
34005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34006  test $ac_status = 0; }
34007  if { ac_try='./conftest$ac_cv_exeext'
34008  { { case "(($ac_try" in
34009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34010  *) ac_try_echo=$ac_try;;
34011esac
34012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34013$as_echo "$ac_try_echo"; } >&5
34014  (eval "$ac_try") 2>&5
34015  ac_status=$?
34016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34017  test $ac_status = 0; }; }; then
34018    cross_compiling=no
34019  else
34020    if test "$cross_compiling" = maybe; then
34021	cross_compiling=yes
34022    else
34023	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34025as_fn_error $? "cannot run C compiled programs.
34026If you meant to cross compile, use \`--host'.
34027See \`config.log' for more details" "$LINENO" 5; }
34028    fi
34029  fi
34030fi
34031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34032$as_echo "$cross_compiling" >&6; }
34033
34034rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34035ac_clean_files=$ac_clean_files_save
34036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34037$as_echo_n "checking for suffix of object files... " >&6; }
34038if ${ac_cv_objext+:} false; then :
34039  $as_echo_n "(cached) " >&6
34040else
34041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34042/* end confdefs.h.  */
34043
34044int
34045main ()
34046{
34047
34048  ;
34049  return 0;
34050}
34051_ACEOF
34052rm -f conftest.o conftest.obj
34053if { { ac_try="$ac_compile"
34054case "(($ac_try" in
34055  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34056  *) ac_try_echo=$ac_try;;
34057esac
34058eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34059$as_echo "$ac_try_echo"; } >&5
34060  (eval "$ac_compile") 2>&5
34061  ac_status=$?
34062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34063  test $ac_status = 0; }; then :
34064  for ac_file in conftest.o conftest.obj conftest.*; do
34065  test -f "$ac_file" || continue;
34066  case $ac_file in
34067    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34068    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34069       break;;
34070  esac
34071done
34072else
34073  $as_echo "$as_me: failed program was:" >&5
34074sed 's/^/| /' conftest.$ac_ext >&5
34075
34076{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34078as_fn_error $? "cannot compute suffix of object files: cannot compile
34079See \`config.log' for more details" "$LINENO" 5; }
34080fi
34081rm -f conftest.$ac_cv_objext conftest.$ac_ext
34082fi
34083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34084$as_echo "$ac_cv_objext" >&6; }
34085OBJEXT=$ac_cv_objext
34086ac_objext=$OBJEXT
34087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34088$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34089if ${ac_cv_c_compiler_gnu+:} false; then :
34090  $as_echo_n "(cached) " >&6
34091else
34092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34093/* end confdefs.h.  */
34094
34095int
34096main ()
34097{
34098#ifndef __GNUC__
34099       choke me
34100#endif
34101
34102  ;
34103  return 0;
34104}
34105_ACEOF
34106if ac_fn_c_try_compile "$LINENO"; then :
34107  ac_compiler_gnu=yes
34108else
34109  ac_compiler_gnu=no
34110fi
34111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34112ac_cv_c_compiler_gnu=$ac_compiler_gnu
34113
34114fi
34115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34116$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34117if test $ac_compiler_gnu = yes; then
34118  GCC=yes
34119else
34120  GCC=
34121fi
34122ac_test_CFLAGS=${CFLAGS+set}
34123ac_save_CFLAGS=$CFLAGS
34124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34125$as_echo_n "checking whether $CC accepts -g... " >&6; }
34126if ${ac_cv_prog_cc_g+:} false; then :
34127  $as_echo_n "(cached) " >&6
34128else
34129  ac_save_c_werror_flag=$ac_c_werror_flag
34130   ac_c_werror_flag=yes
34131   ac_cv_prog_cc_g=no
34132   CFLAGS="-g"
34133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34134/* end confdefs.h.  */
34135
34136int
34137main ()
34138{
34139
34140  ;
34141  return 0;
34142}
34143_ACEOF
34144if ac_fn_c_try_compile "$LINENO"; then :
34145  ac_cv_prog_cc_g=yes
34146else
34147  CFLAGS=""
34148      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34149/* end confdefs.h.  */
34150
34151int
34152main ()
34153{
34154
34155  ;
34156  return 0;
34157}
34158_ACEOF
34159if ac_fn_c_try_compile "$LINENO"; then :
34160
34161else
34162  ac_c_werror_flag=$ac_save_c_werror_flag
34163	 CFLAGS="-g"
34164	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34165/* end confdefs.h.  */
34166
34167int
34168main ()
34169{
34170
34171  ;
34172  return 0;
34173}
34174_ACEOF
34175if ac_fn_c_try_compile "$LINENO"; then :
34176  ac_cv_prog_cc_g=yes
34177fi
34178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34179fi
34180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34181fi
34182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34183   ac_c_werror_flag=$ac_save_c_werror_flag
34184fi
34185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34186$as_echo "$ac_cv_prog_cc_g" >&6; }
34187if test "$ac_test_CFLAGS" = set; then
34188  CFLAGS=$ac_save_CFLAGS
34189elif test $ac_cv_prog_cc_g = yes; then
34190  if test "$GCC" = yes; then
34191    CFLAGS="-g -O2"
34192  else
34193    CFLAGS="-g"
34194  fi
34195else
34196  if test "$GCC" = yes; then
34197    CFLAGS="-O2"
34198  else
34199    CFLAGS=
34200  fi
34201fi
34202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34203$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34204if ${ac_cv_prog_cc_c89+:} false; then :
34205  $as_echo_n "(cached) " >&6
34206else
34207  ac_cv_prog_cc_c89=no
34208ac_save_CC=$CC
34209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34210/* end confdefs.h.  */
34211#include <stdarg.h>
34212#include <stdio.h>
34213struct stat;
34214/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34215struct buf { int x; };
34216FILE * (*rcsopen) (struct buf *, struct stat *, int);
34217static char *e (p, i)
34218     char **p;
34219     int i;
34220{
34221  return p[i];
34222}
34223static char *f (char * (*g) (char **, int), char **p, ...)
34224{
34225  char *s;
34226  va_list v;
34227  va_start (v,p);
34228  s = g (p, va_arg (v,int));
34229  va_end (v);
34230  return s;
34231}
34232
34233/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34234   function prototypes and stuff, but not '\xHH' hex character constants.
34235   These don't provoke an error unfortunately, instead are silently treated
34236   as 'x'.  The following induces an error, until -std is added to get
34237   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34238   array size at least.  It's necessary to write '\x00'==0 to get something
34239   that's true only with -std.  */
34240int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34241
34242/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34243   inside strings and character constants.  */
34244#define FOO(x) 'x'
34245int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34246
34247int test (int i, double x);
34248struct s1 {int (*f) (int a);};
34249struct s2 {int (*f) (double a);};
34250int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34251int argc;
34252char **argv;
34253int
34254main ()
34255{
34256return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34257  ;
34258  return 0;
34259}
34260_ACEOF
34261for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34262	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34263do
34264  CC="$ac_save_CC $ac_arg"
34265  if ac_fn_c_try_compile "$LINENO"; then :
34266  ac_cv_prog_cc_c89=$ac_arg
34267fi
34268rm -f core conftest.err conftest.$ac_objext
34269  test "x$ac_cv_prog_cc_c89" != "xno" && break
34270done
34271rm -f conftest.$ac_ext
34272CC=$ac_save_CC
34273
34274fi
34275# AC_CACHE_VAL
34276case "x$ac_cv_prog_cc_c89" in
34277  x)
34278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34279$as_echo "none needed" >&6; } ;;
34280  xno)
34281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34282$as_echo "unsupported" >&6; } ;;
34283  *)
34284    CC="$CC $ac_cv_prog_cc_c89"
34285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34286$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34287esac
34288if test "x$ac_cv_prog_cc_c89" != xno; then :
34289
34290fi
34291
34292ac_ext=cpp
34293ac_cpp='$CXXCPP $CPPFLAGS'
34294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34297
34298
34299
34300  COMPILER_NAME=C++
34301  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34302
34303  if test "x$CXX" != x; then
34304    # User has supplied compiler name already, always let that override.
34305    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34306$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34307    if test "x`basename $CXX`" = "x$CXX"; then
34308      # A command without a complete path is provided, search $PATH.
34309
34310      for ac_prog in $CXX
34311do
34312  # Extract the first word of "$ac_prog", so it can be a program name with args.
34313set dummy $ac_prog; ac_word=$2
34314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34315$as_echo_n "checking for $ac_word... " >&6; }
34316if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34317  $as_echo_n "(cached) " >&6
34318else
34319  case $POTENTIAL_CXX in
34320  [\\/]* | ?:[\\/]*)
34321  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34322  ;;
34323  *)
34324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34325for as_dir in $PATH
34326do
34327  IFS=$as_save_IFS
34328  test -z "$as_dir" && as_dir=.
34329    for ac_exec_ext in '' $ac_executable_extensions; do
34330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34331    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34333    break 2
34334  fi
34335done
34336  done
34337IFS=$as_save_IFS
34338
34339  ;;
34340esac
34341fi
34342POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34343if test -n "$POTENTIAL_CXX"; then
34344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34345$as_echo "$POTENTIAL_CXX" >&6; }
34346else
34347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34348$as_echo "no" >&6; }
34349fi
34350
34351
34352  test -n "$POTENTIAL_CXX" && break
34353done
34354
34355      if test "x$POTENTIAL_CXX" != x; then
34356        CXX=$POTENTIAL_CXX
34357      else
34358        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34359      fi
34360    else
34361      # Otherwise it might already be a complete path
34362      if test ! -x "$CXX"; then
34363        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34364      fi
34365    fi
34366  else
34367    # No user supplied value. Locate compiler ourselves.
34368
34369    # If we are cross compiling, assume cross compilation tools follows the
34370    # cross compilation standard where they are prefixed with the autoconf
34371    # standard name for the target. For example the binary
34372    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34373    # If we are not cross compiling, then the default compiler name will be
34374    # used.
34375
34376    CXX=
34377    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34378    # before checking the rest of the PATH.
34379    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34380    # step, this should not be necessary.
34381    if test -n "$TOOLCHAIN_PATH"; then
34382      PATH_save="$PATH"
34383      PATH="$TOOLCHAIN_PATH"
34384      for ac_prog in $SEARCH_LIST
34385do
34386  # Extract the first word of "$ac_prog", so it can be a program name with args.
34387set dummy $ac_prog; ac_word=$2
34388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34389$as_echo_n "checking for $ac_word... " >&6; }
34390if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34391  $as_echo_n "(cached) " >&6
34392else
34393  case $TOOLCHAIN_PATH_CXX in
34394  [\\/]* | ?:[\\/]*)
34395  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34396  ;;
34397  *)
34398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34399for as_dir in $PATH
34400do
34401  IFS=$as_save_IFS
34402  test -z "$as_dir" && as_dir=.
34403    for ac_exec_ext in '' $ac_executable_extensions; do
34404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34405    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34407    break 2
34408  fi
34409done
34410  done
34411IFS=$as_save_IFS
34412
34413  ;;
34414esac
34415fi
34416TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34417if test -n "$TOOLCHAIN_PATH_CXX"; then
34418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34419$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34420else
34421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34422$as_echo "no" >&6; }
34423fi
34424
34425
34426  test -n "$TOOLCHAIN_PATH_CXX" && break
34427done
34428
34429      CXX=$TOOLCHAIN_PATH_CXX
34430      PATH="$PATH_save"
34431    fi
34432
34433    # AC_PATH_PROGS can't be run multiple times with the same variable,
34434    # so create a new name for this run.
34435    if test "x$CXX" = x; then
34436      for ac_prog in $SEARCH_LIST
34437do
34438  # Extract the first word of "$ac_prog", so it can be a program name with args.
34439set dummy $ac_prog; ac_word=$2
34440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34441$as_echo_n "checking for $ac_word... " >&6; }
34442if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34443  $as_echo_n "(cached) " >&6
34444else
34445  case $POTENTIAL_CXX in
34446  [\\/]* | ?:[\\/]*)
34447  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34448  ;;
34449  *)
34450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34451for as_dir in $PATH
34452do
34453  IFS=$as_save_IFS
34454  test -z "$as_dir" && as_dir=.
34455    for ac_exec_ext in '' $ac_executable_extensions; do
34456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34457    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34459    break 2
34460  fi
34461done
34462  done
34463IFS=$as_save_IFS
34464
34465  ;;
34466esac
34467fi
34468POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34469if test -n "$POTENTIAL_CXX"; then
34470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34471$as_echo "$POTENTIAL_CXX" >&6; }
34472else
34473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34474$as_echo "no" >&6; }
34475fi
34476
34477
34478  test -n "$POTENTIAL_CXX" && break
34479done
34480
34481      CXX=$POTENTIAL_CXX
34482    fi
34483
34484    if test "x$CXX" = x; then
34485
34486  # Print a helpful message on how to acquire the necessary build dependency.
34487  # devkit is the help tag: freetype, cups, alsa etc
34488  MISSING_DEPENDENCY=devkit
34489
34490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34491    cygwin_help $MISSING_DEPENDENCY
34492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34493    msys_help $MISSING_DEPENDENCY
34494  else
34495    PKGHANDLER_COMMAND=
34496
34497    case $PKGHANDLER in
34498      apt-get)
34499        apt_help     $MISSING_DEPENDENCY ;;
34500      yum)
34501        yum_help     $MISSING_DEPENDENCY ;;
34502      port)
34503        port_help    $MISSING_DEPENDENCY ;;
34504      pkgutil)
34505        pkgutil_help $MISSING_DEPENDENCY ;;
34506      pkgadd)
34507        pkgadd_help  $MISSING_DEPENDENCY ;;
34508    esac
34509
34510    if test "x$PKGHANDLER_COMMAND" != x; then
34511      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34512    fi
34513  fi
34514
34515      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34516    fi
34517  fi
34518
34519  # Now we have a compiler binary in CXX. Make sure it's okay.
34520
34521  # Only process if variable expands to non-empty
34522
34523  if test "x$CXX" != x; then
34524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34525
34526  # First separate the path from the arguments. This will split at the first
34527  # space.
34528  complete="$CXX"
34529  path="${complete%% *}"
34530  tmp="$complete EOL"
34531  arguments="${tmp#* }"
34532
34533  # Input might be given as Windows format, start by converting to
34534  # unix format.
34535  new_path=`$CYGPATH -u "$path"`
34536
34537  # Now try to locate executable using which
34538  new_path=`$WHICH "$new_path" 2> /dev/null`
34539  # bat and cmd files are not always considered executable in cygwin causing which
34540  # to not find them
34541  if test "x$new_path" = x \
34542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34544    new_path=`$CYGPATH -u "$path"`
34545  fi
34546  if test "x$new_path" = x; then
34547    # Oops. Which didn't find the executable.
34548    # The splitting of arguments from the executable at a space might have been incorrect,
34549    # since paths with space are more likely in Windows. Give it another try with the whole
34550    # argument.
34551    path="$complete"
34552    arguments="EOL"
34553    new_path=`$CYGPATH -u "$path"`
34554    new_path=`$WHICH "$new_path" 2> /dev/null`
34555    # bat and cmd files are not always considered executable in cygwin causing which
34556    # to not find them
34557    if test "x$new_path" = x \
34558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34560      new_path=`$CYGPATH -u "$path"`
34561    fi
34562    if test "x$new_path" = x; then
34563      # It's still not found. Now this is an unrecoverable error.
34564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34565$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34566      has_space=`$ECHO "$complete" | $GREP " "`
34567      if test "x$has_space" != x; then
34568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34570      fi
34571      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34572    fi
34573  fi
34574
34575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34578  # "foo.exe" is OK but "foo" is an error.
34579  #
34580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34581  # It is also a way to make sure we got the proper file name for the real test later on.
34582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34583  if test "x$test_shortpath" = x; then
34584    # Short path failed, file does not exist as specified.
34585    # Try adding .exe or .cmd
34586    if test -f "${new_path}.exe"; then
34587      input_to_shortpath="${new_path}.exe"
34588    elif test -f "${new_path}.cmd"; then
34589      input_to_shortpath="${new_path}.cmd"
34590    else
34591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34592$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34595      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34596    fi
34597  else
34598    input_to_shortpath="$new_path"
34599  fi
34600
34601  # Call helper function which possibly converts this using DOS-style short mode.
34602  # If so, the updated path is stored in $new_path.
34603  new_path="$input_to_shortpath"
34604
34605  input_path="$input_to_shortpath"
34606  # Check if we need to convert this using DOS-style short mode. If the path
34607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34608  # take no chances and rewrite it.
34609  # Note: m4 eats our [], so we need to use [ and ] instead.
34610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34611  if test "x$has_forbidden_chars" != x; then
34612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34616      # Going to short mode and back again did indeed matter. Since short mode is
34617      # case insensitive, let's make it lowercase to improve readability.
34618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34619      # Now convert it back to Unix-style (cygpath)
34620      input_path=`$CYGPATH -u "$shortmode_path"`
34621      new_path="$input_path"
34622    fi
34623  fi
34624
34625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34626  if test "x$test_cygdrive_prefix" = x; then
34627    # As a simple fix, exclude /usr/bin since it's not a real path.
34628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34630      # a path prefixed by /cygdrive for fixpath to work.
34631      new_path="$CYGWIN_ROOT_PATH$input_path"
34632    fi
34633  fi
34634
34635  # remove trailing .exe if any
34636  new_path="${new_path/%.exe/}"
34637
34638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34639
34640  # First separate the path from the arguments. This will split at the first
34641  # space.
34642  complete="$CXX"
34643  path="${complete%% *}"
34644  tmp="$complete EOL"
34645  arguments="${tmp#* }"
34646
34647  # Input might be given as Windows format, start by converting to
34648  # unix format.
34649  new_path="$path"
34650
34651  windows_path="$new_path"
34652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34653    unix_path=`$CYGPATH -u "$windows_path"`
34654    new_path="$unix_path"
34655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34657    new_path="$unix_path"
34658  fi
34659
34660
34661  # Now try to locate executable using which
34662  new_path=`$WHICH "$new_path" 2> /dev/null`
34663
34664  if test "x$new_path" = x; then
34665    # Oops. Which didn't find the executable.
34666    # The splitting of arguments from the executable at a space might have been incorrect,
34667    # since paths with space are more likely in Windows. Give it another try with the whole
34668    # argument.
34669    path="$complete"
34670    arguments="EOL"
34671    new_path="$path"
34672
34673  windows_path="$new_path"
34674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675    unix_path=`$CYGPATH -u "$windows_path"`
34676    new_path="$unix_path"
34677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34679    new_path="$unix_path"
34680  fi
34681
34682
34683    new_path=`$WHICH "$new_path" 2> /dev/null`
34684    # bat and cmd files are not always considered executable in MSYS causing which
34685    # to not find them
34686    if test "x$new_path" = x \
34687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34689      new_path="$path"
34690
34691  windows_path="$new_path"
34692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34693    unix_path=`$CYGPATH -u "$windows_path"`
34694    new_path="$unix_path"
34695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34697    new_path="$unix_path"
34698  fi
34699
34700    fi
34701
34702    if test "x$new_path" = x; then
34703      # It's still not found. Now this is an unrecoverable error.
34704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34705$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34706      has_space=`$ECHO "$complete" | $GREP " "`
34707      if test "x$has_space" != x; then
34708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34710      fi
34711      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34712    fi
34713  fi
34714
34715  # Now new_path has a complete unix path to the binary
34716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34717    # Keep paths in /bin as-is, but remove trailing .exe if any
34718    new_path="${new_path/%.exe/}"
34719    # Do not save /bin paths to all_fixpath_prefixes!
34720  else
34721    # Not in mixed or Windows style, start by that.
34722    new_path=`cmd //c echo $new_path`
34723
34724  input_path="$new_path"
34725  # Check if we need to convert this using DOS-style short mode. If the path
34726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34727  # take no chances and rewrite it.
34728  # Note: m4 eats our [], so we need to use [ and ] instead.
34729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34730  if test "x$has_forbidden_chars" != x; then
34731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34733  fi
34734
34735    # Output is in $new_path
34736
34737  windows_path="$new_path"
34738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34739    unix_path=`$CYGPATH -u "$windows_path"`
34740    new_path="$unix_path"
34741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34743    new_path="$unix_path"
34744  fi
34745
34746    # remove trailing .exe if any
34747    new_path="${new_path/%.exe/}"
34748
34749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34751  fi
34752
34753    else
34754      # We're on a unix platform. Hooray! :)
34755      # First separate the path from the arguments. This will split at the first
34756      # space.
34757      complete="$CXX"
34758      path="${complete%% *}"
34759      tmp="$complete EOL"
34760      arguments="${tmp#* }"
34761
34762      # Cannot rely on the command "which" here since it doesn't always work.
34763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34764      if test -z "$is_absolute_path"; then
34765        # Path to executable is not absolute. Find it.
34766        IFS_save="$IFS"
34767        IFS=:
34768        for p in $PATH; do
34769          if test -f "$p/$path" && test -x "$p/$path"; then
34770            new_path="$p/$path"
34771            break
34772          fi
34773        done
34774        IFS="$IFS_save"
34775      else
34776        # This is an absolute path, we can use it without further modifications.
34777        new_path="$path"
34778      fi
34779
34780      if test "x$new_path" = x; then
34781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34782$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34783        has_space=`$ECHO "$complete" | $GREP " "`
34784        if test "x$has_space" != x; then
34785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34787        fi
34788        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34789      fi
34790    fi
34791
34792    # Now join together the path and the arguments once again
34793    if test "x$arguments" != xEOL; then
34794      new_complete="$new_path ${arguments% *}"
34795    else
34796      new_complete="$new_path"
34797    fi
34798
34799    if test "x$complete" != "x$new_complete"; then
34800      CXX="$new_complete"
34801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34802$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34803    fi
34804  fi
34805
34806  TEST_COMPILER="$CXX"
34807
34808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34809$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34810  SYMLINK_ORIGINAL="$TEST_COMPILER"
34811
34812  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34813    # Follow a chain of symbolic links. Use readlink
34814    # where it exists, else fall back to horribly
34815    # complicated shell code.
34816    if test "x$READLINK_TESTED" != yes; then
34817      # On MacOSX there is a readlink tool with a different
34818      # purpose than the GNU readlink tool. Check the found readlink.
34819      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34820      if test "x$ISGNU" = x; then
34821        # A readlink that we do not know how to use.
34822        # Are there other non-GNU readlinks out there?
34823        READLINK_TESTED=yes
34824        READLINK=
34825      fi
34826    fi
34827
34828    if test "x$READLINK" != x; then
34829      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34830    else
34831      # Save the current directory for restoring afterwards
34832      STARTDIR=$PWD
34833      COUNTER=0
34834      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34835      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34836      cd $sym_link_dir
34837      # Use -P flag to resolve symlinks in directories.
34838      cd `$THEPWDCMD -P`
34839      sym_link_dir=`$THEPWDCMD -P`
34840      # Resolve file symlinks
34841      while test $COUNTER -lt 20; do
34842        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34843        if test "x$ISLINK" == x; then
34844          # This is not a symbolic link! We are done!
34845          break
34846        fi
34847        # Again resolve directory symlinks since the target of the just found
34848        # link could be in a different directory
34849        cd `$DIRNAME $ISLINK`
34850        sym_link_dir=`$THEPWDCMD -P`
34851        sym_link_file=`$BASENAME $ISLINK`
34852        let COUNTER=COUNTER+1
34853      done
34854      cd $STARTDIR
34855      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34856    fi
34857  fi
34858
34859  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34861$as_echo "no symlink" >&6; }
34862  else
34863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34864$as_echo "$SYMLINK_ORIGINAL" >&6; }
34865
34866    # We can't handle ccache by gcc wrappers, since we need to know if we're
34867    # using ccache. Instead ccache usage must be controlled by a configure option.
34868    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34869    if test "x$COMPILER_BASENAME" = "xccache"; then
34870      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34871$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34872      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34873    fi
34874  fi
34875
34876
34877  COMPILER=$CXX
34878  COMPILER_NAME=$COMPILER_NAME
34879
34880  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34881    # cc -V output typically looks like
34882    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34883    # or
34884    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34885    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34886    # Check that this is likely to be the Solaris Studio cc.
34887    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34888    if test $? -ne 0; then
34889      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34890      { $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
34891$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34892      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34893$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34894      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34895$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34896      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34897    fi
34898    # Remove usage instructions (if present), and
34899    # collapse compiler output into a single line
34900    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34901        $SED -e 's/ *[Uu]sage:.*//'`
34902    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34903        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34904  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34905    # xlc -qversion output typically looks like
34906    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34907    #     Version: 11.01.0000.0015
34908    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34909    # Check that this is likely to be the IBM XL C compiler.
34910    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34911    if test $? -ne 0; then
34912      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34913      { $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
34914$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34916$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34917      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34918$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34919      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34920    fi
34921    # Collapse compiler output into a single line
34922    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34923    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34924        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34925  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34926    # There is no specific version flag, but all output starts with a version string.
34927    # First line typically looks something like:
34928    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34929    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34930    # Check that this is likely to be Microsoft CL.EXE.
34931    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34932    if test $? -ne 0; then
34933      { $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
34934$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34935      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34936$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34937      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34938    fi
34939    # Collapse compiler output into a single line
34940    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34941    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34942        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34943  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34944    # gcc --version output typically looks like
34945    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34946    #     Copyright (C) 2013 Free Software Foundation, Inc.
34947    #     This is free software; see the source for copying conditions.  There is NO
34948    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34949    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34950    # Check that this is likely to be GCC.
34951    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34952    if test $? -ne 0; then
34953      { $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
34954$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34955      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34956$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34957      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34958    fi
34959    # Remove Copyright and legalese from version string, and
34960    # collapse into a single line
34961    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34962        $SED -e 's/ *Copyright .*//'`
34963    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34964        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34965  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34966    # clang --version output typically looks like
34967    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34968    #    clang version 3.3 (tags/RELEASE_33/final)
34969    # or
34970    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34971    #    Target: x86_64-pc-linux-gnu
34972    #    Thread model: posix
34973    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34974    # Check that this is likely to be clang
34975    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34976    if test $? -ne 0; then
34977      { $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
34978$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34979      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34980$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34981      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34982    fi
34983    # Collapse compiler output into a single line
34984    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34985    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34986        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34987  else
34988      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34989  fi
34990  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34991  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34992  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34993  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34994
34995  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34996$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34997
34998
34999  # Now that we have resolved CXX ourself, let autoconf have its go at it
35000  ac_ext=cpp
35001ac_cpp='$CXXCPP $CPPFLAGS'
35002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35005if test -z "$CXX"; then
35006  if test -n "$CCC"; then
35007    CXX=$CCC
35008  else
35009    if test -n "$ac_tool_prefix"; then
35010  for ac_prog in $CXX
35011  do
35012    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35013set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35015$as_echo_n "checking for $ac_word... " >&6; }
35016if ${ac_cv_prog_CXX+:} false; then :
35017  $as_echo_n "(cached) " >&6
35018else
35019  if test -n "$CXX"; then
35020  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35021else
35022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35023for as_dir in $PATH
35024do
35025  IFS=$as_save_IFS
35026  test -z "$as_dir" && as_dir=.
35027    for ac_exec_ext in '' $ac_executable_extensions; do
35028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35029    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35031    break 2
35032  fi
35033done
35034  done
35035IFS=$as_save_IFS
35036
35037fi
35038fi
35039CXX=$ac_cv_prog_CXX
35040if test -n "$CXX"; then
35041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35042$as_echo "$CXX" >&6; }
35043else
35044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35045$as_echo "no" >&6; }
35046fi
35047
35048
35049    test -n "$CXX" && break
35050  done
35051fi
35052if test -z "$CXX"; then
35053  ac_ct_CXX=$CXX
35054  for ac_prog in $CXX
35055do
35056  # Extract the first word of "$ac_prog", so it can be a program name with args.
35057set dummy $ac_prog; ac_word=$2
35058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35059$as_echo_n "checking for $ac_word... " >&6; }
35060if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35061  $as_echo_n "(cached) " >&6
35062else
35063  if test -n "$ac_ct_CXX"; then
35064  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35065else
35066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35067for as_dir in $PATH
35068do
35069  IFS=$as_save_IFS
35070  test -z "$as_dir" && as_dir=.
35071    for ac_exec_ext in '' $ac_executable_extensions; do
35072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35073    ac_cv_prog_ac_ct_CXX="$ac_prog"
35074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35075    break 2
35076  fi
35077done
35078  done
35079IFS=$as_save_IFS
35080
35081fi
35082fi
35083ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35084if test -n "$ac_ct_CXX"; then
35085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35086$as_echo "$ac_ct_CXX" >&6; }
35087else
35088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35089$as_echo "no" >&6; }
35090fi
35091
35092
35093  test -n "$ac_ct_CXX" && break
35094done
35095
35096  if test "x$ac_ct_CXX" = x; then
35097    CXX="g++"
35098  else
35099    case $cross_compiling:$ac_tool_warned in
35100yes:)
35101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35103ac_tool_warned=yes ;;
35104esac
35105    CXX=$ac_ct_CXX
35106  fi
35107fi
35108
35109  fi
35110fi
35111# Provide some information about the compiler.
35112$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35113set X $ac_compile
35114ac_compiler=$2
35115for ac_option in --version -v -V -qversion; do
35116  { { ac_try="$ac_compiler $ac_option >&5"
35117case "(($ac_try" in
35118  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35119  *) ac_try_echo=$ac_try;;
35120esac
35121eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35122$as_echo "$ac_try_echo"; } >&5
35123  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35124  ac_status=$?
35125  if test -s conftest.err; then
35126    sed '10a\
35127... rest of stderr output deleted ...
35128         10q' conftest.err >conftest.er1
35129    cat conftest.er1 >&5
35130  fi
35131  rm -f conftest.er1 conftest.err
35132  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35133  test $ac_status = 0; }
35134done
35135
35136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35137$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35138if ${ac_cv_cxx_compiler_gnu+:} false; then :
35139  $as_echo_n "(cached) " >&6
35140else
35141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35142/* end confdefs.h.  */
35143
35144int
35145main ()
35146{
35147#ifndef __GNUC__
35148       choke me
35149#endif
35150
35151  ;
35152  return 0;
35153}
35154_ACEOF
35155if ac_fn_cxx_try_compile "$LINENO"; then :
35156  ac_compiler_gnu=yes
35157else
35158  ac_compiler_gnu=no
35159fi
35160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35161ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35162
35163fi
35164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35165$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35166if test $ac_compiler_gnu = yes; then
35167  GXX=yes
35168else
35169  GXX=
35170fi
35171ac_test_CXXFLAGS=${CXXFLAGS+set}
35172ac_save_CXXFLAGS=$CXXFLAGS
35173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35174$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35175if ${ac_cv_prog_cxx_g+:} false; then :
35176  $as_echo_n "(cached) " >&6
35177else
35178  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35179   ac_cxx_werror_flag=yes
35180   ac_cv_prog_cxx_g=no
35181   CXXFLAGS="-g"
35182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35183/* end confdefs.h.  */
35184
35185int
35186main ()
35187{
35188
35189  ;
35190  return 0;
35191}
35192_ACEOF
35193if ac_fn_cxx_try_compile "$LINENO"; then :
35194  ac_cv_prog_cxx_g=yes
35195else
35196  CXXFLAGS=""
35197      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35198/* end confdefs.h.  */
35199
35200int
35201main ()
35202{
35203
35204  ;
35205  return 0;
35206}
35207_ACEOF
35208if ac_fn_cxx_try_compile "$LINENO"; then :
35209
35210else
35211  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35212	 CXXFLAGS="-g"
35213	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35214/* end confdefs.h.  */
35215
35216int
35217main ()
35218{
35219
35220  ;
35221  return 0;
35222}
35223_ACEOF
35224if ac_fn_cxx_try_compile "$LINENO"; then :
35225  ac_cv_prog_cxx_g=yes
35226fi
35227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35228fi
35229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35230fi
35231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35232   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35233fi
35234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35235$as_echo "$ac_cv_prog_cxx_g" >&6; }
35236if test "$ac_test_CXXFLAGS" = set; then
35237  CXXFLAGS=$ac_save_CXXFLAGS
35238elif test $ac_cv_prog_cxx_g = yes; then
35239  if test "$GXX" = yes; then
35240    CXXFLAGS="-g -O2"
35241  else
35242    CXXFLAGS="-g"
35243  fi
35244else
35245  if test "$GXX" = yes; then
35246    CXXFLAGS="-O2"
35247  else
35248    CXXFLAGS=
35249  fi
35250fi
35251ac_ext=cpp
35252ac_cpp='$CXXCPP $CPPFLAGS'
35253ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35254ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35255ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35256
35257
35258  # This is the compiler version number on the form X.Y[.Z]
35259
35260
35261
35262
35263  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35264    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35265$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35266    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35267$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35268  fi
35269
35270  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35271  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35272    { $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
35273$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;}
35274  fi
35275
35276  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35277    { $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
35278$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35279  fi
35280
35281  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35282
35283
35284  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334    # Execute function body
35335
35336  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35337  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35338
35339  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35340    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35341  fi
35342
35343  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35344    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35345  fi
35346
35347  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35348  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35349
35350  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35351    :
35352
35353  else
35354    :
35355
35356          { $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
35357$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35358
35359
35360  fi
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375  fi
35376
35377  #
35378  # Setup the preprocessor (CPP and CXXCPP)
35379  #
35380  ac_ext=c
35381ac_cpp='$CPP $CPPFLAGS'
35382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35384ac_compiler_gnu=$ac_cv_c_compiler_gnu
35385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35386$as_echo_n "checking how to run the C preprocessor... " >&6; }
35387# On Suns, sometimes $CPP names a directory.
35388if test -n "$CPP" && test -d "$CPP"; then
35389  CPP=
35390fi
35391if test -z "$CPP"; then
35392  if ${ac_cv_prog_CPP+:} false; then :
35393  $as_echo_n "(cached) " >&6
35394else
35395      # Double quotes because CPP needs to be expanded
35396    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35397    do
35398      ac_preproc_ok=false
35399for ac_c_preproc_warn_flag in '' yes
35400do
35401  # Use a header file that comes with gcc, so configuring glibc
35402  # with a fresh cross-compiler works.
35403  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35404  # <limits.h> exists even on freestanding compilers.
35405  # On the NeXT, cc -E runs the code through the compiler's parser,
35406  # not just through cpp. "Syntax error" is here to catch this case.
35407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35408/* end confdefs.h.  */
35409#ifdef __STDC__
35410# include <limits.h>
35411#else
35412# include <assert.h>
35413#endif
35414		     Syntax error
35415_ACEOF
35416if ac_fn_c_try_cpp "$LINENO"; then :
35417
35418else
35419  # Broken: fails on valid input.
35420continue
35421fi
35422rm -f conftest.err conftest.i conftest.$ac_ext
35423
35424  # OK, works on sane cases.  Now check whether nonexistent headers
35425  # can be detected and how.
35426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35427/* end confdefs.h.  */
35428#include <ac_nonexistent.h>
35429_ACEOF
35430if ac_fn_c_try_cpp "$LINENO"; then :
35431  # Broken: success on invalid input.
35432continue
35433else
35434  # Passes both tests.
35435ac_preproc_ok=:
35436break
35437fi
35438rm -f conftest.err conftest.i conftest.$ac_ext
35439
35440done
35441# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35442rm -f conftest.i conftest.err conftest.$ac_ext
35443if $ac_preproc_ok; then :
35444  break
35445fi
35446
35447    done
35448    ac_cv_prog_CPP=$CPP
35449
35450fi
35451  CPP=$ac_cv_prog_CPP
35452else
35453  ac_cv_prog_CPP=$CPP
35454fi
35455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35456$as_echo "$CPP" >&6; }
35457ac_preproc_ok=false
35458for ac_c_preproc_warn_flag in '' yes
35459do
35460  # Use a header file that comes with gcc, so configuring glibc
35461  # with a fresh cross-compiler works.
35462  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35463  # <limits.h> exists even on freestanding compilers.
35464  # On the NeXT, cc -E runs the code through the compiler's parser,
35465  # not just through cpp. "Syntax error" is here to catch this case.
35466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35467/* end confdefs.h.  */
35468#ifdef __STDC__
35469# include <limits.h>
35470#else
35471# include <assert.h>
35472#endif
35473		     Syntax error
35474_ACEOF
35475if ac_fn_c_try_cpp "$LINENO"; then :
35476
35477else
35478  # Broken: fails on valid input.
35479continue
35480fi
35481rm -f conftest.err conftest.i conftest.$ac_ext
35482
35483  # OK, works on sane cases.  Now check whether nonexistent headers
35484  # can be detected and how.
35485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35486/* end confdefs.h.  */
35487#include <ac_nonexistent.h>
35488_ACEOF
35489if ac_fn_c_try_cpp "$LINENO"; then :
35490  # Broken: success on invalid input.
35491continue
35492else
35493  # Passes both tests.
35494ac_preproc_ok=:
35495break
35496fi
35497rm -f conftest.err conftest.i conftest.$ac_ext
35498
35499done
35500# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35501rm -f conftest.i conftest.err conftest.$ac_ext
35502if $ac_preproc_ok; then :
35503
35504else
35505  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35507as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35508See \`config.log' for more details" "$LINENO" 5; }
35509fi
35510
35511ac_ext=cpp
35512ac_cpp='$CXXCPP $CPPFLAGS'
35513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35516
35517
35518  # Only process if variable expands to non-empty
35519
35520  if test "x$CPP" != x; then
35521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35522
35523  # First separate the path from the arguments. This will split at the first
35524  # space.
35525  complete="$CPP"
35526  path="${complete%% *}"
35527  tmp="$complete EOL"
35528  arguments="${tmp#* }"
35529
35530  # Input might be given as Windows format, start by converting to
35531  # unix format.
35532  new_path=`$CYGPATH -u "$path"`
35533
35534  # Now try to locate executable using which
35535  new_path=`$WHICH "$new_path" 2> /dev/null`
35536  # bat and cmd files are not always considered executable in cygwin causing which
35537  # to not find them
35538  if test "x$new_path" = x \
35539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35541    new_path=`$CYGPATH -u "$path"`
35542  fi
35543  if test "x$new_path" = x; then
35544    # Oops. Which didn't find the executable.
35545    # The splitting of arguments from the executable at a space might have been incorrect,
35546    # since paths with space are more likely in Windows. Give it another try with the whole
35547    # argument.
35548    path="$complete"
35549    arguments="EOL"
35550    new_path=`$CYGPATH -u "$path"`
35551    new_path=`$WHICH "$new_path" 2> /dev/null`
35552    # bat and cmd files are not always considered executable in cygwin causing which
35553    # to not find them
35554    if test "x$new_path" = x \
35555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35557      new_path=`$CYGPATH -u "$path"`
35558    fi
35559    if test "x$new_path" = x; then
35560      # It's still not found. Now this is an unrecoverable error.
35561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35562$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35563      has_space=`$ECHO "$complete" | $GREP " "`
35564      if test "x$has_space" != x; then
35565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35567      fi
35568      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35569    fi
35570  fi
35571
35572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35575  # "foo.exe" is OK but "foo" is an error.
35576  #
35577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35578  # It is also a way to make sure we got the proper file name for the real test later on.
35579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35580  if test "x$test_shortpath" = x; then
35581    # Short path failed, file does not exist as specified.
35582    # Try adding .exe or .cmd
35583    if test -f "${new_path}.exe"; then
35584      input_to_shortpath="${new_path}.exe"
35585    elif test -f "${new_path}.cmd"; then
35586      input_to_shortpath="${new_path}.cmd"
35587    else
35588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35589$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35592      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35593    fi
35594  else
35595    input_to_shortpath="$new_path"
35596  fi
35597
35598  # Call helper function which possibly converts this using DOS-style short mode.
35599  # If so, the updated path is stored in $new_path.
35600  new_path="$input_to_shortpath"
35601
35602  input_path="$input_to_shortpath"
35603  # Check if we need to convert this using DOS-style short mode. If the path
35604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35605  # take no chances and rewrite it.
35606  # Note: m4 eats our [], so we need to use [ and ] instead.
35607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35608  if test "x$has_forbidden_chars" != x; then
35609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35613      # Going to short mode and back again did indeed matter. Since short mode is
35614      # case insensitive, let's make it lowercase to improve readability.
35615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35616      # Now convert it back to Unix-style (cygpath)
35617      input_path=`$CYGPATH -u "$shortmode_path"`
35618      new_path="$input_path"
35619    fi
35620  fi
35621
35622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35623  if test "x$test_cygdrive_prefix" = x; then
35624    # As a simple fix, exclude /usr/bin since it's not a real path.
35625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35627      # a path prefixed by /cygdrive for fixpath to work.
35628      new_path="$CYGWIN_ROOT_PATH$input_path"
35629    fi
35630  fi
35631
35632  # remove trailing .exe if any
35633  new_path="${new_path/%.exe/}"
35634
35635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35636
35637  # First separate the path from the arguments. This will split at the first
35638  # space.
35639  complete="$CPP"
35640  path="${complete%% *}"
35641  tmp="$complete EOL"
35642  arguments="${tmp#* }"
35643
35644  # Input might be given as Windows format, start by converting to
35645  # unix format.
35646  new_path="$path"
35647
35648  windows_path="$new_path"
35649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35650    unix_path=`$CYGPATH -u "$windows_path"`
35651    new_path="$unix_path"
35652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35654    new_path="$unix_path"
35655  fi
35656
35657
35658  # Now try to locate executable using which
35659  new_path=`$WHICH "$new_path" 2> /dev/null`
35660
35661  if test "x$new_path" = x; then
35662    # Oops. Which didn't find the executable.
35663    # The splitting of arguments from the executable at a space might have been incorrect,
35664    # since paths with space are more likely in Windows. Give it another try with the whole
35665    # argument.
35666    path="$complete"
35667    arguments="EOL"
35668    new_path="$path"
35669
35670  windows_path="$new_path"
35671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35672    unix_path=`$CYGPATH -u "$windows_path"`
35673    new_path="$unix_path"
35674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35676    new_path="$unix_path"
35677  fi
35678
35679
35680    new_path=`$WHICH "$new_path" 2> /dev/null`
35681    # bat and cmd files are not always considered executable in MSYS causing which
35682    # to not find them
35683    if test "x$new_path" = x \
35684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35686      new_path="$path"
35687
35688  windows_path="$new_path"
35689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35690    unix_path=`$CYGPATH -u "$windows_path"`
35691    new_path="$unix_path"
35692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35694    new_path="$unix_path"
35695  fi
35696
35697    fi
35698
35699    if test "x$new_path" = x; then
35700      # It's still not found. Now this is an unrecoverable error.
35701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35702$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35703      has_space=`$ECHO "$complete" | $GREP " "`
35704      if test "x$has_space" != x; then
35705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35707      fi
35708      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35709    fi
35710  fi
35711
35712  # Now new_path has a complete unix path to the binary
35713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35714    # Keep paths in /bin as-is, but remove trailing .exe if any
35715    new_path="${new_path/%.exe/}"
35716    # Do not save /bin paths to all_fixpath_prefixes!
35717  else
35718    # Not in mixed or Windows style, start by that.
35719    new_path=`cmd //c echo $new_path`
35720
35721  input_path="$new_path"
35722  # Check if we need to convert this using DOS-style short mode. If the path
35723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35724  # take no chances and rewrite it.
35725  # Note: m4 eats our [], so we need to use [ and ] instead.
35726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35727  if test "x$has_forbidden_chars" != x; then
35728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35730  fi
35731
35732    # Output is in $new_path
35733
35734  windows_path="$new_path"
35735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35736    unix_path=`$CYGPATH -u "$windows_path"`
35737    new_path="$unix_path"
35738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35740    new_path="$unix_path"
35741  fi
35742
35743    # remove trailing .exe if any
35744    new_path="${new_path/%.exe/}"
35745
35746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35748  fi
35749
35750    else
35751      # We're on a unix platform. Hooray! :)
35752      # First separate the path from the arguments. This will split at the first
35753      # space.
35754      complete="$CPP"
35755      path="${complete%% *}"
35756      tmp="$complete EOL"
35757      arguments="${tmp#* }"
35758
35759      # Cannot rely on the command "which" here since it doesn't always work.
35760      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35761      if test -z "$is_absolute_path"; then
35762        # Path to executable is not absolute. Find it.
35763        IFS_save="$IFS"
35764        IFS=:
35765        for p in $PATH; do
35766          if test -f "$p/$path" && test -x "$p/$path"; then
35767            new_path="$p/$path"
35768            break
35769          fi
35770        done
35771        IFS="$IFS_save"
35772      else
35773        # This is an absolute path, we can use it without further modifications.
35774        new_path="$path"
35775      fi
35776
35777      if test "x$new_path" = x; then
35778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35779$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35780        has_space=`$ECHO "$complete" | $GREP " "`
35781        if test "x$has_space" != x; then
35782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35784        fi
35785        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35786      fi
35787    fi
35788
35789    # Now join together the path and the arguments once again
35790    if test "x$arguments" != xEOL; then
35791      new_complete="$new_path ${arguments% *}"
35792    else
35793      new_complete="$new_path"
35794    fi
35795
35796    if test "x$complete" != "x$new_complete"; then
35797      CPP="$new_complete"
35798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35799$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35800    fi
35801  fi
35802
35803  ac_ext=cpp
35804ac_cpp='$CXXCPP $CPPFLAGS'
35805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35809$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35810if test -z "$CXXCPP"; then
35811  if ${ac_cv_prog_CXXCPP+:} false; then :
35812  $as_echo_n "(cached) " >&6
35813else
35814      # Double quotes because CXXCPP needs to be expanded
35815    for CXXCPP in "$CXX -E" "/lib/cpp"
35816    do
35817      ac_preproc_ok=false
35818for ac_cxx_preproc_warn_flag in '' yes
35819do
35820  # Use a header file that comes with gcc, so configuring glibc
35821  # with a fresh cross-compiler works.
35822  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35823  # <limits.h> exists even on freestanding compilers.
35824  # On the NeXT, cc -E runs the code through the compiler's parser,
35825  # not just through cpp. "Syntax error" is here to catch this case.
35826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35827/* end confdefs.h.  */
35828#ifdef __STDC__
35829# include <limits.h>
35830#else
35831# include <assert.h>
35832#endif
35833		     Syntax error
35834_ACEOF
35835if ac_fn_cxx_try_cpp "$LINENO"; then :
35836
35837else
35838  # Broken: fails on valid input.
35839continue
35840fi
35841rm -f conftest.err conftest.i conftest.$ac_ext
35842
35843  # OK, works on sane cases.  Now check whether nonexistent headers
35844  # can be detected and how.
35845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35846/* end confdefs.h.  */
35847#include <ac_nonexistent.h>
35848_ACEOF
35849if ac_fn_cxx_try_cpp "$LINENO"; then :
35850  # Broken: success on invalid input.
35851continue
35852else
35853  # Passes both tests.
35854ac_preproc_ok=:
35855break
35856fi
35857rm -f conftest.err conftest.i conftest.$ac_ext
35858
35859done
35860# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35861rm -f conftest.i conftest.err conftest.$ac_ext
35862if $ac_preproc_ok; then :
35863  break
35864fi
35865
35866    done
35867    ac_cv_prog_CXXCPP=$CXXCPP
35868
35869fi
35870  CXXCPP=$ac_cv_prog_CXXCPP
35871else
35872  ac_cv_prog_CXXCPP=$CXXCPP
35873fi
35874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35875$as_echo "$CXXCPP" >&6; }
35876ac_preproc_ok=false
35877for ac_cxx_preproc_warn_flag in '' yes
35878do
35879  # Use a header file that comes with gcc, so configuring glibc
35880  # with a fresh cross-compiler works.
35881  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35882  # <limits.h> exists even on freestanding compilers.
35883  # On the NeXT, cc -E runs the code through the compiler's parser,
35884  # not just through cpp. "Syntax error" is here to catch this case.
35885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35886/* end confdefs.h.  */
35887#ifdef __STDC__
35888# include <limits.h>
35889#else
35890# include <assert.h>
35891#endif
35892		     Syntax error
35893_ACEOF
35894if ac_fn_cxx_try_cpp "$LINENO"; then :
35895
35896else
35897  # Broken: fails on valid input.
35898continue
35899fi
35900rm -f conftest.err conftest.i conftest.$ac_ext
35901
35902  # OK, works on sane cases.  Now check whether nonexistent headers
35903  # can be detected and how.
35904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35905/* end confdefs.h.  */
35906#include <ac_nonexistent.h>
35907_ACEOF
35908if ac_fn_cxx_try_cpp "$LINENO"; then :
35909  # Broken: success on invalid input.
35910continue
35911else
35912  # Passes both tests.
35913ac_preproc_ok=:
35914break
35915fi
35916rm -f conftest.err conftest.i conftest.$ac_ext
35917
35918done
35919# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35920rm -f conftest.i conftest.err conftest.$ac_ext
35921if $ac_preproc_ok; then :
35922
35923else
35924  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35926as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35927See \`config.log' for more details" "$LINENO" 5; }
35928fi
35929
35930ac_ext=cpp
35931ac_cpp='$CXXCPP $CPPFLAGS'
35932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35935
35936
35937  # Only process if variable expands to non-empty
35938
35939  if test "x$CXXCPP" != x; then
35940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35941
35942  # First separate the path from the arguments. This will split at the first
35943  # space.
35944  complete="$CXXCPP"
35945  path="${complete%% *}"
35946  tmp="$complete EOL"
35947  arguments="${tmp#* }"
35948
35949  # Input might be given as Windows format, start by converting to
35950  # unix format.
35951  new_path=`$CYGPATH -u "$path"`
35952
35953  # Now try to locate executable using which
35954  new_path=`$WHICH "$new_path" 2> /dev/null`
35955  # bat and cmd files are not always considered executable in cygwin causing which
35956  # to not find them
35957  if test "x$new_path" = x \
35958      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35959      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35960    new_path=`$CYGPATH -u "$path"`
35961  fi
35962  if test "x$new_path" = x; then
35963    # Oops. Which didn't find the executable.
35964    # The splitting of arguments from the executable at a space might have been incorrect,
35965    # since paths with space are more likely in Windows. Give it another try with the whole
35966    # argument.
35967    path="$complete"
35968    arguments="EOL"
35969    new_path=`$CYGPATH -u "$path"`
35970    new_path=`$WHICH "$new_path" 2> /dev/null`
35971    # bat and cmd files are not always considered executable in cygwin causing which
35972    # to not find them
35973    if test "x$new_path" = x \
35974        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35975        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35976      new_path=`$CYGPATH -u "$path"`
35977    fi
35978    if test "x$new_path" = x; then
35979      # It's still not found. Now this is an unrecoverable error.
35980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35981$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35982      has_space=`$ECHO "$complete" | $GREP " "`
35983      if test "x$has_space" != x; then
35984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35986      fi
35987      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35988    fi
35989  fi
35990
35991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35994  # "foo.exe" is OK but "foo" is an error.
35995  #
35996  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35997  # It is also a way to make sure we got the proper file name for the real test later on.
35998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35999  if test "x$test_shortpath" = x; then
36000    # Short path failed, file does not exist as specified.
36001    # Try adding .exe or .cmd
36002    if test -f "${new_path}.exe"; then
36003      input_to_shortpath="${new_path}.exe"
36004    elif test -f "${new_path}.cmd"; then
36005      input_to_shortpath="${new_path}.cmd"
36006    else
36007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36008$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36009      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36011      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36012    fi
36013  else
36014    input_to_shortpath="$new_path"
36015  fi
36016
36017  # Call helper function which possibly converts this using DOS-style short mode.
36018  # If so, the updated path is stored in $new_path.
36019  new_path="$input_to_shortpath"
36020
36021  input_path="$input_to_shortpath"
36022  # Check if we need to convert this using DOS-style short mode. If the path
36023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36024  # take no chances and rewrite it.
36025  # Note: m4 eats our [], so we need to use [ and ] instead.
36026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36027  if test "x$has_forbidden_chars" != x; then
36028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36032      # Going to short mode and back again did indeed matter. Since short mode is
36033      # case insensitive, let's make it lowercase to improve readability.
36034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36035      # Now convert it back to Unix-style (cygpath)
36036      input_path=`$CYGPATH -u "$shortmode_path"`
36037      new_path="$input_path"
36038    fi
36039  fi
36040
36041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36042  if test "x$test_cygdrive_prefix" = x; then
36043    # As a simple fix, exclude /usr/bin since it's not a real path.
36044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36046      # a path prefixed by /cygdrive for fixpath to work.
36047      new_path="$CYGWIN_ROOT_PATH$input_path"
36048    fi
36049  fi
36050
36051  # remove trailing .exe if any
36052  new_path="${new_path/%.exe/}"
36053
36054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36055
36056  # First separate the path from the arguments. This will split at the first
36057  # space.
36058  complete="$CXXCPP"
36059  path="${complete%% *}"
36060  tmp="$complete EOL"
36061  arguments="${tmp#* }"
36062
36063  # Input might be given as Windows format, start by converting to
36064  # unix format.
36065  new_path="$path"
36066
36067  windows_path="$new_path"
36068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36069    unix_path=`$CYGPATH -u "$windows_path"`
36070    new_path="$unix_path"
36071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36073    new_path="$unix_path"
36074  fi
36075
36076
36077  # Now try to locate executable using which
36078  new_path=`$WHICH "$new_path" 2> /dev/null`
36079
36080  if test "x$new_path" = x; then
36081    # Oops. Which didn't find the executable.
36082    # The splitting of arguments from the executable at a space might have been incorrect,
36083    # since paths with space are more likely in Windows. Give it another try with the whole
36084    # argument.
36085    path="$complete"
36086    arguments="EOL"
36087    new_path="$path"
36088
36089  windows_path="$new_path"
36090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36091    unix_path=`$CYGPATH -u "$windows_path"`
36092    new_path="$unix_path"
36093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36095    new_path="$unix_path"
36096  fi
36097
36098
36099    new_path=`$WHICH "$new_path" 2> /dev/null`
36100    # bat and cmd files are not always considered executable in MSYS causing which
36101    # to not find them
36102    if test "x$new_path" = x \
36103        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36104        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36105      new_path="$path"
36106
36107  windows_path="$new_path"
36108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36109    unix_path=`$CYGPATH -u "$windows_path"`
36110    new_path="$unix_path"
36111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36113    new_path="$unix_path"
36114  fi
36115
36116    fi
36117
36118    if test "x$new_path" = x; then
36119      # It's still not found. Now this is an unrecoverable error.
36120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36121$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36122      has_space=`$ECHO "$complete" | $GREP " "`
36123      if test "x$has_space" != x; then
36124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36126      fi
36127      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36128    fi
36129  fi
36130
36131  # Now new_path has a complete unix path to the binary
36132  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36133    # Keep paths in /bin as-is, but remove trailing .exe if any
36134    new_path="${new_path/%.exe/}"
36135    # Do not save /bin paths to all_fixpath_prefixes!
36136  else
36137    # Not in mixed or Windows style, start by that.
36138    new_path=`cmd //c echo $new_path`
36139
36140  input_path="$new_path"
36141  # Check if we need to convert this using DOS-style short mode. If the path
36142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36143  # take no chances and rewrite it.
36144  # Note: m4 eats our [], so we need to use [ and ] instead.
36145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36146  if test "x$has_forbidden_chars" != x; then
36147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36149  fi
36150
36151    # Output is in $new_path
36152
36153  windows_path="$new_path"
36154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36155    unix_path=`$CYGPATH -u "$windows_path"`
36156    new_path="$unix_path"
36157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36159    new_path="$unix_path"
36160  fi
36161
36162    # remove trailing .exe if any
36163    new_path="${new_path/%.exe/}"
36164
36165    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36166    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36167  fi
36168
36169    else
36170      # We're on a unix platform. Hooray! :)
36171      # First separate the path from the arguments. This will split at the first
36172      # space.
36173      complete="$CXXCPP"
36174      path="${complete%% *}"
36175      tmp="$complete EOL"
36176      arguments="${tmp#* }"
36177
36178      # Cannot rely on the command "which" here since it doesn't always work.
36179      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36180      if test -z "$is_absolute_path"; then
36181        # Path to executable is not absolute. Find it.
36182        IFS_save="$IFS"
36183        IFS=:
36184        for p in $PATH; do
36185          if test -f "$p/$path" && test -x "$p/$path"; then
36186            new_path="$p/$path"
36187            break
36188          fi
36189        done
36190        IFS="$IFS_save"
36191      else
36192        # This is an absolute path, we can use it without further modifications.
36193        new_path="$path"
36194      fi
36195
36196      if test "x$new_path" = x; then
36197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36198$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36199        has_space=`$ECHO "$complete" | $GREP " "`
36200        if test "x$has_space" != x; then
36201          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36202$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36203        fi
36204        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36205      fi
36206    fi
36207
36208    # Now join together the path and the arguments once again
36209    if test "x$arguments" != xEOL; then
36210      new_complete="$new_path ${arguments% *}"
36211    else
36212      new_complete="$new_path"
36213    fi
36214
36215    if test "x$complete" != "x$new_complete"; then
36216      CXXCPP="$new_complete"
36217      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36218$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36219    fi
36220  fi
36221
36222
36223  #
36224  # Setup the linker (LD)
36225  #
36226  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36227    # In the Microsoft toolchain we have a separate LD command "link".
36228    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36229    # a cygwin program for something completely different.
36230    # Extract the first word of "link", so it can be a program name with args.
36231set dummy link; ac_word=$2
36232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36233$as_echo_n "checking for $ac_word... " >&6; }
36234if ${ac_cv_prog_LD+:} false; then :
36235  $as_echo_n "(cached) " >&6
36236else
36237  if test -n "$LD"; then
36238  ac_cv_prog_LD="$LD" # Let the user override the test.
36239else
36240  ac_prog_rejected=no
36241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36242for as_dir in $PATH
36243do
36244  IFS=$as_save_IFS
36245  test -z "$as_dir" && as_dir=.
36246    for ac_exec_ext in '' $ac_executable_extensions; do
36247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36248    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36249       ac_prog_rejected=yes
36250       continue
36251     fi
36252    ac_cv_prog_LD="link"
36253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36254    break 2
36255  fi
36256done
36257  done
36258IFS=$as_save_IFS
36259
36260if test $ac_prog_rejected = yes; then
36261  # We found a bogon in the path, so make sure we never use it.
36262  set dummy $ac_cv_prog_LD
36263  shift
36264  if test $# != 0; then
36265    # We chose a different compiler from the bogus one.
36266    # However, it has the same basename, so the bogon will be chosen
36267    # first if we set LD to just the basename; use the full file name.
36268    shift
36269    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36270  fi
36271fi
36272fi
36273fi
36274LD=$ac_cv_prog_LD
36275if test -n "$LD"; then
36276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36277$as_echo "$LD" >&6; }
36278else
36279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36280$as_echo "no" >&6; }
36281fi
36282
36283
36284
36285  # Only process if variable expands to non-empty
36286
36287  if test "x$LD" != x; then
36288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36289
36290  # First separate the path from the arguments. This will split at the first
36291  # space.
36292  complete="$LD"
36293  path="${complete%% *}"
36294  tmp="$complete EOL"
36295  arguments="${tmp#* }"
36296
36297  # Input might be given as Windows format, start by converting to
36298  # unix format.
36299  new_path=`$CYGPATH -u "$path"`
36300
36301  # Now try to locate executable using which
36302  new_path=`$WHICH "$new_path" 2> /dev/null`
36303  # bat and cmd files are not always considered executable in cygwin causing which
36304  # to not find them
36305  if test "x$new_path" = x \
36306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36308    new_path=`$CYGPATH -u "$path"`
36309  fi
36310  if test "x$new_path" = x; then
36311    # Oops. Which didn't find the executable.
36312    # The splitting of arguments from the executable at a space might have been incorrect,
36313    # since paths with space are more likely in Windows. Give it another try with the whole
36314    # argument.
36315    path="$complete"
36316    arguments="EOL"
36317    new_path=`$CYGPATH -u "$path"`
36318    new_path=`$WHICH "$new_path" 2> /dev/null`
36319    # bat and cmd files are not always considered executable in cygwin causing which
36320    # to not find them
36321    if test "x$new_path" = x \
36322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36324      new_path=`$CYGPATH -u "$path"`
36325    fi
36326    if test "x$new_path" = x; then
36327      # It's still not found. Now this is an unrecoverable error.
36328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36329$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36330      has_space=`$ECHO "$complete" | $GREP " "`
36331      if test "x$has_space" != x; then
36332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36334      fi
36335      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36336    fi
36337  fi
36338
36339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36342  # "foo.exe" is OK but "foo" is an error.
36343  #
36344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36345  # It is also a way to make sure we got the proper file name for the real test later on.
36346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36347  if test "x$test_shortpath" = x; then
36348    # Short path failed, file does not exist as specified.
36349    # Try adding .exe or .cmd
36350    if test -f "${new_path}.exe"; then
36351      input_to_shortpath="${new_path}.exe"
36352    elif test -f "${new_path}.cmd"; then
36353      input_to_shortpath="${new_path}.cmd"
36354    else
36355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36356$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36359      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36360    fi
36361  else
36362    input_to_shortpath="$new_path"
36363  fi
36364
36365  # Call helper function which possibly converts this using DOS-style short mode.
36366  # If so, the updated path is stored in $new_path.
36367  new_path="$input_to_shortpath"
36368
36369  input_path="$input_to_shortpath"
36370  # Check if we need to convert this using DOS-style short mode. If the path
36371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36372  # take no chances and rewrite it.
36373  # Note: m4 eats our [], so we need to use [ and ] instead.
36374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36375  if test "x$has_forbidden_chars" != x; then
36376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36380      # Going to short mode and back again did indeed matter. Since short mode is
36381      # case insensitive, let's make it lowercase to improve readability.
36382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36383      # Now convert it back to Unix-style (cygpath)
36384      input_path=`$CYGPATH -u "$shortmode_path"`
36385      new_path="$input_path"
36386    fi
36387  fi
36388
36389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36390  if test "x$test_cygdrive_prefix" = x; then
36391    # As a simple fix, exclude /usr/bin since it's not a real path.
36392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36394      # a path prefixed by /cygdrive for fixpath to work.
36395      new_path="$CYGWIN_ROOT_PATH$input_path"
36396    fi
36397  fi
36398
36399  # remove trailing .exe if any
36400  new_path="${new_path/%.exe/}"
36401
36402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36403
36404  # First separate the path from the arguments. This will split at the first
36405  # space.
36406  complete="$LD"
36407  path="${complete%% *}"
36408  tmp="$complete EOL"
36409  arguments="${tmp#* }"
36410
36411  # Input might be given as Windows format, start by converting to
36412  # unix format.
36413  new_path="$path"
36414
36415  windows_path="$new_path"
36416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36417    unix_path=`$CYGPATH -u "$windows_path"`
36418    new_path="$unix_path"
36419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36421    new_path="$unix_path"
36422  fi
36423
36424
36425  # Now try to locate executable using which
36426  new_path=`$WHICH "$new_path" 2> /dev/null`
36427
36428  if test "x$new_path" = x; then
36429    # Oops. Which didn't find the executable.
36430    # The splitting of arguments from the executable at a space might have been incorrect,
36431    # since paths with space are more likely in Windows. Give it another try with the whole
36432    # argument.
36433    path="$complete"
36434    arguments="EOL"
36435    new_path="$path"
36436
36437  windows_path="$new_path"
36438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36439    unix_path=`$CYGPATH -u "$windows_path"`
36440    new_path="$unix_path"
36441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36443    new_path="$unix_path"
36444  fi
36445
36446
36447    new_path=`$WHICH "$new_path" 2> /dev/null`
36448    # bat and cmd files are not always considered executable in MSYS causing which
36449    # to not find them
36450    if test "x$new_path" = x \
36451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36453      new_path="$path"
36454
36455  windows_path="$new_path"
36456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36457    unix_path=`$CYGPATH -u "$windows_path"`
36458    new_path="$unix_path"
36459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36461    new_path="$unix_path"
36462  fi
36463
36464    fi
36465
36466    if test "x$new_path" = x; then
36467      # It's still not found. Now this is an unrecoverable error.
36468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36469$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36470      has_space=`$ECHO "$complete" | $GREP " "`
36471      if test "x$has_space" != x; then
36472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36474      fi
36475      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36476    fi
36477  fi
36478
36479  # Now new_path has a complete unix path to the binary
36480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36481    # Keep paths in /bin as-is, but remove trailing .exe if any
36482    new_path="${new_path/%.exe/}"
36483    # Do not save /bin paths to all_fixpath_prefixes!
36484  else
36485    # Not in mixed or Windows style, start by that.
36486    new_path=`cmd //c echo $new_path`
36487
36488  input_path="$new_path"
36489  # Check if we need to convert this using DOS-style short mode. If the path
36490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36491  # take no chances and rewrite it.
36492  # Note: m4 eats our [], so we need to use [ and ] instead.
36493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36494  if test "x$has_forbidden_chars" != x; then
36495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36497  fi
36498
36499    # Output is in $new_path
36500
36501  windows_path="$new_path"
36502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36503    unix_path=`$CYGPATH -u "$windows_path"`
36504    new_path="$unix_path"
36505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36507    new_path="$unix_path"
36508  fi
36509
36510    # remove trailing .exe if any
36511    new_path="${new_path/%.exe/}"
36512
36513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36515  fi
36516
36517    else
36518      # We're on a unix platform. Hooray! :)
36519      # First separate the path from the arguments. This will split at the first
36520      # space.
36521      complete="$LD"
36522      path="${complete%% *}"
36523      tmp="$complete EOL"
36524      arguments="${tmp#* }"
36525
36526      # Cannot rely on the command "which" here since it doesn't always work.
36527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36528      if test -z "$is_absolute_path"; then
36529        # Path to executable is not absolute. Find it.
36530        IFS_save="$IFS"
36531        IFS=:
36532        for p in $PATH; do
36533          if test -f "$p/$path" && test -x "$p/$path"; then
36534            new_path="$p/$path"
36535            break
36536          fi
36537        done
36538        IFS="$IFS_save"
36539      else
36540        # This is an absolute path, we can use it without further modifications.
36541        new_path="$path"
36542      fi
36543
36544      if test "x$new_path" = x; then
36545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36546$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36547        has_space=`$ECHO "$complete" | $GREP " "`
36548        if test "x$has_space" != x; then
36549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36551        fi
36552        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36553      fi
36554    fi
36555
36556    # Now join together the path and the arguments once again
36557    if test "x$arguments" != xEOL; then
36558      new_complete="$new_path ${arguments% *}"
36559    else
36560      new_complete="$new_path"
36561    fi
36562
36563    if test "x$complete" != "x$new_complete"; then
36564      LD="$new_complete"
36565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36566$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36567    fi
36568  fi
36569
36570    # Verify that we indeed succeeded with this trick.
36571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36572$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36573    "$LD" --version > /dev/null
36574    if test $? -eq 0 ; then
36575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36576$as_echo "no" >&6; }
36577      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36578    else
36579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36580$as_echo "yes" >&6; }
36581    fi
36582    LDCXX="$LD"
36583  else
36584    # All other toolchains use the compiler to link.
36585    LD="$CC"
36586    LDCXX="$CXX"
36587  fi
36588
36589  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36590
36591
36592  #
36593  # Setup the assembler (AS)
36594  #
36595  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36596
36597
36598  # Publish this variable in the help.
36599
36600
36601  if [ -z "${AS+x}" ]; then
36602    # The variable is not set by user, try to locate tool using the code snippet
36603    for ac_prog in as
36604do
36605  # Extract the first word of "$ac_prog", so it can be a program name with args.
36606set dummy $ac_prog; ac_word=$2
36607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36608$as_echo_n "checking for $ac_word... " >&6; }
36609if ${ac_cv_path_AS+:} false; then :
36610  $as_echo_n "(cached) " >&6
36611else
36612  case $AS in
36613  [\\/]* | ?:[\\/]*)
36614  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36615  ;;
36616  *)
36617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36618for as_dir in $PATH
36619do
36620  IFS=$as_save_IFS
36621  test -z "$as_dir" && as_dir=.
36622    for ac_exec_ext in '' $ac_executable_extensions; do
36623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36624    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36626    break 2
36627  fi
36628done
36629  done
36630IFS=$as_save_IFS
36631
36632  ;;
36633esac
36634fi
36635AS=$ac_cv_path_AS
36636if test -n "$AS"; then
36637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36638$as_echo "$AS" >&6; }
36639else
36640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36641$as_echo "no" >&6; }
36642fi
36643
36644
36645  test -n "$AS" && break
36646done
36647
36648  else
36649    # The variable is set, but is it from the command line or the environment?
36650
36651    # Try to remove the string !AS! from our list.
36652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36654      # If it failed, the variable was not from the command line. Ignore it,
36655      # but warn the user (except for BASH, which is always set by the calling BASH).
36656      if test "xAS" != xBASH; then
36657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36658$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36659      fi
36660      # Try to locate tool using the code snippet
36661      for ac_prog in as
36662do
36663  # Extract the first word of "$ac_prog", so it can be a program name with args.
36664set dummy $ac_prog; ac_word=$2
36665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36666$as_echo_n "checking for $ac_word... " >&6; }
36667if ${ac_cv_path_AS+:} false; then :
36668  $as_echo_n "(cached) " >&6
36669else
36670  case $AS in
36671  [\\/]* | ?:[\\/]*)
36672  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36673  ;;
36674  *)
36675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36676for as_dir in $PATH
36677do
36678  IFS=$as_save_IFS
36679  test -z "$as_dir" && as_dir=.
36680    for ac_exec_ext in '' $ac_executable_extensions; do
36681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36682    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36684    break 2
36685  fi
36686done
36687  done
36688IFS=$as_save_IFS
36689
36690  ;;
36691esac
36692fi
36693AS=$ac_cv_path_AS
36694if test -n "$AS"; then
36695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36696$as_echo "$AS" >&6; }
36697else
36698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36699$as_echo "no" >&6; }
36700fi
36701
36702
36703  test -n "$AS" && break
36704done
36705
36706    else
36707      # If it succeeded, then it was overridden by the user. We will use it
36708      # for the tool.
36709
36710      # First remove it from the list of overridden variables, so we can test
36711      # for unknown variables in the end.
36712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36713
36714      # Check if we try to supply an empty value
36715      if test "x$AS" = x; then
36716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36717$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36719$as_echo_n "checking for AS... " >&6; }
36720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36721$as_echo "disabled" >&6; }
36722      else
36723        # Check if the provided tool contains a complete path.
36724        tool_specified="$AS"
36725        tool_basename="${tool_specified##*/}"
36726        if test "x$tool_basename" = "x$tool_specified"; then
36727          # A command without a complete path is provided, search $PATH.
36728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36729$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36730          # Extract the first word of "$tool_basename", so it can be a program name with args.
36731set dummy $tool_basename; ac_word=$2
36732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36733$as_echo_n "checking for $ac_word... " >&6; }
36734if ${ac_cv_path_AS+:} false; then :
36735  $as_echo_n "(cached) " >&6
36736else
36737  case $AS in
36738  [\\/]* | ?:[\\/]*)
36739  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36740  ;;
36741  *)
36742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36743for as_dir in $PATH
36744do
36745  IFS=$as_save_IFS
36746  test -z "$as_dir" && as_dir=.
36747    for ac_exec_ext in '' $ac_executable_extensions; do
36748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36749    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36751    break 2
36752  fi
36753done
36754  done
36755IFS=$as_save_IFS
36756
36757  ;;
36758esac
36759fi
36760AS=$ac_cv_path_AS
36761if test -n "$AS"; then
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36763$as_echo "$AS" >&6; }
36764else
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36766$as_echo "no" >&6; }
36767fi
36768
36769
36770          if test "x$AS" = x; then
36771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36772          fi
36773        else
36774          # Otherwise we believe it is a complete path. Use it as it is.
36775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36776$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36778$as_echo_n "checking for AS... " >&6; }
36779          if test ! -x "$tool_specified"; then
36780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36781$as_echo "not found" >&6; }
36782            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36783          fi
36784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36785$as_echo "$tool_specified" >&6; }
36786        fi
36787      fi
36788    fi
36789
36790  fi
36791
36792
36793
36794  # Only process if variable expands to non-empty
36795
36796  if test "x$AS" != x; then
36797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36798
36799  # First separate the path from the arguments. This will split at the first
36800  # space.
36801  complete="$AS"
36802  path="${complete%% *}"
36803  tmp="$complete EOL"
36804  arguments="${tmp#* }"
36805
36806  # Input might be given as Windows format, start by converting to
36807  # unix format.
36808  new_path=`$CYGPATH -u "$path"`
36809
36810  # Now try to locate executable using which
36811  new_path=`$WHICH "$new_path" 2> /dev/null`
36812  # bat and cmd files are not always considered executable in cygwin causing which
36813  # to not find them
36814  if test "x$new_path" = x \
36815      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36816      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36817    new_path=`$CYGPATH -u "$path"`
36818  fi
36819  if test "x$new_path" = x; then
36820    # Oops. Which didn't find the executable.
36821    # The splitting of arguments from the executable at a space might have been incorrect,
36822    # since paths with space are more likely in Windows. Give it another try with the whole
36823    # argument.
36824    path="$complete"
36825    arguments="EOL"
36826    new_path=`$CYGPATH -u "$path"`
36827    new_path=`$WHICH "$new_path" 2> /dev/null`
36828    # bat and cmd files are not always considered executable in cygwin causing which
36829    # to not find them
36830    if test "x$new_path" = x \
36831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36833      new_path=`$CYGPATH -u "$path"`
36834    fi
36835    if test "x$new_path" = x; then
36836      # It's still not found. Now this is an unrecoverable error.
36837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36838$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36839      has_space=`$ECHO "$complete" | $GREP " "`
36840      if test "x$has_space" != x; then
36841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36843      fi
36844      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36845    fi
36846  fi
36847
36848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36851  # "foo.exe" is OK but "foo" is an error.
36852  #
36853  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36854  # It is also a way to make sure we got the proper file name for the real test later on.
36855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36856  if test "x$test_shortpath" = x; then
36857    # Short path failed, file does not exist as specified.
36858    # Try adding .exe or .cmd
36859    if test -f "${new_path}.exe"; then
36860      input_to_shortpath="${new_path}.exe"
36861    elif test -f "${new_path}.cmd"; then
36862      input_to_shortpath="${new_path}.cmd"
36863    else
36864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36865$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36868      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36869    fi
36870  else
36871    input_to_shortpath="$new_path"
36872  fi
36873
36874  # Call helper function which possibly converts this using DOS-style short mode.
36875  # If so, the updated path is stored in $new_path.
36876  new_path="$input_to_shortpath"
36877
36878  input_path="$input_to_shortpath"
36879  # Check if we need to convert this using DOS-style short mode. If the path
36880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36881  # take no chances and rewrite it.
36882  # Note: m4 eats our [], so we need to use [ and ] instead.
36883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36884  if test "x$has_forbidden_chars" != x; then
36885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36889      # Going to short mode and back again did indeed matter. Since short mode is
36890      # case insensitive, let's make it lowercase to improve readability.
36891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36892      # Now convert it back to Unix-style (cygpath)
36893      input_path=`$CYGPATH -u "$shortmode_path"`
36894      new_path="$input_path"
36895    fi
36896  fi
36897
36898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36899  if test "x$test_cygdrive_prefix" = x; then
36900    # As a simple fix, exclude /usr/bin since it's not a real path.
36901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36903      # a path prefixed by /cygdrive for fixpath to work.
36904      new_path="$CYGWIN_ROOT_PATH$input_path"
36905    fi
36906  fi
36907
36908  # remove trailing .exe if any
36909  new_path="${new_path/%.exe/}"
36910
36911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36912
36913  # First separate the path from the arguments. This will split at the first
36914  # space.
36915  complete="$AS"
36916  path="${complete%% *}"
36917  tmp="$complete EOL"
36918  arguments="${tmp#* }"
36919
36920  # Input might be given as Windows format, start by converting to
36921  # unix format.
36922  new_path="$path"
36923
36924  windows_path="$new_path"
36925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36926    unix_path=`$CYGPATH -u "$windows_path"`
36927    new_path="$unix_path"
36928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36930    new_path="$unix_path"
36931  fi
36932
36933
36934  # Now try to locate executable using which
36935  new_path=`$WHICH "$new_path" 2> /dev/null`
36936
36937  if test "x$new_path" = x; then
36938    # Oops. Which didn't find the executable.
36939    # The splitting of arguments from the executable at a space might have been incorrect,
36940    # since paths with space are more likely in Windows. Give it another try with the whole
36941    # argument.
36942    path="$complete"
36943    arguments="EOL"
36944    new_path="$path"
36945
36946  windows_path="$new_path"
36947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36948    unix_path=`$CYGPATH -u "$windows_path"`
36949    new_path="$unix_path"
36950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36952    new_path="$unix_path"
36953  fi
36954
36955
36956    new_path=`$WHICH "$new_path" 2> /dev/null`
36957    # bat and cmd files are not always considered executable in MSYS causing which
36958    # to not find them
36959    if test "x$new_path" = x \
36960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36962      new_path="$path"
36963
36964  windows_path="$new_path"
36965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36966    unix_path=`$CYGPATH -u "$windows_path"`
36967    new_path="$unix_path"
36968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36970    new_path="$unix_path"
36971  fi
36972
36973    fi
36974
36975    if test "x$new_path" = x; then
36976      # It's still not found. Now this is an unrecoverable error.
36977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36978$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36979      has_space=`$ECHO "$complete" | $GREP " "`
36980      if test "x$has_space" != x; then
36981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36983      fi
36984      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36985    fi
36986  fi
36987
36988  # Now new_path has a complete unix path to the binary
36989  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36990    # Keep paths in /bin as-is, but remove trailing .exe if any
36991    new_path="${new_path/%.exe/}"
36992    # Do not save /bin paths to all_fixpath_prefixes!
36993  else
36994    # Not in mixed or Windows style, start by that.
36995    new_path=`cmd //c echo $new_path`
36996
36997  input_path="$new_path"
36998  # Check if we need to convert this using DOS-style short mode. If the path
36999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37000  # take no chances and rewrite it.
37001  # Note: m4 eats our [], so we need to use [ and ] instead.
37002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37003  if test "x$has_forbidden_chars" != x; then
37004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37006  fi
37007
37008    # Output is in $new_path
37009
37010  windows_path="$new_path"
37011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37012    unix_path=`$CYGPATH -u "$windows_path"`
37013    new_path="$unix_path"
37014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37016    new_path="$unix_path"
37017  fi
37018
37019    # remove trailing .exe if any
37020    new_path="${new_path/%.exe/}"
37021
37022    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37023    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37024  fi
37025
37026    else
37027      # We're on a unix platform. Hooray! :)
37028      # First separate the path from the arguments. This will split at the first
37029      # space.
37030      complete="$AS"
37031      path="${complete%% *}"
37032      tmp="$complete EOL"
37033      arguments="${tmp#* }"
37034
37035      # Cannot rely on the command "which" here since it doesn't always work.
37036      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37037      if test -z "$is_absolute_path"; then
37038        # Path to executable is not absolute. Find it.
37039        IFS_save="$IFS"
37040        IFS=:
37041        for p in $PATH; do
37042          if test -f "$p/$path" && test -x "$p/$path"; then
37043            new_path="$p/$path"
37044            break
37045          fi
37046        done
37047        IFS="$IFS_save"
37048      else
37049        # This is an absolute path, we can use it without further modifications.
37050        new_path="$path"
37051      fi
37052
37053      if test "x$new_path" = x; then
37054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37055$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37056        has_space=`$ECHO "$complete" | $GREP " "`
37057        if test "x$has_space" != x; then
37058          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37059$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37060        fi
37061        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37062      fi
37063    fi
37064
37065    # Now join together the path and the arguments once again
37066    if test "x$arguments" != xEOL; then
37067      new_complete="$new_path ${arguments% *}"
37068    else
37069      new_complete="$new_path"
37070    fi
37071
37072    if test "x$complete" != "x$new_complete"; then
37073      AS="$new_complete"
37074      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37075$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37076    fi
37077  fi
37078
37079    if test "x$AS" = x; then
37080      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37081    fi
37082  else
37083    # FIXME: is this correct for microsoft?
37084    AS="$CC -c"
37085  fi
37086
37087
37088  #
37089  # Setup the archiver (AR)
37090  #
37091  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37092    # The corresponding ar tool is lib.exe (used to create static libraries)
37093    # Extract the first word of "lib", so it can be a program name with args.
37094set dummy lib; ac_word=$2
37095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37096$as_echo_n "checking for $ac_word... " >&6; }
37097if ${ac_cv_prog_AR+:} false; then :
37098  $as_echo_n "(cached) " >&6
37099else
37100  if test -n "$AR"; then
37101  ac_cv_prog_AR="$AR" # Let the user override the test.
37102else
37103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37104for as_dir in $PATH
37105do
37106  IFS=$as_save_IFS
37107  test -z "$as_dir" && as_dir=.
37108    for ac_exec_ext in '' $ac_executable_extensions; do
37109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37110    ac_cv_prog_AR="lib"
37111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37112    break 2
37113  fi
37114done
37115  done
37116IFS=$as_save_IFS
37117
37118fi
37119fi
37120AR=$ac_cv_prog_AR
37121if test -n "$AR"; then
37122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37123$as_echo "$AR" >&6; }
37124else
37125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37126$as_echo "no" >&6; }
37127fi
37128
37129
37130  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37131
37132
37133  # Publish this variable in the help.
37134
37135
37136  if [ -z "${AR+x}" ]; then
37137    # The variable is not set by user, try to locate tool using the code snippet
37138    if test -n "$ac_tool_prefix"; then
37139  for ac_prog in ar gcc-ar
37140  do
37141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37144$as_echo_n "checking for $ac_word... " >&6; }
37145if ${ac_cv_prog_AR+:} false; then :
37146  $as_echo_n "(cached) " >&6
37147else
37148  if test -n "$AR"; then
37149  ac_cv_prog_AR="$AR" # Let the user override the test.
37150else
37151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37152for as_dir in $PATH
37153do
37154  IFS=$as_save_IFS
37155  test -z "$as_dir" && as_dir=.
37156    for ac_exec_ext in '' $ac_executable_extensions; do
37157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37158    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37160    break 2
37161  fi
37162done
37163  done
37164IFS=$as_save_IFS
37165
37166fi
37167fi
37168AR=$ac_cv_prog_AR
37169if test -n "$AR"; then
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37171$as_echo "$AR" >&6; }
37172else
37173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37174$as_echo "no" >&6; }
37175fi
37176
37177
37178    test -n "$AR" && break
37179  done
37180fi
37181if test -z "$AR"; then
37182  ac_ct_AR=$AR
37183  for ac_prog in ar gcc-ar
37184do
37185  # Extract the first word of "$ac_prog", so it can be a program name with args.
37186set dummy $ac_prog; ac_word=$2
37187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37188$as_echo_n "checking for $ac_word... " >&6; }
37189if ${ac_cv_prog_ac_ct_AR+:} false; then :
37190  $as_echo_n "(cached) " >&6
37191else
37192  if test -n "$ac_ct_AR"; then
37193  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37194else
37195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37196for as_dir in $PATH
37197do
37198  IFS=$as_save_IFS
37199  test -z "$as_dir" && as_dir=.
37200    for ac_exec_ext in '' $ac_executable_extensions; do
37201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37202    ac_cv_prog_ac_ct_AR="$ac_prog"
37203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37204    break 2
37205  fi
37206done
37207  done
37208IFS=$as_save_IFS
37209
37210fi
37211fi
37212ac_ct_AR=$ac_cv_prog_ac_ct_AR
37213if test -n "$ac_ct_AR"; then
37214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37215$as_echo "$ac_ct_AR" >&6; }
37216else
37217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37218$as_echo "no" >&6; }
37219fi
37220
37221
37222  test -n "$ac_ct_AR" && break
37223done
37224
37225  if test "x$ac_ct_AR" = x; then
37226    AR=""
37227  else
37228    case $cross_compiling:$ac_tool_warned in
37229yes:)
37230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37232ac_tool_warned=yes ;;
37233esac
37234    AR=$ac_ct_AR
37235  fi
37236fi
37237
37238  else
37239    # The variable is set, but is it from the command line or the environment?
37240
37241    # Try to remove the string !AR! from our list.
37242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37244      # If it failed, the variable was not from the command line. Ignore it,
37245      # but warn the user (except for BASH, which is always set by the calling BASH).
37246      if test "xAR" != xBASH; then
37247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37248$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37249      fi
37250      # Try to locate tool using the code snippet
37251      if test -n "$ac_tool_prefix"; then
37252  for ac_prog in ar gcc-ar
37253  do
37254    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37255set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37257$as_echo_n "checking for $ac_word... " >&6; }
37258if ${ac_cv_prog_AR+:} false; then :
37259  $as_echo_n "(cached) " >&6
37260else
37261  if test -n "$AR"; then
37262  ac_cv_prog_AR="$AR" # Let the user override the test.
37263else
37264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37265for as_dir in $PATH
37266do
37267  IFS=$as_save_IFS
37268  test -z "$as_dir" && as_dir=.
37269    for ac_exec_ext in '' $ac_executable_extensions; do
37270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37271    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37273    break 2
37274  fi
37275done
37276  done
37277IFS=$as_save_IFS
37278
37279fi
37280fi
37281AR=$ac_cv_prog_AR
37282if test -n "$AR"; then
37283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37284$as_echo "$AR" >&6; }
37285else
37286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37287$as_echo "no" >&6; }
37288fi
37289
37290
37291    test -n "$AR" && break
37292  done
37293fi
37294if test -z "$AR"; then
37295  ac_ct_AR=$AR
37296  for ac_prog in ar gcc-ar
37297do
37298  # Extract the first word of "$ac_prog", so it can be a program name with args.
37299set dummy $ac_prog; ac_word=$2
37300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37301$as_echo_n "checking for $ac_word... " >&6; }
37302if ${ac_cv_prog_ac_ct_AR+:} false; then :
37303  $as_echo_n "(cached) " >&6
37304else
37305  if test -n "$ac_ct_AR"; then
37306  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37307else
37308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37309for as_dir in $PATH
37310do
37311  IFS=$as_save_IFS
37312  test -z "$as_dir" && as_dir=.
37313    for ac_exec_ext in '' $ac_executable_extensions; do
37314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37315    ac_cv_prog_ac_ct_AR="$ac_prog"
37316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37317    break 2
37318  fi
37319done
37320  done
37321IFS=$as_save_IFS
37322
37323fi
37324fi
37325ac_ct_AR=$ac_cv_prog_ac_ct_AR
37326if test -n "$ac_ct_AR"; then
37327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37328$as_echo "$ac_ct_AR" >&6; }
37329else
37330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37331$as_echo "no" >&6; }
37332fi
37333
37334
37335  test -n "$ac_ct_AR" && break
37336done
37337
37338  if test "x$ac_ct_AR" = x; then
37339    AR=""
37340  else
37341    case $cross_compiling:$ac_tool_warned in
37342yes:)
37343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37345ac_tool_warned=yes ;;
37346esac
37347    AR=$ac_ct_AR
37348  fi
37349fi
37350
37351    else
37352      # If it succeeded, then it was overridden by the user. We will use it
37353      # for the tool.
37354
37355      # First remove it from the list of overridden variables, so we can test
37356      # for unknown variables in the end.
37357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37358
37359      # Check if we try to supply an empty value
37360      if test "x$AR" = x; then
37361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37362$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37364$as_echo_n "checking for AR... " >&6; }
37365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37366$as_echo "disabled" >&6; }
37367      else
37368        # Check if the provided tool contains a complete path.
37369        tool_specified="$AR"
37370        tool_basename="${tool_specified##*/}"
37371        if test "x$tool_basename" = "x$tool_specified"; then
37372          # A command without a complete path is provided, search $PATH.
37373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37374$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37375          # Extract the first word of "$tool_basename", so it can be a program name with args.
37376set dummy $tool_basename; ac_word=$2
37377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37378$as_echo_n "checking for $ac_word... " >&6; }
37379if ${ac_cv_path_AR+:} false; then :
37380  $as_echo_n "(cached) " >&6
37381else
37382  case $AR in
37383  [\\/]* | ?:[\\/]*)
37384  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37385  ;;
37386  *)
37387  as_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_path_AR="$as_dir/$ac_word$ac_exec_ext"
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
37402  ;;
37403esac
37404fi
37405AR=$ac_cv_path_AR
37406if test -n "$AR"; then
37407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37408$as_echo "$AR" >&6; }
37409else
37410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37411$as_echo "no" >&6; }
37412fi
37413
37414
37415          if test "x$AR" = x; then
37416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37417          fi
37418        else
37419          # Otherwise we believe it is a complete path. Use it as it is.
37420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37421$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37423$as_echo_n "checking for AR... " >&6; }
37424          if test ! -x "$tool_specified"; then
37425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37426$as_echo "not found" >&6; }
37427            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37428          fi
37429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37430$as_echo "$tool_specified" >&6; }
37431        fi
37432      fi
37433    fi
37434
37435  fi
37436
37437
37438  else
37439
37440
37441  # Publish this variable in the help.
37442
37443
37444  if [ -z "${AR+x}" ]; then
37445    # The variable is not set by user, try to locate tool using the code snippet
37446    if test -n "$ac_tool_prefix"; then
37447  for ac_prog in ar
37448  do
37449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37452$as_echo_n "checking for $ac_word... " >&6; }
37453if ${ac_cv_prog_AR+:} false; then :
37454  $as_echo_n "(cached) " >&6
37455else
37456  if test -n "$AR"; then
37457  ac_cv_prog_AR="$AR" # Let the user override the test.
37458else
37459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37460for as_dir in $PATH
37461do
37462  IFS=$as_save_IFS
37463  test -z "$as_dir" && as_dir=.
37464    for ac_exec_ext in '' $ac_executable_extensions; do
37465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37466    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37468    break 2
37469  fi
37470done
37471  done
37472IFS=$as_save_IFS
37473
37474fi
37475fi
37476AR=$ac_cv_prog_AR
37477if test -n "$AR"; then
37478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37479$as_echo "$AR" >&6; }
37480else
37481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37482$as_echo "no" >&6; }
37483fi
37484
37485
37486    test -n "$AR" && break
37487  done
37488fi
37489if test -z "$AR"; then
37490  ac_ct_AR=$AR
37491  for ac_prog in ar
37492do
37493  # Extract the first word of "$ac_prog", so it can be a program name with args.
37494set dummy $ac_prog; ac_word=$2
37495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37496$as_echo_n "checking for $ac_word... " >&6; }
37497if ${ac_cv_prog_ac_ct_AR+:} false; then :
37498  $as_echo_n "(cached) " >&6
37499else
37500  if test -n "$ac_ct_AR"; then
37501  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37502else
37503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37504for as_dir in $PATH
37505do
37506  IFS=$as_save_IFS
37507  test -z "$as_dir" && as_dir=.
37508    for ac_exec_ext in '' $ac_executable_extensions; do
37509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37510    ac_cv_prog_ac_ct_AR="$ac_prog"
37511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37512    break 2
37513  fi
37514done
37515  done
37516IFS=$as_save_IFS
37517
37518fi
37519fi
37520ac_ct_AR=$ac_cv_prog_ac_ct_AR
37521if test -n "$ac_ct_AR"; then
37522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37523$as_echo "$ac_ct_AR" >&6; }
37524else
37525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37526$as_echo "no" >&6; }
37527fi
37528
37529
37530  test -n "$ac_ct_AR" && break
37531done
37532
37533  if test "x$ac_ct_AR" = x; then
37534    AR=""
37535  else
37536    case $cross_compiling:$ac_tool_warned in
37537yes:)
37538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37540ac_tool_warned=yes ;;
37541esac
37542    AR=$ac_ct_AR
37543  fi
37544fi
37545
37546  else
37547    # The variable is set, but is it from the command line or the environment?
37548
37549    # Try to remove the string !AR! from our list.
37550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37552      # If it failed, the variable was not from the command line. Ignore it,
37553      # but warn the user (except for BASH, which is always set by the calling BASH).
37554      if test "xAR" != xBASH; then
37555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37556$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37557      fi
37558      # Try to locate tool using the code snippet
37559      if test -n "$ac_tool_prefix"; then
37560  for ac_prog in ar
37561  do
37562    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37563set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37565$as_echo_n "checking for $ac_word... " >&6; }
37566if ${ac_cv_prog_AR+:} false; then :
37567  $as_echo_n "(cached) " >&6
37568else
37569  if test -n "$AR"; then
37570  ac_cv_prog_AR="$AR" # Let the user override the test.
37571else
37572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37573for as_dir in $PATH
37574do
37575  IFS=$as_save_IFS
37576  test -z "$as_dir" && as_dir=.
37577    for ac_exec_ext in '' $ac_executable_extensions; do
37578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37579    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37581    break 2
37582  fi
37583done
37584  done
37585IFS=$as_save_IFS
37586
37587fi
37588fi
37589AR=$ac_cv_prog_AR
37590if test -n "$AR"; then
37591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37592$as_echo "$AR" >&6; }
37593else
37594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37595$as_echo "no" >&6; }
37596fi
37597
37598
37599    test -n "$AR" && break
37600  done
37601fi
37602if test -z "$AR"; then
37603  ac_ct_AR=$AR
37604  for ac_prog in ar
37605do
37606  # Extract the first word of "$ac_prog", so it can be a program name with args.
37607set dummy $ac_prog; ac_word=$2
37608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37609$as_echo_n "checking for $ac_word... " >&6; }
37610if ${ac_cv_prog_ac_ct_AR+:} false; then :
37611  $as_echo_n "(cached) " >&6
37612else
37613  if test -n "$ac_ct_AR"; then
37614  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37615else
37616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37617for as_dir in $PATH
37618do
37619  IFS=$as_save_IFS
37620  test -z "$as_dir" && as_dir=.
37621    for ac_exec_ext in '' $ac_executable_extensions; do
37622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37623    ac_cv_prog_ac_ct_AR="$ac_prog"
37624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37625    break 2
37626  fi
37627done
37628  done
37629IFS=$as_save_IFS
37630
37631fi
37632fi
37633ac_ct_AR=$ac_cv_prog_ac_ct_AR
37634if test -n "$ac_ct_AR"; then
37635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37636$as_echo "$ac_ct_AR" >&6; }
37637else
37638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37639$as_echo "no" >&6; }
37640fi
37641
37642
37643  test -n "$ac_ct_AR" && break
37644done
37645
37646  if test "x$ac_ct_AR" = x; then
37647    AR=""
37648  else
37649    case $cross_compiling:$ac_tool_warned in
37650yes:)
37651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37653ac_tool_warned=yes ;;
37654esac
37655    AR=$ac_ct_AR
37656  fi
37657fi
37658
37659    else
37660      # If it succeeded, then it was overridden by the user. We will use it
37661      # for the tool.
37662
37663      # First remove it from the list of overridden variables, so we can test
37664      # for unknown variables in the end.
37665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37666
37667      # Check if we try to supply an empty value
37668      if test "x$AR" = x; then
37669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37670$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37672$as_echo_n "checking for AR... " >&6; }
37673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37674$as_echo "disabled" >&6; }
37675      else
37676        # Check if the provided tool contains a complete path.
37677        tool_specified="$AR"
37678        tool_basename="${tool_specified##*/}"
37679        if test "x$tool_basename" = "x$tool_specified"; then
37680          # A command without a complete path is provided, search $PATH.
37681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37682$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37683          # Extract the first word of "$tool_basename", so it can be a program name with args.
37684set dummy $tool_basename; ac_word=$2
37685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37686$as_echo_n "checking for $ac_word... " >&6; }
37687if ${ac_cv_path_AR+:} false; then :
37688  $as_echo_n "(cached) " >&6
37689else
37690  case $AR in
37691  [\\/]* | ?:[\\/]*)
37692  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37693  ;;
37694  *)
37695  as_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_path_AR="$as_dir/$ac_word$ac_exec_ext"
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
37710  ;;
37711esac
37712fi
37713AR=$ac_cv_path_AR
37714if test -n "$AR"; then
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37716$as_echo "$AR" >&6; }
37717else
37718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37719$as_echo "no" >&6; }
37720fi
37721
37722
37723          if test "x$AR" = x; then
37724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37725          fi
37726        else
37727          # Otherwise we believe it is a complete path. Use it as it is.
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37729$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37731$as_echo_n "checking for AR... " >&6; }
37732          if test ! -x "$tool_specified"; then
37733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37734$as_echo "not found" >&6; }
37735            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37736          fi
37737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37738$as_echo "$tool_specified" >&6; }
37739        fi
37740      fi
37741    fi
37742
37743  fi
37744
37745
37746  fi
37747
37748  # Only process if variable expands to non-empty
37749
37750  if test "x$AR" != x; then
37751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37752
37753  # First separate the path from the arguments. This will split at the first
37754  # space.
37755  complete="$AR"
37756  path="${complete%% *}"
37757  tmp="$complete EOL"
37758  arguments="${tmp#* }"
37759
37760  # Input might be given as Windows format, start by converting to
37761  # unix format.
37762  new_path=`$CYGPATH -u "$path"`
37763
37764  # Now try to locate executable using which
37765  new_path=`$WHICH "$new_path" 2> /dev/null`
37766  # bat and cmd files are not always considered executable in cygwin causing which
37767  # to not find them
37768  if test "x$new_path" = x \
37769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37771    new_path=`$CYGPATH -u "$path"`
37772  fi
37773  if test "x$new_path" = x; then
37774    # Oops. Which didn't find the executable.
37775    # The splitting of arguments from the executable at a space might have been incorrect,
37776    # since paths with space are more likely in Windows. Give it another try with the whole
37777    # argument.
37778    path="$complete"
37779    arguments="EOL"
37780    new_path=`$CYGPATH -u "$path"`
37781    new_path=`$WHICH "$new_path" 2> /dev/null`
37782    # bat and cmd files are not always considered executable in cygwin causing which
37783    # to not find them
37784    if test "x$new_path" = x \
37785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37787      new_path=`$CYGPATH -u "$path"`
37788    fi
37789    if test "x$new_path" = x; then
37790      # It's still not found. Now this is an unrecoverable error.
37791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37792$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37793      has_space=`$ECHO "$complete" | $GREP " "`
37794      if test "x$has_space" != x; then
37795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37797      fi
37798      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37799    fi
37800  fi
37801
37802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37805  # "foo.exe" is OK but "foo" is an error.
37806  #
37807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37808  # It is also a way to make sure we got the proper file name for the real test later on.
37809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37810  if test "x$test_shortpath" = x; then
37811    # Short path failed, file does not exist as specified.
37812    # Try adding .exe or .cmd
37813    if test -f "${new_path}.exe"; then
37814      input_to_shortpath="${new_path}.exe"
37815    elif test -f "${new_path}.cmd"; then
37816      input_to_shortpath="${new_path}.cmd"
37817    else
37818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37819$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37822      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37823    fi
37824  else
37825    input_to_shortpath="$new_path"
37826  fi
37827
37828  # Call helper function which possibly converts this using DOS-style short mode.
37829  # If so, the updated path is stored in $new_path.
37830  new_path="$input_to_shortpath"
37831
37832  input_path="$input_to_shortpath"
37833  # Check if we need to convert this using DOS-style short mode. If the path
37834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37835  # take no chances and rewrite it.
37836  # Note: m4 eats our [], so we need to use [ and ] instead.
37837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37838  if test "x$has_forbidden_chars" != x; then
37839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37843      # Going to short mode and back again did indeed matter. Since short mode is
37844      # case insensitive, let's make it lowercase to improve readability.
37845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37846      # Now convert it back to Unix-style (cygpath)
37847      input_path=`$CYGPATH -u "$shortmode_path"`
37848      new_path="$input_path"
37849    fi
37850  fi
37851
37852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37853  if test "x$test_cygdrive_prefix" = x; then
37854    # As a simple fix, exclude /usr/bin since it's not a real path.
37855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37857      # a path prefixed by /cygdrive for fixpath to work.
37858      new_path="$CYGWIN_ROOT_PATH$input_path"
37859    fi
37860  fi
37861
37862  # remove trailing .exe if any
37863  new_path="${new_path/%.exe/}"
37864
37865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37866
37867  # First separate the path from the arguments. This will split at the first
37868  # space.
37869  complete="$AR"
37870  path="${complete%% *}"
37871  tmp="$complete EOL"
37872  arguments="${tmp#* }"
37873
37874  # Input might be given as Windows format, start by converting to
37875  # unix format.
37876  new_path="$path"
37877
37878  windows_path="$new_path"
37879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37880    unix_path=`$CYGPATH -u "$windows_path"`
37881    new_path="$unix_path"
37882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37884    new_path="$unix_path"
37885  fi
37886
37887
37888  # Now try to locate executable using which
37889  new_path=`$WHICH "$new_path" 2> /dev/null`
37890
37891  if test "x$new_path" = x; then
37892    # Oops. Which didn't find the executable.
37893    # The splitting of arguments from the executable at a space might have been incorrect,
37894    # since paths with space are more likely in Windows. Give it another try with the whole
37895    # argument.
37896    path="$complete"
37897    arguments="EOL"
37898    new_path="$path"
37899
37900  windows_path="$new_path"
37901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37902    unix_path=`$CYGPATH -u "$windows_path"`
37903    new_path="$unix_path"
37904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37906    new_path="$unix_path"
37907  fi
37908
37909
37910    new_path=`$WHICH "$new_path" 2> /dev/null`
37911    # bat and cmd files are not always considered executable in MSYS causing which
37912    # to not find them
37913    if test "x$new_path" = x \
37914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37916      new_path="$path"
37917
37918  windows_path="$new_path"
37919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37920    unix_path=`$CYGPATH -u "$windows_path"`
37921    new_path="$unix_path"
37922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37924    new_path="$unix_path"
37925  fi
37926
37927    fi
37928
37929    if test "x$new_path" = x; then
37930      # It's still not found. Now this is an unrecoverable error.
37931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37932$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37933      has_space=`$ECHO "$complete" | $GREP " "`
37934      if test "x$has_space" != x; then
37935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37937      fi
37938      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37939    fi
37940  fi
37941
37942  # Now new_path has a complete unix path to the binary
37943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37944    # Keep paths in /bin as-is, but remove trailing .exe if any
37945    new_path="${new_path/%.exe/}"
37946    # Do not save /bin paths to all_fixpath_prefixes!
37947  else
37948    # Not in mixed or Windows style, start by that.
37949    new_path=`cmd //c echo $new_path`
37950
37951  input_path="$new_path"
37952  # Check if we need to convert this using DOS-style short mode. If the path
37953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37954  # take no chances and rewrite it.
37955  # Note: m4 eats our [], so we need to use [ and ] instead.
37956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37957  if test "x$has_forbidden_chars" != x; then
37958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37960  fi
37961
37962    # Output is in $new_path
37963
37964  windows_path="$new_path"
37965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37966    unix_path=`$CYGPATH -u "$windows_path"`
37967    new_path="$unix_path"
37968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37970    new_path="$unix_path"
37971  fi
37972
37973    # remove trailing .exe if any
37974    new_path="${new_path/%.exe/}"
37975
37976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37978  fi
37979
37980    else
37981      # We're on a unix platform. Hooray! :)
37982      # First separate the path from the arguments. This will split at the first
37983      # space.
37984      complete="$AR"
37985      path="${complete%% *}"
37986      tmp="$complete EOL"
37987      arguments="${tmp#* }"
37988
37989      # Cannot rely on the command "which" here since it doesn't always work.
37990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37991      if test -z "$is_absolute_path"; then
37992        # Path to executable is not absolute. Find it.
37993        IFS_save="$IFS"
37994        IFS=:
37995        for p in $PATH; do
37996          if test -f "$p/$path" && test -x "$p/$path"; then
37997            new_path="$p/$path"
37998            break
37999          fi
38000        done
38001        IFS="$IFS_save"
38002      else
38003        # This is an absolute path, we can use it without further modifications.
38004        new_path="$path"
38005      fi
38006
38007      if test "x$new_path" = x; then
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38009$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38010        has_space=`$ECHO "$complete" | $GREP " "`
38011        if test "x$has_space" != x; then
38012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38014        fi
38015        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38016      fi
38017    fi
38018
38019    # Now join together the path and the arguments once again
38020    if test "x$arguments" != xEOL; then
38021      new_complete="$new_path ${arguments% *}"
38022    else
38023      new_complete="$new_path"
38024    fi
38025
38026    if test "x$complete" != "x$new_complete"; then
38027      AR="$new_complete"
38028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38029$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38030    fi
38031  fi
38032
38033
38034
38035  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38036
38037
38038  # Publish this variable in the help.
38039
38040
38041  if [ -z "${LIPO+x}" ]; then
38042    # The variable is not set by user, try to locate tool using the code snippet
38043    for ac_prog in lipo
38044do
38045  # Extract the first word of "$ac_prog", so it can be a program name with args.
38046set dummy $ac_prog; ac_word=$2
38047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38048$as_echo_n "checking for $ac_word... " >&6; }
38049if ${ac_cv_path_LIPO+:} false; then :
38050  $as_echo_n "(cached) " >&6
38051else
38052  case $LIPO in
38053  [\\/]* | ?:[\\/]*)
38054  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38055  ;;
38056  *)
38057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38058for as_dir in $PATH
38059do
38060  IFS=$as_save_IFS
38061  test -z "$as_dir" && as_dir=.
38062    for ac_exec_ext in '' $ac_executable_extensions; do
38063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38064    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38066    break 2
38067  fi
38068done
38069  done
38070IFS=$as_save_IFS
38071
38072  ;;
38073esac
38074fi
38075LIPO=$ac_cv_path_LIPO
38076if test -n "$LIPO"; then
38077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38078$as_echo "$LIPO" >&6; }
38079else
38080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38081$as_echo "no" >&6; }
38082fi
38083
38084
38085  test -n "$LIPO" && break
38086done
38087
38088  else
38089    # The variable is set, but is it from the command line or the environment?
38090
38091    # Try to remove the string !LIPO! from our list.
38092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38094      # If it failed, the variable was not from the command line. Ignore it,
38095      # but warn the user (except for BASH, which is always set by the calling BASH).
38096      if test "xLIPO" != xBASH; then
38097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38098$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38099      fi
38100      # Try to locate tool using the code snippet
38101      for ac_prog in lipo
38102do
38103  # Extract the first word of "$ac_prog", so it can be a program name with args.
38104set dummy $ac_prog; ac_word=$2
38105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38106$as_echo_n "checking for $ac_word... " >&6; }
38107if ${ac_cv_path_LIPO+:} false; then :
38108  $as_echo_n "(cached) " >&6
38109else
38110  case $LIPO in
38111  [\\/]* | ?:[\\/]*)
38112  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38113  ;;
38114  *)
38115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38116for as_dir in $PATH
38117do
38118  IFS=$as_save_IFS
38119  test -z "$as_dir" && as_dir=.
38120    for ac_exec_ext in '' $ac_executable_extensions; do
38121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38122    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38124    break 2
38125  fi
38126done
38127  done
38128IFS=$as_save_IFS
38129
38130  ;;
38131esac
38132fi
38133LIPO=$ac_cv_path_LIPO
38134if test -n "$LIPO"; then
38135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38136$as_echo "$LIPO" >&6; }
38137else
38138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38139$as_echo "no" >&6; }
38140fi
38141
38142
38143  test -n "$LIPO" && break
38144done
38145
38146    else
38147      # If it succeeded, then it was overridden by the user. We will use it
38148      # for the tool.
38149
38150      # First remove it from the list of overridden variables, so we can test
38151      # for unknown variables in the end.
38152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38153
38154      # Check if we try to supply an empty value
38155      if test "x$LIPO" = x; then
38156        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38157$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38159$as_echo_n "checking for LIPO... " >&6; }
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38161$as_echo "disabled" >&6; }
38162      else
38163        # Check if the provided tool contains a complete path.
38164        tool_specified="$LIPO"
38165        tool_basename="${tool_specified##*/}"
38166        if test "x$tool_basename" = "x$tool_specified"; then
38167          # A command without a complete path is provided, search $PATH.
38168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38169$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38170          # Extract the first word of "$tool_basename", so it can be a program name with args.
38171set dummy $tool_basename; ac_word=$2
38172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38173$as_echo_n "checking for $ac_word... " >&6; }
38174if ${ac_cv_path_LIPO+:} false; then :
38175  $as_echo_n "(cached) " >&6
38176else
38177  case $LIPO in
38178  [\\/]* | ?:[\\/]*)
38179  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38180  ;;
38181  *)
38182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38183for as_dir in $PATH
38184do
38185  IFS=$as_save_IFS
38186  test -z "$as_dir" && as_dir=.
38187    for ac_exec_ext in '' $ac_executable_extensions; do
38188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38189    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38191    break 2
38192  fi
38193done
38194  done
38195IFS=$as_save_IFS
38196
38197  ;;
38198esac
38199fi
38200LIPO=$ac_cv_path_LIPO
38201if test -n "$LIPO"; then
38202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38203$as_echo "$LIPO" >&6; }
38204else
38205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38206$as_echo "no" >&6; }
38207fi
38208
38209
38210          if test "x$LIPO" = x; then
38211            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38212          fi
38213        else
38214          # Otherwise we believe it is a complete path. Use it as it is.
38215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38216$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38217          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38218$as_echo_n "checking for LIPO... " >&6; }
38219          if test ! -x "$tool_specified"; then
38220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38221$as_echo "not found" >&6; }
38222            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38223          fi
38224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38225$as_echo "$tool_specified" >&6; }
38226        fi
38227      fi
38228    fi
38229
38230  fi
38231
38232
38233
38234  # Only process if variable expands to non-empty
38235
38236  if test "x$LIPO" != x; then
38237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38238
38239  # First separate the path from the arguments. This will split at the first
38240  # space.
38241  complete="$LIPO"
38242  path="${complete%% *}"
38243  tmp="$complete EOL"
38244  arguments="${tmp#* }"
38245
38246  # Input might be given as Windows format, start by converting to
38247  # unix format.
38248  new_path=`$CYGPATH -u "$path"`
38249
38250  # Now try to locate executable using which
38251  new_path=`$WHICH "$new_path" 2> /dev/null`
38252  # bat and cmd files are not always considered executable in cygwin causing which
38253  # to not find them
38254  if test "x$new_path" = x \
38255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38257    new_path=`$CYGPATH -u "$path"`
38258  fi
38259  if test "x$new_path" = x; then
38260    # Oops. Which didn't find the executable.
38261    # The splitting of arguments from the executable at a space might have been incorrect,
38262    # since paths with space are more likely in Windows. Give it another try with the whole
38263    # argument.
38264    path="$complete"
38265    arguments="EOL"
38266    new_path=`$CYGPATH -u "$path"`
38267    new_path=`$WHICH "$new_path" 2> /dev/null`
38268    # bat and cmd files are not always considered executable in cygwin causing which
38269    # to not find them
38270    if test "x$new_path" = x \
38271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38273      new_path=`$CYGPATH -u "$path"`
38274    fi
38275    if test "x$new_path" = x; then
38276      # It's still not found. Now this is an unrecoverable error.
38277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38278$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38279      has_space=`$ECHO "$complete" | $GREP " "`
38280      if test "x$has_space" != x; then
38281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38283      fi
38284      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38285    fi
38286  fi
38287
38288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38291  # "foo.exe" is OK but "foo" is an error.
38292  #
38293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38294  # It is also a way to make sure we got the proper file name for the real test later on.
38295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38296  if test "x$test_shortpath" = x; then
38297    # Short path failed, file does not exist as specified.
38298    # Try adding .exe or .cmd
38299    if test -f "${new_path}.exe"; then
38300      input_to_shortpath="${new_path}.exe"
38301    elif test -f "${new_path}.cmd"; then
38302      input_to_shortpath="${new_path}.cmd"
38303    else
38304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38305$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38308      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38309    fi
38310  else
38311    input_to_shortpath="$new_path"
38312  fi
38313
38314  # Call helper function which possibly converts this using DOS-style short mode.
38315  # If so, the updated path is stored in $new_path.
38316  new_path="$input_to_shortpath"
38317
38318  input_path="$input_to_shortpath"
38319  # Check if we need to convert this using DOS-style short mode. If the path
38320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38321  # take no chances and rewrite it.
38322  # Note: m4 eats our [], so we need to use [ and ] instead.
38323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38324  if test "x$has_forbidden_chars" != x; then
38325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38329      # Going to short mode and back again did indeed matter. Since short mode is
38330      # case insensitive, let's make it lowercase to improve readability.
38331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38332      # Now convert it back to Unix-style (cygpath)
38333      input_path=`$CYGPATH -u "$shortmode_path"`
38334      new_path="$input_path"
38335    fi
38336  fi
38337
38338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38339  if test "x$test_cygdrive_prefix" = x; then
38340    # As a simple fix, exclude /usr/bin since it's not a real path.
38341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38343      # a path prefixed by /cygdrive for fixpath to work.
38344      new_path="$CYGWIN_ROOT_PATH$input_path"
38345    fi
38346  fi
38347
38348  # remove trailing .exe if any
38349  new_path="${new_path/%.exe/}"
38350
38351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38352
38353  # First separate the path from the arguments. This will split at the first
38354  # space.
38355  complete="$LIPO"
38356  path="${complete%% *}"
38357  tmp="$complete EOL"
38358  arguments="${tmp#* }"
38359
38360  # Input might be given as Windows format, start by converting to
38361  # unix format.
38362  new_path="$path"
38363
38364  windows_path="$new_path"
38365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38366    unix_path=`$CYGPATH -u "$windows_path"`
38367    new_path="$unix_path"
38368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38370    new_path="$unix_path"
38371  fi
38372
38373
38374  # Now try to locate executable using which
38375  new_path=`$WHICH "$new_path" 2> /dev/null`
38376
38377  if test "x$new_path" = x; then
38378    # Oops. Which didn't find the executable.
38379    # The splitting of arguments from the executable at a space might have been incorrect,
38380    # since paths with space are more likely in Windows. Give it another try with the whole
38381    # argument.
38382    path="$complete"
38383    arguments="EOL"
38384    new_path="$path"
38385
38386  windows_path="$new_path"
38387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38388    unix_path=`$CYGPATH -u "$windows_path"`
38389    new_path="$unix_path"
38390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38392    new_path="$unix_path"
38393  fi
38394
38395
38396    new_path=`$WHICH "$new_path" 2> /dev/null`
38397    # bat and cmd files are not always considered executable in MSYS causing which
38398    # to not find them
38399    if test "x$new_path" = x \
38400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38402      new_path="$path"
38403
38404  windows_path="$new_path"
38405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38406    unix_path=`$CYGPATH -u "$windows_path"`
38407    new_path="$unix_path"
38408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38410    new_path="$unix_path"
38411  fi
38412
38413    fi
38414
38415    if test "x$new_path" = x; then
38416      # It's still not found. Now this is an unrecoverable error.
38417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38418$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38419      has_space=`$ECHO "$complete" | $GREP " "`
38420      if test "x$has_space" != x; then
38421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38423      fi
38424      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38425    fi
38426  fi
38427
38428  # Now new_path has a complete unix path to the binary
38429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38430    # Keep paths in /bin as-is, but remove trailing .exe if any
38431    new_path="${new_path/%.exe/}"
38432    # Do not save /bin paths to all_fixpath_prefixes!
38433  else
38434    # Not in mixed or Windows style, start by that.
38435    new_path=`cmd //c echo $new_path`
38436
38437  input_path="$new_path"
38438  # Check if we need to convert this using DOS-style short mode. If the path
38439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38440  # take no chances and rewrite it.
38441  # Note: m4 eats our [], so we need to use [ and ] instead.
38442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38443  if test "x$has_forbidden_chars" != x; then
38444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38446  fi
38447
38448    # Output is in $new_path
38449
38450  windows_path="$new_path"
38451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38452    unix_path=`$CYGPATH -u "$windows_path"`
38453    new_path="$unix_path"
38454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38456    new_path="$unix_path"
38457  fi
38458
38459    # remove trailing .exe if any
38460    new_path="${new_path/%.exe/}"
38461
38462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38464  fi
38465
38466    else
38467      # We're on a unix platform. Hooray! :)
38468      # First separate the path from the arguments. This will split at the first
38469      # space.
38470      complete="$LIPO"
38471      path="${complete%% *}"
38472      tmp="$complete EOL"
38473      arguments="${tmp#* }"
38474
38475      # Cannot rely on the command "which" here since it doesn't always work.
38476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38477      if test -z "$is_absolute_path"; then
38478        # Path to executable is not absolute. Find it.
38479        IFS_save="$IFS"
38480        IFS=:
38481        for p in $PATH; do
38482          if test -f "$p/$path" && test -x "$p/$path"; then
38483            new_path="$p/$path"
38484            break
38485          fi
38486        done
38487        IFS="$IFS_save"
38488      else
38489        # This is an absolute path, we can use it without further modifications.
38490        new_path="$path"
38491      fi
38492
38493      if test "x$new_path" = x; then
38494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38495$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38496        has_space=`$ECHO "$complete" | $GREP " "`
38497        if test "x$has_space" != x; then
38498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38500        fi
38501        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38502      fi
38503    fi
38504
38505    # Now join together the path and the arguments once again
38506    if test "x$arguments" != xEOL; then
38507      new_complete="$new_path ${arguments% *}"
38508    else
38509      new_complete="$new_path"
38510    fi
38511
38512    if test "x$complete" != "x$new_complete"; then
38513      LIPO="$new_complete"
38514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38515$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38516    fi
38517  fi
38518
38519  fi
38520
38521  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38522    # Extract the first word of "mt", so it can be a program name with args.
38523set dummy mt; ac_word=$2
38524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38525$as_echo_n "checking for $ac_word... " >&6; }
38526if ${ac_cv_prog_MT+:} false; then :
38527  $as_echo_n "(cached) " >&6
38528else
38529  if test -n "$MT"; then
38530  ac_cv_prog_MT="$MT" # Let the user override the test.
38531else
38532  ac_prog_rejected=no
38533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38534for as_dir in $PATH
38535do
38536  IFS=$as_save_IFS
38537  test -z "$as_dir" && as_dir=.
38538    for ac_exec_ext in '' $ac_executable_extensions; do
38539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38540    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38541       ac_prog_rejected=yes
38542       continue
38543     fi
38544    ac_cv_prog_MT="mt"
38545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38546    break 2
38547  fi
38548done
38549  done
38550IFS=$as_save_IFS
38551
38552if test $ac_prog_rejected = yes; then
38553  # We found a bogon in the path, so make sure we never use it.
38554  set dummy $ac_cv_prog_MT
38555  shift
38556  if test $# != 0; then
38557    # We chose a different compiler from the bogus one.
38558    # However, it has the same basename, so the bogon will be chosen
38559    # first if we set MT to just the basename; use the full file name.
38560    shift
38561    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38562  fi
38563fi
38564fi
38565fi
38566MT=$ac_cv_prog_MT
38567if test -n "$MT"; then
38568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38569$as_echo "$MT" >&6; }
38570else
38571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38572$as_echo "no" >&6; }
38573fi
38574
38575
38576
38577  # Only process if variable expands to non-empty
38578
38579  if test "x$MT" != x; then
38580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38581
38582  # First separate the path from the arguments. This will split at the first
38583  # space.
38584  complete="$MT"
38585  path="${complete%% *}"
38586  tmp="$complete EOL"
38587  arguments="${tmp#* }"
38588
38589  # Input might be given as Windows format, start by converting to
38590  # unix format.
38591  new_path=`$CYGPATH -u "$path"`
38592
38593  # Now try to locate executable using which
38594  new_path=`$WHICH "$new_path" 2> /dev/null`
38595  # bat and cmd files are not always considered executable in cygwin causing which
38596  # to not find them
38597  if test "x$new_path" = x \
38598      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38599      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38600    new_path=`$CYGPATH -u "$path"`
38601  fi
38602  if test "x$new_path" = x; then
38603    # Oops. Which didn't find the executable.
38604    # The splitting of arguments from the executable at a space might have been incorrect,
38605    # since paths with space are more likely in Windows. Give it another try with the whole
38606    # argument.
38607    path="$complete"
38608    arguments="EOL"
38609    new_path=`$CYGPATH -u "$path"`
38610    new_path=`$WHICH "$new_path" 2> /dev/null`
38611    # bat and cmd files are not always considered executable in cygwin causing which
38612    # to not find them
38613    if test "x$new_path" = x \
38614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38616      new_path=`$CYGPATH -u "$path"`
38617    fi
38618    if test "x$new_path" = x; then
38619      # It's still not found. Now this is an unrecoverable error.
38620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38621$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38622      has_space=`$ECHO "$complete" | $GREP " "`
38623      if test "x$has_space" != x; then
38624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38626      fi
38627      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38628    fi
38629  fi
38630
38631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38634  # "foo.exe" is OK but "foo" is an error.
38635  #
38636  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38637  # It is also a way to make sure we got the proper file name for the real test later on.
38638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38639  if test "x$test_shortpath" = x; then
38640    # Short path failed, file does not exist as specified.
38641    # Try adding .exe or .cmd
38642    if test -f "${new_path}.exe"; then
38643      input_to_shortpath="${new_path}.exe"
38644    elif test -f "${new_path}.cmd"; then
38645      input_to_shortpath="${new_path}.cmd"
38646    else
38647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38648$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38651      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38652    fi
38653  else
38654    input_to_shortpath="$new_path"
38655  fi
38656
38657  # Call helper function which possibly converts this using DOS-style short mode.
38658  # If so, the updated path is stored in $new_path.
38659  new_path="$input_to_shortpath"
38660
38661  input_path="$input_to_shortpath"
38662  # Check if we need to convert this using DOS-style short mode. If the path
38663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38664  # take no chances and rewrite it.
38665  # Note: m4 eats our [], so we need to use [ and ] instead.
38666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38667  if test "x$has_forbidden_chars" != x; then
38668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38672      # Going to short mode and back again did indeed matter. Since short mode is
38673      # case insensitive, let's make it lowercase to improve readability.
38674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38675      # Now convert it back to Unix-style (cygpath)
38676      input_path=`$CYGPATH -u "$shortmode_path"`
38677      new_path="$input_path"
38678    fi
38679  fi
38680
38681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38682  if test "x$test_cygdrive_prefix" = x; then
38683    # As a simple fix, exclude /usr/bin since it's not a real path.
38684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38686      # a path prefixed by /cygdrive for fixpath to work.
38687      new_path="$CYGWIN_ROOT_PATH$input_path"
38688    fi
38689  fi
38690
38691  # remove trailing .exe if any
38692  new_path="${new_path/%.exe/}"
38693
38694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38695
38696  # First separate the path from the arguments. This will split at the first
38697  # space.
38698  complete="$MT"
38699  path="${complete%% *}"
38700  tmp="$complete EOL"
38701  arguments="${tmp#* }"
38702
38703  # Input might be given as Windows format, start by converting to
38704  # unix format.
38705  new_path="$path"
38706
38707  windows_path="$new_path"
38708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38709    unix_path=`$CYGPATH -u "$windows_path"`
38710    new_path="$unix_path"
38711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38713    new_path="$unix_path"
38714  fi
38715
38716
38717  # Now try to locate executable using which
38718  new_path=`$WHICH "$new_path" 2> /dev/null`
38719
38720  if test "x$new_path" = x; then
38721    # Oops. Which didn't find the executable.
38722    # The splitting of arguments from the executable at a space might have been incorrect,
38723    # since paths with space are more likely in Windows. Give it another try with the whole
38724    # argument.
38725    path="$complete"
38726    arguments="EOL"
38727    new_path="$path"
38728
38729  windows_path="$new_path"
38730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38731    unix_path=`$CYGPATH -u "$windows_path"`
38732    new_path="$unix_path"
38733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38735    new_path="$unix_path"
38736  fi
38737
38738
38739    new_path=`$WHICH "$new_path" 2> /dev/null`
38740    # bat and cmd files are not always considered executable in MSYS causing which
38741    # to not find them
38742    if test "x$new_path" = x \
38743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38745      new_path="$path"
38746
38747  windows_path="$new_path"
38748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38749    unix_path=`$CYGPATH -u "$windows_path"`
38750    new_path="$unix_path"
38751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38753    new_path="$unix_path"
38754  fi
38755
38756    fi
38757
38758    if test "x$new_path" = x; then
38759      # It's still not found. Now this is an unrecoverable error.
38760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38761$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38762      has_space=`$ECHO "$complete" | $GREP " "`
38763      if test "x$has_space" != x; then
38764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38766      fi
38767      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38768    fi
38769  fi
38770
38771  # Now new_path has a complete unix path to the binary
38772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38773    # Keep paths in /bin as-is, but remove trailing .exe if any
38774    new_path="${new_path/%.exe/}"
38775    # Do not save /bin paths to all_fixpath_prefixes!
38776  else
38777    # Not in mixed or Windows style, start by that.
38778    new_path=`cmd //c echo $new_path`
38779
38780  input_path="$new_path"
38781  # Check if we need to convert this using DOS-style short mode. If the path
38782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38783  # take no chances and rewrite it.
38784  # Note: m4 eats our [], so we need to use [ and ] instead.
38785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38786  if test "x$has_forbidden_chars" != x; then
38787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38789  fi
38790
38791    # Output is in $new_path
38792
38793  windows_path="$new_path"
38794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38795    unix_path=`$CYGPATH -u "$windows_path"`
38796    new_path="$unix_path"
38797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38799    new_path="$unix_path"
38800  fi
38801
38802    # remove trailing .exe if any
38803    new_path="${new_path/%.exe/}"
38804
38805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38807  fi
38808
38809    else
38810      # We're on a unix platform. Hooray! :)
38811      # First separate the path from the arguments. This will split at the first
38812      # space.
38813      complete="$MT"
38814      path="${complete%% *}"
38815      tmp="$complete EOL"
38816      arguments="${tmp#* }"
38817
38818      # Cannot rely on the command "which" here since it doesn't always work.
38819      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38820      if test -z "$is_absolute_path"; then
38821        # Path to executable is not absolute. Find it.
38822        IFS_save="$IFS"
38823        IFS=:
38824        for p in $PATH; do
38825          if test -f "$p/$path" && test -x "$p/$path"; then
38826            new_path="$p/$path"
38827            break
38828          fi
38829        done
38830        IFS="$IFS_save"
38831      else
38832        # This is an absolute path, we can use it without further modifications.
38833        new_path="$path"
38834      fi
38835
38836      if test "x$new_path" = x; then
38837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38838$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38839        has_space=`$ECHO "$complete" | $GREP " "`
38840        if test "x$has_space" != x; then
38841          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38842$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38843        fi
38844        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38845      fi
38846    fi
38847
38848    # Now join together the path and the arguments once again
38849    if test "x$arguments" != xEOL; then
38850      new_complete="$new_path ${arguments% *}"
38851    else
38852      new_complete="$new_path"
38853    fi
38854
38855    if test "x$complete" != "x$new_complete"; then
38856      MT="$new_complete"
38857      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38858$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38859    fi
38860  fi
38861
38862    # Setup the resource compiler (RC)
38863    # Extract the first word of "rc", so it can be a program name with args.
38864set dummy rc; ac_word=$2
38865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38866$as_echo_n "checking for $ac_word... " >&6; }
38867if ${ac_cv_prog_RC+:} false; then :
38868  $as_echo_n "(cached) " >&6
38869else
38870  if test -n "$RC"; then
38871  ac_cv_prog_RC="$RC" # Let the user override the test.
38872else
38873  ac_prog_rejected=no
38874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38875for as_dir in $PATH
38876do
38877  IFS=$as_save_IFS
38878  test -z "$as_dir" && as_dir=.
38879    for ac_exec_ext in '' $ac_executable_extensions; do
38880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38881    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38882       ac_prog_rejected=yes
38883       continue
38884     fi
38885    ac_cv_prog_RC="rc"
38886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38887    break 2
38888  fi
38889done
38890  done
38891IFS=$as_save_IFS
38892
38893if test $ac_prog_rejected = yes; then
38894  # We found a bogon in the path, so make sure we never use it.
38895  set dummy $ac_cv_prog_RC
38896  shift
38897  if test $# != 0; then
38898    # We chose a different compiler from the bogus one.
38899    # However, it has the same basename, so the bogon will be chosen
38900    # first if we set RC to just the basename; use the full file name.
38901    shift
38902    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38903  fi
38904fi
38905fi
38906fi
38907RC=$ac_cv_prog_RC
38908if test -n "$RC"; then
38909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38910$as_echo "$RC" >&6; }
38911else
38912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38913$as_echo "no" >&6; }
38914fi
38915
38916
38917
38918  # Only process if variable expands to non-empty
38919
38920  if test "x$RC" != x; then
38921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38922
38923  # First separate the path from the arguments. This will split at the first
38924  # space.
38925  complete="$RC"
38926  path="${complete%% *}"
38927  tmp="$complete EOL"
38928  arguments="${tmp#* }"
38929
38930  # Input might be given as Windows format, start by converting to
38931  # unix format.
38932  new_path=`$CYGPATH -u "$path"`
38933
38934  # Now try to locate executable using which
38935  new_path=`$WHICH "$new_path" 2> /dev/null`
38936  # bat and cmd files are not always considered executable in cygwin causing which
38937  # to not find them
38938  if test "x$new_path" = x \
38939      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38940      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38941    new_path=`$CYGPATH -u "$path"`
38942  fi
38943  if test "x$new_path" = x; then
38944    # Oops. Which didn't find the executable.
38945    # The splitting of arguments from the executable at a space might have been incorrect,
38946    # since paths with space are more likely in Windows. Give it another try with the whole
38947    # argument.
38948    path="$complete"
38949    arguments="EOL"
38950    new_path=`$CYGPATH -u "$path"`
38951    new_path=`$WHICH "$new_path" 2> /dev/null`
38952    # bat and cmd files are not always considered executable in cygwin causing which
38953    # to not find them
38954    if test "x$new_path" = x \
38955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38957      new_path=`$CYGPATH -u "$path"`
38958    fi
38959    if test "x$new_path" = x; then
38960      # It's still not found. Now this is an unrecoverable error.
38961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38962$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38963      has_space=`$ECHO "$complete" | $GREP " "`
38964      if test "x$has_space" != x; then
38965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38967      fi
38968      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38969    fi
38970  fi
38971
38972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38975  # "foo.exe" is OK but "foo" is an error.
38976  #
38977  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38978  # It is also a way to make sure we got the proper file name for the real test later on.
38979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38980  if test "x$test_shortpath" = x; then
38981    # Short path failed, file does not exist as specified.
38982    # Try adding .exe or .cmd
38983    if test -f "${new_path}.exe"; then
38984      input_to_shortpath="${new_path}.exe"
38985    elif test -f "${new_path}.cmd"; then
38986      input_to_shortpath="${new_path}.cmd"
38987    else
38988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38989$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38990      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38991$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38992      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38993    fi
38994  else
38995    input_to_shortpath="$new_path"
38996  fi
38997
38998  # Call helper function which possibly converts this using DOS-style short mode.
38999  # If so, the updated path is stored in $new_path.
39000  new_path="$input_to_shortpath"
39001
39002  input_path="$input_to_shortpath"
39003  # Check if we need to convert this using DOS-style short mode. If the path
39004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39005  # take no chances and rewrite it.
39006  # Note: m4 eats our [], so we need to use [ and ] instead.
39007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39008  if test "x$has_forbidden_chars" != x; then
39009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39013      # Going to short mode and back again did indeed matter. Since short mode is
39014      # case insensitive, let's make it lowercase to improve readability.
39015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39016      # Now convert it back to Unix-style (cygpath)
39017      input_path=`$CYGPATH -u "$shortmode_path"`
39018      new_path="$input_path"
39019    fi
39020  fi
39021
39022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39023  if test "x$test_cygdrive_prefix" = x; then
39024    # As a simple fix, exclude /usr/bin since it's not a real path.
39025    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39027      # a path prefixed by /cygdrive for fixpath to work.
39028      new_path="$CYGWIN_ROOT_PATH$input_path"
39029    fi
39030  fi
39031
39032  # remove trailing .exe if any
39033  new_path="${new_path/%.exe/}"
39034
39035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39036
39037  # First separate the path from the arguments. This will split at the first
39038  # space.
39039  complete="$RC"
39040  path="${complete%% *}"
39041  tmp="$complete EOL"
39042  arguments="${tmp#* }"
39043
39044  # Input might be given as Windows format, start by converting to
39045  # unix format.
39046  new_path="$path"
39047
39048  windows_path="$new_path"
39049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39050    unix_path=`$CYGPATH -u "$windows_path"`
39051    new_path="$unix_path"
39052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39054    new_path="$unix_path"
39055  fi
39056
39057
39058  # Now try to locate executable using which
39059  new_path=`$WHICH "$new_path" 2> /dev/null`
39060
39061  if test "x$new_path" = x; then
39062    # Oops. Which didn't find the executable.
39063    # The splitting of arguments from the executable at a space might have been incorrect,
39064    # since paths with space are more likely in Windows. Give it another try with the whole
39065    # argument.
39066    path="$complete"
39067    arguments="EOL"
39068    new_path="$path"
39069
39070  windows_path="$new_path"
39071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39072    unix_path=`$CYGPATH -u "$windows_path"`
39073    new_path="$unix_path"
39074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39076    new_path="$unix_path"
39077  fi
39078
39079
39080    new_path=`$WHICH "$new_path" 2> /dev/null`
39081    # bat and cmd files are not always considered executable in MSYS causing which
39082    # to not find them
39083    if test "x$new_path" = x \
39084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39086      new_path="$path"
39087
39088  windows_path="$new_path"
39089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39090    unix_path=`$CYGPATH -u "$windows_path"`
39091    new_path="$unix_path"
39092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39094    new_path="$unix_path"
39095  fi
39096
39097    fi
39098
39099    if test "x$new_path" = x; then
39100      # It's still not found. Now this is an unrecoverable error.
39101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39102$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39103      has_space=`$ECHO "$complete" | $GREP " "`
39104      if test "x$has_space" != x; then
39105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39107      fi
39108      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39109    fi
39110  fi
39111
39112  # Now new_path has a complete unix path to the binary
39113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39114    # Keep paths in /bin as-is, but remove trailing .exe if any
39115    new_path="${new_path/%.exe/}"
39116    # Do not save /bin paths to all_fixpath_prefixes!
39117  else
39118    # Not in mixed or Windows style, start by that.
39119    new_path=`cmd //c echo $new_path`
39120
39121  input_path="$new_path"
39122  # Check if we need to convert this using DOS-style short mode. If the path
39123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39124  # take no chances and rewrite it.
39125  # Note: m4 eats our [], so we need to use [ and ] instead.
39126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39127  if test "x$has_forbidden_chars" != x; then
39128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39130  fi
39131
39132    # Output is in $new_path
39133
39134  windows_path="$new_path"
39135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39136    unix_path=`$CYGPATH -u "$windows_path"`
39137    new_path="$unix_path"
39138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39140    new_path="$unix_path"
39141  fi
39142
39143    # remove trailing .exe if any
39144    new_path="${new_path/%.exe/}"
39145
39146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39148  fi
39149
39150    else
39151      # We're on a unix platform. Hooray! :)
39152      # First separate the path from the arguments. This will split at the first
39153      # space.
39154      complete="$RC"
39155      path="${complete%% *}"
39156      tmp="$complete EOL"
39157      arguments="${tmp#* }"
39158
39159      # Cannot rely on the command "which" here since it doesn't always work.
39160      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39161      if test -z "$is_absolute_path"; then
39162        # Path to executable is not absolute. Find it.
39163        IFS_save="$IFS"
39164        IFS=:
39165        for p in $PATH; do
39166          if test -f "$p/$path" && test -x "$p/$path"; then
39167            new_path="$p/$path"
39168            break
39169          fi
39170        done
39171        IFS="$IFS_save"
39172      else
39173        # This is an absolute path, we can use it without further modifications.
39174        new_path="$path"
39175      fi
39176
39177      if test "x$new_path" = x; then
39178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39179$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39180        has_space=`$ECHO "$complete" | $GREP " "`
39181        if test "x$has_space" != x; then
39182          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39183$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39184        fi
39185        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39186      fi
39187    fi
39188
39189    # Now join together the path and the arguments once again
39190    if test "x$arguments" != xEOL; then
39191      new_complete="$new_path ${arguments% *}"
39192    else
39193      new_complete="$new_path"
39194    fi
39195
39196    if test "x$complete" != "x$new_complete"; then
39197      RC="$new_complete"
39198      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39199$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39200    fi
39201  fi
39202
39203    # Extract the first word of "dumpbin", so it can be a program name with args.
39204set dummy dumpbin; ac_word=$2
39205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39206$as_echo_n "checking for $ac_word... " >&6; }
39207if ${ac_cv_prog_DUMPBIN+:} false; then :
39208  $as_echo_n "(cached) " >&6
39209else
39210  if test -n "$DUMPBIN"; then
39211  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39212else
39213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39214for as_dir in $PATH
39215do
39216  IFS=$as_save_IFS
39217  test -z "$as_dir" && as_dir=.
39218    for ac_exec_ext in '' $ac_executable_extensions; do
39219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39220    ac_cv_prog_DUMPBIN="dumpbin"
39221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39222    break 2
39223  fi
39224done
39225  done
39226IFS=$as_save_IFS
39227
39228fi
39229fi
39230DUMPBIN=$ac_cv_prog_DUMPBIN
39231if test -n "$DUMPBIN"; then
39232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39233$as_echo "$DUMPBIN" >&6; }
39234else
39235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39236$as_echo "no" >&6; }
39237fi
39238
39239
39240
39241  # Only process if variable expands to non-empty
39242
39243  if test "x$DUMPBIN" != x; then
39244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39245
39246  # First separate the path from the arguments. This will split at the first
39247  # space.
39248  complete="$DUMPBIN"
39249  path="${complete%% *}"
39250  tmp="$complete EOL"
39251  arguments="${tmp#* }"
39252
39253  # Input might be given as Windows format, start by converting to
39254  # unix format.
39255  new_path=`$CYGPATH -u "$path"`
39256
39257  # Now try to locate executable using which
39258  new_path=`$WHICH "$new_path" 2> /dev/null`
39259  # bat and cmd files are not always considered executable in cygwin causing which
39260  # to not find them
39261  if test "x$new_path" = x \
39262      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39263      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39264    new_path=`$CYGPATH -u "$path"`
39265  fi
39266  if test "x$new_path" = x; then
39267    # Oops. Which didn't find the executable.
39268    # The splitting of arguments from the executable at a space might have been incorrect,
39269    # since paths with space are more likely in Windows. Give it another try with the whole
39270    # argument.
39271    path="$complete"
39272    arguments="EOL"
39273    new_path=`$CYGPATH -u "$path"`
39274    new_path=`$WHICH "$new_path" 2> /dev/null`
39275    # bat and cmd files are not always considered executable in cygwin causing which
39276    # to not find them
39277    if test "x$new_path" = x \
39278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39280      new_path=`$CYGPATH -u "$path"`
39281    fi
39282    if test "x$new_path" = x; then
39283      # It's still not found. Now this is an unrecoverable error.
39284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39285$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39286      has_space=`$ECHO "$complete" | $GREP " "`
39287      if test "x$has_space" != x; then
39288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39290      fi
39291      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39292    fi
39293  fi
39294
39295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39298  # "foo.exe" is OK but "foo" is an error.
39299  #
39300  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39301  # It is also a way to make sure we got the proper file name for the real test later on.
39302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39303  if test "x$test_shortpath" = x; then
39304    # Short path failed, file does not exist as specified.
39305    # Try adding .exe or .cmd
39306    if test -f "${new_path}.exe"; then
39307      input_to_shortpath="${new_path}.exe"
39308    elif test -f "${new_path}.cmd"; then
39309      input_to_shortpath="${new_path}.cmd"
39310    else
39311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39312$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39315      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39316    fi
39317  else
39318    input_to_shortpath="$new_path"
39319  fi
39320
39321  # Call helper function which possibly converts this using DOS-style short mode.
39322  # If so, the updated path is stored in $new_path.
39323  new_path="$input_to_shortpath"
39324
39325  input_path="$input_to_shortpath"
39326  # Check if we need to convert this using DOS-style short mode. If the path
39327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39328  # take no chances and rewrite it.
39329  # Note: m4 eats our [], so we need to use [ and ] instead.
39330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39331  if test "x$has_forbidden_chars" != x; then
39332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39336      # Going to short mode and back again did indeed matter. Since short mode is
39337      # case insensitive, let's make it lowercase to improve readability.
39338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39339      # Now convert it back to Unix-style (cygpath)
39340      input_path=`$CYGPATH -u "$shortmode_path"`
39341      new_path="$input_path"
39342    fi
39343  fi
39344
39345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39346  if test "x$test_cygdrive_prefix" = x; then
39347    # As a simple fix, exclude /usr/bin since it's not a real path.
39348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39350      # a path prefixed by /cygdrive for fixpath to work.
39351      new_path="$CYGWIN_ROOT_PATH$input_path"
39352    fi
39353  fi
39354
39355  # remove trailing .exe if any
39356  new_path="${new_path/%.exe/}"
39357
39358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39359
39360  # First separate the path from the arguments. This will split at the first
39361  # space.
39362  complete="$DUMPBIN"
39363  path="${complete%% *}"
39364  tmp="$complete EOL"
39365  arguments="${tmp#* }"
39366
39367  # Input might be given as Windows format, start by converting to
39368  # unix format.
39369  new_path="$path"
39370
39371  windows_path="$new_path"
39372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39373    unix_path=`$CYGPATH -u "$windows_path"`
39374    new_path="$unix_path"
39375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39377    new_path="$unix_path"
39378  fi
39379
39380
39381  # Now try to locate executable using which
39382  new_path=`$WHICH "$new_path" 2> /dev/null`
39383
39384  if test "x$new_path" = x; then
39385    # Oops. Which didn't find the executable.
39386    # The splitting of arguments from the executable at a space might have been incorrect,
39387    # since paths with space are more likely in Windows. Give it another try with the whole
39388    # argument.
39389    path="$complete"
39390    arguments="EOL"
39391    new_path="$path"
39392
39393  windows_path="$new_path"
39394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39395    unix_path=`$CYGPATH -u "$windows_path"`
39396    new_path="$unix_path"
39397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39399    new_path="$unix_path"
39400  fi
39401
39402
39403    new_path=`$WHICH "$new_path" 2> /dev/null`
39404    # bat and cmd files are not always considered executable in MSYS causing which
39405    # to not find them
39406    if test "x$new_path" = x \
39407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39409      new_path="$path"
39410
39411  windows_path="$new_path"
39412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39413    unix_path=`$CYGPATH -u "$windows_path"`
39414    new_path="$unix_path"
39415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39417    new_path="$unix_path"
39418  fi
39419
39420    fi
39421
39422    if test "x$new_path" = x; then
39423      # It's still not found. Now this is an unrecoverable error.
39424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39425$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39426      has_space=`$ECHO "$complete" | $GREP " "`
39427      if test "x$has_space" != x; then
39428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39430      fi
39431      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39432    fi
39433  fi
39434
39435  # Now new_path has a complete unix path to the binary
39436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39437    # Keep paths in /bin as-is, but remove trailing .exe if any
39438    new_path="${new_path/%.exe/}"
39439    # Do not save /bin paths to all_fixpath_prefixes!
39440  else
39441    # Not in mixed or Windows style, start by that.
39442    new_path=`cmd //c echo $new_path`
39443
39444  input_path="$new_path"
39445  # Check if we need to convert this using DOS-style short mode. If the path
39446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39447  # take no chances and rewrite it.
39448  # Note: m4 eats our [], so we need to use [ and ] instead.
39449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39450  if test "x$has_forbidden_chars" != x; then
39451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39453  fi
39454
39455    # Output is in $new_path
39456
39457  windows_path="$new_path"
39458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39459    unix_path=`$CYGPATH -u "$windows_path"`
39460    new_path="$unix_path"
39461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39463    new_path="$unix_path"
39464  fi
39465
39466    # remove trailing .exe if any
39467    new_path="${new_path/%.exe/}"
39468
39469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39471  fi
39472
39473    else
39474      # We're on a unix platform. Hooray! :)
39475      # First separate the path from the arguments. This will split at the first
39476      # space.
39477      complete="$DUMPBIN"
39478      path="${complete%% *}"
39479      tmp="$complete EOL"
39480      arguments="${tmp#* }"
39481
39482      # Cannot rely on the command "which" here since it doesn't always work.
39483      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39484      if test -z "$is_absolute_path"; then
39485        # Path to executable is not absolute. Find it.
39486        IFS_save="$IFS"
39487        IFS=:
39488        for p in $PATH; do
39489          if test -f "$p/$path" && test -x "$p/$path"; then
39490            new_path="$p/$path"
39491            break
39492          fi
39493        done
39494        IFS="$IFS_save"
39495      else
39496        # This is an absolute path, we can use it without further modifications.
39497        new_path="$path"
39498      fi
39499
39500      if test "x$new_path" = x; then
39501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39502$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39503        has_space=`$ECHO "$complete" | $GREP " "`
39504        if test "x$has_space" != x; then
39505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39507        fi
39508        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39509      fi
39510    fi
39511
39512    # Now join together the path and the arguments once again
39513    if test "x$arguments" != xEOL; then
39514      new_complete="$new_path ${arguments% *}"
39515    else
39516      new_complete="$new_path"
39517    fi
39518
39519    if test "x$complete" != "x$new_complete"; then
39520      DUMPBIN="$new_complete"
39521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39522$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39523    fi
39524  fi
39525
39526    # We need to check for 'msbuild.exe' because at the place where we expect to
39527    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39528    # won't find the 'msbuild.exe' executable in that case (and the
39529    # 'ac_executable_extensions' is unusable due to performance reasons).
39530    # Notice that we intentionally don't fix up the path to MSBUILD because we
39531    # will call it in a DOS shell during freetype detection on Windows (see
39532    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39533    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39534set dummy msbuild.exe; ac_word=$2
39535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39536$as_echo_n "checking for $ac_word... " >&6; }
39537if ${ac_cv_prog_MSBUILD+:} false; then :
39538  $as_echo_n "(cached) " >&6
39539else
39540  if test -n "$MSBUILD"; then
39541  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39542else
39543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39544for as_dir in $PATH
39545do
39546  IFS=$as_save_IFS
39547  test -z "$as_dir" && as_dir=.
39548    for ac_exec_ext in '' $ac_executable_extensions; do
39549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39550    ac_cv_prog_MSBUILD="msbuild.exe"
39551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39552    break 2
39553  fi
39554done
39555  done
39556IFS=$as_save_IFS
39557
39558fi
39559fi
39560MSBUILD=$ac_cv_prog_MSBUILD
39561if test -n "$MSBUILD"; then
39562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39563$as_echo "$MSBUILD" >&6; }
39564else
39565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39566$as_echo "no" >&6; }
39567fi
39568
39569
39570  fi
39571
39572  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39573
39574
39575  # Publish this variable in the help.
39576
39577
39578  if [ -z "${STRIP+x}" ]; then
39579    # The variable is not set by user, try to locate tool using the code snippet
39580    for ac_prog in strip
39581do
39582  # Extract the first word of "$ac_prog", so it can be a program name with args.
39583set dummy $ac_prog; ac_word=$2
39584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39585$as_echo_n "checking for $ac_word... " >&6; }
39586if ${ac_cv_path_STRIP+:} false; then :
39587  $as_echo_n "(cached) " >&6
39588else
39589  case $STRIP in
39590  [\\/]* | ?:[\\/]*)
39591  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39592  ;;
39593  *)
39594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39595for as_dir in $PATH
39596do
39597  IFS=$as_save_IFS
39598  test -z "$as_dir" && as_dir=.
39599    for ac_exec_ext in '' $ac_executable_extensions; do
39600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39601    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39603    break 2
39604  fi
39605done
39606  done
39607IFS=$as_save_IFS
39608
39609  ;;
39610esac
39611fi
39612STRIP=$ac_cv_path_STRIP
39613if test -n "$STRIP"; then
39614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39615$as_echo "$STRIP" >&6; }
39616else
39617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39618$as_echo "no" >&6; }
39619fi
39620
39621
39622  test -n "$STRIP" && break
39623done
39624
39625  else
39626    # The variable is set, but is it from the command line or the environment?
39627
39628    # Try to remove the string !STRIP! from our list.
39629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39631      # If it failed, the variable was not from the command line. Ignore it,
39632      # but warn the user (except for BASH, which is always set by the calling BASH).
39633      if test "xSTRIP" != xBASH; then
39634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39635$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39636      fi
39637      # Try to locate tool using the code snippet
39638      for ac_prog in strip
39639do
39640  # Extract the first word of "$ac_prog", so it can be a program name with args.
39641set dummy $ac_prog; ac_word=$2
39642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39643$as_echo_n "checking for $ac_word... " >&6; }
39644if ${ac_cv_path_STRIP+:} false; then :
39645  $as_echo_n "(cached) " >&6
39646else
39647  case $STRIP in
39648  [\\/]* | ?:[\\/]*)
39649  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39650  ;;
39651  *)
39652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39653for as_dir in $PATH
39654do
39655  IFS=$as_save_IFS
39656  test -z "$as_dir" && as_dir=.
39657    for ac_exec_ext in '' $ac_executable_extensions; do
39658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39659    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39661    break 2
39662  fi
39663done
39664  done
39665IFS=$as_save_IFS
39666
39667  ;;
39668esac
39669fi
39670STRIP=$ac_cv_path_STRIP
39671if test -n "$STRIP"; then
39672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39673$as_echo "$STRIP" >&6; }
39674else
39675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39676$as_echo "no" >&6; }
39677fi
39678
39679
39680  test -n "$STRIP" && break
39681done
39682
39683    else
39684      # If it succeeded, then it was overridden by the user. We will use it
39685      # for the tool.
39686
39687      # First remove it from the list of overridden variables, so we can test
39688      # for unknown variables in the end.
39689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39690
39691      # Check if we try to supply an empty value
39692      if test "x$STRIP" = x; then
39693        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39694$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39696$as_echo_n "checking for STRIP... " >&6; }
39697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39698$as_echo "disabled" >&6; }
39699      else
39700        # Check if the provided tool contains a complete path.
39701        tool_specified="$STRIP"
39702        tool_basename="${tool_specified##*/}"
39703        if test "x$tool_basename" = "x$tool_specified"; then
39704          # A command without a complete path is provided, search $PATH.
39705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39706$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39707          # Extract the first word of "$tool_basename", so it can be a program name with args.
39708set dummy $tool_basename; ac_word=$2
39709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39710$as_echo_n "checking for $ac_word... " >&6; }
39711if ${ac_cv_path_STRIP+:} false; then :
39712  $as_echo_n "(cached) " >&6
39713else
39714  case $STRIP in
39715  [\\/]* | ?:[\\/]*)
39716  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39717  ;;
39718  *)
39719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39720for as_dir in $PATH
39721do
39722  IFS=$as_save_IFS
39723  test -z "$as_dir" && as_dir=.
39724    for ac_exec_ext in '' $ac_executable_extensions; do
39725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39726    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39728    break 2
39729  fi
39730done
39731  done
39732IFS=$as_save_IFS
39733
39734  ;;
39735esac
39736fi
39737STRIP=$ac_cv_path_STRIP
39738if test -n "$STRIP"; then
39739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39740$as_echo "$STRIP" >&6; }
39741else
39742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39743$as_echo "no" >&6; }
39744fi
39745
39746
39747          if test "x$STRIP" = x; then
39748            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39749          fi
39750        else
39751          # Otherwise we believe it is a complete path. Use it as it is.
39752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39753$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39754          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39755$as_echo_n "checking for STRIP... " >&6; }
39756          if test ! -x "$tool_specified"; then
39757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39758$as_echo "not found" >&6; }
39759            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39760          fi
39761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39762$as_echo "$tool_specified" >&6; }
39763        fi
39764      fi
39765    fi
39766
39767  fi
39768
39769
39770
39771  # Only process if variable expands to non-empty
39772
39773  if test "x$STRIP" != x; then
39774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39775
39776  # First separate the path from the arguments. This will split at the first
39777  # space.
39778  complete="$STRIP"
39779  path="${complete%% *}"
39780  tmp="$complete EOL"
39781  arguments="${tmp#* }"
39782
39783  # Input might be given as Windows format, start by converting to
39784  # unix format.
39785  new_path=`$CYGPATH -u "$path"`
39786
39787  # Now try to locate executable using which
39788  new_path=`$WHICH "$new_path" 2> /dev/null`
39789  # bat and cmd files are not always considered executable in cygwin causing which
39790  # to not find them
39791  if test "x$new_path" = x \
39792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39794    new_path=`$CYGPATH -u "$path"`
39795  fi
39796  if test "x$new_path" = x; then
39797    # Oops. Which didn't find the executable.
39798    # The splitting of arguments from the executable at a space might have been incorrect,
39799    # since paths with space are more likely in Windows. Give it another try with the whole
39800    # argument.
39801    path="$complete"
39802    arguments="EOL"
39803    new_path=`$CYGPATH -u "$path"`
39804    new_path=`$WHICH "$new_path" 2> /dev/null`
39805    # bat and cmd files are not always considered executable in cygwin causing which
39806    # to not find them
39807    if test "x$new_path" = x \
39808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39810      new_path=`$CYGPATH -u "$path"`
39811    fi
39812    if test "x$new_path" = x; then
39813      # It's still not found. Now this is an unrecoverable error.
39814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39815$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39816      has_space=`$ECHO "$complete" | $GREP " "`
39817      if test "x$has_space" != x; then
39818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39820      fi
39821      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39822    fi
39823  fi
39824
39825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39828  # "foo.exe" is OK but "foo" is an error.
39829  #
39830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39831  # It is also a way to make sure we got the proper file name for the real test later on.
39832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39833  if test "x$test_shortpath" = x; then
39834    # Short path failed, file does not exist as specified.
39835    # Try adding .exe or .cmd
39836    if test -f "${new_path}.exe"; then
39837      input_to_shortpath="${new_path}.exe"
39838    elif test -f "${new_path}.cmd"; then
39839      input_to_shortpath="${new_path}.cmd"
39840    else
39841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39842$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39845      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39846    fi
39847  else
39848    input_to_shortpath="$new_path"
39849  fi
39850
39851  # Call helper function which possibly converts this using DOS-style short mode.
39852  # If so, the updated path is stored in $new_path.
39853  new_path="$input_to_shortpath"
39854
39855  input_path="$input_to_shortpath"
39856  # Check if we need to convert this using DOS-style short mode. If the path
39857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39858  # take no chances and rewrite it.
39859  # Note: m4 eats our [], so we need to use [ and ] instead.
39860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39861  if test "x$has_forbidden_chars" != x; then
39862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39866      # Going to short mode and back again did indeed matter. Since short mode is
39867      # case insensitive, let's make it lowercase to improve readability.
39868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39869      # Now convert it back to Unix-style (cygpath)
39870      input_path=`$CYGPATH -u "$shortmode_path"`
39871      new_path="$input_path"
39872    fi
39873  fi
39874
39875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39876  if test "x$test_cygdrive_prefix" = x; then
39877    # As a simple fix, exclude /usr/bin since it's not a real path.
39878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39880      # a path prefixed by /cygdrive for fixpath to work.
39881      new_path="$CYGWIN_ROOT_PATH$input_path"
39882    fi
39883  fi
39884
39885  # remove trailing .exe if any
39886  new_path="${new_path/%.exe/}"
39887
39888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39889
39890  # First separate the path from the arguments. This will split at the first
39891  # space.
39892  complete="$STRIP"
39893  path="${complete%% *}"
39894  tmp="$complete EOL"
39895  arguments="${tmp#* }"
39896
39897  # Input might be given as Windows format, start by converting to
39898  # unix format.
39899  new_path="$path"
39900
39901  windows_path="$new_path"
39902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39903    unix_path=`$CYGPATH -u "$windows_path"`
39904    new_path="$unix_path"
39905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39907    new_path="$unix_path"
39908  fi
39909
39910
39911  # Now try to locate executable using which
39912  new_path=`$WHICH "$new_path" 2> /dev/null`
39913
39914  if test "x$new_path" = x; then
39915    # Oops. Which didn't find the executable.
39916    # The splitting of arguments from the executable at a space might have been incorrect,
39917    # since paths with space are more likely in Windows. Give it another try with the whole
39918    # argument.
39919    path="$complete"
39920    arguments="EOL"
39921    new_path="$path"
39922
39923  windows_path="$new_path"
39924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39925    unix_path=`$CYGPATH -u "$windows_path"`
39926    new_path="$unix_path"
39927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39929    new_path="$unix_path"
39930  fi
39931
39932
39933    new_path=`$WHICH "$new_path" 2> /dev/null`
39934    # bat and cmd files are not always considered executable in MSYS causing which
39935    # to not find them
39936    if test "x$new_path" = x \
39937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39939      new_path="$path"
39940
39941  windows_path="$new_path"
39942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39943    unix_path=`$CYGPATH -u "$windows_path"`
39944    new_path="$unix_path"
39945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39947    new_path="$unix_path"
39948  fi
39949
39950    fi
39951
39952    if test "x$new_path" = x; then
39953      # It's still not found. Now this is an unrecoverable error.
39954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39955$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39956      has_space=`$ECHO "$complete" | $GREP " "`
39957      if test "x$has_space" != x; then
39958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39960      fi
39961      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39962    fi
39963  fi
39964
39965  # Now new_path has a complete unix path to the binary
39966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39967    # Keep paths in /bin as-is, but remove trailing .exe if any
39968    new_path="${new_path/%.exe/}"
39969    # Do not save /bin paths to all_fixpath_prefixes!
39970  else
39971    # Not in mixed or Windows style, start by that.
39972    new_path=`cmd //c echo $new_path`
39973
39974  input_path="$new_path"
39975  # Check if we need to convert this using DOS-style short mode. If the path
39976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39977  # take no chances and rewrite it.
39978  # Note: m4 eats our [], so we need to use [ and ] instead.
39979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39980  if test "x$has_forbidden_chars" != x; then
39981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39983  fi
39984
39985    # Output is in $new_path
39986
39987  windows_path="$new_path"
39988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39989    unix_path=`$CYGPATH -u "$windows_path"`
39990    new_path="$unix_path"
39991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39993    new_path="$unix_path"
39994  fi
39995
39996    # remove trailing .exe if any
39997    new_path="${new_path/%.exe/}"
39998
39999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40001  fi
40002
40003    else
40004      # We're on a unix platform. Hooray! :)
40005      # First separate the path from the arguments. This will split at the first
40006      # space.
40007      complete="$STRIP"
40008      path="${complete%% *}"
40009      tmp="$complete EOL"
40010      arguments="${tmp#* }"
40011
40012      # Cannot rely on the command "which" here since it doesn't always work.
40013      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40014      if test -z "$is_absolute_path"; then
40015        # Path to executable is not absolute. Find it.
40016        IFS_save="$IFS"
40017        IFS=:
40018        for p in $PATH; do
40019          if test -f "$p/$path" && test -x "$p/$path"; then
40020            new_path="$p/$path"
40021            break
40022          fi
40023        done
40024        IFS="$IFS_save"
40025      else
40026        # This is an absolute path, we can use it without further modifications.
40027        new_path="$path"
40028      fi
40029
40030      if test "x$new_path" = x; then
40031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40032$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40033        has_space=`$ECHO "$complete" | $GREP " "`
40034        if test "x$has_space" != x; then
40035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40037        fi
40038        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40039      fi
40040    fi
40041
40042    # Now join together the path and the arguments once again
40043    if test "x$arguments" != xEOL; then
40044      new_complete="$new_path ${arguments% *}"
40045    else
40046      new_complete="$new_path"
40047    fi
40048
40049    if test "x$complete" != "x$new_complete"; then
40050      STRIP="$new_complete"
40051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40052$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40053    fi
40054  fi
40055
40056
40057
40058  # Publish this variable in the help.
40059
40060
40061  if [ -z "${NM+x}" ]; then
40062    # The variable is not set by user, try to locate tool using the code snippet
40063    for ac_prog in nm
40064do
40065  # Extract the first word of "$ac_prog", so it can be a program name with args.
40066set dummy $ac_prog; ac_word=$2
40067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40068$as_echo_n "checking for $ac_word... " >&6; }
40069if ${ac_cv_path_NM+:} false; then :
40070  $as_echo_n "(cached) " >&6
40071else
40072  case $NM in
40073  [\\/]* | ?:[\\/]*)
40074  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40075  ;;
40076  *)
40077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40078for as_dir in $PATH
40079do
40080  IFS=$as_save_IFS
40081  test -z "$as_dir" && as_dir=.
40082    for ac_exec_ext in '' $ac_executable_extensions; do
40083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40084    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40086    break 2
40087  fi
40088done
40089  done
40090IFS=$as_save_IFS
40091
40092  ;;
40093esac
40094fi
40095NM=$ac_cv_path_NM
40096if test -n "$NM"; then
40097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40098$as_echo "$NM" >&6; }
40099else
40100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40101$as_echo "no" >&6; }
40102fi
40103
40104
40105  test -n "$NM" && break
40106done
40107
40108  else
40109    # The variable is set, but is it from the command line or the environment?
40110
40111    # Try to remove the string !NM! from our list.
40112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40114      # If it failed, the variable was not from the command line. Ignore it,
40115      # but warn the user (except for BASH, which is always set by the calling BASH).
40116      if test "xNM" != xBASH; then
40117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40118$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40119      fi
40120      # Try to locate tool using the code snippet
40121      for ac_prog in nm
40122do
40123  # Extract the first word of "$ac_prog", so it can be a program name with args.
40124set dummy $ac_prog; ac_word=$2
40125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40126$as_echo_n "checking for $ac_word... " >&6; }
40127if ${ac_cv_path_NM+:} false; then :
40128  $as_echo_n "(cached) " >&6
40129else
40130  case $NM in
40131  [\\/]* | ?:[\\/]*)
40132  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40133  ;;
40134  *)
40135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40136for as_dir in $PATH
40137do
40138  IFS=$as_save_IFS
40139  test -z "$as_dir" && as_dir=.
40140    for ac_exec_ext in '' $ac_executable_extensions; do
40141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40142    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40144    break 2
40145  fi
40146done
40147  done
40148IFS=$as_save_IFS
40149
40150  ;;
40151esac
40152fi
40153NM=$ac_cv_path_NM
40154if test -n "$NM"; then
40155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40156$as_echo "$NM" >&6; }
40157else
40158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40159$as_echo "no" >&6; }
40160fi
40161
40162
40163  test -n "$NM" && break
40164done
40165
40166    else
40167      # If it succeeded, then it was overridden by the user. We will use it
40168      # for the tool.
40169
40170      # First remove it from the list of overridden variables, so we can test
40171      # for unknown variables in the end.
40172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40173
40174      # Check if we try to supply an empty value
40175      if test "x$NM" = x; then
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40177$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40179$as_echo_n "checking for NM... " >&6; }
40180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40181$as_echo "disabled" >&6; }
40182      else
40183        # Check if the provided tool contains a complete path.
40184        tool_specified="$NM"
40185        tool_basename="${tool_specified##*/}"
40186        if test "x$tool_basename" = "x$tool_specified"; then
40187          # A command without a complete path is provided, search $PATH.
40188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40189$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40190          # Extract the first word of "$tool_basename", so it can be a program name with args.
40191set dummy $tool_basename; ac_word=$2
40192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40193$as_echo_n "checking for $ac_word... " >&6; }
40194if ${ac_cv_path_NM+:} false; then :
40195  $as_echo_n "(cached) " >&6
40196else
40197  case $NM in
40198  [\\/]* | ?:[\\/]*)
40199  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40200  ;;
40201  *)
40202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40203for as_dir in $PATH
40204do
40205  IFS=$as_save_IFS
40206  test -z "$as_dir" && as_dir=.
40207    for ac_exec_ext in '' $ac_executable_extensions; do
40208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40209    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40211    break 2
40212  fi
40213done
40214  done
40215IFS=$as_save_IFS
40216
40217  ;;
40218esac
40219fi
40220NM=$ac_cv_path_NM
40221if test -n "$NM"; then
40222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40223$as_echo "$NM" >&6; }
40224else
40225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40226$as_echo "no" >&6; }
40227fi
40228
40229
40230          if test "x$NM" = x; then
40231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40232          fi
40233        else
40234          # Otherwise we believe it is a complete path. Use it as it is.
40235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40236$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40238$as_echo_n "checking for NM... " >&6; }
40239          if test ! -x "$tool_specified"; then
40240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40241$as_echo "not found" >&6; }
40242            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40243          fi
40244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40245$as_echo "$tool_specified" >&6; }
40246        fi
40247      fi
40248    fi
40249
40250  fi
40251
40252
40253
40254  # Only process if variable expands to non-empty
40255
40256  if test "x$NM" != x; then
40257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40258
40259  # First separate the path from the arguments. This will split at the first
40260  # space.
40261  complete="$NM"
40262  path="${complete%% *}"
40263  tmp="$complete EOL"
40264  arguments="${tmp#* }"
40265
40266  # Input might be given as Windows format, start by converting to
40267  # unix format.
40268  new_path=`$CYGPATH -u "$path"`
40269
40270  # Now try to locate executable using which
40271  new_path=`$WHICH "$new_path" 2> /dev/null`
40272  # bat and cmd files are not always considered executable in cygwin causing which
40273  # to not find them
40274  if test "x$new_path" = x \
40275      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40276      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40277    new_path=`$CYGPATH -u "$path"`
40278  fi
40279  if test "x$new_path" = x; then
40280    # Oops. Which didn't find the executable.
40281    # The splitting of arguments from the executable at a space might have been incorrect,
40282    # since paths with space are more likely in Windows. Give it another try with the whole
40283    # argument.
40284    path="$complete"
40285    arguments="EOL"
40286    new_path=`$CYGPATH -u "$path"`
40287    new_path=`$WHICH "$new_path" 2> /dev/null`
40288    # bat and cmd files are not always considered executable in cygwin causing which
40289    # to not find them
40290    if test "x$new_path" = x \
40291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40293      new_path=`$CYGPATH -u "$path"`
40294    fi
40295    if test "x$new_path" = x; then
40296      # It's still not found. Now this is an unrecoverable error.
40297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40298$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40299      has_space=`$ECHO "$complete" | $GREP " "`
40300      if test "x$has_space" != x; then
40301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40303      fi
40304      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40305    fi
40306  fi
40307
40308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40311  # "foo.exe" is OK but "foo" is an error.
40312  #
40313  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40314  # It is also a way to make sure we got the proper file name for the real test later on.
40315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40316  if test "x$test_shortpath" = x; then
40317    # Short path failed, file does not exist as specified.
40318    # Try adding .exe or .cmd
40319    if test -f "${new_path}.exe"; then
40320      input_to_shortpath="${new_path}.exe"
40321    elif test -f "${new_path}.cmd"; then
40322      input_to_shortpath="${new_path}.cmd"
40323    else
40324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40325$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40328      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40329    fi
40330  else
40331    input_to_shortpath="$new_path"
40332  fi
40333
40334  # Call helper function which possibly converts this using DOS-style short mode.
40335  # If so, the updated path is stored in $new_path.
40336  new_path="$input_to_shortpath"
40337
40338  input_path="$input_to_shortpath"
40339  # Check if we need to convert this using DOS-style short mode. If the path
40340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40341  # take no chances and rewrite it.
40342  # Note: m4 eats our [], so we need to use [ and ] instead.
40343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40344  if test "x$has_forbidden_chars" != x; then
40345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40349      # Going to short mode and back again did indeed matter. Since short mode is
40350      # case insensitive, let's make it lowercase to improve readability.
40351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40352      # Now convert it back to Unix-style (cygpath)
40353      input_path=`$CYGPATH -u "$shortmode_path"`
40354      new_path="$input_path"
40355    fi
40356  fi
40357
40358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40359  if test "x$test_cygdrive_prefix" = x; then
40360    # As a simple fix, exclude /usr/bin since it's not a real path.
40361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40363      # a path prefixed by /cygdrive for fixpath to work.
40364      new_path="$CYGWIN_ROOT_PATH$input_path"
40365    fi
40366  fi
40367
40368  # remove trailing .exe if any
40369  new_path="${new_path/%.exe/}"
40370
40371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40372
40373  # First separate the path from the arguments. This will split at the first
40374  # space.
40375  complete="$NM"
40376  path="${complete%% *}"
40377  tmp="$complete EOL"
40378  arguments="${tmp#* }"
40379
40380  # Input might be given as Windows format, start by converting to
40381  # unix format.
40382  new_path="$path"
40383
40384  windows_path="$new_path"
40385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40386    unix_path=`$CYGPATH -u "$windows_path"`
40387    new_path="$unix_path"
40388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40390    new_path="$unix_path"
40391  fi
40392
40393
40394  # Now try to locate executable using which
40395  new_path=`$WHICH "$new_path" 2> /dev/null`
40396
40397  if test "x$new_path" = x; then
40398    # Oops. Which didn't find the executable.
40399    # The splitting of arguments from the executable at a space might have been incorrect,
40400    # since paths with space are more likely in Windows. Give it another try with the whole
40401    # argument.
40402    path="$complete"
40403    arguments="EOL"
40404    new_path="$path"
40405
40406  windows_path="$new_path"
40407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40408    unix_path=`$CYGPATH -u "$windows_path"`
40409    new_path="$unix_path"
40410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40412    new_path="$unix_path"
40413  fi
40414
40415
40416    new_path=`$WHICH "$new_path" 2> /dev/null`
40417    # bat and cmd files are not always considered executable in MSYS causing which
40418    # to not find them
40419    if test "x$new_path" = x \
40420        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40421        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40422      new_path="$path"
40423
40424  windows_path="$new_path"
40425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40426    unix_path=`$CYGPATH -u "$windows_path"`
40427    new_path="$unix_path"
40428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40430    new_path="$unix_path"
40431  fi
40432
40433    fi
40434
40435    if test "x$new_path" = x; then
40436      # It's still not found. Now this is an unrecoverable error.
40437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40438$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40439      has_space=`$ECHO "$complete" | $GREP " "`
40440      if test "x$has_space" != x; then
40441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40443      fi
40444      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40445    fi
40446  fi
40447
40448  # Now new_path has a complete unix path to the binary
40449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40450    # Keep paths in /bin as-is, but remove trailing .exe if any
40451    new_path="${new_path/%.exe/}"
40452    # Do not save /bin paths to all_fixpath_prefixes!
40453  else
40454    # Not in mixed or Windows style, start by that.
40455    new_path=`cmd //c echo $new_path`
40456
40457  input_path="$new_path"
40458  # Check if we need to convert this using DOS-style short mode. If the path
40459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40460  # take no chances and rewrite it.
40461  # Note: m4 eats our [], so we need to use [ and ] instead.
40462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40463  if test "x$has_forbidden_chars" != x; then
40464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40466  fi
40467
40468    # Output is in $new_path
40469
40470  windows_path="$new_path"
40471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40472    unix_path=`$CYGPATH -u "$windows_path"`
40473    new_path="$unix_path"
40474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40476    new_path="$unix_path"
40477  fi
40478
40479    # remove trailing .exe if any
40480    new_path="${new_path/%.exe/}"
40481
40482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40484  fi
40485
40486    else
40487      # We're on a unix platform. Hooray! :)
40488      # First separate the path from the arguments. This will split at the first
40489      # space.
40490      complete="$NM"
40491      path="${complete%% *}"
40492      tmp="$complete EOL"
40493      arguments="${tmp#* }"
40494
40495      # Cannot rely on the command "which" here since it doesn't always work.
40496      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40497      if test -z "$is_absolute_path"; then
40498        # Path to executable is not absolute. Find it.
40499        IFS_save="$IFS"
40500        IFS=:
40501        for p in $PATH; do
40502          if test -f "$p/$path" && test -x "$p/$path"; then
40503            new_path="$p/$path"
40504            break
40505          fi
40506        done
40507        IFS="$IFS_save"
40508      else
40509        # This is an absolute path, we can use it without further modifications.
40510        new_path="$path"
40511      fi
40512
40513      if test "x$new_path" = x; then
40514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40515$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40516        has_space=`$ECHO "$complete" | $GREP " "`
40517        if test "x$has_space" != x; then
40518          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40520        fi
40521        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40522      fi
40523    fi
40524
40525    # Now join together the path and the arguments once again
40526    if test "x$arguments" != xEOL; then
40527      new_complete="$new_path ${arguments% *}"
40528    else
40529      new_complete="$new_path"
40530    fi
40531
40532    if test "x$complete" != "x$new_complete"; then
40533      NM="$new_complete"
40534      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40535$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40536    fi
40537  fi
40538
40539
40540
40541  # Publish this variable in the help.
40542
40543
40544  if [ -z "${GNM+x}" ]; then
40545    # The variable is not set by user, try to locate tool using the code snippet
40546    for ac_prog in gnm
40547do
40548  # Extract the first word of "$ac_prog", so it can be a program name with args.
40549set dummy $ac_prog; ac_word=$2
40550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40551$as_echo_n "checking for $ac_word... " >&6; }
40552if ${ac_cv_path_GNM+:} false; then :
40553  $as_echo_n "(cached) " >&6
40554else
40555  case $GNM in
40556  [\\/]* | ?:[\\/]*)
40557  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40558  ;;
40559  *)
40560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40561for as_dir in $PATH
40562do
40563  IFS=$as_save_IFS
40564  test -z "$as_dir" && as_dir=.
40565    for ac_exec_ext in '' $ac_executable_extensions; do
40566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40567    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40569    break 2
40570  fi
40571done
40572  done
40573IFS=$as_save_IFS
40574
40575  ;;
40576esac
40577fi
40578GNM=$ac_cv_path_GNM
40579if test -n "$GNM"; then
40580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40581$as_echo "$GNM" >&6; }
40582else
40583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40584$as_echo "no" >&6; }
40585fi
40586
40587
40588  test -n "$GNM" && break
40589done
40590
40591  else
40592    # The variable is set, but is it from the command line or the environment?
40593
40594    # Try to remove the string !GNM! from our list.
40595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40597      # If it failed, the variable was not from the command line. Ignore it,
40598      # but warn the user (except for BASH, which is always set by the calling BASH).
40599      if test "xGNM" != xBASH; then
40600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40601$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40602      fi
40603      # Try to locate tool using the code snippet
40604      for ac_prog in gnm
40605do
40606  # Extract the first word of "$ac_prog", so it can be a program name with args.
40607set dummy $ac_prog; ac_word=$2
40608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40609$as_echo_n "checking for $ac_word... " >&6; }
40610if ${ac_cv_path_GNM+:} false; then :
40611  $as_echo_n "(cached) " >&6
40612else
40613  case $GNM in
40614  [\\/]* | ?:[\\/]*)
40615  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40616  ;;
40617  *)
40618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40619for as_dir in $PATH
40620do
40621  IFS=$as_save_IFS
40622  test -z "$as_dir" && as_dir=.
40623    for ac_exec_ext in '' $ac_executable_extensions; do
40624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40625    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40627    break 2
40628  fi
40629done
40630  done
40631IFS=$as_save_IFS
40632
40633  ;;
40634esac
40635fi
40636GNM=$ac_cv_path_GNM
40637if test -n "$GNM"; then
40638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40639$as_echo "$GNM" >&6; }
40640else
40641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40642$as_echo "no" >&6; }
40643fi
40644
40645
40646  test -n "$GNM" && break
40647done
40648
40649    else
40650      # If it succeeded, then it was overridden by the user. We will use it
40651      # for the tool.
40652
40653      # First remove it from the list of overridden variables, so we can test
40654      # for unknown variables in the end.
40655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40656
40657      # Check if we try to supply an empty value
40658      if test "x$GNM" = x; then
40659        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40660$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40661        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40662$as_echo_n "checking for GNM... " >&6; }
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40664$as_echo "disabled" >&6; }
40665      else
40666        # Check if the provided tool contains a complete path.
40667        tool_specified="$GNM"
40668        tool_basename="${tool_specified##*/}"
40669        if test "x$tool_basename" = "x$tool_specified"; then
40670          # A command without a complete path is provided, search $PATH.
40671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40672$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40673          # Extract the first word of "$tool_basename", so it can be a program name with args.
40674set dummy $tool_basename; ac_word=$2
40675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40676$as_echo_n "checking for $ac_word... " >&6; }
40677if ${ac_cv_path_GNM+:} false; then :
40678  $as_echo_n "(cached) " >&6
40679else
40680  case $GNM in
40681  [\\/]* | ?:[\\/]*)
40682  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40683  ;;
40684  *)
40685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40686for as_dir in $PATH
40687do
40688  IFS=$as_save_IFS
40689  test -z "$as_dir" && as_dir=.
40690    for ac_exec_ext in '' $ac_executable_extensions; do
40691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40692    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40694    break 2
40695  fi
40696done
40697  done
40698IFS=$as_save_IFS
40699
40700  ;;
40701esac
40702fi
40703GNM=$ac_cv_path_GNM
40704if test -n "$GNM"; then
40705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40706$as_echo "$GNM" >&6; }
40707else
40708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40709$as_echo "no" >&6; }
40710fi
40711
40712
40713          if test "x$GNM" = x; then
40714            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40715          fi
40716        else
40717          # Otherwise we believe it is a complete path. Use it as it is.
40718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40719$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40720          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40721$as_echo_n "checking for GNM... " >&6; }
40722          if test ! -x "$tool_specified"; then
40723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40724$as_echo "not found" >&6; }
40725            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40726          fi
40727          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40728$as_echo "$tool_specified" >&6; }
40729        fi
40730      fi
40731    fi
40732
40733  fi
40734
40735
40736
40737  # Only process if variable expands to non-empty
40738
40739  if test "x$GNM" != x; then
40740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40741
40742  # First separate the path from the arguments. This will split at the first
40743  # space.
40744  complete="$GNM"
40745  path="${complete%% *}"
40746  tmp="$complete EOL"
40747  arguments="${tmp#* }"
40748
40749  # Input might be given as Windows format, start by converting to
40750  # unix format.
40751  new_path=`$CYGPATH -u "$path"`
40752
40753  # Now try to locate executable using which
40754  new_path=`$WHICH "$new_path" 2> /dev/null`
40755  # bat and cmd files are not always considered executable in cygwin causing which
40756  # to not find them
40757  if test "x$new_path" = x \
40758      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40759      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40760    new_path=`$CYGPATH -u "$path"`
40761  fi
40762  if test "x$new_path" = x; then
40763    # Oops. Which didn't find the executable.
40764    # The splitting of arguments from the executable at a space might have been incorrect,
40765    # since paths with space are more likely in Windows. Give it another try with the whole
40766    # argument.
40767    path="$complete"
40768    arguments="EOL"
40769    new_path=`$CYGPATH -u "$path"`
40770    new_path=`$WHICH "$new_path" 2> /dev/null`
40771    # bat and cmd files are not always considered executable in cygwin causing which
40772    # to not find them
40773    if test "x$new_path" = x \
40774        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40775        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40776      new_path=`$CYGPATH -u "$path"`
40777    fi
40778    if test "x$new_path" = x; then
40779      # It's still not found. Now this is an unrecoverable error.
40780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40781$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40782      has_space=`$ECHO "$complete" | $GREP " "`
40783      if test "x$has_space" != x; then
40784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40786      fi
40787      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40788    fi
40789  fi
40790
40791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40794  # "foo.exe" is OK but "foo" is an error.
40795  #
40796  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40797  # It is also a way to make sure we got the proper file name for the real test later on.
40798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40799  if test "x$test_shortpath" = x; then
40800    # Short path failed, file does not exist as specified.
40801    # Try adding .exe or .cmd
40802    if test -f "${new_path}.exe"; then
40803      input_to_shortpath="${new_path}.exe"
40804    elif test -f "${new_path}.cmd"; then
40805      input_to_shortpath="${new_path}.cmd"
40806    else
40807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40808$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40809      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40810$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40811      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40812    fi
40813  else
40814    input_to_shortpath="$new_path"
40815  fi
40816
40817  # Call helper function which possibly converts this using DOS-style short mode.
40818  # If so, the updated path is stored in $new_path.
40819  new_path="$input_to_shortpath"
40820
40821  input_path="$input_to_shortpath"
40822  # Check if we need to convert this using DOS-style short mode. If the path
40823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40824  # take no chances and rewrite it.
40825  # Note: m4 eats our [], so we need to use [ and ] instead.
40826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40827  if test "x$has_forbidden_chars" != x; then
40828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40832      # Going to short mode and back again did indeed matter. Since short mode is
40833      # case insensitive, let's make it lowercase to improve readability.
40834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40835      # Now convert it back to Unix-style (cygpath)
40836      input_path=`$CYGPATH -u "$shortmode_path"`
40837      new_path="$input_path"
40838    fi
40839  fi
40840
40841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40842  if test "x$test_cygdrive_prefix" = x; then
40843    # As a simple fix, exclude /usr/bin since it's not a real path.
40844    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40846      # a path prefixed by /cygdrive for fixpath to work.
40847      new_path="$CYGWIN_ROOT_PATH$input_path"
40848    fi
40849  fi
40850
40851  # remove trailing .exe if any
40852  new_path="${new_path/%.exe/}"
40853
40854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40855
40856  # First separate the path from the arguments. This will split at the first
40857  # space.
40858  complete="$GNM"
40859  path="${complete%% *}"
40860  tmp="$complete EOL"
40861  arguments="${tmp#* }"
40862
40863  # Input might be given as Windows format, start by converting to
40864  # unix format.
40865  new_path="$path"
40866
40867  windows_path="$new_path"
40868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40869    unix_path=`$CYGPATH -u "$windows_path"`
40870    new_path="$unix_path"
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40873    new_path="$unix_path"
40874  fi
40875
40876
40877  # Now try to locate executable using which
40878  new_path=`$WHICH "$new_path" 2> /dev/null`
40879
40880  if test "x$new_path" = x; then
40881    # Oops. Which didn't find the executable.
40882    # The splitting of arguments from the executable at a space might have been incorrect,
40883    # since paths with space are more likely in Windows. Give it another try with the whole
40884    # argument.
40885    path="$complete"
40886    arguments="EOL"
40887    new_path="$path"
40888
40889  windows_path="$new_path"
40890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40891    unix_path=`$CYGPATH -u "$windows_path"`
40892    new_path="$unix_path"
40893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40895    new_path="$unix_path"
40896  fi
40897
40898
40899    new_path=`$WHICH "$new_path" 2> /dev/null`
40900    # bat and cmd files are not always considered executable in MSYS causing which
40901    # to not find them
40902    if test "x$new_path" = x \
40903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40905      new_path="$path"
40906
40907  windows_path="$new_path"
40908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40909    unix_path=`$CYGPATH -u "$windows_path"`
40910    new_path="$unix_path"
40911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40913    new_path="$unix_path"
40914  fi
40915
40916    fi
40917
40918    if test "x$new_path" = x; then
40919      # It's still not found. Now this is an unrecoverable error.
40920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40921$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40922      has_space=`$ECHO "$complete" | $GREP " "`
40923      if test "x$has_space" != x; then
40924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40926      fi
40927      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40928    fi
40929  fi
40930
40931  # Now new_path has a complete unix path to the binary
40932  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40933    # Keep paths in /bin as-is, but remove trailing .exe if any
40934    new_path="${new_path/%.exe/}"
40935    # Do not save /bin paths to all_fixpath_prefixes!
40936  else
40937    # Not in mixed or Windows style, start by that.
40938    new_path=`cmd //c echo $new_path`
40939
40940  input_path="$new_path"
40941  # Check if we need to convert this using DOS-style short mode. If the path
40942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40943  # take no chances and rewrite it.
40944  # Note: m4 eats our [], so we need to use [ and ] instead.
40945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40946  if test "x$has_forbidden_chars" != x; then
40947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40949  fi
40950
40951    # Output is in $new_path
40952
40953  windows_path="$new_path"
40954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40955    unix_path=`$CYGPATH -u "$windows_path"`
40956    new_path="$unix_path"
40957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40959    new_path="$unix_path"
40960  fi
40961
40962    # remove trailing .exe if any
40963    new_path="${new_path/%.exe/}"
40964
40965    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40966    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40967  fi
40968
40969    else
40970      # We're on a unix platform. Hooray! :)
40971      # First separate the path from the arguments. This will split at the first
40972      # space.
40973      complete="$GNM"
40974      path="${complete%% *}"
40975      tmp="$complete EOL"
40976      arguments="${tmp#* }"
40977
40978      # Cannot rely on the command "which" here since it doesn't always work.
40979      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40980      if test -z "$is_absolute_path"; then
40981        # Path to executable is not absolute. Find it.
40982        IFS_save="$IFS"
40983        IFS=:
40984        for p in $PATH; do
40985          if test -f "$p/$path" && test -x "$p/$path"; then
40986            new_path="$p/$path"
40987            break
40988          fi
40989        done
40990        IFS="$IFS_save"
40991      else
40992        # This is an absolute path, we can use it without further modifications.
40993        new_path="$path"
40994      fi
40995
40996      if test "x$new_path" = x; then
40997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40998$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40999        has_space=`$ECHO "$complete" | $GREP " "`
41000        if test "x$has_space" != x; then
41001          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41002$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41003        fi
41004        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41005      fi
41006    fi
41007
41008    # Now join together the path and the arguments once again
41009    if test "x$arguments" != xEOL; then
41010      new_complete="$new_path ${arguments% *}"
41011    else
41012      new_complete="$new_path"
41013    fi
41014
41015    if test "x$complete" != "x$new_complete"; then
41016      GNM="$new_complete"
41017      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41018$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41019    fi
41020  fi
41021
41022  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41023    # FIXME: we should unify this with the solaris case above.
41024
41025
41026  # Publish this variable in the help.
41027
41028
41029  if [ -z "${STRIP+x}" ]; then
41030    # The variable is not set by user, try to locate tool using the code snippet
41031    if test -n "$ac_tool_prefix"; then
41032  for ac_prog in strip
41033  do
41034    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41035set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41037$as_echo_n "checking for $ac_word... " >&6; }
41038if ${ac_cv_prog_STRIP+:} false; then :
41039  $as_echo_n "(cached) " >&6
41040else
41041  if test -n "$STRIP"; then
41042  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41043else
41044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41045for as_dir in $PATH
41046do
41047  IFS=$as_save_IFS
41048  test -z "$as_dir" && as_dir=.
41049    for ac_exec_ext in '' $ac_executable_extensions; do
41050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41051    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41053    break 2
41054  fi
41055done
41056  done
41057IFS=$as_save_IFS
41058
41059fi
41060fi
41061STRIP=$ac_cv_prog_STRIP
41062if test -n "$STRIP"; then
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41064$as_echo "$STRIP" >&6; }
41065else
41066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41067$as_echo "no" >&6; }
41068fi
41069
41070
41071    test -n "$STRIP" && break
41072  done
41073fi
41074if test -z "$STRIP"; then
41075  ac_ct_STRIP=$STRIP
41076  for ac_prog in strip
41077do
41078  # Extract the first word of "$ac_prog", so it can be a program name with args.
41079set dummy $ac_prog; ac_word=$2
41080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41081$as_echo_n "checking for $ac_word... " >&6; }
41082if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41083  $as_echo_n "(cached) " >&6
41084else
41085  if test -n "$ac_ct_STRIP"; then
41086  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41087else
41088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41089for as_dir in $PATH
41090do
41091  IFS=$as_save_IFS
41092  test -z "$as_dir" && as_dir=.
41093    for ac_exec_ext in '' $ac_executable_extensions; do
41094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41095    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41097    break 2
41098  fi
41099done
41100  done
41101IFS=$as_save_IFS
41102
41103fi
41104fi
41105ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41106if test -n "$ac_ct_STRIP"; then
41107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41108$as_echo "$ac_ct_STRIP" >&6; }
41109else
41110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41111$as_echo "no" >&6; }
41112fi
41113
41114
41115  test -n "$ac_ct_STRIP" && break
41116done
41117
41118  if test "x$ac_ct_STRIP" = x; then
41119    STRIP=""
41120  else
41121    case $cross_compiling:$ac_tool_warned in
41122yes:)
41123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41125ac_tool_warned=yes ;;
41126esac
41127    STRIP=$ac_ct_STRIP
41128  fi
41129fi
41130
41131  else
41132    # The variable is set, but is it from the command line or the environment?
41133
41134    # Try to remove the string !STRIP! from our list.
41135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41137      # If it failed, the variable was not from the command line. Ignore it,
41138      # but warn the user (except for BASH, which is always set by the calling BASH).
41139      if test "xSTRIP" != xBASH; then
41140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41141$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41142      fi
41143      # Try to locate tool using the code snippet
41144      if test -n "$ac_tool_prefix"; then
41145  for ac_prog in strip
41146  do
41147    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41148set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41150$as_echo_n "checking for $ac_word... " >&6; }
41151if ${ac_cv_prog_STRIP+:} false; then :
41152  $as_echo_n "(cached) " >&6
41153else
41154  if test -n "$STRIP"; then
41155  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41156else
41157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41158for as_dir in $PATH
41159do
41160  IFS=$as_save_IFS
41161  test -z "$as_dir" && as_dir=.
41162    for ac_exec_ext in '' $ac_executable_extensions; do
41163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41164    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41166    break 2
41167  fi
41168done
41169  done
41170IFS=$as_save_IFS
41171
41172fi
41173fi
41174STRIP=$ac_cv_prog_STRIP
41175if test -n "$STRIP"; then
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41177$as_echo "$STRIP" >&6; }
41178else
41179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41180$as_echo "no" >&6; }
41181fi
41182
41183
41184    test -n "$STRIP" && break
41185  done
41186fi
41187if test -z "$STRIP"; then
41188  ac_ct_STRIP=$STRIP
41189  for ac_prog in strip
41190do
41191  # Extract the first word of "$ac_prog", so it can be a program name with args.
41192set dummy $ac_prog; ac_word=$2
41193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41194$as_echo_n "checking for $ac_word... " >&6; }
41195if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41196  $as_echo_n "(cached) " >&6
41197else
41198  if test -n "$ac_ct_STRIP"; then
41199  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41200else
41201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41202for as_dir in $PATH
41203do
41204  IFS=$as_save_IFS
41205  test -z "$as_dir" && as_dir=.
41206    for ac_exec_ext in '' $ac_executable_extensions; do
41207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41208    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41210    break 2
41211  fi
41212done
41213  done
41214IFS=$as_save_IFS
41215
41216fi
41217fi
41218ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41219if test -n "$ac_ct_STRIP"; then
41220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41221$as_echo "$ac_ct_STRIP" >&6; }
41222else
41223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41224$as_echo "no" >&6; }
41225fi
41226
41227
41228  test -n "$ac_ct_STRIP" && break
41229done
41230
41231  if test "x$ac_ct_STRIP" = x; then
41232    STRIP=""
41233  else
41234    case $cross_compiling:$ac_tool_warned in
41235yes:)
41236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41238ac_tool_warned=yes ;;
41239esac
41240    STRIP=$ac_ct_STRIP
41241  fi
41242fi
41243
41244    else
41245      # If it succeeded, then it was overridden by the user. We will use it
41246      # for the tool.
41247
41248      # First remove it from the list of overridden variables, so we can test
41249      # for unknown variables in the end.
41250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41251
41252      # Check if we try to supply an empty value
41253      if test "x$STRIP" = x; then
41254        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41255$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41257$as_echo_n "checking for STRIP... " >&6; }
41258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41259$as_echo "disabled" >&6; }
41260      else
41261        # Check if the provided tool contains a complete path.
41262        tool_specified="$STRIP"
41263        tool_basename="${tool_specified##*/}"
41264        if test "x$tool_basename" = "x$tool_specified"; then
41265          # A command without a complete path is provided, search $PATH.
41266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41267$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41268          # Extract the first word of "$tool_basename", so it can be a program name with args.
41269set dummy $tool_basename; ac_word=$2
41270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41271$as_echo_n "checking for $ac_word... " >&6; }
41272if ${ac_cv_path_STRIP+:} false; then :
41273  $as_echo_n "(cached) " >&6
41274else
41275  case $STRIP in
41276  [\\/]* | ?:[\\/]*)
41277  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41278  ;;
41279  *)
41280  as_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_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
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
41295  ;;
41296esac
41297fi
41298STRIP=$ac_cv_path_STRIP
41299if test -n "$STRIP"; then
41300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41301$as_echo "$STRIP" >&6; }
41302else
41303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41304$as_echo "no" >&6; }
41305fi
41306
41307
41308          if test "x$STRIP" = x; then
41309            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41310          fi
41311        else
41312          # Otherwise we believe it is a complete path. Use it as it is.
41313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41314$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41315          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41316$as_echo_n "checking for STRIP... " >&6; }
41317          if test ! -x "$tool_specified"; then
41318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41319$as_echo "not found" >&6; }
41320            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41321          fi
41322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41323$as_echo "$tool_specified" >&6; }
41324        fi
41325      fi
41326    fi
41327
41328  fi
41329
41330
41331
41332  # Only process if variable expands to non-empty
41333
41334  if test "x$STRIP" != x; then
41335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41336
41337  # First separate the path from the arguments. This will split at the first
41338  # space.
41339  complete="$STRIP"
41340  path="${complete%% *}"
41341  tmp="$complete EOL"
41342  arguments="${tmp#* }"
41343
41344  # Input might be given as Windows format, start by converting to
41345  # unix format.
41346  new_path=`$CYGPATH -u "$path"`
41347
41348  # Now try to locate executable using which
41349  new_path=`$WHICH "$new_path" 2> /dev/null`
41350  # bat and cmd files are not always considered executable in cygwin causing which
41351  # to not find them
41352  if test "x$new_path" = x \
41353      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41354      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41355    new_path=`$CYGPATH -u "$path"`
41356  fi
41357  if test "x$new_path" = x; then
41358    # Oops. Which didn't find the executable.
41359    # The splitting of arguments from the executable at a space might have been incorrect,
41360    # since paths with space are more likely in Windows. Give it another try with the whole
41361    # argument.
41362    path="$complete"
41363    arguments="EOL"
41364    new_path=`$CYGPATH -u "$path"`
41365    new_path=`$WHICH "$new_path" 2> /dev/null`
41366    # bat and cmd files are not always considered executable in cygwin causing which
41367    # to not find them
41368    if test "x$new_path" = x \
41369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41371      new_path=`$CYGPATH -u "$path"`
41372    fi
41373    if test "x$new_path" = x; then
41374      # It's still not found. Now this is an unrecoverable error.
41375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41376$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41377      has_space=`$ECHO "$complete" | $GREP " "`
41378      if test "x$has_space" != x; then
41379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41381      fi
41382      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41383    fi
41384  fi
41385
41386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41389  # "foo.exe" is OK but "foo" is an error.
41390  #
41391  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41392  # It is also a way to make sure we got the proper file name for the real test later on.
41393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41394  if test "x$test_shortpath" = x; then
41395    # Short path failed, file does not exist as specified.
41396    # Try adding .exe or .cmd
41397    if test -f "${new_path}.exe"; then
41398      input_to_shortpath="${new_path}.exe"
41399    elif test -f "${new_path}.cmd"; then
41400      input_to_shortpath="${new_path}.cmd"
41401    else
41402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41403$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41406      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41407    fi
41408  else
41409    input_to_shortpath="$new_path"
41410  fi
41411
41412  # Call helper function which possibly converts this using DOS-style short mode.
41413  # If so, the updated path is stored in $new_path.
41414  new_path="$input_to_shortpath"
41415
41416  input_path="$input_to_shortpath"
41417  # Check if we need to convert this using DOS-style short mode. If the path
41418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41419  # take no chances and rewrite it.
41420  # Note: m4 eats our [], so we need to use [ and ] instead.
41421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41422  if test "x$has_forbidden_chars" != x; then
41423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41427      # Going to short mode and back again did indeed matter. Since short mode is
41428      # case insensitive, let's make it lowercase to improve readability.
41429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41430      # Now convert it back to Unix-style (cygpath)
41431      input_path=`$CYGPATH -u "$shortmode_path"`
41432      new_path="$input_path"
41433    fi
41434  fi
41435
41436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41437  if test "x$test_cygdrive_prefix" = x; then
41438    # As a simple fix, exclude /usr/bin since it's not a real path.
41439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41441      # a path prefixed by /cygdrive for fixpath to work.
41442      new_path="$CYGWIN_ROOT_PATH$input_path"
41443    fi
41444  fi
41445
41446  # remove trailing .exe if any
41447  new_path="${new_path/%.exe/}"
41448
41449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41450
41451  # First separate the path from the arguments. This will split at the first
41452  # space.
41453  complete="$STRIP"
41454  path="${complete%% *}"
41455  tmp="$complete EOL"
41456  arguments="${tmp#* }"
41457
41458  # Input might be given as Windows format, start by converting to
41459  # unix format.
41460  new_path="$path"
41461
41462  windows_path="$new_path"
41463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41464    unix_path=`$CYGPATH -u "$windows_path"`
41465    new_path="$unix_path"
41466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41468    new_path="$unix_path"
41469  fi
41470
41471
41472  # Now try to locate executable using which
41473  new_path=`$WHICH "$new_path" 2> /dev/null`
41474
41475  if test "x$new_path" = x; then
41476    # Oops. Which didn't find the executable.
41477    # The splitting of arguments from the executable at a space might have been incorrect,
41478    # since paths with space are more likely in Windows. Give it another try with the whole
41479    # argument.
41480    path="$complete"
41481    arguments="EOL"
41482    new_path="$path"
41483
41484  windows_path="$new_path"
41485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41486    unix_path=`$CYGPATH -u "$windows_path"`
41487    new_path="$unix_path"
41488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41490    new_path="$unix_path"
41491  fi
41492
41493
41494    new_path=`$WHICH "$new_path" 2> /dev/null`
41495    # bat and cmd files are not always considered executable in MSYS causing which
41496    # to not find them
41497    if test "x$new_path" = x \
41498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41500      new_path="$path"
41501
41502  windows_path="$new_path"
41503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41504    unix_path=`$CYGPATH -u "$windows_path"`
41505    new_path="$unix_path"
41506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41508    new_path="$unix_path"
41509  fi
41510
41511    fi
41512
41513    if test "x$new_path" = x; then
41514      # It's still not found. Now this is an unrecoverable error.
41515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41516$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41517      has_space=`$ECHO "$complete" | $GREP " "`
41518      if test "x$has_space" != x; then
41519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41521      fi
41522      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41523    fi
41524  fi
41525
41526  # Now new_path has a complete unix path to the binary
41527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41528    # Keep paths in /bin as-is, but remove trailing .exe if any
41529    new_path="${new_path/%.exe/}"
41530    # Do not save /bin paths to all_fixpath_prefixes!
41531  else
41532    # Not in mixed or Windows style, start by that.
41533    new_path=`cmd //c echo $new_path`
41534
41535  input_path="$new_path"
41536  # Check if we need to convert this using DOS-style short mode. If the path
41537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41538  # take no chances and rewrite it.
41539  # Note: m4 eats our [], so we need to use [ and ] instead.
41540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41541  if test "x$has_forbidden_chars" != x; then
41542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41544  fi
41545
41546    # Output is in $new_path
41547
41548  windows_path="$new_path"
41549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41550    unix_path=`$CYGPATH -u "$windows_path"`
41551    new_path="$unix_path"
41552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41554    new_path="$unix_path"
41555  fi
41556
41557    # remove trailing .exe if any
41558    new_path="${new_path/%.exe/}"
41559
41560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41562  fi
41563
41564    else
41565      # We're on a unix platform. Hooray! :)
41566      # First separate the path from the arguments. This will split at the first
41567      # space.
41568      complete="$STRIP"
41569      path="${complete%% *}"
41570      tmp="$complete EOL"
41571      arguments="${tmp#* }"
41572
41573      # Cannot rely on the command "which" here since it doesn't always work.
41574      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41575      if test -z "$is_absolute_path"; then
41576        # Path to executable is not absolute. Find it.
41577        IFS_save="$IFS"
41578        IFS=:
41579        for p in $PATH; do
41580          if test -f "$p/$path" && test -x "$p/$path"; then
41581            new_path="$p/$path"
41582            break
41583          fi
41584        done
41585        IFS="$IFS_save"
41586      else
41587        # This is an absolute path, we can use it without further modifications.
41588        new_path="$path"
41589      fi
41590
41591      if test "x$new_path" = x; then
41592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41593$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41594        has_space=`$ECHO "$complete" | $GREP " "`
41595        if test "x$has_space" != x; then
41596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41598        fi
41599        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41600      fi
41601    fi
41602
41603    # Now join together the path and the arguments once again
41604    if test "x$arguments" != xEOL; then
41605      new_complete="$new_path ${arguments% *}"
41606    else
41607      new_complete="$new_path"
41608    fi
41609
41610    if test "x$complete" != "x$new_complete"; then
41611      STRIP="$new_complete"
41612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41613$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41614    fi
41615  fi
41616
41617    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41618
41619
41620  # Publish this variable in the help.
41621
41622
41623  if [ -z "${NM+x}" ]; then
41624    # The variable is not set by user, try to locate tool using the code snippet
41625    if test -n "$ac_tool_prefix"; then
41626  for ac_prog in nm gcc-nm
41627  do
41628    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41629set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41631$as_echo_n "checking for $ac_word... " >&6; }
41632if ${ac_cv_prog_NM+:} false; then :
41633  $as_echo_n "(cached) " >&6
41634else
41635  if test -n "$NM"; then
41636  ac_cv_prog_NM="$NM" # Let the user override the test.
41637else
41638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41639for as_dir in $PATH
41640do
41641  IFS=$as_save_IFS
41642  test -z "$as_dir" && as_dir=.
41643    for ac_exec_ext in '' $ac_executable_extensions; do
41644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41645    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41647    break 2
41648  fi
41649done
41650  done
41651IFS=$as_save_IFS
41652
41653fi
41654fi
41655NM=$ac_cv_prog_NM
41656if test -n "$NM"; then
41657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41658$as_echo "$NM" >&6; }
41659else
41660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41661$as_echo "no" >&6; }
41662fi
41663
41664
41665    test -n "$NM" && break
41666  done
41667fi
41668if test -z "$NM"; then
41669  ac_ct_NM=$NM
41670  for ac_prog in nm gcc-nm
41671do
41672  # Extract the first word of "$ac_prog", so it can be a program name with args.
41673set dummy $ac_prog; ac_word=$2
41674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41675$as_echo_n "checking for $ac_word... " >&6; }
41676if ${ac_cv_prog_ac_ct_NM+:} false; then :
41677  $as_echo_n "(cached) " >&6
41678else
41679  if test -n "$ac_ct_NM"; then
41680  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41681else
41682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41683for as_dir in $PATH
41684do
41685  IFS=$as_save_IFS
41686  test -z "$as_dir" && as_dir=.
41687    for ac_exec_ext in '' $ac_executable_extensions; do
41688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41689    ac_cv_prog_ac_ct_NM="$ac_prog"
41690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41691    break 2
41692  fi
41693done
41694  done
41695IFS=$as_save_IFS
41696
41697fi
41698fi
41699ac_ct_NM=$ac_cv_prog_ac_ct_NM
41700if test -n "$ac_ct_NM"; then
41701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41702$as_echo "$ac_ct_NM" >&6; }
41703else
41704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41705$as_echo "no" >&6; }
41706fi
41707
41708
41709  test -n "$ac_ct_NM" && break
41710done
41711
41712  if test "x$ac_ct_NM" = x; then
41713    NM=""
41714  else
41715    case $cross_compiling:$ac_tool_warned in
41716yes:)
41717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41719ac_tool_warned=yes ;;
41720esac
41721    NM=$ac_ct_NM
41722  fi
41723fi
41724
41725  else
41726    # The variable is set, but is it from the command line or the environment?
41727
41728    # Try to remove the string !NM! from our list.
41729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41731      # If it failed, the variable was not from the command line. Ignore it,
41732      # but warn the user (except for BASH, which is always set by the calling BASH).
41733      if test "xNM" != xBASH; then
41734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41735$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41736      fi
41737      # Try to locate tool using the code snippet
41738      if test -n "$ac_tool_prefix"; then
41739  for ac_prog in nm gcc-nm
41740  do
41741    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41742set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41744$as_echo_n "checking for $ac_word... " >&6; }
41745if ${ac_cv_prog_NM+:} false; then :
41746  $as_echo_n "(cached) " >&6
41747else
41748  if test -n "$NM"; then
41749  ac_cv_prog_NM="$NM" # Let the user override the test.
41750else
41751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41752for as_dir in $PATH
41753do
41754  IFS=$as_save_IFS
41755  test -z "$as_dir" && as_dir=.
41756    for ac_exec_ext in '' $ac_executable_extensions; do
41757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41758    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41760    break 2
41761  fi
41762done
41763  done
41764IFS=$as_save_IFS
41765
41766fi
41767fi
41768NM=$ac_cv_prog_NM
41769if test -n "$NM"; then
41770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41771$as_echo "$NM" >&6; }
41772else
41773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41774$as_echo "no" >&6; }
41775fi
41776
41777
41778    test -n "$NM" && break
41779  done
41780fi
41781if test -z "$NM"; then
41782  ac_ct_NM=$NM
41783  for ac_prog in nm gcc-nm
41784do
41785  # Extract the first word of "$ac_prog", so it can be a program name with args.
41786set dummy $ac_prog; ac_word=$2
41787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41788$as_echo_n "checking for $ac_word... " >&6; }
41789if ${ac_cv_prog_ac_ct_NM+:} false; then :
41790  $as_echo_n "(cached) " >&6
41791else
41792  if test -n "$ac_ct_NM"; then
41793  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41794else
41795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41796for as_dir in $PATH
41797do
41798  IFS=$as_save_IFS
41799  test -z "$as_dir" && as_dir=.
41800    for ac_exec_ext in '' $ac_executable_extensions; do
41801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41802    ac_cv_prog_ac_ct_NM="$ac_prog"
41803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41804    break 2
41805  fi
41806done
41807  done
41808IFS=$as_save_IFS
41809
41810fi
41811fi
41812ac_ct_NM=$ac_cv_prog_ac_ct_NM
41813if test -n "$ac_ct_NM"; then
41814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41815$as_echo "$ac_ct_NM" >&6; }
41816else
41817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41818$as_echo "no" >&6; }
41819fi
41820
41821
41822  test -n "$ac_ct_NM" && break
41823done
41824
41825  if test "x$ac_ct_NM" = x; then
41826    NM=""
41827  else
41828    case $cross_compiling:$ac_tool_warned in
41829yes:)
41830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41832ac_tool_warned=yes ;;
41833esac
41834    NM=$ac_ct_NM
41835  fi
41836fi
41837
41838    else
41839      # If it succeeded, then it was overridden by the user. We will use it
41840      # for the tool.
41841
41842      # First remove it from the list of overridden variables, so we can test
41843      # for unknown variables in the end.
41844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41845
41846      # Check if we try to supply an empty value
41847      if test "x$NM" = x; then
41848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41849$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41851$as_echo_n "checking for NM... " >&6; }
41852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41853$as_echo "disabled" >&6; }
41854      else
41855        # Check if the provided tool contains a complete path.
41856        tool_specified="$NM"
41857        tool_basename="${tool_specified##*/}"
41858        if test "x$tool_basename" = "x$tool_specified"; then
41859          # A command without a complete path is provided, search $PATH.
41860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41861$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41862          # Extract the first word of "$tool_basename", so it can be a program name with args.
41863set dummy $tool_basename; ac_word=$2
41864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41865$as_echo_n "checking for $ac_word... " >&6; }
41866if ${ac_cv_path_NM+:} false; then :
41867  $as_echo_n "(cached) " >&6
41868else
41869  case $NM in
41870  [\\/]* | ?:[\\/]*)
41871  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41872  ;;
41873  *)
41874  as_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_path_NM="$as_dir/$ac_word$ac_exec_ext"
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
41889  ;;
41890esac
41891fi
41892NM=$ac_cv_path_NM
41893if test -n "$NM"; then
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41895$as_echo "$NM" >&6; }
41896else
41897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41898$as_echo "no" >&6; }
41899fi
41900
41901
41902          if test "x$NM" = x; then
41903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41904          fi
41905        else
41906          # Otherwise we believe it is a complete path. Use it as it is.
41907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41908$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41910$as_echo_n "checking for NM... " >&6; }
41911          if test ! -x "$tool_specified"; then
41912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41913$as_echo "not found" >&6; }
41914            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41915          fi
41916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41917$as_echo "$tool_specified" >&6; }
41918        fi
41919      fi
41920    fi
41921
41922  fi
41923
41924
41925    else
41926
41927
41928  # Publish this variable in the help.
41929
41930
41931  if [ -z "${NM+x}" ]; then
41932    # The variable is not set by user, try to locate tool using the code snippet
41933    if test -n "$ac_tool_prefix"; then
41934  for ac_prog in nm
41935  do
41936    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41937set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41939$as_echo_n "checking for $ac_word... " >&6; }
41940if ${ac_cv_prog_NM+:} false; then :
41941  $as_echo_n "(cached) " >&6
41942else
41943  if test -n "$NM"; then
41944  ac_cv_prog_NM="$NM" # Let the user override the test.
41945else
41946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41947for as_dir in $PATH
41948do
41949  IFS=$as_save_IFS
41950  test -z "$as_dir" && as_dir=.
41951    for ac_exec_ext in '' $ac_executable_extensions; do
41952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41953    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41955    break 2
41956  fi
41957done
41958  done
41959IFS=$as_save_IFS
41960
41961fi
41962fi
41963NM=$ac_cv_prog_NM
41964if test -n "$NM"; then
41965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41966$as_echo "$NM" >&6; }
41967else
41968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41969$as_echo "no" >&6; }
41970fi
41971
41972
41973    test -n "$NM" && break
41974  done
41975fi
41976if test -z "$NM"; then
41977  ac_ct_NM=$NM
41978  for ac_prog in nm
41979do
41980  # Extract the first word of "$ac_prog", so it can be a program name with args.
41981set dummy $ac_prog; ac_word=$2
41982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41983$as_echo_n "checking for $ac_word... " >&6; }
41984if ${ac_cv_prog_ac_ct_NM+:} false; then :
41985  $as_echo_n "(cached) " >&6
41986else
41987  if test -n "$ac_ct_NM"; then
41988  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41989else
41990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41991for as_dir in $PATH
41992do
41993  IFS=$as_save_IFS
41994  test -z "$as_dir" && as_dir=.
41995    for ac_exec_ext in '' $ac_executable_extensions; do
41996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41997    ac_cv_prog_ac_ct_NM="$ac_prog"
41998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41999    break 2
42000  fi
42001done
42002  done
42003IFS=$as_save_IFS
42004
42005fi
42006fi
42007ac_ct_NM=$ac_cv_prog_ac_ct_NM
42008if test -n "$ac_ct_NM"; then
42009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42010$as_echo "$ac_ct_NM" >&6; }
42011else
42012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42013$as_echo "no" >&6; }
42014fi
42015
42016
42017  test -n "$ac_ct_NM" && break
42018done
42019
42020  if test "x$ac_ct_NM" = x; then
42021    NM=""
42022  else
42023    case $cross_compiling:$ac_tool_warned in
42024yes:)
42025{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42026$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42027ac_tool_warned=yes ;;
42028esac
42029    NM=$ac_ct_NM
42030  fi
42031fi
42032
42033  else
42034    # The variable is set, but is it from the command line or the environment?
42035
42036    # Try to remove the string !NM! from our list.
42037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42039      # If it failed, the variable was not from the command line. Ignore it,
42040      # but warn the user (except for BASH, which is always set by the calling BASH).
42041      if test "xNM" != xBASH; then
42042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42043$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42044      fi
42045      # Try to locate tool using the code snippet
42046      if test -n "$ac_tool_prefix"; then
42047  for ac_prog in nm
42048  do
42049    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42050set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42052$as_echo_n "checking for $ac_word... " >&6; }
42053if ${ac_cv_prog_NM+:} false; then :
42054  $as_echo_n "(cached) " >&6
42055else
42056  if test -n "$NM"; then
42057  ac_cv_prog_NM="$NM" # Let the user override the test.
42058else
42059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42060for as_dir in $PATH
42061do
42062  IFS=$as_save_IFS
42063  test -z "$as_dir" && as_dir=.
42064    for ac_exec_ext in '' $ac_executable_extensions; do
42065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42066    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42068    break 2
42069  fi
42070done
42071  done
42072IFS=$as_save_IFS
42073
42074fi
42075fi
42076NM=$ac_cv_prog_NM
42077if test -n "$NM"; then
42078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42079$as_echo "$NM" >&6; }
42080else
42081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42082$as_echo "no" >&6; }
42083fi
42084
42085
42086    test -n "$NM" && break
42087  done
42088fi
42089if test -z "$NM"; then
42090  ac_ct_NM=$NM
42091  for ac_prog in nm
42092do
42093  # Extract the first word of "$ac_prog", so it can be a program name with args.
42094set dummy $ac_prog; ac_word=$2
42095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42096$as_echo_n "checking for $ac_word... " >&6; }
42097if ${ac_cv_prog_ac_ct_NM+:} false; then :
42098  $as_echo_n "(cached) " >&6
42099else
42100  if test -n "$ac_ct_NM"; then
42101  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42102else
42103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42104for as_dir in $PATH
42105do
42106  IFS=$as_save_IFS
42107  test -z "$as_dir" && as_dir=.
42108    for ac_exec_ext in '' $ac_executable_extensions; do
42109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42110    ac_cv_prog_ac_ct_NM="$ac_prog"
42111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42112    break 2
42113  fi
42114done
42115  done
42116IFS=$as_save_IFS
42117
42118fi
42119fi
42120ac_ct_NM=$ac_cv_prog_ac_ct_NM
42121if test -n "$ac_ct_NM"; then
42122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42123$as_echo "$ac_ct_NM" >&6; }
42124else
42125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42126$as_echo "no" >&6; }
42127fi
42128
42129
42130  test -n "$ac_ct_NM" && break
42131done
42132
42133  if test "x$ac_ct_NM" = x; then
42134    NM=""
42135  else
42136    case $cross_compiling:$ac_tool_warned in
42137yes:)
42138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42140ac_tool_warned=yes ;;
42141esac
42142    NM=$ac_ct_NM
42143  fi
42144fi
42145
42146    else
42147      # If it succeeded, then it was overridden by the user. We will use it
42148      # for the tool.
42149
42150      # First remove it from the list of overridden variables, so we can test
42151      # for unknown variables in the end.
42152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42153
42154      # Check if we try to supply an empty value
42155      if test "x$NM" = x; then
42156        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42157$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42159$as_echo_n "checking for NM... " >&6; }
42160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42161$as_echo "disabled" >&6; }
42162      else
42163        # Check if the provided tool contains a complete path.
42164        tool_specified="$NM"
42165        tool_basename="${tool_specified##*/}"
42166        if test "x$tool_basename" = "x$tool_specified"; then
42167          # A command without a complete path is provided, search $PATH.
42168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42169$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42170          # Extract the first word of "$tool_basename", so it can be a program name with args.
42171set dummy $tool_basename; ac_word=$2
42172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42173$as_echo_n "checking for $ac_word... " >&6; }
42174if ${ac_cv_path_NM+:} false; then :
42175  $as_echo_n "(cached) " >&6
42176else
42177  case $NM in
42178  [\\/]* | ?:[\\/]*)
42179  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42180  ;;
42181  *)
42182  as_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_path_NM="$as_dir/$ac_word$ac_exec_ext"
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
42197  ;;
42198esac
42199fi
42200NM=$ac_cv_path_NM
42201if test -n "$NM"; then
42202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42203$as_echo "$NM" >&6; }
42204else
42205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42206$as_echo "no" >&6; }
42207fi
42208
42209
42210          if test "x$NM" = x; then
42211            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42212          fi
42213        else
42214          # Otherwise we believe it is a complete path. Use it as it is.
42215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42216$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42217          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42218$as_echo_n "checking for NM... " >&6; }
42219          if test ! -x "$tool_specified"; then
42220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42221$as_echo "not found" >&6; }
42222            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42223          fi
42224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42225$as_echo "$tool_specified" >&6; }
42226        fi
42227      fi
42228    fi
42229
42230  fi
42231
42232
42233    fi
42234
42235  # Only process if variable expands to non-empty
42236
42237  if test "x$NM" != x; then
42238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42239
42240  # First separate the path from the arguments. This will split at the first
42241  # space.
42242  complete="$NM"
42243  path="${complete%% *}"
42244  tmp="$complete EOL"
42245  arguments="${tmp#* }"
42246
42247  # Input might be given as Windows format, start by converting to
42248  # unix format.
42249  new_path=`$CYGPATH -u "$path"`
42250
42251  # Now try to locate executable using which
42252  new_path=`$WHICH "$new_path" 2> /dev/null`
42253  # bat and cmd files are not always considered executable in cygwin causing which
42254  # to not find them
42255  if test "x$new_path" = x \
42256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42258    new_path=`$CYGPATH -u "$path"`
42259  fi
42260  if test "x$new_path" = x; then
42261    # Oops. Which didn't find the executable.
42262    # The splitting of arguments from the executable at a space might have been incorrect,
42263    # since paths with space are more likely in Windows. Give it another try with the whole
42264    # argument.
42265    path="$complete"
42266    arguments="EOL"
42267    new_path=`$CYGPATH -u "$path"`
42268    new_path=`$WHICH "$new_path" 2> /dev/null`
42269    # bat and cmd files are not always considered executable in cygwin causing which
42270    # to not find them
42271    if test "x$new_path" = x \
42272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42274      new_path=`$CYGPATH -u "$path"`
42275    fi
42276    if test "x$new_path" = x; then
42277      # It's still not found. Now this is an unrecoverable error.
42278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42279$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42280      has_space=`$ECHO "$complete" | $GREP " "`
42281      if test "x$has_space" != x; then
42282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42284      fi
42285      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42286    fi
42287  fi
42288
42289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42292  # "foo.exe" is OK but "foo" is an error.
42293  #
42294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42295  # It is also a way to make sure we got the proper file name for the real test later on.
42296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42297  if test "x$test_shortpath" = x; then
42298    # Short path failed, file does not exist as specified.
42299    # Try adding .exe or .cmd
42300    if test -f "${new_path}.exe"; then
42301      input_to_shortpath="${new_path}.exe"
42302    elif test -f "${new_path}.cmd"; then
42303      input_to_shortpath="${new_path}.cmd"
42304    else
42305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42306$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42309      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42310    fi
42311  else
42312    input_to_shortpath="$new_path"
42313  fi
42314
42315  # Call helper function which possibly converts this using DOS-style short mode.
42316  # If so, the updated path is stored in $new_path.
42317  new_path="$input_to_shortpath"
42318
42319  input_path="$input_to_shortpath"
42320  # Check if we need to convert this using DOS-style short mode. If the path
42321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42322  # take no chances and rewrite it.
42323  # Note: m4 eats our [], so we need to use [ and ] instead.
42324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42325  if test "x$has_forbidden_chars" != x; then
42326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42330      # Going to short mode and back again did indeed matter. Since short mode is
42331      # case insensitive, let's make it lowercase to improve readability.
42332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42333      # Now convert it back to Unix-style (cygpath)
42334      input_path=`$CYGPATH -u "$shortmode_path"`
42335      new_path="$input_path"
42336    fi
42337  fi
42338
42339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42340  if test "x$test_cygdrive_prefix" = x; then
42341    # As a simple fix, exclude /usr/bin since it's not a real path.
42342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42344      # a path prefixed by /cygdrive for fixpath to work.
42345      new_path="$CYGWIN_ROOT_PATH$input_path"
42346    fi
42347  fi
42348
42349  # remove trailing .exe if any
42350  new_path="${new_path/%.exe/}"
42351
42352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42353
42354  # First separate the path from the arguments. This will split at the first
42355  # space.
42356  complete="$NM"
42357  path="${complete%% *}"
42358  tmp="$complete EOL"
42359  arguments="${tmp#* }"
42360
42361  # Input might be given as Windows format, start by converting to
42362  # unix format.
42363  new_path="$path"
42364
42365  windows_path="$new_path"
42366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42367    unix_path=`$CYGPATH -u "$windows_path"`
42368    new_path="$unix_path"
42369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42371    new_path="$unix_path"
42372  fi
42373
42374
42375  # Now try to locate executable using which
42376  new_path=`$WHICH "$new_path" 2> /dev/null`
42377
42378  if test "x$new_path" = x; then
42379    # Oops. Which didn't find the executable.
42380    # The splitting of arguments from the executable at a space might have been incorrect,
42381    # since paths with space are more likely in Windows. Give it another try with the whole
42382    # argument.
42383    path="$complete"
42384    arguments="EOL"
42385    new_path="$path"
42386
42387  windows_path="$new_path"
42388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42389    unix_path=`$CYGPATH -u "$windows_path"`
42390    new_path="$unix_path"
42391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42393    new_path="$unix_path"
42394  fi
42395
42396
42397    new_path=`$WHICH "$new_path" 2> /dev/null`
42398    # bat and cmd files are not always considered executable in MSYS causing which
42399    # to not find them
42400    if test "x$new_path" = x \
42401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42403      new_path="$path"
42404
42405  windows_path="$new_path"
42406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42407    unix_path=`$CYGPATH -u "$windows_path"`
42408    new_path="$unix_path"
42409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42411    new_path="$unix_path"
42412  fi
42413
42414    fi
42415
42416    if test "x$new_path" = x; then
42417      # It's still not found. Now this is an unrecoverable error.
42418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42419$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42420      has_space=`$ECHO "$complete" | $GREP " "`
42421      if test "x$has_space" != x; then
42422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42424      fi
42425      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42426    fi
42427  fi
42428
42429  # Now new_path has a complete unix path to the binary
42430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42431    # Keep paths in /bin as-is, but remove trailing .exe if any
42432    new_path="${new_path/%.exe/}"
42433    # Do not save /bin paths to all_fixpath_prefixes!
42434  else
42435    # Not in mixed or Windows style, start by that.
42436    new_path=`cmd //c echo $new_path`
42437
42438  input_path="$new_path"
42439  # Check if we need to convert this using DOS-style short mode. If the path
42440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42441  # take no chances and rewrite it.
42442  # Note: m4 eats our [], so we need to use [ and ] instead.
42443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42444  if test "x$has_forbidden_chars" != x; then
42445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42447  fi
42448
42449    # Output is in $new_path
42450
42451  windows_path="$new_path"
42452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42453    unix_path=`$CYGPATH -u "$windows_path"`
42454    new_path="$unix_path"
42455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42457    new_path="$unix_path"
42458  fi
42459
42460    # remove trailing .exe if any
42461    new_path="${new_path/%.exe/}"
42462
42463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42465  fi
42466
42467    else
42468      # We're on a unix platform. Hooray! :)
42469      # First separate the path from the arguments. This will split at the first
42470      # space.
42471      complete="$NM"
42472      path="${complete%% *}"
42473      tmp="$complete EOL"
42474      arguments="${tmp#* }"
42475
42476      # Cannot rely on the command "which" here since it doesn't always work.
42477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42478      if test -z "$is_absolute_path"; then
42479        # Path to executable is not absolute. Find it.
42480        IFS_save="$IFS"
42481        IFS=:
42482        for p in $PATH; do
42483          if test -f "$p/$path" && test -x "$p/$path"; then
42484            new_path="$p/$path"
42485            break
42486          fi
42487        done
42488        IFS="$IFS_save"
42489      else
42490        # This is an absolute path, we can use it without further modifications.
42491        new_path="$path"
42492      fi
42493
42494      if test "x$new_path" = x; then
42495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42496$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42497        has_space=`$ECHO "$complete" | $GREP " "`
42498        if test "x$has_space" != x; then
42499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42501        fi
42502        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42503      fi
42504    fi
42505
42506    # Now join together the path and the arguments once again
42507    if test "x$arguments" != xEOL; then
42508      new_complete="$new_path ${arguments% *}"
42509    else
42510      new_complete="$new_path"
42511    fi
42512
42513    if test "x$complete" != "x$new_complete"; then
42514      NM="$new_complete"
42515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42516$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42517    fi
42518  fi
42519
42520    GNM="$NM"
42521
42522  fi
42523
42524  # objcopy is used for moving debug symbols to separate files when
42525  # full debug symbols are enabled.
42526  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42527
42528
42529  # Publish this variable in the help.
42530
42531
42532  if [ -z "${OBJCOPY+x}" ]; then
42533    # The variable is not set by user, try to locate tool using the code snippet
42534    if test -n "$ac_tool_prefix"; then
42535  for ac_prog in gobjcopy objcopy
42536  do
42537    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42538set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42540$as_echo_n "checking for $ac_word... " >&6; }
42541if ${ac_cv_prog_OBJCOPY+:} false; then :
42542  $as_echo_n "(cached) " >&6
42543else
42544  if test -n "$OBJCOPY"; then
42545  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42546else
42547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42548for as_dir in $PATH
42549do
42550  IFS=$as_save_IFS
42551  test -z "$as_dir" && as_dir=.
42552    for ac_exec_ext in '' $ac_executable_extensions; do
42553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42554    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42556    break 2
42557  fi
42558done
42559  done
42560IFS=$as_save_IFS
42561
42562fi
42563fi
42564OBJCOPY=$ac_cv_prog_OBJCOPY
42565if test -n "$OBJCOPY"; then
42566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42567$as_echo "$OBJCOPY" >&6; }
42568else
42569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42570$as_echo "no" >&6; }
42571fi
42572
42573
42574    test -n "$OBJCOPY" && break
42575  done
42576fi
42577if test -z "$OBJCOPY"; then
42578  ac_ct_OBJCOPY=$OBJCOPY
42579  for ac_prog in gobjcopy objcopy
42580do
42581  # Extract the first word of "$ac_prog", so it can be a program name with args.
42582set dummy $ac_prog; ac_word=$2
42583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42584$as_echo_n "checking for $ac_word... " >&6; }
42585if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42586  $as_echo_n "(cached) " >&6
42587else
42588  if test -n "$ac_ct_OBJCOPY"; then
42589  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42590else
42591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42592for as_dir in $PATH
42593do
42594  IFS=$as_save_IFS
42595  test -z "$as_dir" && as_dir=.
42596    for ac_exec_ext in '' $ac_executable_extensions; do
42597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42598    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42600    break 2
42601  fi
42602done
42603  done
42604IFS=$as_save_IFS
42605
42606fi
42607fi
42608ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42609if test -n "$ac_ct_OBJCOPY"; then
42610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42611$as_echo "$ac_ct_OBJCOPY" >&6; }
42612else
42613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42614$as_echo "no" >&6; }
42615fi
42616
42617
42618  test -n "$ac_ct_OBJCOPY" && break
42619done
42620
42621  if test "x$ac_ct_OBJCOPY" = x; then
42622    OBJCOPY=""
42623  else
42624    case $cross_compiling:$ac_tool_warned in
42625yes:)
42626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42628ac_tool_warned=yes ;;
42629esac
42630    OBJCOPY=$ac_ct_OBJCOPY
42631  fi
42632fi
42633
42634  else
42635    # The variable is set, but is it from the command line or the environment?
42636
42637    # Try to remove the string !OBJCOPY! from our list.
42638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42640      # If it failed, the variable was not from the command line. Ignore it,
42641      # but warn the user (except for BASH, which is always set by the calling BASH).
42642      if test "xOBJCOPY" != xBASH; then
42643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42644$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42645      fi
42646      # Try to locate tool using the code snippet
42647      if test -n "$ac_tool_prefix"; then
42648  for ac_prog in gobjcopy objcopy
42649  do
42650    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42651set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42653$as_echo_n "checking for $ac_word... " >&6; }
42654if ${ac_cv_prog_OBJCOPY+:} false; then :
42655  $as_echo_n "(cached) " >&6
42656else
42657  if test -n "$OBJCOPY"; then
42658  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42659else
42660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42661for as_dir in $PATH
42662do
42663  IFS=$as_save_IFS
42664  test -z "$as_dir" && as_dir=.
42665    for ac_exec_ext in '' $ac_executable_extensions; do
42666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42667    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42669    break 2
42670  fi
42671done
42672  done
42673IFS=$as_save_IFS
42674
42675fi
42676fi
42677OBJCOPY=$ac_cv_prog_OBJCOPY
42678if test -n "$OBJCOPY"; then
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42680$as_echo "$OBJCOPY" >&6; }
42681else
42682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42683$as_echo "no" >&6; }
42684fi
42685
42686
42687    test -n "$OBJCOPY" && break
42688  done
42689fi
42690if test -z "$OBJCOPY"; then
42691  ac_ct_OBJCOPY=$OBJCOPY
42692  for ac_prog in gobjcopy objcopy
42693do
42694  # Extract the first word of "$ac_prog", so it can be a program name with args.
42695set dummy $ac_prog; ac_word=$2
42696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42697$as_echo_n "checking for $ac_word... " >&6; }
42698if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42699  $as_echo_n "(cached) " >&6
42700else
42701  if test -n "$ac_ct_OBJCOPY"; then
42702  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42703else
42704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42705for as_dir in $PATH
42706do
42707  IFS=$as_save_IFS
42708  test -z "$as_dir" && as_dir=.
42709    for ac_exec_ext in '' $ac_executable_extensions; do
42710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42711    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42713    break 2
42714  fi
42715done
42716  done
42717IFS=$as_save_IFS
42718
42719fi
42720fi
42721ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42722if test -n "$ac_ct_OBJCOPY"; then
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42724$as_echo "$ac_ct_OBJCOPY" >&6; }
42725else
42726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42727$as_echo "no" >&6; }
42728fi
42729
42730
42731  test -n "$ac_ct_OBJCOPY" && break
42732done
42733
42734  if test "x$ac_ct_OBJCOPY" = x; then
42735    OBJCOPY=""
42736  else
42737    case $cross_compiling:$ac_tool_warned in
42738yes:)
42739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42741ac_tool_warned=yes ;;
42742esac
42743    OBJCOPY=$ac_ct_OBJCOPY
42744  fi
42745fi
42746
42747    else
42748      # If it succeeded, then it was overridden by the user. We will use it
42749      # for the tool.
42750
42751      # First remove it from the list of overridden variables, so we can test
42752      # for unknown variables in the end.
42753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42754
42755      # Check if we try to supply an empty value
42756      if test "x$OBJCOPY" = x; then
42757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42758$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42760$as_echo_n "checking for OBJCOPY... " >&6; }
42761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42762$as_echo "disabled" >&6; }
42763      else
42764        # Check if the provided tool contains a complete path.
42765        tool_specified="$OBJCOPY"
42766        tool_basename="${tool_specified##*/}"
42767        if test "x$tool_basename" = "x$tool_specified"; then
42768          # A command without a complete path is provided, search $PATH.
42769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42770$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42771          # Extract the first word of "$tool_basename", so it can be a program name with args.
42772set dummy $tool_basename; ac_word=$2
42773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42774$as_echo_n "checking for $ac_word... " >&6; }
42775if ${ac_cv_path_OBJCOPY+:} false; then :
42776  $as_echo_n "(cached) " >&6
42777else
42778  case $OBJCOPY in
42779  [\\/]* | ?:[\\/]*)
42780  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42781  ;;
42782  *)
42783  as_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_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
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
42798  ;;
42799esac
42800fi
42801OBJCOPY=$ac_cv_path_OBJCOPY
42802if test -n "$OBJCOPY"; then
42803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42804$as_echo "$OBJCOPY" >&6; }
42805else
42806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42807$as_echo "no" >&6; }
42808fi
42809
42810
42811          if test "x$OBJCOPY" = x; then
42812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42813          fi
42814        else
42815          # Otherwise we believe it is a complete path. Use it as it is.
42816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42817$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42819$as_echo_n "checking for OBJCOPY... " >&6; }
42820          if test ! -x "$tool_specified"; then
42821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42822$as_echo "not found" >&6; }
42823            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42824          fi
42825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42826$as_echo "$tool_specified" >&6; }
42827        fi
42828      fi
42829    fi
42830
42831  fi
42832
42833
42834    # Only call fixup if objcopy was found.
42835    if test -n "$OBJCOPY"; then
42836
42837  # Only process if variable expands to non-empty
42838
42839  if test "x$OBJCOPY" != x; then
42840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42841
42842  # First separate the path from the arguments. This will split at the first
42843  # space.
42844  complete="$OBJCOPY"
42845  path="${complete%% *}"
42846  tmp="$complete EOL"
42847  arguments="${tmp#* }"
42848
42849  # Input might be given as Windows format, start by converting to
42850  # unix format.
42851  new_path=`$CYGPATH -u "$path"`
42852
42853  # Now try to locate executable using which
42854  new_path=`$WHICH "$new_path" 2> /dev/null`
42855  # bat and cmd files are not always considered executable in cygwin causing which
42856  # to not find them
42857  if test "x$new_path" = x \
42858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42860    new_path=`$CYGPATH -u "$path"`
42861  fi
42862  if test "x$new_path" = x; then
42863    # Oops. Which didn't find the executable.
42864    # The splitting of arguments from the executable at a space might have been incorrect,
42865    # since paths with space are more likely in Windows. Give it another try with the whole
42866    # argument.
42867    path="$complete"
42868    arguments="EOL"
42869    new_path=`$CYGPATH -u "$path"`
42870    new_path=`$WHICH "$new_path" 2> /dev/null`
42871    # bat and cmd files are not always considered executable in cygwin causing which
42872    # to not find them
42873    if test "x$new_path" = x \
42874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42876      new_path=`$CYGPATH -u "$path"`
42877    fi
42878    if test "x$new_path" = x; then
42879      # It's still not found. Now this is an unrecoverable error.
42880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42881$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42882      has_space=`$ECHO "$complete" | $GREP " "`
42883      if test "x$has_space" != x; then
42884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42886      fi
42887      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42888    fi
42889  fi
42890
42891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42894  # "foo.exe" is OK but "foo" is an error.
42895  #
42896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42897  # It is also a way to make sure we got the proper file name for the real test later on.
42898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42899  if test "x$test_shortpath" = x; then
42900    # Short path failed, file does not exist as specified.
42901    # Try adding .exe or .cmd
42902    if test -f "${new_path}.exe"; then
42903      input_to_shortpath="${new_path}.exe"
42904    elif test -f "${new_path}.cmd"; then
42905      input_to_shortpath="${new_path}.cmd"
42906    else
42907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42908$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42911      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42912    fi
42913  else
42914    input_to_shortpath="$new_path"
42915  fi
42916
42917  # Call helper function which possibly converts this using DOS-style short mode.
42918  # If so, the updated path is stored in $new_path.
42919  new_path="$input_to_shortpath"
42920
42921  input_path="$input_to_shortpath"
42922  # Check if we need to convert this using DOS-style short mode. If the path
42923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42924  # take no chances and rewrite it.
42925  # Note: m4 eats our [], so we need to use [ and ] instead.
42926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42927  if test "x$has_forbidden_chars" != x; then
42928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42932      # Going to short mode and back again did indeed matter. Since short mode is
42933      # case insensitive, let's make it lowercase to improve readability.
42934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42935      # Now convert it back to Unix-style (cygpath)
42936      input_path=`$CYGPATH -u "$shortmode_path"`
42937      new_path="$input_path"
42938    fi
42939  fi
42940
42941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42942  if test "x$test_cygdrive_prefix" = x; then
42943    # As a simple fix, exclude /usr/bin since it's not a real path.
42944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42946      # a path prefixed by /cygdrive for fixpath to work.
42947      new_path="$CYGWIN_ROOT_PATH$input_path"
42948    fi
42949  fi
42950
42951  # remove trailing .exe if any
42952  new_path="${new_path/%.exe/}"
42953
42954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42955
42956  # First separate the path from the arguments. This will split at the first
42957  # space.
42958  complete="$OBJCOPY"
42959  path="${complete%% *}"
42960  tmp="$complete EOL"
42961  arguments="${tmp#* }"
42962
42963  # Input might be given as Windows format, start by converting to
42964  # unix format.
42965  new_path="$path"
42966
42967  windows_path="$new_path"
42968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42969    unix_path=`$CYGPATH -u "$windows_path"`
42970    new_path="$unix_path"
42971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42973    new_path="$unix_path"
42974  fi
42975
42976
42977  # Now try to locate executable using which
42978  new_path=`$WHICH "$new_path" 2> /dev/null`
42979
42980  if test "x$new_path" = x; then
42981    # Oops. Which didn't find the executable.
42982    # The splitting of arguments from the executable at a space might have been incorrect,
42983    # since paths with space are more likely in Windows. Give it another try with the whole
42984    # argument.
42985    path="$complete"
42986    arguments="EOL"
42987    new_path="$path"
42988
42989  windows_path="$new_path"
42990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42991    unix_path=`$CYGPATH -u "$windows_path"`
42992    new_path="$unix_path"
42993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42995    new_path="$unix_path"
42996  fi
42997
42998
42999    new_path=`$WHICH "$new_path" 2> /dev/null`
43000    # bat and cmd files are not always considered executable in MSYS causing which
43001    # to not find them
43002    if test "x$new_path" = x \
43003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43005      new_path="$path"
43006
43007  windows_path="$new_path"
43008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43009    unix_path=`$CYGPATH -u "$windows_path"`
43010    new_path="$unix_path"
43011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43013    new_path="$unix_path"
43014  fi
43015
43016    fi
43017
43018    if test "x$new_path" = x; then
43019      # It's still not found. Now this is an unrecoverable error.
43020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43021$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43022      has_space=`$ECHO "$complete" | $GREP " "`
43023      if test "x$has_space" != x; then
43024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43026      fi
43027      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43028    fi
43029  fi
43030
43031  # Now new_path has a complete unix path to the binary
43032  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43033    # Keep paths in /bin as-is, but remove trailing .exe if any
43034    new_path="${new_path/%.exe/}"
43035    # Do not save /bin paths to all_fixpath_prefixes!
43036  else
43037    # Not in mixed or Windows style, start by that.
43038    new_path=`cmd //c echo $new_path`
43039
43040  input_path="$new_path"
43041  # Check if we need to convert this using DOS-style short mode. If the path
43042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43043  # take no chances and rewrite it.
43044  # Note: m4 eats our [], so we need to use [ and ] instead.
43045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43046  if test "x$has_forbidden_chars" != x; then
43047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43049  fi
43050
43051    # Output is in $new_path
43052
43053  windows_path="$new_path"
43054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43055    unix_path=`$CYGPATH -u "$windows_path"`
43056    new_path="$unix_path"
43057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43059    new_path="$unix_path"
43060  fi
43061
43062    # remove trailing .exe if any
43063    new_path="${new_path/%.exe/}"
43064
43065    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43066    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43067  fi
43068
43069    else
43070      # We're on a unix platform. Hooray! :)
43071      # First separate the path from the arguments. This will split at the first
43072      # space.
43073      complete="$OBJCOPY"
43074      path="${complete%% *}"
43075      tmp="$complete EOL"
43076      arguments="${tmp#* }"
43077
43078      # Cannot rely on the command "which" here since it doesn't always work.
43079      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43080      if test -z "$is_absolute_path"; then
43081        # Path to executable is not absolute. Find it.
43082        IFS_save="$IFS"
43083        IFS=:
43084        for p in $PATH; do
43085          if test -f "$p/$path" && test -x "$p/$path"; then
43086            new_path="$p/$path"
43087            break
43088          fi
43089        done
43090        IFS="$IFS_save"
43091      else
43092        # This is an absolute path, we can use it without further modifications.
43093        new_path="$path"
43094      fi
43095
43096      if test "x$new_path" = x; then
43097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43098$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43099        has_space=`$ECHO "$complete" | $GREP " "`
43100        if test "x$has_space" != x; then
43101          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43103        fi
43104        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43105      fi
43106    fi
43107
43108    # Now join together the path and the arguments once again
43109    if test "x$arguments" != xEOL; then
43110      new_complete="$new_path ${arguments% *}"
43111    else
43112      new_complete="$new_path"
43113    fi
43114
43115    if test "x$complete" != "x$new_complete"; then
43116      OBJCOPY="$new_complete"
43117      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43118$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43119    fi
43120  fi
43121
43122      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43123        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43124        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43125        # - version number is last blank separate word on first line
43126        # - version number formats that have been seen:
43127        #   - <major>.<minor>
43128        #   - <major>.<minor>.<micro>
43129        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43130        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43131         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43132              -e 's/.* //' \
43133              -e '/^[01]\./b bad' \
43134              -e '/^2\./{' \
43135              -e '  s/^2\.//' \
43136              -e '  /^[0-9]$/b bad' \
43137              -e '  /^[0-9]\./b bad' \
43138              -e '  /^1[0-9]$/b bad' \
43139              -e '  /^1[0-9]\./b bad' \
43140              -e '  /^20\./b bad' \
43141              -e '  /^21\.0$/b bad' \
43142              -e '  /^21\.0\./b bad' \
43143              -e '}' \
43144              -e ':good' \
43145              -e 's/.*/VALID_VERSION/p' \
43146              -e 'q' \
43147              -e ':bad' \
43148              -e 's/.*/BAD_VERSION/p' \
43149              -e 'q'`
43150        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43151          OBJCOPY=
43152          { $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
43153$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43154          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43155$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43156          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43157$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43158          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43159$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43160          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43161$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43162        fi
43163      fi
43164    fi
43165  fi
43166
43167
43168
43169  # Publish this variable in the help.
43170
43171
43172  if [ -z "${OBJDUMP+x}" ]; then
43173    # The variable is not set by user, try to locate tool using the code snippet
43174    if test -n "$ac_tool_prefix"; then
43175  for ac_prog in gobjdump objdump
43176  do
43177    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43180$as_echo_n "checking for $ac_word... " >&6; }
43181if ${ac_cv_prog_OBJDUMP+:} false; then :
43182  $as_echo_n "(cached) " >&6
43183else
43184  if test -n "$OBJDUMP"; then
43185  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43186else
43187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43188for as_dir in $PATH
43189do
43190  IFS=$as_save_IFS
43191  test -z "$as_dir" && as_dir=.
43192    for ac_exec_ext in '' $ac_executable_extensions; do
43193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43194    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43196    break 2
43197  fi
43198done
43199  done
43200IFS=$as_save_IFS
43201
43202fi
43203fi
43204OBJDUMP=$ac_cv_prog_OBJDUMP
43205if test -n "$OBJDUMP"; then
43206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43207$as_echo "$OBJDUMP" >&6; }
43208else
43209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43210$as_echo "no" >&6; }
43211fi
43212
43213
43214    test -n "$OBJDUMP" && break
43215  done
43216fi
43217if test -z "$OBJDUMP"; then
43218  ac_ct_OBJDUMP=$OBJDUMP
43219  for ac_prog in gobjdump objdump
43220do
43221  # Extract the first word of "$ac_prog", so it can be a program name with args.
43222set dummy $ac_prog; ac_word=$2
43223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43224$as_echo_n "checking for $ac_word... " >&6; }
43225if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43226  $as_echo_n "(cached) " >&6
43227else
43228  if test -n "$ac_ct_OBJDUMP"; then
43229  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43230else
43231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43232for as_dir in $PATH
43233do
43234  IFS=$as_save_IFS
43235  test -z "$as_dir" && as_dir=.
43236    for ac_exec_ext in '' $ac_executable_extensions; do
43237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43238    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43240    break 2
43241  fi
43242done
43243  done
43244IFS=$as_save_IFS
43245
43246fi
43247fi
43248ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43249if test -n "$ac_ct_OBJDUMP"; then
43250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43251$as_echo "$ac_ct_OBJDUMP" >&6; }
43252else
43253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43254$as_echo "no" >&6; }
43255fi
43256
43257
43258  test -n "$ac_ct_OBJDUMP" && break
43259done
43260
43261  if test "x$ac_ct_OBJDUMP" = x; then
43262    OBJDUMP=""
43263  else
43264    case $cross_compiling:$ac_tool_warned in
43265yes:)
43266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43268ac_tool_warned=yes ;;
43269esac
43270    OBJDUMP=$ac_ct_OBJDUMP
43271  fi
43272fi
43273
43274  else
43275    # The variable is set, but is it from the command line or the environment?
43276
43277    # Try to remove the string !OBJDUMP! from our list.
43278    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43279    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43280      # If it failed, the variable was not from the command line. Ignore it,
43281      # but warn the user (except for BASH, which is always set by the calling BASH).
43282      if test "xOBJDUMP" != xBASH; then
43283        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43284$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43285      fi
43286      # Try to locate tool using the code snippet
43287      if test -n "$ac_tool_prefix"; then
43288  for ac_prog in gobjdump objdump
43289  do
43290    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43291set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43293$as_echo_n "checking for $ac_word... " >&6; }
43294if ${ac_cv_prog_OBJDUMP+:} false; then :
43295  $as_echo_n "(cached) " >&6
43296else
43297  if test -n "$OBJDUMP"; then
43298  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43299else
43300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43301for as_dir in $PATH
43302do
43303  IFS=$as_save_IFS
43304  test -z "$as_dir" && as_dir=.
43305    for ac_exec_ext in '' $ac_executable_extensions; do
43306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43307    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43309    break 2
43310  fi
43311done
43312  done
43313IFS=$as_save_IFS
43314
43315fi
43316fi
43317OBJDUMP=$ac_cv_prog_OBJDUMP
43318if test -n "$OBJDUMP"; then
43319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43320$as_echo "$OBJDUMP" >&6; }
43321else
43322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43323$as_echo "no" >&6; }
43324fi
43325
43326
43327    test -n "$OBJDUMP" && break
43328  done
43329fi
43330if test -z "$OBJDUMP"; then
43331  ac_ct_OBJDUMP=$OBJDUMP
43332  for ac_prog in gobjdump objdump
43333do
43334  # Extract the first word of "$ac_prog", so it can be a program name with args.
43335set dummy $ac_prog; ac_word=$2
43336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43337$as_echo_n "checking for $ac_word... " >&6; }
43338if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43339  $as_echo_n "(cached) " >&6
43340else
43341  if test -n "$ac_ct_OBJDUMP"; then
43342  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43343else
43344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43345for as_dir in $PATH
43346do
43347  IFS=$as_save_IFS
43348  test -z "$as_dir" && as_dir=.
43349    for ac_exec_ext in '' $ac_executable_extensions; do
43350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43351    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43353    break 2
43354  fi
43355done
43356  done
43357IFS=$as_save_IFS
43358
43359fi
43360fi
43361ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43362if test -n "$ac_ct_OBJDUMP"; then
43363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43364$as_echo "$ac_ct_OBJDUMP" >&6; }
43365else
43366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43367$as_echo "no" >&6; }
43368fi
43369
43370
43371  test -n "$ac_ct_OBJDUMP" && break
43372done
43373
43374  if test "x$ac_ct_OBJDUMP" = x; then
43375    OBJDUMP=""
43376  else
43377    case $cross_compiling:$ac_tool_warned in
43378yes:)
43379{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43380$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43381ac_tool_warned=yes ;;
43382esac
43383    OBJDUMP=$ac_ct_OBJDUMP
43384  fi
43385fi
43386
43387    else
43388      # If it succeeded, then it was overridden by the user. We will use it
43389      # for the tool.
43390
43391      # First remove it from the list of overridden variables, so we can test
43392      # for unknown variables in the end.
43393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43394
43395      # Check if we try to supply an empty value
43396      if test "x$OBJDUMP" = x; then
43397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43398$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43400$as_echo_n "checking for OBJDUMP... " >&6; }
43401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43402$as_echo "disabled" >&6; }
43403      else
43404        # Check if the provided tool contains a complete path.
43405        tool_specified="$OBJDUMP"
43406        tool_basename="${tool_specified##*/}"
43407        if test "x$tool_basename" = "x$tool_specified"; then
43408          # A command without a complete path is provided, search $PATH.
43409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43410$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43411          # Extract the first word of "$tool_basename", so it can be a program name with args.
43412set dummy $tool_basename; ac_word=$2
43413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43414$as_echo_n "checking for $ac_word... " >&6; }
43415if ${ac_cv_path_OBJDUMP+:} false; then :
43416  $as_echo_n "(cached) " >&6
43417else
43418  case $OBJDUMP in
43419  [\\/]* | ?:[\\/]*)
43420  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43421  ;;
43422  *)
43423  as_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_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
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
43438  ;;
43439esac
43440fi
43441OBJDUMP=$ac_cv_path_OBJDUMP
43442if test -n "$OBJDUMP"; then
43443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43444$as_echo "$OBJDUMP" >&6; }
43445else
43446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43447$as_echo "no" >&6; }
43448fi
43449
43450
43451          if test "x$OBJDUMP" = x; then
43452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43453          fi
43454        else
43455          # Otherwise we believe it is a complete path. Use it as it is.
43456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43457$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43459$as_echo_n "checking for OBJDUMP... " >&6; }
43460          if test ! -x "$tool_specified"; then
43461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43462$as_echo "not found" >&6; }
43463            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43464          fi
43465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43466$as_echo "$tool_specified" >&6; }
43467        fi
43468      fi
43469    fi
43470
43471  fi
43472
43473
43474  if test "x$OBJDUMP" != x; then
43475    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43476    # bails if argument is missing.
43477
43478  # Only process if variable expands to non-empty
43479
43480  if test "x$OBJDUMP" != x; then
43481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43482
43483  # First separate the path from the arguments. This will split at the first
43484  # space.
43485  complete="$OBJDUMP"
43486  path="${complete%% *}"
43487  tmp="$complete EOL"
43488  arguments="${tmp#* }"
43489
43490  # Input might be given as Windows format, start by converting to
43491  # unix format.
43492  new_path=`$CYGPATH -u "$path"`
43493
43494  # Now try to locate executable using which
43495  new_path=`$WHICH "$new_path" 2> /dev/null`
43496  # bat and cmd files are not always considered executable in cygwin causing which
43497  # to not find them
43498  if test "x$new_path" = x \
43499      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43500      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43501    new_path=`$CYGPATH -u "$path"`
43502  fi
43503  if test "x$new_path" = x; then
43504    # Oops. Which didn't find the executable.
43505    # The splitting of arguments from the executable at a space might have been incorrect,
43506    # since paths with space are more likely in Windows. Give it another try with the whole
43507    # argument.
43508    path="$complete"
43509    arguments="EOL"
43510    new_path=`$CYGPATH -u "$path"`
43511    new_path=`$WHICH "$new_path" 2> /dev/null`
43512    # bat and cmd files are not always considered executable in cygwin causing which
43513    # to not find them
43514    if test "x$new_path" = x \
43515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43517      new_path=`$CYGPATH -u "$path"`
43518    fi
43519    if test "x$new_path" = x; then
43520      # It's still not found. Now this is an unrecoverable error.
43521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43522$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43523      has_space=`$ECHO "$complete" | $GREP " "`
43524      if test "x$has_space" != x; then
43525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43527      fi
43528      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43529    fi
43530  fi
43531
43532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43535  # "foo.exe" is OK but "foo" is an error.
43536  #
43537  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43538  # It is also a way to make sure we got the proper file name for the real test later on.
43539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43540  if test "x$test_shortpath" = x; then
43541    # Short path failed, file does not exist as specified.
43542    # Try adding .exe or .cmd
43543    if test -f "${new_path}.exe"; then
43544      input_to_shortpath="${new_path}.exe"
43545    elif test -f "${new_path}.cmd"; then
43546      input_to_shortpath="${new_path}.cmd"
43547    else
43548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43549$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43550      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43551$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43552      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43553    fi
43554  else
43555    input_to_shortpath="$new_path"
43556  fi
43557
43558  # Call helper function which possibly converts this using DOS-style short mode.
43559  # If so, the updated path is stored in $new_path.
43560  new_path="$input_to_shortpath"
43561
43562  input_path="$input_to_shortpath"
43563  # Check if we need to convert this using DOS-style short mode. If the path
43564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43565  # take no chances and rewrite it.
43566  # Note: m4 eats our [], so we need to use [ and ] instead.
43567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43568  if test "x$has_forbidden_chars" != x; then
43569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43573      # Going to short mode and back again did indeed matter. Since short mode is
43574      # case insensitive, let's make it lowercase to improve readability.
43575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43576      # Now convert it back to Unix-style (cygpath)
43577      input_path=`$CYGPATH -u "$shortmode_path"`
43578      new_path="$input_path"
43579    fi
43580  fi
43581
43582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43583  if test "x$test_cygdrive_prefix" = x; then
43584    # As a simple fix, exclude /usr/bin since it's not a real path.
43585    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43587      # a path prefixed by /cygdrive for fixpath to work.
43588      new_path="$CYGWIN_ROOT_PATH$input_path"
43589    fi
43590  fi
43591
43592  # remove trailing .exe if any
43593  new_path="${new_path/%.exe/}"
43594
43595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43596
43597  # First separate the path from the arguments. This will split at the first
43598  # space.
43599  complete="$OBJDUMP"
43600  path="${complete%% *}"
43601  tmp="$complete EOL"
43602  arguments="${tmp#* }"
43603
43604  # Input might be given as Windows format, start by converting to
43605  # unix format.
43606  new_path="$path"
43607
43608  windows_path="$new_path"
43609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43610    unix_path=`$CYGPATH -u "$windows_path"`
43611    new_path="$unix_path"
43612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43614    new_path="$unix_path"
43615  fi
43616
43617
43618  # Now try to locate executable using which
43619  new_path=`$WHICH "$new_path" 2> /dev/null`
43620
43621  if test "x$new_path" = x; then
43622    # Oops. Which didn't find the executable.
43623    # The splitting of arguments from the executable at a space might have been incorrect,
43624    # since paths with space are more likely in Windows. Give it another try with the whole
43625    # argument.
43626    path="$complete"
43627    arguments="EOL"
43628    new_path="$path"
43629
43630  windows_path="$new_path"
43631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43632    unix_path=`$CYGPATH -u "$windows_path"`
43633    new_path="$unix_path"
43634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43636    new_path="$unix_path"
43637  fi
43638
43639
43640    new_path=`$WHICH "$new_path" 2> /dev/null`
43641    # bat and cmd files are not always considered executable in MSYS causing which
43642    # to not find them
43643    if test "x$new_path" = x \
43644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43646      new_path="$path"
43647
43648  windows_path="$new_path"
43649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43650    unix_path=`$CYGPATH -u "$windows_path"`
43651    new_path="$unix_path"
43652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43654    new_path="$unix_path"
43655  fi
43656
43657    fi
43658
43659    if test "x$new_path" = x; then
43660      # It's still not found. Now this is an unrecoverable error.
43661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43662$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43663      has_space=`$ECHO "$complete" | $GREP " "`
43664      if test "x$has_space" != x; then
43665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43667      fi
43668      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43669    fi
43670  fi
43671
43672  # Now new_path has a complete unix path to the binary
43673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43674    # Keep paths in /bin as-is, but remove trailing .exe if any
43675    new_path="${new_path/%.exe/}"
43676    # Do not save /bin paths to all_fixpath_prefixes!
43677  else
43678    # Not in mixed or Windows style, start by that.
43679    new_path=`cmd //c echo $new_path`
43680
43681  input_path="$new_path"
43682  # Check if we need to convert this using DOS-style short mode. If the path
43683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43684  # take no chances and rewrite it.
43685  # Note: m4 eats our [], so we need to use [ and ] instead.
43686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43687  if test "x$has_forbidden_chars" != x; then
43688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43690  fi
43691
43692    # Output is in $new_path
43693
43694  windows_path="$new_path"
43695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43696    unix_path=`$CYGPATH -u "$windows_path"`
43697    new_path="$unix_path"
43698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43700    new_path="$unix_path"
43701  fi
43702
43703    # remove trailing .exe if any
43704    new_path="${new_path/%.exe/}"
43705
43706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43708  fi
43709
43710    else
43711      # We're on a unix platform. Hooray! :)
43712      # First separate the path from the arguments. This will split at the first
43713      # space.
43714      complete="$OBJDUMP"
43715      path="${complete%% *}"
43716      tmp="$complete EOL"
43717      arguments="${tmp#* }"
43718
43719      # Cannot rely on the command "which" here since it doesn't always work.
43720      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43721      if test -z "$is_absolute_path"; then
43722        # Path to executable is not absolute. Find it.
43723        IFS_save="$IFS"
43724        IFS=:
43725        for p in $PATH; do
43726          if test -f "$p/$path" && test -x "$p/$path"; then
43727            new_path="$p/$path"
43728            break
43729          fi
43730        done
43731        IFS="$IFS_save"
43732      else
43733        # This is an absolute path, we can use it without further modifications.
43734        new_path="$path"
43735      fi
43736
43737      if test "x$new_path" = x; then
43738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43739$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43740        has_space=`$ECHO "$complete" | $GREP " "`
43741        if test "x$has_space" != x; then
43742          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43743$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43744        fi
43745        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43746      fi
43747    fi
43748
43749    # Now join together the path and the arguments once again
43750    if test "x$arguments" != xEOL; then
43751      new_complete="$new_path ${arguments% *}"
43752    else
43753      new_complete="$new_path"
43754    fi
43755
43756    if test "x$complete" != "x$new_complete"; then
43757      OBJDUMP="$new_complete"
43758      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43759$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43760    fi
43761  fi
43762
43763  fi
43764
43765
43766  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43767  # to remain in place. Otherwise the compiler will not work in some siutations
43768  # in later configure checks.
43769  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43770    PATH="$OLD_PATH"
43771  fi
43772
43773  # Restore the flags to the user specified values.
43774  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43775  CFLAGS="$ORG_CFLAGS"
43776  CXXFLAGS="$ORG_CXXFLAGS"
43777
43778
43779# Finally do some processing after the detection phase
43780
43781  if test "x$COMPILE_TYPE" = "xcross"; then
43782    # Now we need to find a C/C++ compiler that can build executables for the
43783    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43784    # used once. Also, we need to do this without adding a tools dir to the
43785    # path, otherwise we might pick up cross-compilers which don't use standard
43786    # naming.
43787
43788    OLDPATH="$PATH"
43789
43790
43791# Check whether --with-build-devkit was given.
43792if test "${with_build_devkit+set}" = set; then :
43793  withval=$with_build_devkit;
43794fi
43795
43796    if test "x$with_build_devkit" = "xyes"; then
43797      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43798    elif test -n "$with_build_devkit"; then
43799      if test ! -d "$with_build_devkit"; then
43800        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43801      else
43802
43803  # Only process if variable expands to non-empty
43804
43805  if test "x$with_build_devkit" != x; then
43806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43807
43808  # Input might be given as Windows format, start by converting to
43809  # unix format.
43810  path="$with_build_devkit"
43811  new_path=`$CYGPATH -u "$path"`
43812
43813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43816  # "foo.exe" is OK but "foo" is an error.
43817  #
43818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43819  # It is also a way to make sure we got the proper file name for the real test later on.
43820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43821  if test "x$test_shortpath" = x; then
43822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43823$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43824    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43825  fi
43826
43827  # Call helper function which possibly converts this using DOS-style short mode.
43828  # If so, the updated path is stored in $new_path.
43829
43830  input_path="$new_path"
43831  # Check if we need to convert this using DOS-style short mode. If the path
43832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43833  # take no chances and rewrite it.
43834  # Note: m4 eats our [], so we need to use [ and ] instead.
43835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43836  if test "x$has_forbidden_chars" != x; then
43837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43841      # Going to short mode and back again did indeed matter. Since short mode is
43842      # case insensitive, let's make it lowercase to improve readability.
43843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43844      # Now convert it back to Unix-style (cygpath)
43845      input_path=`$CYGPATH -u "$shortmode_path"`
43846      new_path="$input_path"
43847    fi
43848  fi
43849
43850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43851  if test "x$test_cygdrive_prefix" = x; then
43852    # As a simple fix, exclude /usr/bin since it's not a real path.
43853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43855      # a path prefixed by /cygdrive for fixpath to work.
43856      new_path="$CYGWIN_ROOT_PATH$input_path"
43857    fi
43858  fi
43859
43860
43861  if test "x$path" != "x$new_path"; then
43862    with_build_devkit="$new_path"
43863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43864$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43865  fi
43866
43867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43868
43869  path="$with_build_devkit"
43870  has_colon=`$ECHO $path | $GREP ^.:`
43871  new_path="$path"
43872  if test "x$has_colon" = x; then
43873    # Not in mixed or Windows style, start by that.
43874    new_path=`cmd //c echo $path`
43875  fi
43876
43877
43878  input_path="$new_path"
43879  # Check if we need to convert this using DOS-style short mode. If the path
43880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43881  # take no chances and rewrite it.
43882  # Note: m4 eats our [], so we need to use [ and ] instead.
43883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43884  if test "x$has_forbidden_chars" != x; then
43885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43887  fi
43888
43889
43890  windows_path="$new_path"
43891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43892    unix_path=`$CYGPATH -u "$windows_path"`
43893    new_path="$unix_path"
43894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43896    new_path="$unix_path"
43897  fi
43898
43899  if test "x$path" != "x$new_path"; then
43900    with_build_devkit="$new_path"
43901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43902$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43903  fi
43904
43905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43907
43908    else
43909      # We're on a unix platform. Hooray! :)
43910      path="$with_build_devkit"
43911      has_space=`$ECHO "$path" | $GREP " "`
43912      if test "x$has_space" != x; then
43913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43914$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43916      fi
43917
43918      # Use eval to expand a potential ~
43919      eval path="$path"
43920      if test ! -f "$path" && test ! -d "$path"; then
43921        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43922      fi
43923
43924      if test -d "$path"; then
43925        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43926      else
43927        dir="`$DIRNAME "$path"`"
43928        base="`$BASENAME "$path"`"
43929        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43930      fi
43931    fi
43932  fi
43933
43934        BUILD_DEVKIT_ROOT="$with_build_devkit"
43935        # Check for a meta data info file in the root of the devkit
43936        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43937          # Process devkit.info so that existing devkit variables are not
43938          # modified by this
43939          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43940              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43941              -e "s/\$host/\$build/g" \
43942              $BUILD_DEVKIT_ROOT/devkit.info \
43943              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43944          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43945          # This potentially sets the following:
43946          # A descriptive name of the devkit
43947
43948  if test "x$BUILD_DEVKIT_NAME" = x; then
43949    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43950  fi
43951
43952          # Corresponds to --with-extra-path
43953
43954  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43955    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43956  fi
43957
43958          # Corresponds to --with-toolchain-path
43959
43960  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43961    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43962  fi
43963
43964          # Corresponds to --with-sysroot
43965
43966  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43967    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43968  fi
43969
43970          # Skip the Window specific parts
43971        fi
43972
43973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43974$as_echo_n "checking for build platform devkit... " >&6; }
43975        if test "x$BUILD_DEVKIT_NAME" != x; then
43976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43977$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43978        else
43979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43980$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43981        fi
43982
43983        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43984
43985  if test "x$BUILD_SYSROOT" != "x"; then
43986    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43987      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43988        # Solaris Studio does not have a concept of sysroot. Instead we must
43989        # make sure the default include and lib dirs are appended to each
43990        # compile and link command line. Must also add -I-xbuiltin to enable
43991        # inlining of system functions and intrinsics.
43992        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43993        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43994            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43995      fi
43996    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43997      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43998      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43999    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44000      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44001      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44002    fi
44003    # Propagate the sysroot args to hotspot
44004    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44005    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44006    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44007    # The global CFLAGS and LDFLAGS variables need these for configure to function
44008    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44009    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44010    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44011    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44012  fi
44013
44014  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44015    # We also need -iframework<path>/System/Library/Frameworks
44016    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44017    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44018    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44019    # set this here so it doesn't have to be peppered throughout the forest
44020    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44021    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44022  fi
44023
44024
44025
44026
44027
44028         # Fallback default of just /bin if DEVKIT_PATH is not defined
44029        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44030          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44031        fi
44032        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44033      fi
44034    fi
44035
44036    # FIXME: we should list the discovered compilers as an exclude pattern!
44037    # If we do that, we can do this detection before POST_DETECTION, and still
44038    # find the build compilers in the tools dir, if needed.
44039
44040
44041
44042  # Publish this variable in the help.
44043
44044
44045  if [ -z "${BUILD_CC+x}" ]; then
44046    # The variable is not set by user, try to locate tool using the code snippet
44047    for ac_prog in cl cc gcc
44048do
44049  # Extract the first word of "$ac_prog", so it can be a program name with args.
44050set dummy $ac_prog; ac_word=$2
44051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44052$as_echo_n "checking for $ac_word... " >&6; }
44053if ${ac_cv_path_BUILD_CC+:} false; then :
44054  $as_echo_n "(cached) " >&6
44055else
44056  case $BUILD_CC in
44057  [\\/]* | ?:[\\/]*)
44058  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44059  ;;
44060  *)
44061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44062for as_dir in $PATH
44063do
44064  IFS=$as_save_IFS
44065  test -z "$as_dir" && as_dir=.
44066    for ac_exec_ext in '' $ac_executable_extensions; do
44067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44068    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44070    break 2
44071  fi
44072done
44073  done
44074IFS=$as_save_IFS
44075
44076  ;;
44077esac
44078fi
44079BUILD_CC=$ac_cv_path_BUILD_CC
44080if test -n "$BUILD_CC"; then
44081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44082$as_echo "$BUILD_CC" >&6; }
44083else
44084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44085$as_echo "no" >&6; }
44086fi
44087
44088
44089  test -n "$BUILD_CC" && break
44090done
44091
44092  else
44093    # The variable is set, but is it from the command line or the environment?
44094
44095    # Try to remove the string !BUILD_CC! from our list.
44096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44098      # If it failed, the variable was not from the command line. Ignore it,
44099      # but warn the user (except for BASH, which is always set by the calling BASH).
44100      if test "xBUILD_CC" != xBASH; then
44101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44102$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44103      fi
44104      # Try to locate tool using the code snippet
44105      for ac_prog in cl cc gcc
44106do
44107  # Extract the first word of "$ac_prog", so it can be a program name with args.
44108set dummy $ac_prog; ac_word=$2
44109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44110$as_echo_n "checking for $ac_word... " >&6; }
44111if ${ac_cv_path_BUILD_CC+:} false; then :
44112  $as_echo_n "(cached) " >&6
44113else
44114  case $BUILD_CC in
44115  [\\/]* | ?:[\\/]*)
44116  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44117  ;;
44118  *)
44119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44120for as_dir in $PATH
44121do
44122  IFS=$as_save_IFS
44123  test -z "$as_dir" && as_dir=.
44124    for ac_exec_ext in '' $ac_executable_extensions; do
44125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44126    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44128    break 2
44129  fi
44130done
44131  done
44132IFS=$as_save_IFS
44133
44134  ;;
44135esac
44136fi
44137BUILD_CC=$ac_cv_path_BUILD_CC
44138if test -n "$BUILD_CC"; then
44139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44140$as_echo "$BUILD_CC" >&6; }
44141else
44142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44143$as_echo "no" >&6; }
44144fi
44145
44146
44147  test -n "$BUILD_CC" && break
44148done
44149
44150    else
44151      # If it succeeded, then it was overridden by the user. We will use it
44152      # for the tool.
44153
44154      # First remove it from the list of overridden variables, so we can test
44155      # for unknown variables in the end.
44156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44157
44158      # Check if we try to supply an empty value
44159      if test "x$BUILD_CC" = x; then
44160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44161$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44163$as_echo_n "checking for BUILD_CC... " >&6; }
44164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44165$as_echo "disabled" >&6; }
44166      else
44167        # Check if the provided tool contains a complete path.
44168        tool_specified="$BUILD_CC"
44169        tool_basename="${tool_specified##*/}"
44170        if test "x$tool_basename" = "x$tool_specified"; then
44171          # A command without a complete path is provided, search $PATH.
44172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44173$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44174          # Extract the first word of "$tool_basename", so it can be a program name with args.
44175set dummy $tool_basename; ac_word=$2
44176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44177$as_echo_n "checking for $ac_word... " >&6; }
44178if ${ac_cv_path_BUILD_CC+:} false; then :
44179  $as_echo_n "(cached) " >&6
44180else
44181  case $BUILD_CC in
44182  [\\/]* | ?:[\\/]*)
44183  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44184  ;;
44185  *)
44186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44187for as_dir in $PATH
44188do
44189  IFS=$as_save_IFS
44190  test -z "$as_dir" && as_dir=.
44191    for ac_exec_ext in '' $ac_executable_extensions; do
44192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44193    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44195    break 2
44196  fi
44197done
44198  done
44199IFS=$as_save_IFS
44200
44201  ;;
44202esac
44203fi
44204BUILD_CC=$ac_cv_path_BUILD_CC
44205if test -n "$BUILD_CC"; then
44206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44207$as_echo "$BUILD_CC" >&6; }
44208else
44209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44210$as_echo "no" >&6; }
44211fi
44212
44213
44214          if test "x$BUILD_CC" = x; then
44215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44216          fi
44217        else
44218          # Otherwise we believe it is a complete path. Use it as it is.
44219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44220$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44222$as_echo_n "checking for BUILD_CC... " >&6; }
44223          if test ! -x "$tool_specified"; then
44224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44225$as_echo "not found" >&6; }
44226            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44227          fi
44228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44229$as_echo "$tool_specified" >&6; }
44230        fi
44231      fi
44232    fi
44233
44234  fi
44235
44236
44237
44238  if test "x$BUILD_CC" = x; then
44239    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44240  fi
44241
44242
44243
44244  # Only process if variable expands to non-empty
44245
44246  if test "x$BUILD_CC" != x; then
44247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44248
44249  # First separate the path from the arguments. This will split at the first
44250  # space.
44251  complete="$BUILD_CC"
44252  path="${complete%% *}"
44253  tmp="$complete EOL"
44254  arguments="${tmp#* }"
44255
44256  # Input might be given as Windows format, start by converting to
44257  # unix format.
44258  new_path=`$CYGPATH -u "$path"`
44259
44260  # Now try to locate executable using which
44261  new_path=`$WHICH "$new_path" 2> /dev/null`
44262  # bat and cmd files are not always considered executable in cygwin causing which
44263  # to not find them
44264  if test "x$new_path" = x \
44265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44267    new_path=`$CYGPATH -u "$path"`
44268  fi
44269  if test "x$new_path" = x; then
44270    # Oops. Which didn't find the executable.
44271    # The splitting of arguments from the executable at a space might have been incorrect,
44272    # since paths with space are more likely in Windows. Give it another try with the whole
44273    # argument.
44274    path="$complete"
44275    arguments="EOL"
44276    new_path=`$CYGPATH -u "$path"`
44277    new_path=`$WHICH "$new_path" 2> /dev/null`
44278    # bat and cmd files are not always considered executable in cygwin causing which
44279    # to not find them
44280    if test "x$new_path" = x \
44281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44283      new_path=`$CYGPATH -u "$path"`
44284    fi
44285    if test "x$new_path" = x; then
44286      # It's still not found. Now this is an unrecoverable error.
44287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44288$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44289      has_space=`$ECHO "$complete" | $GREP " "`
44290      if test "x$has_space" != x; then
44291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44293      fi
44294      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44295    fi
44296  fi
44297
44298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44301  # "foo.exe" is OK but "foo" is an error.
44302  #
44303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44304  # It is also a way to make sure we got the proper file name for the real test later on.
44305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44306  if test "x$test_shortpath" = x; then
44307    # Short path failed, file does not exist as specified.
44308    # Try adding .exe or .cmd
44309    if test -f "${new_path}.exe"; then
44310      input_to_shortpath="${new_path}.exe"
44311    elif test -f "${new_path}.cmd"; then
44312      input_to_shortpath="${new_path}.cmd"
44313    else
44314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44315$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44318      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44319    fi
44320  else
44321    input_to_shortpath="$new_path"
44322  fi
44323
44324  # Call helper function which possibly converts this using DOS-style short mode.
44325  # If so, the updated path is stored in $new_path.
44326  new_path="$input_to_shortpath"
44327
44328  input_path="$input_to_shortpath"
44329  # Check if we need to convert this using DOS-style short mode. If the path
44330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44331  # take no chances and rewrite it.
44332  # Note: m4 eats our [], so we need to use [ and ] instead.
44333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44334  if test "x$has_forbidden_chars" != x; then
44335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44339      # Going to short mode and back again did indeed matter. Since short mode is
44340      # case insensitive, let's make it lowercase to improve readability.
44341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44342      # Now convert it back to Unix-style (cygpath)
44343      input_path=`$CYGPATH -u "$shortmode_path"`
44344      new_path="$input_path"
44345    fi
44346  fi
44347
44348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44349  if test "x$test_cygdrive_prefix" = x; then
44350    # As a simple fix, exclude /usr/bin since it's not a real path.
44351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44353      # a path prefixed by /cygdrive for fixpath to work.
44354      new_path="$CYGWIN_ROOT_PATH$input_path"
44355    fi
44356  fi
44357
44358  # remove trailing .exe if any
44359  new_path="${new_path/%.exe/}"
44360
44361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44362
44363  # First separate the path from the arguments. This will split at the first
44364  # space.
44365  complete="$BUILD_CC"
44366  path="${complete%% *}"
44367  tmp="$complete EOL"
44368  arguments="${tmp#* }"
44369
44370  # Input might be given as Windows format, start by converting to
44371  # unix format.
44372  new_path="$path"
44373
44374  windows_path="$new_path"
44375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44376    unix_path=`$CYGPATH -u "$windows_path"`
44377    new_path="$unix_path"
44378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44380    new_path="$unix_path"
44381  fi
44382
44383
44384  # Now try to locate executable using which
44385  new_path=`$WHICH "$new_path" 2> /dev/null`
44386
44387  if test "x$new_path" = x; then
44388    # Oops. Which didn't find the executable.
44389    # The splitting of arguments from the executable at a space might have been incorrect,
44390    # since paths with space are more likely in Windows. Give it another try with the whole
44391    # argument.
44392    path="$complete"
44393    arguments="EOL"
44394    new_path="$path"
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405
44406    new_path=`$WHICH "$new_path" 2> /dev/null`
44407    # bat and cmd files are not always considered executable in MSYS causing which
44408    # to not find them
44409    if test "x$new_path" = x \
44410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44412      new_path="$path"
44413
44414  windows_path="$new_path"
44415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44416    unix_path=`$CYGPATH -u "$windows_path"`
44417    new_path="$unix_path"
44418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44420    new_path="$unix_path"
44421  fi
44422
44423    fi
44424
44425    if test "x$new_path" = x; then
44426      # It's still not found. Now this is an unrecoverable error.
44427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44428$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44429      has_space=`$ECHO "$complete" | $GREP " "`
44430      if test "x$has_space" != x; then
44431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44433      fi
44434      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44435    fi
44436  fi
44437
44438  # Now new_path has a complete unix path to the binary
44439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44440    # Keep paths in /bin as-is, but remove trailing .exe if any
44441    new_path="${new_path/%.exe/}"
44442    # Do not save /bin paths to all_fixpath_prefixes!
44443  else
44444    # Not in mixed or Windows style, start by that.
44445    new_path=`cmd //c echo $new_path`
44446
44447  input_path="$new_path"
44448  # Check if we need to convert this using DOS-style short mode. If the path
44449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44450  # take no chances and rewrite it.
44451  # Note: m4 eats our [], so we need to use [ and ] instead.
44452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44453  if test "x$has_forbidden_chars" != x; then
44454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44456  fi
44457
44458    # Output is in $new_path
44459
44460  windows_path="$new_path"
44461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44462    unix_path=`$CYGPATH -u "$windows_path"`
44463    new_path="$unix_path"
44464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44466    new_path="$unix_path"
44467  fi
44468
44469    # remove trailing .exe if any
44470    new_path="${new_path/%.exe/}"
44471
44472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44474  fi
44475
44476    else
44477      # We're on a unix platform. Hooray! :)
44478      # First separate the path from the arguments. This will split at the first
44479      # space.
44480      complete="$BUILD_CC"
44481      path="${complete%% *}"
44482      tmp="$complete EOL"
44483      arguments="${tmp#* }"
44484
44485      # Cannot rely on the command "which" here since it doesn't always work.
44486      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44487      if test -z "$is_absolute_path"; then
44488        # Path to executable is not absolute. Find it.
44489        IFS_save="$IFS"
44490        IFS=:
44491        for p in $PATH; do
44492          if test -f "$p/$path" && test -x "$p/$path"; then
44493            new_path="$p/$path"
44494            break
44495          fi
44496        done
44497        IFS="$IFS_save"
44498      else
44499        # This is an absolute path, we can use it without further modifications.
44500        new_path="$path"
44501      fi
44502
44503      if test "x$new_path" = x; then
44504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44505$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44506        has_space=`$ECHO "$complete" | $GREP " "`
44507        if test "x$has_space" != x; then
44508          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44510        fi
44511        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44512      fi
44513    fi
44514
44515    # Now join together the path and the arguments once again
44516    if test "x$arguments" != xEOL; then
44517      new_complete="$new_path ${arguments% *}"
44518    else
44519      new_complete="$new_path"
44520    fi
44521
44522    if test "x$complete" != "x$new_complete"; then
44523      BUILD_CC="$new_complete"
44524      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44525$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44526    fi
44527  fi
44528
44529
44530
44531
44532  # Publish this variable in the help.
44533
44534
44535  if [ -z "${BUILD_CXX+x}" ]; then
44536    # The variable is not set by user, try to locate tool using the code snippet
44537    for ac_prog in cl CC g++
44538do
44539  # Extract the first word of "$ac_prog", so it can be a program name with args.
44540set dummy $ac_prog; ac_word=$2
44541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44542$as_echo_n "checking for $ac_word... " >&6; }
44543if ${ac_cv_path_BUILD_CXX+:} false; then :
44544  $as_echo_n "(cached) " >&6
44545else
44546  case $BUILD_CXX in
44547  [\\/]* | ?:[\\/]*)
44548  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44549  ;;
44550  *)
44551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44552for as_dir in $PATH
44553do
44554  IFS=$as_save_IFS
44555  test -z "$as_dir" && as_dir=.
44556    for ac_exec_ext in '' $ac_executable_extensions; do
44557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44558    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44560    break 2
44561  fi
44562done
44563  done
44564IFS=$as_save_IFS
44565
44566  ;;
44567esac
44568fi
44569BUILD_CXX=$ac_cv_path_BUILD_CXX
44570if test -n "$BUILD_CXX"; then
44571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44572$as_echo "$BUILD_CXX" >&6; }
44573else
44574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44575$as_echo "no" >&6; }
44576fi
44577
44578
44579  test -n "$BUILD_CXX" && break
44580done
44581
44582  else
44583    # The variable is set, but is it from the command line or the environment?
44584
44585    # Try to remove the string !BUILD_CXX! from our list.
44586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44588      # If it failed, the variable was not from the command line. Ignore it,
44589      # but warn the user (except for BASH, which is always set by the calling BASH).
44590      if test "xBUILD_CXX" != xBASH; then
44591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44592$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44593      fi
44594      # Try to locate tool using the code snippet
44595      for ac_prog in cl CC g++
44596do
44597  # Extract the first word of "$ac_prog", so it can be a program name with args.
44598set dummy $ac_prog; ac_word=$2
44599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44600$as_echo_n "checking for $ac_word... " >&6; }
44601if ${ac_cv_path_BUILD_CXX+:} false; then :
44602  $as_echo_n "(cached) " >&6
44603else
44604  case $BUILD_CXX in
44605  [\\/]* | ?:[\\/]*)
44606  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44607  ;;
44608  *)
44609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44610for as_dir in $PATH
44611do
44612  IFS=$as_save_IFS
44613  test -z "$as_dir" && as_dir=.
44614    for ac_exec_ext in '' $ac_executable_extensions; do
44615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44616    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44618    break 2
44619  fi
44620done
44621  done
44622IFS=$as_save_IFS
44623
44624  ;;
44625esac
44626fi
44627BUILD_CXX=$ac_cv_path_BUILD_CXX
44628if test -n "$BUILD_CXX"; then
44629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44630$as_echo "$BUILD_CXX" >&6; }
44631else
44632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44633$as_echo "no" >&6; }
44634fi
44635
44636
44637  test -n "$BUILD_CXX" && break
44638done
44639
44640    else
44641      # If it succeeded, then it was overridden by the user. We will use it
44642      # for the tool.
44643
44644      # First remove it from the list of overridden variables, so we can test
44645      # for unknown variables in the end.
44646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44647
44648      # Check if we try to supply an empty value
44649      if test "x$BUILD_CXX" = x; then
44650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44651$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44653$as_echo_n "checking for BUILD_CXX... " >&6; }
44654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44655$as_echo "disabled" >&6; }
44656      else
44657        # Check if the provided tool contains a complete path.
44658        tool_specified="$BUILD_CXX"
44659        tool_basename="${tool_specified##*/}"
44660        if test "x$tool_basename" = "x$tool_specified"; then
44661          # A command without a complete path is provided, search $PATH.
44662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44663$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44664          # Extract the first word of "$tool_basename", so it can be a program name with args.
44665set dummy $tool_basename; ac_word=$2
44666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44667$as_echo_n "checking for $ac_word... " >&6; }
44668if ${ac_cv_path_BUILD_CXX+:} false; then :
44669  $as_echo_n "(cached) " >&6
44670else
44671  case $BUILD_CXX in
44672  [\\/]* | ?:[\\/]*)
44673  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44674  ;;
44675  *)
44676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44677for as_dir in $PATH
44678do
44679  IFS=$as_save_IFS
44680  test -z "$as_dir" && as_dir=.
44681    for ac_exec_ext in '' $ac_executable_extensions; do
44682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44683    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44685    break 2
44686  fi
44687done
44688  done
44689IFS=$as_save_IFS
44690
44691  ;;
44692esac
44693fi
44694BUILD_CXX=$ac_cv_path_BUILD_CXX
44695if test -n "$BUILD_CXX"; then
44696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44697$as_echo "$BUILD_CXX" >&6; }
44698else
44699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44700$as_echo "no" >&6; }
44701fi
44702
44703
44704          if test "x$BUILD_CXX" = x; then
44705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44706          fi
44707        else
44708          # Otherwise we believe it is a complete path. Use it as it is.
44709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44710$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44712$as_echo_n "checking for BUILD_CXX... " >&6; }
44713          if test ! -x "$tool_specified"; then
44714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44715$as_echo "not found" >&6; }
44716            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44717          fi
44718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44719$as_echo "$tool_specified" >&6; }
44720        fi
44721      fi
44722    fi
44723
44724  fi
44725
44726
44727
44728  if test "x$BUILD_CXX" = x; then
44729    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44730  fi
44731
44732
44733
44734  # Only process if variable expands to non-empty
44735
44736  if test "x$BUILD_CXX" != x; then
44737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44738
44739  # First separate the path from the arguments. This will split at the first
44740  # space.
44741  complete="$BUILD_CXX"
44742  path="${complete%% *}"
44743  tmp="$complete EOL"
44744  arguments="${tmp#* }"
44745
44746  # Input might be given as Windows format, start by converting to
44747  # unix format.
44748  new_path=`$CYGPATH -u "$path"`
44749
44750  # Now try to locate executable using which
44751  new_path=`$WHICH "$new_path" 2> /dev/null`
44752  # bat and cmd files are not always considered executable in cygwin causing which
44753  # to not find them
44754  if test "x$new_path" = x \
44755      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44756      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44757    new_path=`$CYGPATH -u "$path"`
44758  fi
44759  if test "x$new_path" = x; then
44760    # Oops. Which didn't find the executable.
44761    # The splitting of arguments from the executable at a space might have been incorrect,
44762    # since paths with space are more likely in Windows. Give it another try with the whole
44763    # argument.
44764    path="$complete"
44765    arguments="EOL"
44766    new_path=`$CYGPATH -u "$path"`
44767    new_path=`$WHICH "$new_path" 2> /dev/null`
44768    # bat and cmd files are not always considered executable in cygwin causing which
44769    # to not find them
44770    if test "x$new_path" = x \
44771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44773      new_path=`$CYGPATH -u "$path"`
44774    fi
44775    if test "x$new_path" = x; then
44776      # It's still not found. Now this is an unrecoverable error.
44777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44778$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44779      has_space=`$ECHO "$complete" | $GREP " "`
44780      if test "x$has_space" != x; then
44781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44783      fi
44784      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44785    fi
44786  fi
44787
44788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44791  # "foo.exe" is OK but "foo" is an error.
44792  #
44793  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44794  # It is also a way to make sure we got the proper file name for the real test later on.
44795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44796  if test "x$test_shortpath" = x; then
44797    # Short path failed, file does not exist as specified.
44798    # Try adding .exe or .cmd
44799    if test -f "${new_path}.exe"; then
44800      input_to_shortpath="${new_path}.exe"
44801    elif test -f "${new_path}.cmd"; then
44802      input_to_shortpath="${new_path}.cmd"
44803    else
44804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44805$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44806      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44807$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44808      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44809    fi
44810  else
44811    input_to_shortpath="$new_path"
44812  fi
44813
44814  # Call helper function which possibly converts this using DOS-style short mode.
44815  # If so, the updated path is stored in $new_path.
44816  new_path="$input_to_shortpath"
44817
44818  input_path="$input_to_shortpath"
44819  # Check if we need to convert this using DOS-style short mode. If the path
44820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44821  # take no chances and rewrite it.
44822  # Note: m4 eats our [], so we need to use [ and ] instead.
44823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44824  if test "x$has_forbidden_chars" != x; then
44825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44829      # Going to short mode and back again did indeed matter. Since short mode is
44830      # case insensitive, let's make it lowercase to improve readability.
44831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44832      # Now convert it back to Unix-style (cygpath)
44833      input_path=`$CYGPATH -u "$shortmode_path"`
44834      new_path="$input_path"
44835    fi
44836  fi
44837
44838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44839  if test "x$test_cygdrive_prefix" = x; then
44840    # As a simple fix, exclude /usr/bin since it's not a real path.
44841    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44843      # a path prefixed by /cygdrive for fixpath to work.
44844      new_path="$CYGWIN_ROOT_PATH$input_path"
44845    fi
44846  fi
44847
44848  # remove trailing .exe if any
44849  new_path="${new_path/%.exe/}"
44850
44851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44852
44853  # First separate the path from the arguments. This will split at the first
44854  # space.
44855  complete="$BUILD_CXX"
44856  path="${complete%% *}"
44857  tmp="$complete EOL"
44858  arguments="${tmp#* }"
44859
44860  # Input might be given as Windows format, start by converting to
44861  # unix format.
44862  new_path="$path"
44863
44864  windows_path="$new_path"
44865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44866    unix_path=`$CYGPATH -u "$windows_path"`
44867    new_path="$unix_path"
44868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44870    new_path="$unix_path"
44871  fi
44872
44873
44874  # Now try to locate executable using which
44875  new_path=`$WHICH "$new_path" 2> /dev/null`
44876
44877  if test "x$new_path" = x; then
44878    # Oops. Which didn't find the executable.
44879    # The splitting of arguments from the executable at a space might have been incorrect,
44880    # since paths with space are more likely in Windows. Give it another try with the whole
44881    # argument.
44882    path="$complete"
44883    arguments="EOL"
44884    new_path="$path"
44885
44886  windows_path="$new_path"
44887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44888    unix_path=`$CYGPATH -u "$windows_path"`
44889    new_path="$unix_path"
44890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44892    new_path="$unix_path"
44893  fi
44894
44895
44896    new_path=`$WHICH "$new_path" 2> /dev/null`
44897    # bat and cmd files are not always considered executable in MSYS causing which
44898    # to not find them
44899    if test "x$new_path" = x \
44900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44902      new_path="$path"
44903
44904  windows_path="$new_path"
44905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44906    unix_path=`$CYGPATH -u "$windows_path"`
44907    new_path="$unix_path"
44908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44910    new_path="$unix_path"
44911  fi
44912
44913    fi
44914
44915    if test "x$new_path" = x; then
44916      # It's still not found. Now this is an unrecoverable error.
44917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44918$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44919      has_space=`$ECHO "$complete" | $GREP " "`
44920      if test "x$has_space" != x; then
44921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44923      fi
44924      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44925    fi
44926  fi
44927
44928  # Now new_path has a complete unix path to the binary
44929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44930    # Keep paths in /bin as-is, but remove trailing .exe if any
44931    new_path="${new_path/%.exe/}"
44932    # Do not save /bin paths to all_fixpath_prefixes!
44933  else
44934    # Not in mixed or Windows style, start by that.
44935    new_path=`cmd //c echo $new_path`
44936
44937  input_path="$new_path"
44938  # Check if we need to convert this using DOS-style short mode. If the path
44939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44940  # take no chances and rewrite it.
44941  # Note: m4 eats our [], so we need to use [ and ] instead.
44942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44943  if test "x$has_forbidden_chars" != x; then
44944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44946  fi
44947
44948    # Output is in $new_path
44949
44950  windows_path="$new_path"
44951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44952    unix_path=`$CYGPATH -u "$windows_path"`
44953    new_path="$unix_path"
44954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44956    new_path="$unix_path"
44957  fi
44958
44959    # remove trailing .exe if any
44960    new_path="${new_path/%.exe/}"
44961
44962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44964  fi
44965
44966    else
44967      # We're on a unix platform. Hooray! :)
44968      # First separate the path from the arguments. This will split at the first
44969      # space.
44970      complete="$BUILD_CXX"
44971      path="${complete%% *}"
44972      tmp="$complete EOL"
44973      arguments="${tmp#* }"
44974
44975      # Cannot rely on the command "which" here since it doesn't always work.
44976      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44977      if test -z "$is_absolute_path"; then
44978        # Path to executable is not absolute. Find it.
44979        IFS_save="$IFS"
44980        IFS=:
44981        for p in $PATH; do
44982          if test -f "$p/$path" && test -x "$p/$path"; then
44983            new_path="$p/$path"
44984            break
44985          fi
44986        done
44987        IFS="$IFS_save"
44988      else
44989        # This is an absolute path, we can use it without further modifications.
44990        new_path="$path"
44991      fi
44992
44993      if test "x$new_path" = x; then
44994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44995$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44996        has_space=`$ECHO "$complete" | $GREP " "`
44997        if test "x$has_space" != x; then
44998          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45000        fi
45001        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45002      fi
45003    fi
45004
45005    # Now join together the path and the arguments once again
45006    if test "x$arguments" != xEOL; then
45007      new_complete="$new_path ${arguments% *}"
45008    else
45009      new_complete="$new_path"
45010    fi
45011
45012    if test "x$complete" != "x$new_complete"; then
45013      BUILD_CXX="$new_complete"
45014      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45015$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45016    fi
45017  fi
45018
45019
45020
45021  # Publish this variable in the help.
45022
45023
45024  if [ -z "${BUILD_NM+x}" ]; then
45025    # The variable is not set by user, try to locate tool using the code snippet
45026    for ac_prog in nm gcc-nm
45027do
45028  # Extract the first word of "$ac_prog", so it can be a program name with args.
45029set dummy $ac_prog; ac_word=$2
45030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45031$as_echo_n "checking for $ac_word... " >&6; }
45032if ${ac_cv_path_BUILD_NM+:} false; then :
45033  $as_echo_n "(cached) " >&6
45034else
45035  case $BUILD_NM in
45036  [\\/]* | ?:[\\/]*)
45037  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45038  ;;
45039  *)
45040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45041for as_dir in $PATH
45042do
45043  IFS=$as_save_IFS
45044  test -z "$as_dir" && as_dir=.
45045    for ac_exec_ext in '' $ac_executable_extensions; do
45046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45047    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45049    break 2
45050  fi
45051done
45052  done
45053IFS=$as_save_IFS
45054
45055  ;;
45056esac
45057fi
45058BUILD_NM=$ac_cv_path_BUILD_NM
45059if test -n "$BUILD_NM"; then
45060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45061$as_echo "$BUILD_NM" >&6; }
45062else
45063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45064$as_echo "no" >&6; }
45065fi
45066
45067
45068  test -n "$BUILD_NM" && break
45069done
45070
45071  else
45072    # The variable is set, but is it from the command line or the environment?
45073
45074    # Try to remove the string !BUILD_NM! from our list.
45075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45077      # If it failed, the variable was not from the command line. Ignore it,
45078      # but warn the user (except for BASH, which is always set by the calling BASH).
45079      if test "xBUILD_NM" != xBASH; then
45080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45081$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45082      fi
45083      # Try to locate tool using the code snippet
45084      for ac_prog in nm gcc-nm
45085do
45086  # Extract the first word of "$ac_prog", so it can be a program name with args.
45087set dummy $ac_prog; ac_word=$2
45088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45089$as_echo_n "checking for $ac_word... " >&6; }
45090if ${ac_cv_path_BUILD_NM+:} false; then :
45091  $as_echo_n "(cached) " >&6
45092else
45093  case $BUILD_NM in
45094  [\\/]* | ?:[\\/]*)
45095  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45096  ;;
45097  *)
45098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45099for as_dir in $PATH
45100do
45101  IFS=$as_save_IFS
45102  test -z "$as_dir" && as_dir=.
45103    for ac_exec_ext in '' $ac_executable_extensions; do
45104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45105    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45107    break 2
45108  fi
45109done
45110  done
45111IFS=$as_save_IFS
45112
45113  ;;
45114esac
45115fi
45116BUILD_NM=$ac_cv_path_BUILD_NM
45117if test -n "$BUILD_NM"; then
45118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45119$as_echo "$BUILD_NM" >&6; }
45120else
45121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45122$as_echo "no" >&6; }
45123fi
45124
45125
45126  test -n "$BUILD_NM" && break
45127done
45128
45129    else
45130      # If it succeeded, then it was overridden by the user. We will use it
45131      # for the tool.
45132
45133      # First remove it from the list of overridden variables, so we can test
45134      # for unknown variables in the end.
45135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45136
45137      # Check if we try to supply an empty value
45138      if test "x$BUILD_NM" = x; then
45139        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45140$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45141        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45142$as_echo_n "checking for BUILD_NM... " >&6; }
45143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45144$as_echo "disabled" >&6; }
45145      else
45146        # Check if the provided tool contains a complete path.
45147        tool_specified="$BUILD_NM"
45148        tool_basename="${tool_specified##*/}"
45149        if test "x$tool_basename" = "x$tool_specified"; then
45150          # A command without a complete path is provided, search $PATH.
45151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45152$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45153          # Extract the first word of "$tool_basename", so it can be a program name with args.
45154set dummy $tool_basename; ac_word=$2
45155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45156$as_echo_n "checking for $ac_word... " >&6; }
45157if ${ac_cv_path_BUILD_NM+:} false; then :
45158  $as_echo_n "(cached) " >&6
45159else
45160  case $BUILD_NM in
45161  [\\/]* | ?:[\\/]*)
45162  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45163  ;;
45164  *)
45165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45166for as_dir in $PATH
45167do
45168  IFS=$as_save_IFS
45169  test -z "$as_dir" && as_dir=.
45170    for ac_exec_ext in '' $ac_executable_extensions; do
45171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45172    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45174    break 2
45175  fi
45176done
45177  done
45178IFS=$as_save_IFS
45179
45180  ;;
45181esac
45182fi
45183BUILD_NM=$ac_cv_path_BUILD_NM
45184if test -n "$BUILD_NM"; then
45185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45186$as_echo "$BUILD_NM" >&6; }
45187else
45188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45189$as_echo "no" >&6; }
45190fi
45191
45192
45193          if test "x$BUILD_NM" = x; then
45194            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45195          fi
45196        else
45197          # Otherwise we believe it is a complete path. Use it as it is.
45198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45199$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45201$as_echo_n "checking for BUILD_NM... " >&6; }
45202          if test ! -x "$tool_specified"; then
45203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45204$as_echo "not found" >&6; }
45205            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45206          fi
45207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45208$as_echo "$tool_specified" >&6; }
45209        fi
45210      fi
45211    fi
45212
45213  fi
45214
45215
45216
45217  # Only process if variable expands to non-empty
45218
45219  if test "x$BUILD_NM" != x; then
45220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45221
45222  # First separate the path from the arguments. This will split at the first
45223  # space.
45224  complete="$BUILD_NM"
45225  path="${complete%% *}"
45226  tmp="$complete EOL"
45227  arguments="${tmp#* }"
45228
45229  # Input might be given as Windows format, start by converting to
45230  # unix format.
45231  new_path=`$CYGPATH -u "$path"`
45232
45233  # Now try to locate executable using which
45234  new_path=`$WHICH "$new_path" 2> /dev/null`
45235  # bat and cmd files are not always considered executable in cygwin causing which
45236  # to not find them
45237  if test "x$new_path" = x \
45238      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45239      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45240    new_path=`$CYGPATH -u "$path"`
45241  fi
45242  if test "x$new_path" = x; then
45243    # Oops. Which didn't find the executable.
45244    # The splitting of arguments from the executable at a space might have been incorrect,
45245    # since paths with space are more likely in Windows. Give it another try with the whole
45246    # argument.
45247    path="$complete"
45248    arguments="EOL"
45249    new_path=`$CYGPATH -u "$path"`
45250    new_path=`$WHICH "$new_path" 2> /dev/null`
45251    # bat and cmd files are not always considered executable in cygwin causing which
45252    # to not find them
45253    if test "x$new_path" = x \
45254        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45255        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45256      new_path=`$CYGPATH -u "$path"`
45257    fi
45258    if test "x$new_path" = x; then
45259      # It's still not found. Now this is an unrecoverable error.
45260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45261$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45262      has_space=`$ECHO "$complete" | $GREP " "`
45263      if test "x$has_space" != x; then
45264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45266      fi
45267      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45268    fi
45269  fi
45270
45271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45274  # "foo.exe" is OK but "foo" is an error.
45275  #
45276  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45277  # It is also a way to make sure we got the proper file name for the real test later on.
45278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45279  if test "x$test_shortpath" = x; then
45280    # Short path failed, file does not exist as specified.
45281    # Try adding .exe or .cmd
45282    if test -f "${new_path}.exe"; then
45283      input_to_shortpath="${new_path}.exe"
45284    elif test -f "${new_path}.cmd"; then
45285      input_to_shortpath="${new_path}.cmd"
45286    else
45287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45288$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45291      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45292    fi
45293  else
45294    input_to_shortpath="$new_path"
45295  fi
45296
45297  # Call helper function which possibly converts this using DOS-style short mode.
45298  # If so, the updated path is stored in $new_path.
45299  new_path="$input_to_shortpath"
45300
45301  input_path="$input_to_shortpath"
45302  # Check if we need to convert this using DOS-style short mode. If the path
45303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45304  # take no chances and rewrite it.
45305  # Note: m4 eats our [], so we need to use [ and ] instead.
45306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45307  if test "x$has_forbidden_chars" != x; then
45308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45312      # Going to short mode and back again did indeed matter. Since short mode is
45313      # case insensitive, let's make it lowercase to improve readability.
45314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45315      # Now convert it back to Unix-style (cygpath)
45316      input_path=`$CYGPATH -u "$shortmode_path"`
45317      new_path="$input_path"
45318    fi
45319  fi
45320
45321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45322  if test "x$test_cygdrive_prefix" = x; then
45323    # As a simple fix, exclude /usr/bin since it's not a real path.
45324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45326      # a path prefixed by /cygdrive for fixpath to work.
45327      new_path="$CYGWIN_ROOT_PATH$input_path"
45328    fi
45329  fi
45330
45331  # remove trailing .exe if any
45332  new_path="${new_path/%.exe/}"
45333
45334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45335
45336  # First separate the path from the arguments. This will split at the first
45337  # space.
45338  complete="$BUILD_NM"
45339  path="${complete%% *}"
45340  tmp="$complete EOL"
45341  arguments="${tmp#* }"
45342
45343  # Input might be given as Windows format, start by converting to
45344  # unix format.
45345  new_path="$path"
45346
45347  windows_path="$new_path"
45348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45349    unix_path=`$CYGPATH -u "$windows_path"`
45350    new_path="$unix_path"
45351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45353    new_path="$unix_path"
45354  fi
45355
45356
45357  # Now try to locate executable using which
45358  new_path=`$WHICH "$new_path" 2> /dev/null`
45359
45360  if test "x$new_path" = x; then
45361    # Oops. Which didn't find the executable.
45362    # The splitting of arguments from the executable at a space might have been incorrect,
45363    # since paths with space are more likely in Windows. Give it another try with the whole
45364    # argument.
45365    path="$complete"
45366    arguments="EOL"
45367    new_path="$path"
45368
45369  windows_path="$new_path"
45370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45371    unix_path=`$CYGPATH -u "$windows_path"`
45372    new_path="$unix_path"
45373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45375    new_path="$unix_path"
45376  fi
45377
45378
45379    new_path=`$WHICH "$new_path" 2> /dev/null`
45380    # bat and cmd files are not always considered executable in MSYS causing which
45381    # to not find them
45382    if test "x$new_path" = x \
45383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45385      new_path="$path"
45386
45387  windows_path="$new_path"
45388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45389    unix_path=`$CYGPATH -u "$windows_path"`
45390    new_path="$unix_path"
45391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45393    new_path="$unix_path"
45394  fi
45395
45396    fi
45397
45398    if test "x$new_path" = x; then
45399      # It's still not found. Now this is an unrecoverable error.
45400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45401$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45402      has_space=`$ECHO "$complete" | $GREP " "`
45403      if test "x$has_space" != x; then
45404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45406      fi
45407      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45408    fi
45409  fi
45410
45411  # Now new_path has a complete unix path to the binary
45412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45413    # Keep paths in /bin as-is, but remove trailing .exe if any
45414    new_path="${new_path/%.exe/}"
45415    # Do not save /bin paths to all_fixpath_prefixes!
45416  else
45417    # Not in mixed or Windows style, start by that.
45418    new_path=`cmd //c echo $new_path`
45419
45420  input_path="$new_path"
45421  # Check if we need to convert this using DOS-style short mode. If the path
45422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45423  # take no chances and rewrite it.
45424  # Note: m4 eats our [], so we need to use [ and ] instead.
45425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45426  if test "x$has_forbidden_chars" != x; then
45427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45429  fi
45430
45431    # Output is in $new_path
45432
45433  windows_path="$new_path"
45434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45435    unix_path=`$CYGPATH -u "$windows_path"`
45436    new_path="$unix_path"
45437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45439    new_path="$unix_path"
45440  fi
45441
45442    # remove trailing .exe if any
45443    new_path="${new_path/%.exe/}"
45444
45445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45447  fi
45448
45449    else
45450      # We're on a unix platform. Hooray! :)
45451      # First separate the path from the arguments. This will split at the first
45452      # space.
45453      complete="$BUILD_NM"
45454      path="${complete%% *}"
45455      tmp="$complete EOL"
45456      arguments="${tmp#* }"
45457
45458      # Cannot rely on the command "which" here since it doesn't always work.
45459      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45460      if test -z "$is_absolute_path"; then
45461        # Path to executable is not absolute. Find it.
45462        IFS_save="$IFS"
45463        IFS=:
45464        for p in $PATH; do
45465          if test -f "$p/$path" && test -x "$p/$path"; then
45466            new_path="$p/$path"
45467            break
45468          fi
45469        done
45470        IFS="$IFS_save"
45471      else
45472        # This is an absolute path, we can use it without further modifications.
45473        new_path="$path"
45474      fi
45475
45476      if test "x$new_path" = x; then
45477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45478$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45479        has_space=`$ECHO "$complete" | $GREP " "`
45480        if test "x$has_space" != x; then
45481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45483        fi
45484        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45485      fi
45486    fi
45487
45488    # Now join together the path and the arguments once again
45489    if test "x$arguments" != xEOL; then
45490      new_complete="$new_path ${arguments% *}"
45491    else
45492      new_complete="$new_path"
45493    fi
45494
45495    if test "x$complete" != "x$new_complete"; then
45496      BUILD_NM="$new_complete"
45497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45498$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45499    fi
45500  fi
45501
45502
45503
45504  # Publish this variable in the help.
45505
45506
45507  if [ -z "${BUILD_AR+x}" ]; then
45508    # The variable is not set by user, try to locate tool using the code snippet
45509    for ac_prog in ar gcc-ar
45510do
45511  # Extract the first word of "$ac_prog", so it can be a program name with args.
45512set dummy $ac_prog; ac_word=$2
45513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45514$as_echo_n "checking for $ac_word... " >&6; }
45515if ${ac_cv_path_BUILD_AR+:} false; then :
45516  $as_echo_n "(cached) " >&6
45517else
45518  case $BUILD_AR in
45519  [\\/]* | ?:[\\/]*)
45520  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45521  ;;
45522  *)
45523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45524for as_dir in $PATH
45525do
45526  IFS=$as_save_IFS
45527  test -z "$as_dir" && as_dir=.
45528    for ac_exec_ext in '' $ac_executable_extensions; do
45529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45530    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45532    break 2
45533  fi
45534done
45535  done
45536IFS=$as_save_IFS
45537
45538  ;;
45539esac
45540fi
45541BUILD_AR=$ac_cv_path_BUILD_AR
45542if test -n "$BUILD_AR"; then
45543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45544$as_echo "$BUILD_AR" >&6; }
45545else
45546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45547$as_echo "no" >&6; }
45548fi
45549
45550
45551  test -n "$BUILD_AR" && break
45552done
45553
45554  else
45555    # The variable is set, but is it from the command line or the environment?
45556
45557    # Try to remove the string !BUILD_AR! from our list.
45558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45560      # If it failed, the variable was not from the command line. Ignore it,
45561      # but warn the user (except for BASH, which is always set by the calling BASH).
45562      if test "xBUILD_AR" != xBASH; then
45563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45564$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45565      fi
45566      # Try to locate tool using the code snippet
45567      for ac_prog in ar gcc-ar
45568do
45569  # Extract the first word of "$ac_prog", so it can be a program name with args.
45570set dummy $ac_prog; ac_word=$2
45571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45572$as_echo_n "checking for $ac_word... " >&6; }
45573if ${ac_cv_path_BUILD_AR+:} false; then :
45574  $as_echo_n "(cached) " >&6
45575else
45576  case $BUILD_AR in
45577  [\\/]* | ?:[\\/]*)
45578  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45579  ;;
45580  *)
45581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45582for as_dir in $PATH
45583do
45584  IFS=$as_save_IFS
45585  test -z "$as_dir" && as_dir=.
45586    for ac_exec_ext in '' $ac_executable_extensions; do
45587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45588    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45590    break 2
45591  fi
45592done
45593  done
45594IFS=$as_save_IFS
45595
45596  ;;
45597esac
45598fi
45599BUILD_AR=$ac_cv_path_BUILD_AR
45600if test -n "$BUILD_AR"; then
45601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45602$as_echo "$BUILD_AR" >&6; }
45603else
45604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45605$as_echo "no" >&6; }
45606fi
45607
45608
45609  test -n "$BUILD_AR" && break
45610done
45611
45612    else
45613      # If it succeeded, then it was overridden by the user. We will use it
45614      # for the tool.
45615
45616      # First remove it from the list of overridden variables, so we can test
45617      # for unknown variables in the end.
45618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45619
45620      # Check if we try to supply an empty value
45621      if test "x$BUILD_AR" = x; then
45622        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45623$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45625$as_echo_n "checking for BUILD_AR... " >&6; }
45626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45627$as_echo "disabled" >&6; }
45628      else
45629        # Check if the provided tool contains a complete path.
45630        tool_specified="$BUILD_AR"
45631        tool_basename="${tool_specified##*/}"
45632        if test "x$tool_basename" = "x$tool_specified"; then
45633          # A command without a complete path is provided, search $PATH.
45634          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45635$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45636          # Extract the first word of "$tool_basename", so it can be a program name with args.
45637set dummy $tool_basename; ac_word=$2
45638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45639$as_echo_n "checking for $ac_word... " >&6; }
45640if ${ac_cv_path_BUILD_AR+:} false; then :
45641  $as_echo_n "(cached) " >&6
45642else
45643  case $BUILD_AR in
45644  [\\/]* | ?:[\\/]*)
45645  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45646  ;;
45647  *)
45648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45649for as_dir in $PATH
45650do
45651  IFS=$as_save_IFS
45652  test -z "$as_dir" && as_dir=.
45653    for ac_exec_ext in '' $ac_executable_extensions; do
45654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45655    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45657    break 2
45658  fi
45659done
45660  done
45661IFS=$as_save_IFS
45662
45663  ;;
45664esac
45665fi
45666BUILD_AR=$ac_cv_path_BUILD_AR
45667if test -n "$BUILD_AR"; then
45668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45669$as_echo "$BUILD_AR" >&6; }
45670else
45671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45672$as_echo "no" >&6; }
45673fi
45674
45675
45676          if test "x$BUILD_AR" = x; then
45677            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45678          fi
45679        else
45680          # Otherwise we believe it is a complete path. Use it as it is.
45681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45682$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45684$as_echo_n "checking for BUILD_AR... " >&6; }
45685          if test ! -x "$tool_specified"; then
45686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45687$as_echo "not found" >&6; }
45688            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45689          fi
45690          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45691$as_echo "$tool_specified" >&6; }
45692        fi
45693      fi
45694    fi
45695
45696  fi
45697
45698
45699
45700  # Only process if variable expands to non-empty
45701
45702  if test "x$BUILD_AR" != x; then
45703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45704
45705  # First separate the path from the arguments. This will split at the first
45706  # space.
45707  complete="$BUILD_AR"
45708  path="${complete%% *}"
45709  tmp="$complete EOL"
45710  arguments="${tmp#* }"
45711
45712  # Input might be given as Windows format, start by converting to
45713  # unix format.
45714  new_path=`$CYGPATH -u "$path"`
45715
45716  # Now try to locate executable using which
45717  new_path=`$WHICH "$new_path" 2> /dev/null`
45718  # bat and cmd files are not always considered executable in cygwin causing which
45719  # to not find them
45720  if test "x$new_path" = x \
45721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45723    new_path=`$CYGPATH -u "$path"`
45724  fi
45725  if test "x$new_path" = x; then
45726    # Oops. Which didn't find the executable.
45727    # The splitting of arguments from the executable at a space might have been incorrect,
45728    # since paths with space are more likely in Windows. Give it another try with the whole
45729    # argument.
45730    path="$complete"
45731    arguments="EOL"
45732    new_path=`$CYGPATH -u "$path"`
45733    new_path=`$WHICH "$new_path" 2> /dev/null`
45734    # bat and cmd files are not always considered executable in cygwin causing which
45735    # to not find them
45736    if test "x$new_path" = x \
45737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45739      new_path=`$CYGPATH -u "$path"`
45740    fi
45741    if test "x$new_path" = x; then
45742      # It's still not found. Now this is an unrecoverable error.
45743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45744$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45745      has_space=`$ECHO "$complete" | $GREP " "`
45746      if test "x$has_space" != x; then
45747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45749      fi
45750      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45751    fi
45752  fi
45753
45754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45757  # "foo.exe" is OK but "foo" is an error.
45758  #
45759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45760  # It is also a way to make sure we got the proper file name for the real test later on.
45761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45762  if test "x$test_shortpath" = x; then
45763    # Short path failed, file does not exist as specified.
45764    # Try adding .exe or .cmd
45765    if test -f "${new_path}.exe"; then
45766      input_to_shortpath="${new_path}.exe"
45767    elif test -f "${new_path}.cmd"; then
45768      input_to_shortpath="${new_path}.cmd"
45769    else
45770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45771$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45774      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45775    fi
45776  else
45777    input_to_shortpath="$new_path"
45778  fi
45779
45780  # Call helper function which possibly converts this using DOS-style short mode.
45781  # If so, the updated path is stored in $new_path.
45782  new_path="$input_to_shortpath"
45783
45784  input_path="$input_to_shortpath"
45785  # Check if we need to convert this using DOS-style short mode. If the path
45786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45787  # take no chances and rewrite it.
45788  # Note: m4 eats our [], so we need to use [ and ] instead.
45789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45790  if test "x$has_forbidden_chars" != x; then
45791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45795      # Going to short mode and back again did indeed matter. Since short mode is
45796      # case insensitive, let's make it lowercase to improve readability.
45797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45798      # Now convert it back to Unix-style (cygpath)
45799      input_path=`$CYGPATH -u "$shortmode_path"`
45800      new_path="$input_path"
45801    fi
45802  fi
45803
45804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45805  if test "x$test_cygdrive_prefix" = x; then
45806    # As a simple fix, exclude /usr/bin since it's not a real path.
45807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45809      # a path prefixed by /cygdrive for fixpath to work.
45810      new_path="$CYGWIN_ROOT_PATH$input_path"
45811    fi
45812  fi
45813
45814  # remove trailing .exe if any
45815  new_path="${new_path/%.exe/}"
45816
45817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45818
45819  # First separate the path from the arguments. This will split at the first
45820  # space.
45821  complete="$BUILD_AR"
45822  path="${complete%% *}"
45823  tmp="$complete EOL"
45824  arguments="${tmp#* }"
45825
45826  # Input might be given as Windows format, start by converting to
45827  # unix format.
45828  new_path="$path"
45829
45830  windows_path="$new_path"
45831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45832    unix_path=`$CYGPATH -u "$windows_path"`
45833    new_path="$unix_path"
45834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45836    new_path="$unix_path"
45837  fi
45838
45839
45840  # Now try to locate executable using which
45841  new_path=`$WHICH "$new_path" 2> /dev/null`
45842
45843  if test "x$new_path" = x; then
45844    # Oops. Which didn't find the executable.
45845    # The splitting of arguments from the executable at a space might have been incorrect,
45846    # since paths with space are more likely in Windows. Give it another try with the whole
45847    # argument.
45848    path="$complete"
45849    arguments="EOL"
45850    new_path="$path"
45851
45852  windows_path="$new_path"
45853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45854    unix_path=`$CYGPATH -u "$windows_path"`
45855    new_path="$unix_path"
45856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45858    new_path="$unix_path"
45859  fi
45860
45861
45862    new_path=`$WHICH "$new_path" 2> /dev/null`
45863    # bat and cmd files are not always considered executable in MSYS causing which
45864    # to not find them
45865    if test "x$new_path" = x \
45866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45868      new_path="$path"
45869
45870  windows_path="$new_path"
45871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45872    unix_path=`$CYGPATH -u "$windows_path"`
45873    new_path="$unix_path"
45874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45876    new_path="$unix_path"
45877  fi
45878
45879    fi
45880
45881    if test "x$new_path" = x; then
45882      # It's still not found. Now this is an unrecoverable error.
45883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45884$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45885      has_space=`$ECHO "$complete" | $GREP " "`
45886      if test "x$has_space" != x; then
45887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45889      fi
45890      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45891    fi
45892  fi
45893
45894  # Now new_path has a complete unix path to the binary
45895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45896    # Keep paths in /bin as-is, but remove trailing .exe if any
45897    new_path="${new_path/%.exe/}"
45898    # Do not save /bin paths to all_fixpath_prefixes!
45899  else
45900    # Not in mixed or Windows style, start by that.
45901    new_path=`cmd //c echo $new_path`
45902
45903  input_path="$new_path"
45904  # Check if we need to convert this using DOS-style short mode. If the path
45905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45906  # take no chances and rewrite it.
45907  # Note: m4 eats our [], so we need to use [ and ] instead.
45908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45909  if test "x$has_forbidden_chars" != x; then
45910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45912  fi
45913
45914    # Output is in $new_path
45915
45916  windows_path="$new_path"
45917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45918    unix_path=`$CYGPATH -u "$windows_path"`
45919    new_path="$unix_path"
45920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45922    new_path="$unix_path"
45923  fi
45924
45925    # remove trailing .exe if any
45926    new_path="${new_path/%.exe/}"
45927
45928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45930  fi
45931
45932    else
45933      # We're on a unix platform. Hooray! :)
45934      # First separate the path from the arguments. This will split at the first
45935      # space.
45936      complete="$BUILD_AR"
45937      path="${complete%% *}"
45938      tmp="$complete EOL"
45939      arguments="${tmp#* }"
45940
45941      # Cannot rely on the command "which" here since it doesn't always work.
45942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45943      if test -z "$is_absolute_path"; then
45944        # Path to executable is not absolute. Find it.
45945        IFS_save="$IFS"
45946        IFS=:
45947        for p in $PATH; do
45948          if test -f "$p/$path" && test -x "$p/$path"; then
45949            new_path="$p/$path"
45950            break
45951          fi
45952        done
45953        IFS="$IFS_save"
45954      else
45955        # This is an absolute path, we can use it without further modifications.
45956        new_path="$path"
45957      fi
45958
45959      if test "x$new_path" = x; then
45960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45961$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45962        has_space=`$ECHO "$complete" | $GREP " "`
45963        if test "x$has_space" != x; then
45964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45966        fi
45967        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45968      fi
45969    fi
45970
45971    # Now join together the path and the arguments once again
45972    if test "x$arguments" != xEOL; then
45973      new_complete="$new_path ${arguments% *}"
45974    else
45975      new_complete="$new_path"
45976    fi
45977
45978    if test "x$complete" != "x$new_complete"; then
45979      BUILD_AR="$new_complete"
45980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45981$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45982    fi
45983  fi
45984
45985
45986
45987  # Publish this variable in the help.
45988
45989
45990  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45991    # The variable is not set by user, try to locate tool using the code snippet
45992    for ac_prog in objcopy
45993do
45994  # Extract the first word of "$ac_prog", so it can be a program name with args.
45995set dummy $ac_prog; ac_word=$2
45996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45997$as_echo_n "checking for $ac_word... " >&6; }
45998if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45999  $as_echo_n "(cached) " >&6
46000else
46001  case $BUILD_OBJCOPY in
46002  [\\/]* | ?:[\\/]*)
46003  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46004  ;;
46005  *)
46006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46007for as_dir in $PATH
46008do
46009  IFS=$as_save_IFS
46010  test -z "$as_dir" && as_dir=.
46011    for ac_exec_ext in '' $ac_executable_extensions; do
46012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46013    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46015    break 2
46016  fi
46017done
46018  done
46019IFS=$as_save_IFS
46020
46021  ;;
46022esac
46023fi
46024BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46025if test -n "$BUILD_OBJCOPY"; then
46026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46027$as_echo "$BUILD_OBJCOPY" >&6; }
46028else
46029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46030$as_echo "no" >&6; }
46031fi
46032
46033
46034  test -n "$BUILD_OBJCOPY" && break
46035done
46036
46037  else
46038    # The variable is set, but is it from the command line or the environment?
46039
46040    # Try to remove the string !BUILD_OBJCOPY! from our list.
46041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46043      # If it failed, the variable was not from the command line. Ignore it,
46044      # but warn the user (except for BASH, which is always set by the calling BASH).
46045      if test "xBUILD_OBJCOPY" != xBASH; then
46046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46047$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46048      fi
46049      # Try to locate tool using the code snippet
46050      for ac_prog in objcopy
46051do
46052  # Extract the first word of "$ac_prog", so it can be a program name with args.
46053set dummy $ac_prog; ac_word=$2
46054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46055$as_echo_n "checking for $ac_word... " >&6; }
46056if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46057  $as_echo_n "(cached) " >&6
46058else
46059  case $BUILD_OBJCOPY in
46060  [\\/]* | ?:[\\/]*)
46061  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46062  ;;
46063  *)
46064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46065for as_dir in $PATH
46066do
46067  IFS=$as_save_IFS
46068  test -z "$as_dir" && as_dir=.
46069    for ac_exec_ext in '' $ac_executable_extensions; do
46070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46071    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46073    break 2
46074  fi
46075done
46076  done
46077IFS=$as_save_IFS
46078
46079  ;;
46080esac
46081fi
46082BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46083if test -n "$BUILD_OBJCOPY"; then
46084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46085$as_echo "$BUILD_OBJCOPY" >&6; }
46086else
46087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46088$as_echo "no" >&6; }
46089fi
46090
46091
46092  test -n "$BUILD_OBJCOPY" && break
46093done
46094
46095    else
46096      # If it succeeded, then it was overridden by the user. We will use it
46097      # for the tool.
46098
46099      # First remove it from the list of overridden variables, so we can test
46100      # for unknown variables in the end.
46101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46102
46103      # Check if we try to supply an empty value
46104      if test "x$BUILD_OBJCOPY" = x; then
46105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46106$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46108$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46110$as_echo "disabled" >&6; }
46111      else
46112        # Check if the provided tool contains a complete path.
46113        tool_specified="$BUILD_OBJCOPY"
46114        tool_basename="${tool_specified##*/}"
46115        if test "x$tool_basename" = "x$tool_specified"; then
46116          # A command without a complete path is provided, search $PATH.
46117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46118$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46119          # Extract the first word of "$tool_basename", so it can be a program name with args.
46120set dummy $tool_basename; ac_word=$2
46121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46122$as_echo_n "checking for $ac_word... " >&6; }
46123if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46124  $as_echo_n "(cached) " >&6
46125else
46126  case $BUILD_OBJCOPY in
46127  [\\/]* | ?:[\\/]*)
46128  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46129  ;;
46130  *)
46131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46132for as_dir in $PATH
46133do
46134  IFS=$as_save_IFS
46135  test -z "$as_dir" && as_dir=.
46136    for ac_exec_ext in '' $ac_executable_extensions; do
46137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46138    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46140    break 2
46141  fi
46142done
46143  done
46144IFS=$as_save_IFS
46145
46146  ;;
46147esac
46148fi
46149BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46150if test -n "$BUILD_OBJCOPY"; then
46151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46152$as_echo "$BUILD_OBJCOPY" >&6; }
46153else
46154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46155$as_echo "no" >&6; }
46156fi
46157
46158
46159          if test "x$BUILD_OBJCOPY" = x; then
46160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46161          fi
46162        else
46163          # Otherwise we believe it is a complete path. Use it as it is.
46164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46165$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46167$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46168          if test ! -x "$tool_specified"; then
46169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46170$as_echo "not found" >&6; }
46171            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46172          fi
46173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46174$as_echo "$tool_specified" >&6; }
46175        fi
46176      fi
46177    fi
46178
46179  fi
46180
46181
46182
46183  # Only process if variable expands to non-empty
46184
46185  if test "x$BUILD_OBJCOPY" != x; then
46186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46187
46188  # First separate the path from the arguments. This will split at the first
46189  # space.
46190  complete="$BUILD_OBJCOPY"
46191  path="${complete%% *}"
46192  tmp="$complete EOL"
46193  arguments="${tmp#* }"
46194
46195  # Input might be given as Windows format, start by converting to
46196  # unix format.
46197  new_path=`$CYGPATH -u "$path"`
46198
46199  # Now try to locate executable using which
46200  new_path=`$WHICH "$new_path" 2> /dev/null`
46201  # bat and cmd files are not always considered executable in cygwin causing which
46202  # to not find them
46203  if test "x$new_path" = x \
46204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46206    new_path=`$CYGPATH -u "$path"`
46207  fi
46208  if test "x$new_path" = x; then
46209    # Oops. Which didn't find the executable.
46210    # The splitting of arguments from the executable at a space might have been incorrect,
46211    # since paths with space are more likely in Windows. Give it another try with the whole
46212    # argument.
46213    path="$complete"
46214    arguments="EOL"
46215    new_path=`$CYGPATH -u "$path"`
46216    new_path=`$WHICH "$new_path" 2> /dev/null`
46217    # bat and cmd files are not always considered executable in cygwin causing which
46218    # to not find them
46219    if test "x$new_path" = x \
46220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46222      new_path=`$CYGPATH -u "$path"`
46223    fi
46224    if test "x$new_path" = x; then
46225      # It's still not found. Now this is an unrecoverable error.
46226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46227$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46228      has_space=`$ECHO "$complete" | $GREP " "`
46229      if test "x$has_space" != x; then
46230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46232      fi
46233      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46234    fi
46235  fi
46236
46237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46240  # "foo.exe" is OK but "foo" is an error.
46241  #
46242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46243  # It is also a way to make sure we got the proper file name for the real test later on.
46244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46245  if test "x$test_shortpath" = x; then
46246    # Short path failed, file does not exist as specified.
46247    # Try adding .exe or .cmd
46248    if test -f "${new_path}.exe"; then
46249      input_to_shortpath="${new_path}.exe"
46250    elif test -f "${new_path}.cmd"; then
46251      input_to_shortpath="${new_path}.cmd"
46252    else
46253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46254$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46257      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46258    fi
46259  else
46260    input_to_shortpath="$new_path"
46261  fi
46262
46263  # Call helper function which possibly converts this using DOS-style short mode.
46264  # If so, the updated path is stored in $new_path.
46265  new_path="$input_to_shortpath"
46266
46267  input_path="$input_to_shortpath"
46268  # Check if we need to convert this using DOS-style short mode. If the path
46269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46270  # take no chances and rewrite it.
46271  # Note: m4 eats our [], so we need to use [ and ] instead.
46272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46273  if test "x$has_forbidden_chars" != x; then
46274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46278      # Going to short mode and back again did indeed matter. Since short mode is
46279      # case insensitive, let's make it lowercase to improve readability.
46280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46281      # Now convert it back to Unix-style (cygpath)
46282      input_path=`$CYGPATH -u "$shortmode_path"`
46283      new_path="$input_path"
46284    fi
46285  fi
46286
46287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46288  if test "x$test_cygdrive_prefix" = x; then
46289    # As a simple fix, exclude /usr/bin since it's not a real path.
46290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46292      # a path prefixed by /cygdrive for fixpath to work.
46293      new_path="$CYGWIN_ROOT_PATH$input_path"
46294    fi
46295  fi
46296
46297  # remove trailing .exe if any
46298  new_path="${new_path/%.exe/}"
46299
46300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46301
46302  # First separate the path from the arguments. This will split at the first
46303  # space.
46304  complete="$BUILD_OBJCOPY"
46305  path="${complete%% *}"
46306  tmp="$complete EOL"
46307  arguments="${tmp#* }"
46308
46309  # Input might be given as Windows format, start by converting to
46310  # unix format.
46311  new_path="$path"
46312
46313  windows_path="$new_path"
46314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46315    unix_path=`$CYGPATH -u "$windows_path"`
46316    new_path="$unix_path"
46317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46319    new_path="$unix_path"
46320  fi
46321
46322
46323  # Now try to locate executable using which
46324  new_path=`$WHICH "$new_path" 2> /dev/null`
46325
46326  if test "x$new_path" = x; then
46327    # Oops. Which didn't find the executable.
46328    # The splitting of arguments from the executable at a space might have been incorrect,
46329    # since paths with space are more likely in Windows. Give it another try with the whole
46330    # argument.
46331    path="$complete"
46332    arguments="EOL"
46333    new_path="$path"
46334
46335  windows_path="$new_path"
46336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46337    unix_path=`$CYGPATH -u "$windows_path"`
46338    new_path="$unix_path"
46339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46341    new_path="$unix_path"
46342  fi
46343
46344
46345    new_path=`$WHICH "$new_path" 2> /dev/null`
46346    # bat and cmd files are not always considered executable in MSYS causing which
46347    # to not find them
46348    if test "x$new_path" = x \
46349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46351      new_path="$path"
46352
46353  windows_path="$new_path"
46354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46355    unix_path=`$CYGPATH -u "$windows_path"`
46356    new_path="$unix_path"
46357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46359    new_path="$unix_path"
46360  fi
46361
46362    fi
46363
46364    if test "x$new_path" = x; then
46365      # It's still not found. Now this is an unrecoverable error.
46366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46367$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46368      has_space=`$ECHO "$complete" | $GREP " "`
46369      if test "x$has_space" != x; then
46370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46372      fi
46373      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46374    fi
46375  fi
46376
46377  # Now new_path has a complete unix path to the binary
46378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46379    # Keep paths in /bin as-is, but remove trailing .exe if any
46380    new_path="${new_path/%.exe/}"
46381    # Do not save /bin paths to all_fixpath_prefixes!
46382  else
46383    # Not in mixed or Windows style, start by that.
46384    new_path=`cmd //c echo $new_path`
46385
46386  input_path="$new_path"
46387  # Check if we need to convert this using DOS-style short mode. If the path
46388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46389  # take no chances and rewrite it.
46390  # Note: m4 eats our [], so we need to use [ and ] instead.
46391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46392  if test "x$has_forbidden_chars" != x; then
46393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46395  fi
46396
46397    # Output is in $new_path
46398
46399  windows_path="$new_path"
46400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46401    unix_path=`$CYGPATH -u "$windows_path"`
46402    new_path="$unix_path"
46403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46405    new_path="$unix_path"
46406  fi
46407
46408    # remove trailing .exe if any
46409    new_path="${new_path/%.exe/}"
46410
46411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46413  fi
46414
46415    else
46416      # We're on a unix platform. Hooray! :)
46417      # First separate the path from the arguments. This will split at the first
46418      # space.
46419      complete="$BUILD_OBJCOPY"
46420      path="${complete%% *}"
46421      tmp="$complete EOL"
46422      arguments="${tmp#* }"
46423
46424      # Cannot rely on the command "which" here since it doesn't always work.
46425      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46426      if test -z "$is_absolute_path"; then
46427        # Path to executable is not absolute. Find it.
46428        IFS_save="$IFS"
46429        IFS=:
46430        for p in $PATH; do
46431          if test -f "$p/$path" && test -x "$p/$path"; then
46432            new_path="$p/$path"
46433            break
46434          fi
46435        done
46436        IFS="$IFS_save"
46437      else
46438        # This is an absolute path, we can use it without further modifications.
46439        new_path="$path"
46440      fi
46441
46442      if test "x$new_path" = x; then
46443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46444$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46445        has_space=`$ECHO "$complete" | $GREP " "`
46446        if test "x$has_space" != x; then
46447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46449        fi
46450        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46451      fi
46452    fi
46453
46454    # Now join together the path and the arguments once again
46455    if test "x$arguments" != xEOL; then
46456      new_complete="$new_path ${arguments% *}"
46457    else
46458      new_complete="$new_path"
46459    fi
46460
46461    if test "x$complete" != "x$new_complete"; then
46462      BUILD_OBJCOPY="$new_complete"
46463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46464$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46465    fi
46466  fi
46467
46468
46469
46470  # Publish this variable in the help.
46471
46472
46473  if [ -z "${BUILD_STRIP+x}" ]; then
46474    # The variable is not set by user, try to locate tool using the code snippet
46475    for ac_prog in strip
46476do
46477  # Extract the first word of "$ac_prog", so it can be a program name with args.
46478set dummy $ac_prog; ac_word=$2
46479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46480$as_echo_n "checking for $ac_word... " >&6; }
46481if ${ac_cv_path_BUILD_STRIP+:} false; then :
46482  $as_echo_n "(cached) " >&6
46483else
46484  case $BUILD_STRIP in
46485  [\\/]* | ?:[\\/]*)
46486  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46487  ;;
46488  *)
46489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46490for as_dir in $PATH
46491do
46492  IFS=$as_save_IFS
46493  test -z "$as_dir" && as_dir=.
46494    for ac_exec_ext in '' $ac_executable_extensions; do
46495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46496    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46498    break 2
46499  fi
46500done
46501  done
46502IFS=$as_save_IFS
46503
46504  ;;
46505esac
46506fi
46507BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46508if test -n "$BUILD_STRIP"; then
46509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46510$as_echo "$BUILD_STRIP" >&6; }
46511else
46512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46513$as_echo "no" >&6; }
46514fi
46515
46516
46517  test -n "$BUILD_STRIP" && break
46518done
46519
46520  else
46521    # The variable is set, but is it from the command line or the environment?
46522
46523    # Try to remove the string !BUILD_STRIP! from our list.
46524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46526      # If it failed, the variable was not from the command line. Ignore it,
46527      # but warn the user (except for BASH, which is always set by the calling BASH).
46528      if test "xBUILD_STRIP" != xBASH; then
46529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46530$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46531      fi
46532      # Try to locate tool using the code snippet
46533      for ac_prog in strip
46534do
46535  # Extract the first word of "$ac_prog", so it can be a program name with args.
46536set dummy $ac_prog; ac_word=$2
46537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46538$as_echo_n "checking for $ac_word... " >&6; }
46539if ${ac_cv_path_BUILD_STRIP+:} false; then :
46540  $as_echo_n "(cached) " >&6
46541else
46542  case $BUILD_STRIP in
46543  [\\/]* | ?:[\\/]*)
46544  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46545  ;;
46546  *)
46547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46548for as_dir in $PATH
46549do
46550  IFS=$as_save_IFS
46551  test -z "$as_dir" && as_dir=.
46552    for ac_exec_ext in '' $ac_executable_extensions; do
46553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46554    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46556    break 2
46557  fi
46558done
46559  done
46560IFS=$as_save_IFS
46561
46562  ;;
46563esac
46564fi
46565BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46566if test -n "$BUILD_STRIP"; then
46567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46568$as_echo "$BUILD_STRIP" >&6; }
46569else
46570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46571$as_echo "no" >&6; }
46572fi
46573
46574
46575  test -n "$BUILD_STRIP" && break
46576done
46577
46578    else
46579      # If it succeeded, then it was overridden by the user. We will use it
46580      # for the tool.
46581
46582      # First remove it from the list of overridden variables, so we can test
46583      # for unknown variables in the end.
46584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46585
46586      # Check if we try to supply an empty value
46587      if test "x$BUILD_STRIP" = x; then
46588        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46589$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46591$as_echo_n "checking for BUILD_STRIP... " >&6; }
46592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46593$as_echo "disabled" >&6; }
46594      else
46595        # Check if the provided tool contains a complete path.
46596        tool_specified="$BUILD_STRIP"
46597        tool_basename="${tool_specified##*/}"
46598        if test "x$tool_basename" = "x$tool_specified"; then
46599          # A command without a complete path is provided, search $PATH.
46600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46601$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46602          # Extract the first word of "$tool_basename", so it can be a program name with args.
46603set dummy $tool_basename; ac_word=$2
46604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46605$as_echo_n "checking for $ac_word... " >&6; }
46606if ${ac_cv_path_BUILD_STRIP+:} false; then :
46607  $as_echo_n "(cached) " >&6
46608else
46609  case $BUILD_STRIP in
46610  [\\/]* | ?:[\\/]*)
46611  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46612  ;;
46613  *)
46614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46615for as_dir in $PATH
46616do
46617  IFS=$as_save_IFS
46618  test -z "$as_dir" && as_dir=.
46619    for ac_exec_ext in '' $ac_executable_extensions; do
46620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46621    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46623    break 2
46624  fi
46625done
46626  done
46627IFS=$as_save_IFS
46628
46629  ;;
46630esac
46631fi
46632BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46633if test -n "$BUILD_STRIP"; then
46634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46635$as_echo "$BUILD_STRIP" >&6; }
46636else
46637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46638$as_echo "no" >&6; }
46639fi
46640
46641
46642          if test "x$BUILD_STRIP" = x; then
46643            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46644          fi
46645        else
46646          # Otherwise we believe it is a complete path. Use it as it is.
46647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46648$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46649          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46650$as_echo_n "checking for BUILD_STRIP... " >&6; }
46651          if test ! -x "$tool_specified"; then
46652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46653$as_echo "not found" >&6; }
46654            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46655          fi
46656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46657$as_echo "$tool_specified" >&6; }
46658        fi
46659      fi
46660    fi
46661
46662  fi
46663
46664
46665
46666  # Only process if variable expands to non-empty
46667
46668  if test "x$BUILD_STRIP" != x; then
46669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46670
46671  # First separate the path from the arguments. This will split at the first
46672  # space.
46673  complete="$BUILD_STRIP"
46674  path="${complete%% *}"
46675  tmp="$complete EOL"
46676  arguments="${tmp#* }"
46677
46678  # Input might be given as Windows format, start by converting to
46679  # unix format.
46680  new_path=`$CYGPATH -u "$path"`
46681
46682  # Now try to locate executable using which
46683  new_path=`$WHICH "$new_path" 2> /dev/null`
46684  # bat and cmd files are not always considered executable in cygwin causing which
46685  # to not find them
46686  if test "x$new_path" = x \
46687      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46688      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46689    new_path=`$CYGPATH -u "$path"`
46690  fi
46691  if test "x$new_path" = x; then
46692    # Oops. Which didn't find the executable.
46693    # The splitting of arguments from the executable at a space might have been incorrect,
46694    # since paths with space are more likely in Windows. Give it another try with the whole
46695    # argument.
46696    path="$complete"
46697    arguments="EOL"
46698    new_path=`$CYGPATH -u "$path"`
46699    new_path=`$WHICH "$new_path" 2> /dev/null`
46700    # bat and cmd files are not always considered executable in cygwin causing which
46701    # to not find them
46702    if test "x$new_path" = x \
46703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46705      new_path=`$CYGPATH -u "$path"`
46706    fi
46707    if test "x$new_path" = x; then
46708      # It's still not found. Now this is an unrecoverable error.
46709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46710$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46711      has_space=`$ECHO "$complete" | $GREP " "`
46712      if test "x$has_space" != x; then
46713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46715      fi
46716      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46717    fi
46718  fi
46719
46720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46723  # "foo.exe" is OK but "foo" is an error.
46724  #
46725  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46726  # It is also a way to make sure we got the proper file name for the real test later on.
46727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46728  if test "x$test_shortpath" = x; then
46729    # Short path failed, file does not exist as specified.
46730    # Try adding .exe or .cmd
46731    if test -f "${new_path}.exe"; then
46732      input_to_shortpath="${new_path}.exe"
46733    elif test -f "${new_path}.cmd"; then
46734      input_to_shortpath="${new_path}.cmd"
46735    else
46736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46737$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46738      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46739$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46740      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46741    fi
46742  else
46743    input_to_shortpath="$new_path"
46744  fi
46745
46746  # Call helper function which possibly converts this using DOS-style short mode.
46747  # If so, the updated path is stored in $new_path.
46748  new_path="$input_to_shortpath"
46749
46750  input_path="$input_to_shortpath"
46751  # Check if we need to convert this using DOS-style short mode. If the path
46752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46753  # take no chances and rewrite it.
46754  # Note: m4 eats our [], so we need to use [ and ] instead.
46755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46756  if test "x$has_forbidden_chars" != x; then
46757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46761      # Going to short mode and back again did indeed matter. Since short mode is
46762      # case insensitive, let's make it lowercase to improve readability.
46763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46764      # Now convert it back to Unix-style (cygpath)
46765      input_path=`$CYGPATH -u "$shortmode_path"`
46766      new_path="$input_path"
46767    fi
46768  fi
46769
46770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46771  if test "x$test_cygdrive_prefix" = x; then
46772    # As a simple fix, exclude /usr/bin since it's not a real path.
46773    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46775      # a path prefixed by /cygdrive for fixpath to work.
46776      new_path="$CYGWIN_ROOT_PATH$input_path"
46777    fi
46778  fi
46779
46780  # remove trailing .exe if any
46781  new_path="${new_path/%.exe/}"
46782
46783    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46784
46785  # First separate the path from the arguments. This will split at the first
46786  # space.
46787  complete="$BUILD_STRIP"
46788  path="${complete%% *}"
46789  tmp="$complete EOL"
46790  arguments="${tmp#* }"
46791
46792  # Input might be given as Windows format, start by converting to
46793  # unix format.
46794  new_path="$path"
46795
46796  windows_path="$new_path"
46797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46798    unix_path=`$CYGPATH -u "$windows_path"`
46799    new_path="$unix_path"
46800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46802    new_path="$unix_path"
46803  fi
46804
46805
46806  # Now try to locate executable using which
46807  new_path=`$WHICH "$new_path" 2> /dev/null`
46808
46809  if test "x$new_path" = x; then
46810    # Oops. Which didn't find the executable.
46811    # The splitting of arguments from the executable at a space might have been incorrect,
46812    # since paths with space are more likely in Windows. Give it another try with the whole
46813    # argument.
46814    path="$complete"
46815    arguments="EOL"
46816    new_path="$path"
46817
46818  windows_path="$new_path"
46819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820    unix_path=`$CYGPATH -u "$windows_path"`
46821    new_path="$unix_path"
46822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46824    new_path="$unix_path"
46825  fi
46826
46827
46828    new_path=`$WHICH "$new_path" 2> /dev/null`
46829    # bat and cmd files are not always considered executable in MSYS causing which
46830    # to not find them
46831    if test "x$new_path" = x \
46832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46834      new_path="$path"
46835
46836  windows_path="$new_path"
46837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46838    unix_path=`$CYGPATH -u "$windows_path"`
46839    new_path="$unix_path"
46840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46842    new_path="$unix_path"
46843  fi
46844
46845    fi
46846
46847    if test "x$new_path" = x; then
46848      # It's still not found. Now this is an unrecoverable error.
46849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46850$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46851      has_space=`$ECHO "$complete" | $GREP " "`
46852      if test "x$has_space" != x; then
46853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46855      fi
46856      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46857    fi
46858  fi
46859
46860  # Now new_path has a complete unix path to the binary
46861  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46862    # Keep paths in /bin as-is, but remove trailing .exe if any
46863    new_path="${new_path/%.exe/}"
46864    # Do not save /bin paths to all_fixpath_prefixes!
46865  else
46866    # Not in mixed or Windows style, start by that.
46867    new_path=`cmd //c echo $new_path`
46868
46869  input_path="$new_path"
46870  # Check if we need to convert this using DOS-style short mode. If the path
46871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46872  # take no chances and rewrite it.
46873  # Note: m4 eats our [], so we need to use [ and ] instead.
46874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46875  if test "x$has_forbidden_chars" != x; then
46876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46878  fi
46879
46880    # Output is in $new_path
46881
46882  windows_path="$new_path"
46883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46884    unix_path=`$CYGPATH -u "$windows_path"`
46885    new_path="$unix_path"
46886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46888    new_path="$unix_path"
46889  fi
46890
46891    # remove trailing .exe if any
46892    new_path="${new_path/%.exe/}"
46893
46894    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46895    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46896  fi
46897
46898    else
46899      # We're on a unix platform. Hooray! :)
46900      # First separate the path from the arguments. This will split at the first
46901      # space.
46902      complete="$BUILD_STRIP"
46903      path="${complete%% *}"
46904      tmp="$complete EOL"
46905      arguments="${tmp#* }"
46906
46907      # Cannot rely on the command "which" here since it doesn't always work.
46908      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46909      if test -z "$is_absolute_path"; then
46910        # Path to executable is not absolute. Find it.
46911        IFS_save="$IFS"
46912        IFS=:
46913        for p in $PATH; do
46914          if test -f "$p/$path" && test -x "$p/$path"; then
46915            new_path="$p/$path"
46916            break
46917          fi
46918        done
46919        IFS="$IFS_save"
46920      else
46921        # This is an absolute path, we can use it without further modifications.
46922        new_path="$path"
46923      fi
46924
46925      if test "x$new_path" = x; then
46926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46927$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46928        has_space=`$ECHO "$complete" | $GREP " "`
46929        if test "x$has_space" != x; then
46930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46932        fi
46933        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46934      fi
46935    fi
46936
46937    # Now join together the path and the arguments once again
46938    if test "x$arguments" != xEOL; then
46939      new_complete="$new_path ${arguments% *}"
46940    else
46941      new_complete="$new_path"
46942    fi
46943
46944    if test "x$complete" != "x$new_complete"; then
46945      BUILD_STRIP="$new_complete"
46946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46947$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46948    fi
46949  fi
46950
46951    # Assume the C compiler is the assembler
46952    BUILD_AS="$BUILD_CC -c"
46953    # Just like for the target compiler, use the compiler as linker
46954    BUILD_LD="$BUILD_CC"
46955    BUILD_LDCXX="$BUILD_CXX"
46956
46957    PATH="$OLDPATH"
46958
46959
46960  COMPILER=$BUILD_CC
46961  COMPILER_NAME=BuildC
46962
46963  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46964    # cc -V output typically looks like
46965    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46966    # or
46967    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46968    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46969    # Check that this is likely to be the Solaris Studio cc.
46970    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46971    if test $? -ne 0; then
46972      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46973      { $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
46974$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46975      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46976$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46977      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46978$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46979      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46980    fi
46981    # Remove usage instructions (if present), and
46982    # collapse compiler output into a single line
46983    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46984        $SED -e 's/ *[Uu]sage:.*//'`
46985    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46986        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46987  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46988    # xlc -qversion output typically looks like
46989    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46990    #     Version: 11.01.0000.0015
46991    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46992    # Check that this is likely to be the IBM XL C compiler.
46993    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46994    if test $? -ne 0; then
46995      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46996      { $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
46997$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46998      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46999$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47000      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47001$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47002      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47003    fi
47004    # Collapse compiler output into a single line
47005    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47006    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47007        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47008  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47009    # There is no specific version flag, but all output starts with a version string.
47010    # First line typically looks something like:
47011    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47012    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47013    # Check that this is likely to be Microsoft CL.EXE.
47014    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47015    if test $? -ne 0; then
47016      { $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
47017$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47018      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47019$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47020      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47021    fi
47022    # Collapse compiler output into a single line
47023    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47024    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47025        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47026  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47027    # gcc --version output typically looks like
47028    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47029    #     Copyright (C) 2013 Free Software Foundation, Inc.
47030    #     This is free software; see the source for copying conditions.  There is NO
47031    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47032    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47033    # Check that this is likely to be GCC.
47034    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47035    if test $? -ne 0; then
47036      { $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
47037$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47038      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47039$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47040      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47041    fi
47042    # Remove Copyright and legalese from version string, and
47043    # collapse into a single line
47044    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47045        $SED -e 's/ *Copyright .*//'`
47046    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47047        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47048  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47049    # clang --version output typically looks like
47050    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47051    #    clang version 3.3 (tags/RELEASE_33/final)
47052    # or
47053    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47054    #    Target: x86_64-pc-linux-gnu
47055    #    Thread model: posix
47056    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47057    # Check that this is likely to be clang
47058    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47059    if test $? -ne 0; then
47060      { $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
47061$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47063$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47064      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47065    fi
47066    # Collapse compiler output into a single line
47067    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47068    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47069        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47070  else
47071      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47072  fi
47073  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47074  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47075  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47076  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47077
47078  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47079$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47080
47081
47082  COMPILER=$BUILD_CXX
47083  COMPILER_NAME=BuildC++
47084
47085  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47086    # cc -V output typically looks like
47087    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47088    # or
47089    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47090    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47091    # Check that this is likely to be the Solaris Studio cc.
47092    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47093    if test $? -ne 0; then
47094      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47095      { $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
47096$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47097      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47098$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47099      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47100$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47101      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47102    fi
47103    # Remove usage instructions (if present), and
47104    # collapse compiler output into a single line
47105    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47106        $SED -e 's/ *[Uu]sage:.*//'`
47107    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47108        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47109  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47110    # xlc -qversion output typically looks like
47111    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47112    #     Version: 11.01.0000.0015
47113    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47114    # Check that this is likely to be the IBM XL C compiler.
47115    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47116    if test $? -ne 0; then
47117      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47118      { $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
47119$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47120      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47121$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47122      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47123$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47124      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47125    fi
47126    # Collapse compiler output into a single line
47127    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47128    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47129        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47130  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47131    # There is no specific version flag, but all output starts with a version string.
47132    # First line typically looks something like:
47133    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47134    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47135    # Check that this is likely to be Microsoft CL.EXE.
47136    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47137    if test $? -ne 0; then
47138      { $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
47139$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47140      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47141$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47142      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47143    fi
47144    # Collapse compiler output into a single line
47145    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47146    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47147        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47148  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47149    # gcc --version output typically looks like
47150    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47151    #     Copyright (C) 2013 Free Software Foundation, Inc.
47152    #     This is free software; see the source for copying conditions.  There is NO
47153    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47154    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47155    # Check that this is likely to be GCC.
47156    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47157    if test $? -ne 0; then
47158      { $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
47159$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47160      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47161$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47162      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47163    fi
47164    # Remove Copyright and legalese from version string, and
47165    # collapse into a single line
47166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47167        $SED -e 's/ *Copyright .*//'`
47168    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47169        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47170  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47171    # clang --version output typically looks like
47172    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47173    #    clang version 3.3 (tags/RELEASE_33/final)
47174    # or
47175    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47176    #    Target: x86_64-pc-linux-gnu
47177    #    Thread model: posix
47178    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47179    # Check that this is likely to be clang
47180    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47181    if test $? -ne 0; then
47182      { $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
47183$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47184      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47185$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47186      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47187    fi
47188    # Collapse compiler output into a single line
47189    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47190    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47191        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47192  else
47193      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47194  fi
47195  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47196  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47197  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47198  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47199
47200  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47201$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47202
47203
47204  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47205    { $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
47206$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47208$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47209  fi
47210
47211  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47212  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47213    { $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
47214$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;}
47215  fi
47216
47217  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47218    { $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
47219$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47220  fi
47221
47222  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47223
47224  else
47225    # If we are not cross compiling, use the normal target compilers for
47226    # building the build platform executables.
47227    BUILD_CC="$CC"
47228    BUILD_CXX="$CXX"
47229    BUILD_LD="$LD"
47230    BUILD_LDCXX="$LDCXX"
47231    BUILD_NM="$NM"
47232    BUILD_AS="$AS"
47233    BUILD_OBJCOPY="$OBJCOPY"
47234    BUILD_STRIP="$STRIP"
47235    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47236    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47237    BUILD_AR="$AR"
47238
47239
47240  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47241    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47242$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47243    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47244$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47245  fi
47246
47247  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47248  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47249    { $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
47250$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;}
47251  fi
47252
47253  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47254    { $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
47255$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47256  fi
47257
47258  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47259
47260  fi
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275  # The package path is used only on macosx?
47276  # FIXME: clean this up, and/or move it elsewhere.
47277  PACKAGE_PATH=/opt/local
47278
47279
47280  # Check for extra potential brokenness.
47281  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47282    # On Windows, double-check that we got the right compiler.
47283    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47284    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47285    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47286      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47287        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
47288      fi
47289    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47290      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47291        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47292      fi
47293    fi
47294  fi
47295
47296  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47297    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47298    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47299    # This is later checked when setting flags.
47300
47301    # "-Og" suppported for GCC 4.8 and later
47302    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350    # Execute function body
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399    # Execute function body
47400
47401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47402$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47403  supports=yes
47404
47405  saved_cflags="$CFLAGS"
47406  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47407  ac_ext=c
47408ac_cpp='$CPP $CPPFLAGS'
47409ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47410ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47411ac_compiler_gnu=$ac_cv_c_compiler_gnu
47412
47413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47414/* end confdefs.h.  */
47415int i;
47416_ACEOF
47417if ac_fn_c_try_compile "$LINENO"; then :
47418
47419else
47420  supports=no
47421fi
47422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47423  ac_ext=cpp
47424ac_cpp='$CXXCPP $CPPFLAGS'
47425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47428
47429  CFLAGS="$saved_cflags"
47430
47431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47432$as_echo "$supports" >&6; }
47433  if test "x$supports" = "xyes" ; then
47434    :
47435    C_COMP_SUPPORTS="yes"
47436  else
47437    :
47438    C_COMP_SUPPORTS="no"
47439  fi
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
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499    # Execute function body
47500
47501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47502$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47503  supports=yes
47504
47505  saved_cxxflags="$CXXFLAGS"
47506  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47507  ac_ext=cpp
47508ac_cpp='$CXXCPP $CPPFLAGS'
47509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47512
47513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47514/* end confdefs.h.  */
47515int i;
47516_ACEOF
47517if ac_fn_cxx_try_compile "$LINENO"; then :
47518
47519else
47520  supports=no
47521fi
47522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47523  ac_ext=cpp
47524ac_cpp='$CXXCPP $CPPFLAGS'
47525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47528
47529  CXXFLAGS="$saved_cxxflags"
47530
47531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47532$as_echo "$supports" >&6; }
47533  if test "x$supports" = "xyes" ; then
47534    :
47535    CXX_COMP_SUPPORTS="yes"
47536  else
47537    :
47538    CXX_COMP_SUPPORTS="no"
47539  fi
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47554$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47555  supports=no
47556  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47557
47558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47559$as_echo "$supports" >&6; }
47560  if test "x$supports" = "xyes" ; then
47561    :
47562    HAS_CFLAG_OPTIMIZE_DEBUG=true
47563  else
47564    :
47565    HAS_CFLAG_OPTIMIZE_DEBUG=false
47566  fi
47567
47568
47569
47570
47571
47572
47573
47574    # "-z relro" supported in GNU binutils 2.17 and later
47575    LINKER_RELRO_FLAG="-Wl,-z,relro"
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623    # Execute function body
47624
47625  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47626$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47627  supports=yes
47628
47629  saved_ldflags="$LDFLAGS"
47630  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47631  ac_ext=c
47632ac_cpp='$CPP $CPPFLAGS'
47633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47635ac_compiler_gnu=$ac_cv_c_compiler_gnu
47636
47637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47638/* end confdefs.h.  */
47639
47640int
47641main ()
47642{
47643
47644  ;
47645  return 0;
47646}
47647_ACEOF
47648if ac_fn_c_try_link "$LINENO"; then :
47649
47650else
47651  supports=no
47652fi
47653rm -f core conftest.err conftest.$ac_objext \
47654    conftest$ac_exeext conftest.$ac_ext
47655  ac_ext=cpp
47656ac_cpp='$CXXCPP $CPPFLAGS'
47657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47660
47661  LDFLAGS="$saved_ldflags"
47662
47663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47664$as_echo "$supports" >&6; }
47665  if test "x$supports" = "xyes" ; then
47666    :
47667    HAS_LINKER_RELRO=true
47668  else
47669    :
47670    HAS_LINKER_RELRO=false
47671  fi
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685    # "-z now" supported in GNU binutils 2.11 and later
47686    LINKER_NOW_FLAG="-Wl,-z,now"
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734    # Execute function body
47735
47736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47737$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47738  supports=yes
47739
47740  saved_ldflags="$LDFLAGS"
47741  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47742  ac_ext=c
47743ac_cpp='$CPP $CPPFLAGS'
47744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47746ac_compiler_gnu=$ac_cv_c_compiler_gnu
47747
47748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47749/* end confdefs.h.  */
47750
47751int
47752main ()
47753{
47754
47755  ;
47756  return 0;
47757}
47758_ACEOF
47759if ac_fn_c_try_link "$LINENO"; then :
47760
47761else
47762  supports=no
47763fi
47764rm -f core conftest.err conftest.$ac_objext \
47765    conftest$ac_exeext conftest.$ac_ext
47766  ac_ext=cpp
47767ac_cpp='$CXXCPP $CPPFLAGS'
47768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47771
47772  LDFLAGS="$saved_ldflags"
47773
47774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47775$as_echo "$supports" >&6; }
47776  if test "x$supports" = "xyes" ; then
47777    :
47778    HAS_LINKER_NOW=true
47779  else
47780    :
47781    HAS_LINKER_NOW=false
47782  fi
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795  fi
47796
47797  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47798  # in executable.'
47799  USING_BROKEN_SUSE_LD=no
47800  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47802$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47803    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47804    $ECHO "int main() { }" > main.c
47805    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47807$as_echo "no" >&6; }
47808      USING_BROKEN_SUSE_LD=no
47809    else
47810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47811$as_echo "yes" >&6; }
47812      USING_BROKEN_SUSE_LD=yes
47813    fi
47814    $RM version-script.map main.c a.out
47815  fi
47816
47817
47818  # Setup hotspot lecagy names for toolchains
47819  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47820  if test "x$TOOLCHAIN_TYPE" = xclang; then
47821    HOTSPOT_TOOLCHAIN_TYPE=gcc
47822  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47823    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47824  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47825    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47826  fi
47827
47828
47829
47830# Setup the JTReg Regression Test Harness.
47831
47832
47833# Check whether --with-jtreg was given.
47834if test "${with_jtreg+set}" = set; then :
47835  withval=$with_jtreg;
47836else
47837  with_jtreg=no
47838fi
47839
47840
47841  if test "x$with_jtreg" = xno; then
47842    # jtreg disabled
47843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47844$as_echo_n "checking for jtreg... " >&6; }
47845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47846$as_echo "no" >&6; }
47847  else
47848    if test "x$with_jtreg" != xyes; then
47849      # with path specified.
47850      JT_HOME="$with_jtreg"
47851    fi
47852
47853    if test "x$JT_HOME" != x; then
47854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47855$as_echo_n "checking for jtreg... " >&6; }
47856
47857      # use JT_HOME enviroment var.
47858
47859  # Only process if variable expands to non-empty
47860
47861  if test "x$JT_HOME" != x; then
47862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47863
47864  # Input might be given as Windows format, start by converting to
47865  # unix format.
47866  path="$JT_HOME"
47867  new_path=`$CYGPATH -u "$path"`
47868
47869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47872  # "foo.exe" is OK but "foo" is an error.
47873  #
47874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47875  # It is also a way to make sure we got the proper file name for the real test later on.
47876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47877  if test "x$test_shortpath" = x; then
47878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47879$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47880    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47881  fi
47882
47883  # Call helper function which possibly converts this using DOS-style short mode.
47884  # If so, the updated path is stored in $new_path.
47885
47886  input_path="$new_path"
47887  # Check if we need to convert this using DOS-style short mode. If the path
47888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47889  # take no chances and rewrite it.
47890  # Note: m4 eats our [], so we need to use [ and ] instead.
47891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47892  if test "x$has_forbidden_chars" != x; then
47893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47897      # Going to short mode and back again did indeed matter. Since short mode is
47898      # case insensitive, let's make it lowercase to improve readability.
47899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47900      # Now convert it back to Unix-style (cygpath)
47901      input_path=`$CYGPATH -u "$shortmode_path"`
47902      new_path="$input_path"
47903    fi
47904  fi
47905
47906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47907  if test "x$test_cygdrive_prefix" = x; then
47908    # As a simple fix, exclude /usr/bin since it's not a real path.
47909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47911      # a path prefixed by /cygdrive for fixpath to work.
47912      new_path="$CYGWIN_ROOT_PATH$input_path"
47913    fi
47914  fi
47915
47916
47917  if test "x$path" != "x$new_path"; then
47918    JT_HOME="$new_path"
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47920$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47921  fi
47922
47923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47924
47925  path="$JT_HOME"
47926  has_colon=`$ECHO $path | $GREP ^.:`
47927  new_path="$path"
47928  if test "x$has_colon" = x; then
47929    # Not in mixed or Windows style, start by that.
47930    new_path=`cmd //c echo $path`
47931  fi
47932
47933
47934  input_path="$new_path"
47935  # Check if we need to convert this using DOS-style short mode. If the path
47936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47937  # take no chances and rewrite it.
47938  # Note: m4 eats our [], so we need to use [ and ] instead.
47939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47940  if test "x$has_forbidden_chars" != x; then
47941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47943  fi
47944
47945
47946  windows_path="$new_path"
47947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47948    unix_path=`$CYGPATH -u "$windows_path"`
47949    new_path="$unix_path"
47950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47952    new_path="$unix_path"
47953  fi
47954
47955  if test "x$path" != "x$new_path"; then
47956    JT_HOME="$new_path"
47957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47958$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47959  fi
47960
47961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47963
47964    else
47965      # We're on a unix platform. Hooray! :)
47966      path="$JT_HOME"
47967      has_space=`$ECHO "$path" | $GREP " "`
47968      if test "x$has_space" != x; then
47969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47970$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47972      fi
47973
47974      # Use eval to expand a potential ~
47975      eval path="$path"
47976      if test ! -f "$path" && test ! -d "$path"; then
47977        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47978      fi
47979
47980      if test -d "$path"; then
47981        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47982      else
47983        dir="`$DIRNAME "$path"`"
47984        base="`$BASENAME "$path"`"
47985        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47986      fi
47987    fi
47988  fi
47989
47990
47991      # jtreg win32 script works for everybody
47992      JTREGEXE="$JT_HOME/bin/jtreg"
47993
47994      if test ! -f "$JTREGEXE"; then
47995        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47996      fi
47997
47998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47999$as_echo "$JTREGEXE" >&6; }
48000    else
48001      # try to find jtreg on path
48002
48003
48004
48005  # Publish this variable in the help.
48006
48007
48008  if [ -z "${JTREGEXE+x}" ]; then
48009    # The variable is not set by user, try to locate tool using the code snippet
48010    for ac_prog in jtreg
48011do
48012  # Extract the first word of "$ac_prog", so it can be a program name with args.
48013set dummy $ac_prog; ac_word=$2
48014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48015$as_echo_n "checking for $ac_word... " >&6; }
48016if ${ac_cv_path_JTREGEXE+:} false; then :
48017  $as_echo_n "(cached) " >&6
48018else
48019  case $JTREGEXE in
48020  [\\/]* | ?:[\\/]*)
48021  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48022  ;;
48023  *)
48024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48025for as_dir in $PATH
48026do
48027  IFS=$as_save_IFS
48028  test -z "$as_dir" && as_dir=.
48029    for ac_exec_ext in '' $ac_executable_extensions; do
48030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48031    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48033    break 2
48034  fi
48035done
48036  done
48037IFS=$as_save_IFS
48038
48039  ;;
48040esac
48041fi
48042JTREGEXE=$ac_cv_path_JTREGEXE
48043if test -n "$JTREGEXE"; then
48044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48045$as_echo "$JTREGEXE" >&6; }
48046else
48047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48048$as_echo "no" >&6; }
48049fi
48050
48051
48052  test -n "$JTREGEXE" && break
48053done
48054
48055  else
48056    # The variable is set, but is it from the command line or the environment?
48057
48058    # Try to remove the string !JTREGEXE! from our list.
48059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48061      # If it failed, the variable was not from the command line. Ignore it,
48062      # but warn the user (except for BASH, which is always set by the calling BASH).
48063      if test "xJTREGEXE" != xBASH; then
48064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48065$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48066      fi
48067      # Try to locate tool using the code snippet
48068      for ac_prog in jtreg
48069do
48070  # Extract the first word of "$ac_prog", so it can be a program name with args.
48071set dummy $ac_prog; ac_word=$2
48072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48073$as_echo_n "checking for $ac_word... " >&6; }
48074if ${ac_cv_path_JTREGEXE+:} false; then :
48075  $as_echo_n "(cached) " >&6
48076else
48077  case $JTREGEXE in
48078  [\\/]* | ?:[\\/]*)
48079  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48080  ;;
48081  *)
48082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48083for as_dir in $PATH
48084do
48085  IFS=$as_save_IFS
48086  test -z "$as_dir" && as_dir=.
48087    for ac_exec_ext in '' $ac_executable_extensions; do
48088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48089    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48091    break 2
48092  fi
48093done
48094  done
48095IFS=$as_save_IFS
48096
48097  ;;
48098esac
48099fi
48100JTREGEXE=$ac_cv_path_JTREGEXE
48101if test -n "$JTREGEXE"; then
48102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48103$as_echo "$JTREGEXE" >&6; }
48104else
48105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48106$as_echo "no" >&6; }
48107fi
48108
48109
48110  test -n "$JTREGEXE" && break
48111done
48112
48113    else
48114      # If it succeeded, then it was overridden by the user. We will use it
48115      # for the tool.
48116
48117      # First remove it from the list of overridden variables, so we can test
48118      # for unknown variables in the end.
48119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48120
48121      # Check if we try to supply an empty value
48122      if test "x$JTREGEXE" = x; then
48123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48124$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48126$as_echo_n "checking for JTREGEXE... " >&6; }
48127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48128$as_echo "disabled" >&6; }
48129      else
48130        # Check if the provided tool contains a complete path.
48131        tool_specified="$JTREGEXE"
48132        tool_basename="${tool_specified##*/}"
48133        if test "x$tool_basename" = "x$tool_specified"; then
48134          # A command without a complete path is provided, search $PATH.
48135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48136$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48137          # Extract the first word of "$tool_basename", so it can be a program name with args.
48138set dummy $tool_basename; ac_word=$2
48139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48140$as_echo_n "checking for $ac_word... " >&6; }
48141if ${ac_cv_path_JTREGEXE+:} false; then :
48142  $as_echo_n "(cached) " >&6
48143else
48144  case $JTREGEXE in
48145  [\\/]* | ?:[\\/]*)
48146  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48147  ;;
48148  *)
48149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48150for as_dir in $PATH
48151do
48152  IFS=$as_save_IFS
48153  test -z "$as_dir" && as_dir=.
48154    for ac_exec_ext in '' $ac_executable_extensions; do
48155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48156    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48158    break 2
48159  fi
48160done
48161  done
48162IFS=$as_save_IFS
48163
48164  ;;
48165esac
48166fi
48167JTREGEXE=$ac_cv_path_JTREGEXE
48168if test -n "$JTREGEXE"; then
48169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48170$as_echo "$JTREGEXE" >&6; }
48171else
48172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48173$as_echo "no" >&6; }
48174fi
48175
48176
48177          if test "x$JTREGEXE" = x; then
48178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48179          fi
48180        else
48181          # Otherwise we believe it is a complete path. Use it as it is.
48182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48183$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48185$as_echo_n "checking for JTREGEXE... " >&6; }
48186          if test ! -x "$tool_specified"; then
48187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48188$as_echo "not found" >&6; }
48189            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48190          fi
48191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48192$as_echo "$tool_specified" >&6; }
48193        fi
48194      fi
48195    fi
48196
48197  fi
48198
48199
48200
48201  if test "x$JTREGEXE" = x; then
48202    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48203  fi
48204
48205
48206      JT_HOME="`$DIRNAME $JTREGEXE`"
48207    fi
48208  fi
48209
48210
48211
48212
48213
48214
48215  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48216  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48217  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48218  #                              commands produced by the link step (currently AIX only)
48219  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48220    COMPILER_TARGET_BITS_FLAG="-q"
48221    COMPILER_COMMAND_FILE_FLAG="-f"
48222    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48223  else
48224    COMPILER_TARGET_BITS_FLAG="-m"
48225    COMPILER_COMMAND_FILE_FLAG="@"
48226    COMPILER_BINDCMD_FILE_FLAG=""
48227
48228    # The solstudio linker does not support @-files.
48229    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48230      COMPILER_COMMAND_FILE_FLAG=
48231    fi
48232
48233    # Check if @file is supported by gcc
48234    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48235      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48236$as_echo_n "checking if @file is supported by gcc... " >&6; }
48237      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48238      $ECHO "" "--version" > command.file
48239      if $CXX @command.file 2>&5 >&5; then
48240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48241$as_echo "yes" >&6; }
48242        COMPILER_COMMAND_FILE_FLAG="@"
48243      else
48244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48245$as_echo "no" >&6; }
48246        COMPILER_COMMAND_FILE_FLAG=
48247      fi
48248      $RM command.file
48249    fi
48250  fi
48251
48252
48253
48254
48255  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48256  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48257    ARFLAGS="-r"
48258  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48259    ARFLAGS="-X64"
48260  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48261    # lib.exe is used as AR to create static libraries.
48262    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48263  else
48264    ARFLAGS=""
48265  fi
48266
48267
48268  ## Setup strip.
48269  # FIXME: should this really be per platform, or should it be per toolchain type?
48270  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48271  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48272  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48273    STRIPFLAGS="-g"
48274  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48275    STRIPFLAGS="-x"
48276  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48277    STRIPFLAGS="-S"
48278  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48279    STRIPFLAGS="-X32_64"
48280  fi
48281
48282
48283
48284  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48285    CC_OUT_OPTION=-Fo
48286    EXE_OUT_OPTION=-out:
48287    LD_OUT_OPTION=-out:
48288    AR_OUT_OPTION=-out:
48289  else
48290    # The option used to specify the target .o,.a or .so file.
48291    # When compiling, how to specify the to be created object file.
48292    CC_OUT_OPTION='-o$(SPACE)'
48293    # When linking, how to specify the to be created executable.
48294    EXE_OUT_OPTION='-o$(SPACE)'
48295    # When linking, how to specify the to be created dynamically linkable library.
48296    LD_OUT_OPTION='-o$(SPACE)'
48297    # When archiving, how to specify the to be create static archive for object files.
48298    AR_OUT_OPTION='rcs$(SPACE)'
48299  fi
48300
48301
48302
48303
48304
48305  # On Windows, we need to set RC flags.
48306  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48307    RC_FLAGS="-nologo -l0x409"
48308    JVM_RCFLAGS="-nologo"
48309    if test "x$DEBUG_LEVEL" = xrelease; then
48310      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48311      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48312    fi
48313
48314    # The version variables used to create RC_FLAGS may be overridden
48315    # in a custom configure script, or possibly the command line.
48316    # Let those variables be expanded at make time in spec.gmk.
48317    # The \$ are escaped to the shell, and the $(...) variables
48318    # are evaluated by make.
48319    RC_FLAGS="$RC_FLAGS \
48320        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48321        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48322        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48323        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48324        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48325        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48326        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48327
48328    JVM_RCFLAGS="$JVM_RCFLAGS \
48329        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48330        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48331        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48332        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48333        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48334        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48335        -D\"HS_FNAME=jvm.dll\" \
48336        -D\"HS_INTERNAL_NAME=jvm\""
48337  fi
48338
48339
48340
48341  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48342    # silence copyright notice and other headers.
48343    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48344  fi
48345
48346
48347# Now we can test some aspects on the target using configure macros.
48348
48349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48350$as_echo_n "checking for ANSI C header files... " >&6; }
48351if ${ac_cv_header_stdc+:} false; then :
48352  $as_echo_n "(cached) " >&6
48353else
48354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48355/* end confdefs.h.  */
48356#include <stdlib.h>
48357#include <stdarg.h>
48358#include <string.h>
48359#include <float.h>
48360
48361int
48362main ()
48363{
48364
48365  ;
48366  return 0;
48367}
48368_ACEOF
48369if ac_fn_cxx_try_compile "$LINENO"; then :
48370  ac_cv_header_stdc=yes
48371else
48372  ac_cv_header_stdc=no
48373fi
48374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48375
48376if test $ac_cv_header_stdc = yes; then
48377  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48379/* end confdefs.h.  */
48380#include <string.h>
48381
48382_ACEOF
48383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48384  $EGREP "memchr" >/dev/null 2>&1; then :
48385
48386else
48387  ac_cv_header_stdc=no
48388fi
48389rm -f conftest*
48390
48391fi
48392
48393if test $ac_cv_header_stdc = yes; then
48394  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48396/* end confdefs.h.  */
48397#include <stdlib.h>
48398
48399_ACEOF
48400if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48401  $EGREP "free" >/dev/null 2>&1; then :
48402
48403else
48404  ac_cv_header_stdc=no
48405fi
48406rm -f conftest*
48407
48408fi
48409
48410if test $ac_cv_header_stdc = yes; then
48411  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48412  if test "$cross_compiling" = yes; then :
48413  :
48414else
48415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48416/* end confdefs.h.  */
48417#include <ctype.h>
48418#include <stdlib.h>
48419#if ((' ' & 0x0FF) == 0x020)
48420# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48421# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48422#else
48423# define ISLOWER(c) \
48424		   (('a' <= (c) && (c) <= 'i') \
48425		     || ('j' <= (c) && (c) <= 'r') \
48426		     || ('s' <= (c) && (c) <= 'z'))
48427# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48428#endif
48429
48430#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48431int
48432main ()
48433{
48434  int i;
48435  for (i = 0; i < 256; i++)
48436    if (XOR (islower (i), ISLOWER (i))
48437	|| toupper (i) != TOUPPER (i))
48438      return 2;
48439  return 0;
48440}
48441_ACEOF
48442if ac_fn_cxx_try_run "$LINENO"; then :
48443
48444else
48445  ac_cv_header_stdc=no
48446fi
48447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48448  conftest.$ac_objext conftest.beam conftest.$ac_ext
48449fi
48450
48451fi
48452fi
48453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48454$as_echo "$ac_cv_header_stdc" >&6; }
48455if test $ac_cv_header_stdc = yes; then
48456
48457$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48458
48459fi
48460
48461# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48462for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48463		  inttypes.h stdint.h unistd.h
48464do :
48465  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48466ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48467"
48468if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48469  cat >>confdefs.h <<_ACEOF
48470#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48471_ACEOF
48472
48473fi
48474
48475done
48476
48477
48478
48479  ###############################################################################
48480  #
48481  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48482  # (The JVM can use 32 or 64 bit Java pointers but that decision
48483  # is made at runtime.)
48484  #
48485
48486  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48487    # Always specify -m flag on Solaris
48488    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48489
48490  # When we add flags to the "official" CFLAGS etc, we need to
48491  # keep track of these additions in ADDED_CFLAGS etc. These
48492  # will later be checked to make sure only controlled additions
48493  # have been made to CFLAGS etc.
48494  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48495  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48496  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48497
48498  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48499  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48500  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48501
48502  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48503  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48504  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48505
48506  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48507  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48508  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48509
48510  elif test "x$COMPILE_TYPE" = xreduced; then
48511    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48512      # Specify -m if running reduced on unix platforms
48513
48514  # When we add flags to the "official" CFLAGS etc, we need to
48515  # keep track of these additions in ADDED_CFLAGS etc. These
48516  # will later be checked to make sure only controlled additions
48517  # have been made to CFLAGS etc.
48518  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48519  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48520  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48521
48522  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48523  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48524  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48525
48526  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48527  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48528  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48529
48530  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48531  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48532  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48533
48534    fi
48535  fi
48536  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48537    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48538    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48539    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48540  fi
48541
48542  # Make compilation sanity check
48543  for ac_header in stdio.h
48544do :
48545  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48546if test "x$ac_cv_header_stdio_h" = xyes; then :
48547  cat >>confdefs.h <<_ACEOF
48548#define HAVE_STDIO_H 1
48549_ACEOF
48550
48551else
48552
48553    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48554$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48555    if test "x$COMPILE_TYPE" = xreduced; then
48556
48557  # Print a helpful message on how to acquire the necessary build dependency.
48558  # reduced is the help tag: freetype, cups, alsa etc
48559  MISSING_DEPENDENCY=reduced
48560
48561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48562    cygwin_help $MISSING_DEPENDENCY
48563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48564    msys_help $MISSING_DEPENDENCY
48565  else
48566    PKGHANDLER_COMMAND=
48567
48568    case $PKGHANDLER in
48569      apt-get)
48570        apt_help     $MISSING_DEPENDENCY ;;
48571      yum)
48572        yum_help     $MISSING_DEPENDENCY ;;
48573      port)
48574        port_help    $MISSING_DEPENDENCY ;;
48575      pkgutil)
48576        pkgutil_help $MISSING_DEPENDENCY ;;
48577      pkgadd)
48578        pkgadd_help  $MISSING_DEPENDENCY ;;
48579    esac
48580
48581    if test "x$PKGHANDLER_COMMAND" != x; then
48582      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48583    fi
48584  fi
48585
48586      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48587$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48588    elif test "x$COMPILE_TYPE" = xcross; then
48589      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48590$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48591    fi
48592    as_fn_error $? "Cannot continue." "$LINENO" 5
48593
48594fi
48595
48596done
48597
48598
48599  # The cast to long int works around a bug in the HP C Compiler
48600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48602# This bug is HP SR number 8606223364.
48603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48604$as_echo_n "checking size of int *... " >&6; }
48605if ${ac_cv_sizeof_int_p+:} false; then :
48606  $as_echo_n "(cached) " >&6
48607else
48608  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48609
48610else
48611  if test "$ac_cv_type_int_p" = yes; then
48612     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48614as_fn_error 77 "cannot compute sizeof (int *)
48615See \`config.log' for more details" "$LINENO" 5; }
48616   else
48617     ac_cv_sizeof_int_p=0
48618   fi
48619fi
48620
48621fi
48622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48623$as_echo "$ac_cv_sizeof_int_p" >&6; }
48624
48625
48626
48627cat >>confdefs.h <<_ACEOF
48628#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48629_ACEOF
48630
48631
48632
48633  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48634  if test "x$ac_cv_sizeof_int_p" = x; then
48635    # The test failed, lets stick to the assumed value.
48636    { $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
48637$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48638  else
48639    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48640
48641    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48642      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48643      # Let's try to implicitely set the compilers target architecture and retry the test
48644      { $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
48645$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;}
48646      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48647$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48648
48649  # When we add flags to the "official" CFLAGS etc, we need to
48650  # keep track of these additions in ADDED_CFLAGS etc. These
48651  # will later be checked to make sure only controlled additions
48652  # have been made to CFLAGS etc.
48653  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48654  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48655  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48656
48657  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48658  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48659  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48660
48661  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48662  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48663  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48664
48665  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48666  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48667  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48668
48669
48670      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48671      unset ac_cv_sizeof_int_p
48672      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48673      cat >>confdefs.h <<_ACEOF
48674#undef SIZEOF_INT_P
48675_ACEOF
48676
48677      # The cast to long int works around a bug in the HP C Compiler
48678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48680# This bug is HP SR number 8606223364.
48681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48682$as_echo_n "checking size of int *... " >&6; }
48683if ${ac_cv_sizeof_int_p+:} false; then :
48684  $as_echo_n "(cached) " >&6
48685else
48686  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48687
48688else
48689  if test "$ac_cv_type_int_p" = yes; then
48690     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48692as_fn_error 77 "cannot compute sizeof (int *)
48693See \`config.log' for more details" "$LINENO" 5; }
48694   else
48695     ac_cv_sizeof_int_p=0
48696   fi
48697fi
48698
48699fi
48700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48701$as_echo "$ac_cv_sizeof_int_p" >&6; }
48702
48703
48704
48705cat >>confdefs.h <<_ACEOF
48706#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48707_ACEOF
48708
48709
48710
48711      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48712
48713      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48714        { $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
48715$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;}
48716        if test "x$COMPILE_TYPE" = xreduced; then
48717
48718  # Print a helpful message on how to acquire the necessary build dependency.
48719  # reduced is the help tag: freetype, cups, alsa etc
48720  MISSING_DEPENDENCY=reduced
48721
48722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48723    cygwin_help $MISSING_DEPENDENCY
48724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48725    msys_help $MISSING_DEPENDENCY
48726  else
48727    PKGHANDLER_COMMAND=
48728
48729    case $PKGHANDLER in
48730      apt-get)
48731        apt_help     $MISSING_DEPENDENCY ;;
48732      yum)
48733        yum_help     $MISSING_DEPENDENCY ;;
48734      port)
48735        port_help    $MISSING_DEPENDENCY ;;
48736      pkgutil)
48737        pkgutil_help $MISSING_DEPENDENCY ;;
48738      pkgadd)
48739        pkgadd_help  $MISSING_DEPENDENCY ;;
48740    esac
48741
48742    if test "x$PKGHANDLER_COMMAND" != x; then
48743      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48744    fi
48745  fi
48746
48747          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48748$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48749        elif test "x$COMPILE_TYPE" = xcross; then
48750          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48751$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48752        fi
48753        as_fn_error $? "Cannot continue." "$LINENO" 5
48754      fi
48755    fi
48756  fi
48757
48758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48759$as_echo_n "checking for target address size... " >&6; }
48760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48761$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48762
48763
48764  ###############################################################################
48765  #
48766  # Is the target little of big endian?
48767  #
48768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48769$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48770if ${ac_cv_c_bigendian+:} false; then :
48771  $as_echo_n "(cached) " >&6
48772else
48773  ac_cv_c_bigendian=unknown
48774    # See if we're dealing with a universal compiler.
48775    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48776/* end confdefs.h.  */
48777#ifndef __APPLE_CC__
48778	       not a universal capable compiler
48779	     #endif
48780	     typedef int dummy;
48781
48782_ACEOF
48783if ac_fn_cxx_try_compile "$LINENO"; then :
48784
48785	# Check for potential -arch flags.  It is not universal unless
48786	# there are at least two -arch flags with different values.
48787	ac_arch=
48788	ac_prev=
48789	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48790	 if test -n "$ac_prev"; then
48791	   case $ac_word in
48792	     i?86 | x86_64 | ppc | ppc64)
48793	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48794		 ac_arch=$ac_word
48795	       else
48796		 ac_cv_c_bigendian=universal
48797		 break
48798	       fi
48799	       ;;
48800	   esac
48801	   ac_prev=
48802	 elif test "x$ac_word" = "x-arch"; then
48803	   ac_prev=arch
48804	 fi
48805       done
48806fi
48807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48808    if test $ac_cv_c_bigendian = unknown; then
48809      # See if sys/param.h defines the BYTE_ORDER macro.
48810      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48811/* end confdefs.h.  */
48812#include <sys/types.h>
48813	     #include <sys/param.h>
48814
48815int
48816main ()
48817{
48818#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48819		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48820		     && LITTLE_ENDIAN)
48821	      bogus endian macros
48822	     #endif
48823
48824  ;
48825  return 0;
48826}
48827_ACEOF
48828if ac_fn_cxx_try_compile "$LINENO"; then :
48829  # It does; now see whether it defined to BIG_ENDIAN or not.
48830	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48831/* end confdefs.h.  */
48832#include <sys/types.h>
48833		#include <sys/param.h>
48834
48835int
48836main ()
48837{
48838#if BYTE_ORDER != BIG_ENDIAN
48839		 not big endian
48840		#endif
48841
48842  ;
48843  return 0;
48844}
48845_ACEOF
48846if ac_fn_cxx_try_compile "$LINENO"; then :
48847  ac_cv_c_bigendian=yes
48848else
48849  ac_cv_c_bigendian=no
48850fi
48851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48852fi
48853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48854    fi
48855    if test $ac_cv_c_bigendian = unknown; then
48856      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48857      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48858/* end confdefs.h.  */
48859#include <limits.h>
48860
48861int
48862main ()
48863{
48864#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48865	      bogus endian macros
48866	     #endif
48867
48868  ;
48869  return 0;
48870}
48871_ACEOF
48872if ac_fn_cxx_try_compile "$LINENO"; then :
48873  # It does; now see whether it defined to _BIG_ENDIAN or not.
48874	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48875/* end confdefs.h.  */
48876#include <limits.h>
48877
48878int
48879main ()
48880{
48881#ifndef _BIG_ENDIAN
48882		 not big endian
48883		#endif
48884
48885  ;
48886  return 0;
48887}
48888_ACEOF
48889if ac_fn_cxx_try_compile "$LINENO"; then :
48890  ac_cv_c_bigendian=yes
48891else
48892  ac_cv_c_bigendian=no
48893fi
48894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48895fi
48896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48897    fi
48898    if test $ac_cv_c_bigendian = unknown; then
48899      # Compile a test program.
48900      if test "$cross_compiling" = yes; then :
48901  # Try to guess by grepping values from an object file.
48902	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48903/* end confdefs.h.  */
48904short int ascii_mm[] =
48905		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48906		short int ascii_ii[] =
48907		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48908		int use_ascii (int i) {
48909		  return ascii_mm[i] + ascii_ii[i];
48910		}
48911		short int ebcdic_ii[] =
48912		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48913		short int ebcdic_mm[] =
48914		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48915		int use_ebcdic (int i) {
48916		  return ebcdic_mm[i] + ebcdic_ii[i];
48917		}
48918		extern int foo;
48919
48920int
48921main ()
48922{
48923return use_ascii (foo) == use_ebcdic (foo);
48924  ;
48925  return 0;
48926}
48927_ACEOF
48928if ac_fn_cxx_try_compile "$LINENO"; then :
48929  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48930	      ac_cv_c_bigendian=yes
48931	    fi
48932	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48933	      if test "$ac_cv_c_bigendian" = unknown; then
48934		ac_cv_c_bigendian=no
48935	      else
48936		# finding both strings is unlikely to happen, but who knows?
48937		ac_cv_c_bigendian=unknown
48938	      fi
48939	    fi
48940fi
48941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48942else
48943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48944/* end confdefs.h.  */
48945$ac_includes_default
48946int
48947main ()
48948{
48949
48950	     /* Are we little or big endian?  From Harbison&Steele.  */
48951	     union
48952	     {
48953	       long int l;
48954	       char c[sizeof (long int)];
48955	     } u;
48956	     u.l = 1;
48957	     return u.c[sizeof (long int) - 1] == 1;
48958
48959  ;
48960  return 0;
48961}
48962_ACEOF
48963if ac_fn_cxx_try_run "$LINENO"; then :
48964  ac_cv_c_bigendian=no
48965else
48966  ac_cv_c_bigendian=yes
48967fi
48968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48969  conftest.$ac_objext conftest.beam conftest.$ac_ext
48970fi
48971
48972    fi
48973fi
48974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48975$as_echo "$ac_cv_c_bigendian" >&6; }
48976 case $ac_cv_c_bigendian in #(
48977   yes)
48978     ENDIAN="big";; #(
48979   no)
48980     ENDIAN="little" ;; #(
48981   universal)
48982     ENDIAN="universal_endianness"
48983     ;; #(
48984   *)
48985     ENDIAN="unknown" ;;
48986 esac
48987
48988
48989  if test "x$ENDIAN" = xuniversal_endianness; then
48990    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48991  fi
48992  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48993    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
48994  fi
48995
48996
48997# Configure flags for the tools
48998
48999  ###############################################################################
49000  #
49001  # How to compile shared libraries.
49002  #
49003
49004  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49005    PICFLAG="-fPIC"
49006    C_FLAG_REORDER=''
49007    CXX_FLAG_REORDER=''
49008
49009    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49010      # Linking is different on MacOSX
49011      if test "x$STATIC_BUILD" = xtrue; then
49012        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49013      else
49014        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49015        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49016      fi
49017      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49018      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49019      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49020      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49021    else
49022      # Default works for linux, might work on other platforms as well.
49023      SHARED_LIBRARY_FLAGS='-shared'
49024      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49025      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49026      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49027      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49028    fi
49029  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49030    C_FLAG_REORDER=''
49031    CXX_FLAG_REORDER=''
49032
49033    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49034      # Linking is different on MacOSX
49035      PICFLAG=''
49036      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49037      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49038      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49039      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49040      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49041
49042      if test "x$STATIC_BUILD" = xfalse; then
49043        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49044      fi
49045    else
49046      # Default works for linux, might work on other platforms as well.
49047      PICFLAG='-fPIC'
49048      SHARED_LIBRARY_FLAGS='-shared'
49049      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49050      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49051      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49052      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49053    fi
49054  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49055    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49056      PICFLAG="-xcode=pic32"
49057    else
49058      PICFLAG="-KPIC"
49059    fi
49060    C_FLAG_REORDER='-xF'
49061    CXX_FLAG_REORDER='-xF'
49062    SHARED_LIBRARY_FLAGS="-G"
49063    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49064    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49065    SET_SHARED_LIBRARY_NAME='-h $1'
49066    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49067  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49068    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49069    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49070    # will have to patch this single instruction with a call to some out-of-order code which
49071    # does the load from the TOC. This is of course slow. But in that case we also would have
49072    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49073    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49074    # can be patched directly by the linker and does not require a jump to out-of-order code.
49075    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49076    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49077    # loads for accessing a global variable). But there are rumors that this may be seen as a
49078    # 'performance feature' because of improved code locality of the symbols used in a
49079    # compilation unit.
49080    PICFLAG="-qpic"
49081    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49082    C_FLAG_REORDER=''
49083    CXX_FLAG_REORDER=''
49084    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49085    SET_EXECUTABLE_ORIGIN=""
49086    SET_SHARED_LIBRARY_ORIGIN=''
49087    SET_SHARED_LIBRARY_NAME=''
49088    SET_SHARED_LIBRARY_MAPFILE=''
49089  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49090    PICFLAG=""
49091    C_FLAG_REORDER=''
49092    CXX_FLAG_REORDER=''
49093    SHARED_LIBRARY_FLAGS="-dll"
49094    SET_EXECUTABLE_ORIGIN=''
49095    SET_SHARED_LIBRARY_ORIGIN=''
49096    SET_SHARED_LIBRARY_NAME=''
49097    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49098  fi
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108  # The (cross) compiler is now configured, we can now test capabilities
49109  # of the target platform.
49110
49111
49112
49113  ###############################################################################
49114  #
49115  # Setup the opt flags for different compilers
49116  # and different operating systems.
49117  #
49118
49119  # FIXME: this was indirectly the old default, but just inherited.
49120  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49121  #   C_FLAG_DEPS="-MMD -MF"
49122  # fi
49123
49124  # Generate make dependency files
49125  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49126    C_FLAG_DEPS="-MMD -MF"
49127  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49128    C_FLAG_DEPS="-MMD -MF"
49129  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49130    C_FLAG_DEPS="-xMMD -xMF"
49131  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49132    C_FLAG_DEPS="-qmakedep=gcc -MF"
49133  fi
49134  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49135
49136
49137
49138  # Debug symbols
49139  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49140    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49141      # reduce from default "-g2" option to save space
49142      CFLAGS_DEBUG_SYMBOLS="-g1"
49143      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49144    else
49145      CFLAGS_DEBUG_SYMBOLS="-g"
49146      CXXFLAGS_DEBUG_SYMBOLS="-g"
49147    fi
49148  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49149    CFLAGS_DEBUG_SYMBOLS="-g"
49150    CXXFLAGS_DEBUG_SYMBOLS="-g"
49151  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49152    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49153    # -g0 enables debug symbols without disabling inlining.
49154    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49155  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49156    CFLAGS_DEBUG_SYMBOLS="-g"
49157    CXXFLAGS_DEBUG_SYMBOLS="-g"
49158  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49159    CFLAGS_DEBUG_SYMBOLS="-Zi"
49160    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49161  fi
49162
49163
49164
49165  # Debug symbols for JVM_CFLAGS
49166  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49167    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49168    if test "x$DEBUG_LEVEL" = xslowdebug; then
49169      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49170    else
49171      # -g0 does not disable inlining, which -g does.
49172      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49173    fi
49174  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49175    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49176  else
49177    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49178  fi
49179
49180
49181  # bounds, memory and behavior checking options
49182  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49183    case $DEBUG_LEVEL in
49184    release )
49185      # no adjustment
49186      ;;
49187    fastdebug )
49188      # no adjustment
49189      ;;
49190    slowdebug )
49191      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49192      # get's added conditionally on whether we produce debug symbols or not.
49193      # This is most likely not really correct.
49194
49195      # Add runtime stack smashing and undefined behavior checks.
49196      # Not all versions of gcc support -fstack-protector
49197      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240    # Execute function body
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289    # Execute function body
49290
49291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49292$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49293  supports=yes
49294
49295  saved_cflags="$CFLAGS"
49296  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49297  ac_ext=c
49298ac_cpp='$CPP $CPPFLAGS'
49299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49301ac_compiler_gnu=$ac_cv_c_compiler_gnu
49302
49303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49304/* end confdefs.h.  */
49305int i;
49306_ACEOF
49307if ac_fn_c_try_compile "$LINENO"; then :
49308
49309else
49310  supports=no
49311fi
49312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49313  ac_ext=cpp
49314ac_cpp='$CXXCPP $CPPFLAGS'
49315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49318
49319  CFLAGS="$saved_cflags"
49320
49321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49322$as_echo "$supports" >&6; }
49323  if test "x$supports" = "xyes" ; then
49324    :
49325    C_COMP_SUPPORTS="yes"
49326  else
49327    :
49328    C_COMP_SUPPORTS="no"
49329  fi
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
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389    # Execute function body
49390
49391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49392$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49393  supports=yes
49394
49395  saved_cxxflags="$CXXFLAGS"
49396  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49397  ac_ext=cpp
49398ac_cpp='$CXXCPP $CPPFLAGS'
49399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49402
49403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49404/* end confdefs.h.  */
49405int i;
49406_ACEOF
49407if ac_fn_cxx_try_compile "$LINENO"; then :
49408
49409else
49410  supports=no
49411fi
49412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49413  ac_ext=cpp
49414ac_cpp='$CXXCPP $CPPFLAGS'
49415ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49416ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49417ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49418
49419  CXXFLAGS="$saved_cxxflags"
49420
49421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49422$as_echo "$supports" >&6; }
49423  if test "x$supports" = "xyes" ; then
49424    :
49425    CXX_COMP_SUPPORTS="yes"
49426  else
49427    :
49428    CXX_COMP_SUPPORTS="no"
49429  fi
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49444$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49445  supports=no
49446  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49447
49448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49449$as_echo "$supports" >&6; }
49450  if test "x$supports" = "xyes" ; then
49451    :
49452
49453  else
49454    :
49455    STACK_PROTECTOR_CFLAG=""
49456  fi
49457
49458
49459
49460
49461
49462
49463
49464      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49465      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49466      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49467        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49468      fi
49469      ;;
49470    esac
49471  fi
49472
49473  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49474    if test "x$DEBUG_LEVEL" != xrelease; then
49475      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49476        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49477      fi
49478    fi
49479  fi
49480
49481  # Optimization levels
49482  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49483    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49484
49485    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49486      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49487      C_O_FLAG_HIGHEST_JVM="-xO4"
49488      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49489      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49490      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49491      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49492      C_O_FLAG_DEBUG_JVM=""
49493      C_O_FLAG_NONE="-xregs=no%frameptr"
49494      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49495      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49496      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49497      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49498      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49499      CXX_O_FLAG_DEBUG_JVM=""
49500      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49501      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49502        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49503        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49504      fi
49505    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49506      C_O_FLAG_HIGHEST_JVM="-xO4"
49507      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49508      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49509      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49510      C_O_FLAG_DEBUG=""
49511      C_O_FLAG_DEBUG_JVM=""
49512      C_O_FLAG_NONE=""
49513      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49514      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49515      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49516      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49517      CXX_O_FLAG_DEBUG=""
49518      CXX_O_FLAG_DEBUG_JVM=""
49519      CXX_O_FLAG_NONE=""
49520    fi
49521  else
49522    # The remaining toolchains share opt flags between CC and CXX;
49523    # setup for C and duplicate afterwards.
49524    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49525      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49526        # On MacOSX we optimize for size, something
49527        # we should do for all platforms?
49528        C_O_FLAG_HIGHEST_JVM="-Os"
49529        C_O_FLAG_HIGHEST="-Os"
49530        C_O_FLAG_HI="-Os"
49531        C_O_FLAG_NORM="-Os"
49532        C_O_FLAG_SIZE="-Os"
49533      else
49534        C_O_FLAG_HIGHEST_JVM="-O3"
49535        C_O_FLAG_HIGHEST="-O3"
49536        C_O_FLAG_HI="-O3"
49537        C_O_FLAG_NORM="-O2"
49538        C_O_FLAG_SIZE="-Os"
49539      fi
49540      C_O_FLAG_DEBUG="-O0"
49541      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49542        C_O_FLAG_DEBUG_JVM=""
49543      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49544        C_O_FLAG_DEBUG_JVM="-O0"
49545      fi
49546      C_O_FLAG_NONE="-O0"
49547    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49548      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49549        # On MacOSX we optimize for size, something
49550        # we should do for all platforms?
49551        C_O_FLAG_HIGHEST_JVM="-Os"
49552        C_O_FLAG_HIGHEST="-Os"
49553        C_O_FLAG_HI="-Os"
49554        C_O_FLAG_NORM="-Os"
49555        C_O_FLAG_SIZE="-Os"
49556      else
49557        C_O_FLAG_HIGHEST_JVM="-O3"
49558        C_O_FLAG_HIGHEST="-O3"
49559        C_O_FLAG_HI="-O3"
49560        C_O_FLAG_NORM="-O2"
49561        C_O_FLAG_SIZE="-Os"
49562      fi
49563      C_O_FLAG_DEBUG="-O0"
49564      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49565        C_O_FLAG_DEBUG_JVM=""
49566      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49567        C_O_FLAG_DEBUG_JVM="-O0"
49568      fi
49569      C_O_FLAG_NONE="-O0"
49570    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49571      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49572      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49573      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49574      C_O_FLAG_NORM="-O2"
49575      C_O_FLAG_DEBUG="-qnoopt"
49576      # FIXME: Value below not verified.
49577      C_O_FLAG_DEBUG_JVM=""
49578      C_O_FLAG_NONE="-qnoopt"
49579    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49580      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49581      C_O_FLAG_HIGHEST="-O2"
49582      C_O_FLAG_HI="-O1"
49583      C_O_FLAG_NORM="-O1"
49584      C_O_FLAG_DEBUG="-Od"
49585      C_O_FLAG_DEBUG_JVM=""
49586      C_O_FLAG_NONE="-Od"
49587      C_O_FLAG_SIZE="-Os"
49588    fi
49589    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49590    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49591    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49592    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49593    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49594    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49595    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49596    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49597  fi
49598
49599  # Adjust optimization flags according to debug level.
49600  case $DEBUG_LEVEL in
49601    release )
49602      # no adjustment
49603      ;;
49604    fastdebug )
49605      # Not quite so much optimization
49606      C_O_FLAG_HI="$C_O_FLAG_NORM"
49607      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49608      ;;
49609    slowdebug )
49610      # Disable optimization
49611      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49612      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49613      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49614      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49615      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49616      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49617      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49618      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49619      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49620      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49621      ;;
49622  esac
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642  # Special extras...
49643  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49644    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49645      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49646      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49647    fi
49648    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49649    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49650  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49651    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49652    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49653  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49654    CXXSTD_CXXFLAG="-std=gnu++98"
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697    # Execute function body
49698
49699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49700$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49701  supports=yes
49702
49703  saved_cxxflags="$CXXFLAGS"
49704  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49705  ac_ext=cpp
49706ac_cpp='$CXXCPP $CPPFLAGS'
49707ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49708ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49709ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49710
49711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49712/* end confdefs.h.  */
49713int i;
49714_ACEOF
49715if ac_fn_cxx_try_compile "$LINENO"; then :
49716
49717else
49718  supports=no
49719fi
49720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49721  ac_ext=cpp
49722ac_cpp='$CXXCPP $CPPFLAGS'
49723ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49724ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49725ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49726
49727  CXXFLAGS="$saved_cxxflags"
49728
49729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49730$as_echo "$supports" >&6; }
49731  if test "x$supports" = "xyes" ; then
49732    :
49733
49734  else
49735    :
49736    CXXSTD_CXXFLAG=""
49737  fi
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49751    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49752
49753  fi
49754  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49755    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49756    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49757  fi
49758
49759  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49760    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49761    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49762  fi
49763
49764  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49765  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49766  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49767
49768  ###############################################################################
49769  #
49770  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49771  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49772  #
49773
49774  # Setup compiler/platform specific flags into
49775  #    CFLAGS_JDK    - C Compiler flags
49776  #    CXXFLAGS_JDK  - C++ Compiler flags
49777  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49778  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49779    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49780    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49781    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49782    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49783      # Force compatibility with i586 on 32 bit intel platforms.
49784      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49785      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49786    fi
49787    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49788        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49789    case $OPENJDK_TARGET_CPU_ARCH in
49790      arm )
49791        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49792        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49793        ;;
49794      ppc )
49795        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49796        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49797        ;;
49798      s390 )
49799        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49800        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49801        ;;
49802      * )
49803        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49804        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49805        ;;
49806    esac
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861    # Execute function body
49862
49863  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49864  REFERENCE_VERSION=6
49865
49866  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49867    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49868  fi
49869
49870  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49871    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49872  fi
49873
49874  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49875  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49876
49877  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49878    :
49879
49880  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49881  # runs afoul of the more aggressive versions of these optimisations.
49882  # Notably, value range propagation now assumes that the this pointer of C++
49883  # member functions is non-null.
49884  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49885        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49886        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49887$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49888  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49889  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49890
49891  else
49892    :
49893
49894  fi
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49910    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49911
49912    # Restrict the debug information created by Clang to avoid
49913    # too big object files and speed the build up a little bit
49914    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49915    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49916    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49917      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49918        # Force compatibility with i586 on 32 bit intel platforms.
49919        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49920        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49921      fi
49922      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49923      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49924          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49925      case $OPENJDK_TARGET_CPU_ARCH in
49926        ppc )
49927          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49928          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49929          ;;
49930        * )
49931          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49932          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49933          ;;
49934      esac
49935    fi
49936  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49937    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49938    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49939    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49940      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49941    fi
49942
49943    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49944    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49945  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49946    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49947    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49948    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49949  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49950    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49951        -MD -Zc:wchar_t- -W3 -wd4800 \
49952        -DWIN32_LEAN_AND_MEAN \
49953        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49954        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49955        -DWIN32 -DIAL"
49956    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49957      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49958    else
49959      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49960    fi
49961    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49962    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49963    # studio.
49964    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49965      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49966      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49967      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49968    fi
49969  fi
49970
49971  ###############################################################################
49972
49973  # Adjust flags according to debug level.
49974  case $DEBUG_LEVEL in
49975    fastdebug | slowdebug )
49976      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49977      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49978      ;;
49979    release )
49980      ;;
49981    * )
49982      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49983      ;;
49984  esac
49985
49986  # Set some common defines. These works for all compilers, but assume
49987  # -D is universally accepted.
49988
49989  # Setup endianness
49990  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49991    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49992    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49993    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49994    #   Note: -Dmacro         is the same as    #define macro 1
49995    #         -Dmacro=        is the same as    #define macro
49996    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49997      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49998    else
49999      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50000    fi
50001  else
50002    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50003    # are defined in the system?
50004    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50005      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50006    else
50007      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50008    fi
50009  fi
50010
50011  # Setup target OS define. Use OS target name but in upper case.
50012  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50013  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50014
50015  # Setup target CPU
50016  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50017      $OPENJDK_TARGET_ADD_LP64 \
50018      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50019
50020  # Setup debug/release defines
50021  if test "x$DEBUG_LEVEL" = xrelease; then
50022    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50023    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50024      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50025    fi
50026  else
50027    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50028  fi
50029
50030  # Set some additional per-OS defines.
50031  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50032    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50033    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50034        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50035  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50036    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50037    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50038        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50039  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50040    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50041    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50042    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50043    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50044        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50045        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50046        -fno-omit-frame-pointer"
50047  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50048    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50049    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50050    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50051        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50052        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50053  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50054    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50055  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50056    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50057    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50058  fi
50059
50060  # Set some additional per-CPU defines.
50061  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50062    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50063  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50064    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50065  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50066    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50067      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50068      # fixes `relocation truncated to fit' error for gcc 4.1.
50069      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50070      # Use ppc64 instructions, but schedule for power5
50071      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50072    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50073      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50074    fi
50075  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50076    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50077      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50078      # Little endian machine uses ELFv2 ABI.
50079      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50080      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50081      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50082    fi
50083  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50084    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50085      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50086    fi
50087  fi
50088
50089  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50090    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50091  fi
50092
50093  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50094    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50095      # Solaris does not have _LP64=1 in the old build.
50096      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50097      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50098    fi
50099  fi
50100
50101  # Set JVM_CFLAGS warning handling
50102  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50103    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50104        -Wunused-value -Woverloaded-virtual"
50105
50106    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161    # Execute function body
50162
50163  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50164  REFERENCE_VERSION=4.8
50165
50166  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50167    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50168  fi
50169
50170  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50171    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50172  fi
50173
50174  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50175  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50176
50177  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50178    :
50179
50180            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50181            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50182
50183
50184  else
50185    :
50186
50187  fi
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202    fi
50203    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50204      # Non-zero builds have stricter warnings
50205      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50206    else
50207      if test "x$TOOLCHAIN_TYPE" = xclang; then
50208        # Some versions of llvm do not like -Wundef
50209        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50210      fi
50211    fi
50212  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50213    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50214        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50215  fi
50216
50217  # Additional macosx handling
50218  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50219    # Setting these parameters makes it an error to link to macosx APIs that are
50220    # newer than the given OS version and makes the linked binaries compatible
50221    # even if built on a newer version of the OS.
50222    # The expected format is X.Y.Z
50223    MACOSX_VERSION_MIN=10.7.0
50224
50225
50226    # The macro takes the version with no dots, ex: 1070
50227    # Let the flags variables get resolved in make for easier override on make
50228    # command line.
50229    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50230    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50231  fi
50232
50233  # Setup some hard coded includes
50234  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50235      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50236      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50237      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50238      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50239      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50240      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50241
50242  # The shared libraries are compiled using the picflag.
50243  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50244      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50245  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50246      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50247
50248  # Executable flags
50249  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50250  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50251
50252
50253
50254
50255
50256
50257  # Setup LDFLAGS et al.
50258  #
50259
50260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50261    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50262    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50263    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50264    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50265      LDFLAGS_SAFESH="-safeseh"
50266      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50267      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50268      # NOTE: Old build added -machine. Probably not needed.
50269      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50270    else
50271      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50272    fi
50273  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50274      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50275      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50276        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50277        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50278    fi
50279  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50280    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50281    # We have previously set HAS_GNU_HASH if this is the case
50282    if test -n "$HAS_GNU_HASH"; then
50283      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50284      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50285      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50286    fi
50287      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50288        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50289    fi
50290    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50291      # And since we now know that the linker is gnu, then add -z defs, to forbid
50292      # undefined symbols in object files.
50293      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50294      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50295      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50296      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50297      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50298      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50299        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50300      fi
50301      case $DEBUG_LEVEL in
50302        release )
50303          # tell linker to optimize libraries.
50304          # Should this be supplied to the OSS linker as well?
50305          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50306          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50307          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50308          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50309            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50310          fi
50311          ;;
50312        slowdebug )
50313          # Hotspot always let the linker optimize
50314          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50315          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50316            # do relocations at load
50317            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50318            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50319            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50320          fi
50321          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50322            # mark relocations read only
50323            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50324            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50325            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50326          fi
50327          ;;
50328        fastdebug )
50329          # Hotspot always let the linker optimize
50330          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50331          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50332            # mark relocations read only
50333            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50334            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50335            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50336          fi
50337          ;;
50338        * )
50339          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50340          ;;
50341        esac
50342    fi
50343  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50344    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50345    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50346    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50347    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50348    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50349    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50350      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50351    fi
50352  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50353    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50354    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50355    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50356  fi
50357
50358  # Customize LDFLAGS for executables
50359
50360  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50361
50362  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50363    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50364      LDFLAGS_STACK_SIZE=1048576
50365    else
50366      LDFLAGS_STACK_SIZE=327680
50367    fi
50368    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50369  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50370    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50371  fi
50372
50373  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50374
50375  # Customize LDFLAGS for libs
50376  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50377
50378  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50379  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50380    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50381        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50382    JDKLIB_LIBS=""
50383  else
50384    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50385        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50386
50387    if test "xTARGET" = "xTARGET"; then
50388      # On some platforms (mac) the linker warns about non existing -L dirs.
50389      # For any of the variants server, client or minimal, the dir matches the
50390      # variant name. The "main" variant should be used for linking. For the
50391      # rest, the dir is just server.
50392      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50393          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50394        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50395            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
50396      else
50397        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50398            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50399      fi
50400    elif test "xTARGET" = "xBUILD"; then
50401      # When building a buildjdk, it's always only the server variant
50402      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50403          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50404    fi
50405
50406    JDKLIB_LIBS="-ljava -ljvm"
50407    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50408      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50409    fi
50410
50411  fi
50412
50413LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50414
50415  # Set JVM_LIBS (per os)
50416  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50417    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50418  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50419    # FIXME: This hard-coded path is not really proper.
50420    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50421      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50422    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50423      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50424    fi
50425    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50426        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50427  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50428    JVM_LIBS="$JVM_LIBS -lm"
50429  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50430    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50431  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50432    JVM_LIBS="$JVM_LIBS -lm"
50433  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50434    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50435        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50436        wsock32.lib winmm.lib version.lib psapi.lib"
50437    fi
50438
50439  # Set JVM_ASFLAGS
50440  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50441    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50442      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50443    fi
50444  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50445    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50446  fi
50447
50448  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464  # Special extras...
50465  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50466    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50467      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50468      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50469    fi
50470    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50471    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50472  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50473    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50474    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50475  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50476    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519    # Execute function body
50520
50521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50522$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50523  supports=yes
50524
50525  saved_cxxflags="$CXXFLAGS"
50526  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50527  ac_ext=cpp
50528ac_cpp='$CXXCPP $CPPFLAGS'
50529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50532
50533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50534/* end confdefs.h.  */
50535int i;
50536_ACEOF
50537if ac_fn_cxx_try_compile "$LINENO"; then :
50538
50539else
50540  supports=no
50541fi
50542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50543  ac_ext=cpp
50544ac_cpp='$CXXCPP $CPPFLAGS'
50545ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50546ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50547ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50548
50549  CXXFLAGS="$saved_cxxflags"
50550
50551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50552$as_echo "$supports" >&6; }
50553  if test "x$supports" = "xyes" ; then
50554    :
50555
50556  else
50557    :
50558    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50559  fi
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50573    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50574
50575  fi
50576  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50577    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50578    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50579  fi
50580
50581  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50582    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50583    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50584  fi
50585
50586  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50587  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50588  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50589
50590  ###############################################################################
50591  #
50592  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50593  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50594  #
50595
50596  # Setup compiler/platform specific flags into
50597  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50598  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50599  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50600  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50601    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50602    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50603    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50604    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50605      # Force compatibility with i586 on 32 bit intel platforms.
50606      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50607      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50608    fi
50609    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50610        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50611    case $OPENJDK_BUILD_CPU_ARCH in
50612      arm )
50613        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50614        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50615        ;;
50616      ppc )
50617        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50618        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50619        ;;
50620      s390 )
50621        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50622        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50623        ;;
50624      * )
50625        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50626        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50627        ;;
50628    esac
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683    # Execute function body
50684
50685  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50686  REFERENCE_VERSION=6
50687
50688  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50689    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50690  fi
50691
50692  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50693    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50694  fi
50695
50696  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50697  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50698
50699  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50700    :
50701
50702  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50703  # runs afoul of the more aggressive versions of these optimisations.
50704  # Notably, value range propagation now assumes that the this pointer of C++
50705  # member functions is non-null.
50706  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50707        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50708        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50709$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50710  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50711  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50712
50713  else
50714    :
50715
50716  fi
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50732    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50733
50734    # Restrict the debug information created by Clang to avoid
50735    # too big object files and speed the build up a little bit
50736    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50737    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50738    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50739      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50740        # Force compatibility with i586 on 32 bit intel platforms.
50741        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50742        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50743      fi
50744      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50745      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50746          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50747      case $OPENJDK_BUILD_CPU_ARCH in
50748        ppc )
50749          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50750          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50751          ;;
50752        * )
50753          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50754          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50755          ;;
50756      esac
50757    fi
50758  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50759    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50760    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50761    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50762      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50763    fi
50764
50765    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50766    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50767  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50768    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50769    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50770    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50771  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50772    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50773        -MD -Zc:wchar_t- -W3 -wd4800 \
50774        -DWIN32_LEAN_AND_MEAN \
50775        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50776        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50777        -DWIN32 -DIAL"
50778    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50779      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50780    else
50781      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50782    fi
50783    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50784    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50785    # studio.
50786    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50787      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50788      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50789      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50790    fi
50791  fi
50792
50793  ###############################################################################
50794
50795  # Adjust flags according to debug level.
50796  case $DEBUG_LEVEL in
50797    fastdebug | slowdebug )
50798      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50799      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50800      ;;
50801    release )
50802      ;;
50803    * )
50804      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50805      ;;
50806  esac
50807
50808  # Set some common defines. These works for all compilers, but assume
50809  # -D is universally accepted.
50810
50811  # Setup endianness
50812  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50813    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50814    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50815    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50816    #   Note: -Dmacro         is the same as    #define macro 1
50817    #         -Dmacro=        is the same as    #define macro
50818    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50819      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50820    else
50821      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50822    fi
50823  else
50824    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50825    # are defined in the system?
50826    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50827      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50828    else
50829      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50830    fi
50831  fi
50832
50833  # Setup target OS define. Use OS target name but in upper case.
50834  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50835  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50836
50837  # Setup target CPU
50838  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50839      $OPENJDK_BUILD_ADD_LP64 \
50840      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50841
50842  # Setup debug/release defines
50843  if test "x$DEBUG_LEVEL" = xrelease; then
50844    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50845    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50846      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50847    fi
50848  else
50849    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50850  fi
50851
50852  # Set some additional per-OS defines.
50853  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50854    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50855    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50856        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50857  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50858    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50859    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50860        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50861  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50862    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50863    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50864    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50865    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50866        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50867        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50868        -fno-omit-frame-pointer"
50869  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50870    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50871    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50872    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50873        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50874        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50875  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50876    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50877  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50878    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50879    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50880  fi
50881
50882  # Set some additional per-CPU defines.
50883  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50884    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50885  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50886    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50887  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50888    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50889      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50890      # fixes `relocation truncated to fit' error for gcc 4.1.
50891      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50892      # Use ppc64 instructions, but schedule for power5
50893      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50894    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50895      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50896    fi
50897  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50898    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50899      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50900      # Little endian machine uses ELFv2 ABI.
50901      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50902      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50903      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50904    fi
50905  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50906    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50907      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50908    fi
50909  fi
50910
50911  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50913  fi
50914
50915  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50916    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50917      # Solaris does not have _LP64=1 in the old build.
50918      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50919      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50920    fi
50921  fi
50922
50923  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50924  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50925    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50926        -Wunused-value -Woverloaded-virtual"
50927
50928    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983    # Execute function body
50984
50985  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50986  REFERENCE_VERSION=4.8
50987
50988  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50989    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50990  fi
50991
50992  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50993    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50994  fi
50995
50996  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50997  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50998
50999  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51000    :
51001
51002            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51003            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51004
51005
51006  else
51007    :
51008
51009  fi
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024    fi
51025    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51026      # Non-zero builds have stricter warnings
51027      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51028    else
51029      if test "x$TOOLCHAIN_TYPE" = xclang; then
51030        # Some versions of llvm do not like -Wundef
51031        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51032      fi
51033    fi
51034  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51035    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51036        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51037  fi
51038
51039  # Additional macosx handling
51040  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51041    # Setting these parameters makes it an error to link to macosx APIs that are
51042    # newer than the given OS version and makes the linked binaries compatible
51043    # even if built on a newer version of the OS.
51044    # The expected format is X.Y.Z
51045    MACOSX_VERSION_MIN=10.7.0
51046
51047
51048    # The macro takes the version with no dots, ex: 1070
51049    # Let the flags variables get resolved in make for easier override on make
51050    # command line.
51051    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)"
51052    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51053  fi
51054
51055  # Setup some hard coded includes
51056  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51057      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51058      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51059      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51060      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51061      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51062      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51063
51064  # The shared libraries are compiled using the picflag.
51065  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51066      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51067  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51068      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51069
51070  # Executable flags
51071  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51072  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51073
51074
51075
51076
51077
51078
51079  # Setup LDFLAGS et al.
51080  #
51081
51082  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51083    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51084    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51085    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51086    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51087      LDFLAGS_SAFESH="-safeseh"
51088      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51089      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51090      # NOTE: Old build added -machine. Probably not needed.
51091      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51092    else
51093      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51094    fi
51095  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51096      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51097      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51098        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51099        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51100    fi
51101  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51102    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51103    # We have previously set HAS_GNU_HASH if this is the case
51104    if test -n "$HAS_GNU_HASH"; then
51105      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51106      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51107      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51108    fi
51109      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51110        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51111    fi
51112    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51113      # And since we now know that the linker is gnu, then add -z defs, to forbid
51114      # undefined symbols in object files.
51115      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51116      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51117      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51118      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51119      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51120      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51121        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51122      fi
51123      case $DEBUG_LEVEL in
51124        release )
51125          # tell linker to optimize libraries.
51126          # Should this be supplied to the OSS linker as well?
51127          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51128          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51129          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51130          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51131            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51132          fi
51133          ;;
51134        slowdebug )
51135          # Hotspot always let the linker optimize
51136          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51137          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51138            # do relocations at load
51139            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51140            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51141            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51142          fi
51143          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51144            # mark relocations read only
51145            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51146            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51147            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51148          fi
51149          ;;
51150        fastdebug )
51151          # Hotspot always let the linker optimize
51152          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51153          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51154            # mark relocations read only
51155            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51156            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51157            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51158          fi
51159          ;;
51160        * )
51161          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51162          ;;
51163        esac
51164    fi
51165  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51166    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51167    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51168    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51169    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51170    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51171    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51172      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51173    fi
51174  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51175    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51176    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51177    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51178  fi
51179
51180  # Customize LDFLAGS for executables
51181
51182  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51183
51184  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51185    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51186      LDFLAGS_STACK_SIZE=1048576
51187    else
51188      LDFLAGS_STACK_SIZE=327680
51189    fi
51190    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51191  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51192    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51193  fi
51194
51195  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51196
51197  # Customize LDFLAGS for libs
51198  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51199
51200  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51201  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51202    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51203        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51204    OPENJDK_BUILD_JDKLIB_LIBS=""
51205  else
51206    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51207        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51208
51209    if test "xBUILD" = "xTARGET"; then
51210      # On some platforms (mac) the linker warns about non existing -L dirs.
51211      # For any of the variants server, client or minimal, the dir matches the
51212      # variant name. The "main" variant should be used for linking. For the
51213      # rest, the dir is just server.
51214      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51215          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51216        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51217            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
51218      else
51219        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51220            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51221      fi
51222    elif test "xBUILD" = "xBUILD"; then
51223      # When building a buildjdk, it's always only the server variant
51224      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51225          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51226    fi
51227
51228    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51229    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51230      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51231    fi
51232
51233  fi
51234
51235OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51236
51237  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51238  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51239    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51240  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51241    # FIXME: This hard-coded path is not really proper.
51242    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51243      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51244    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51245      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51246    fi
51247    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51248        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51249  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51250    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51251  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51252    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51253  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51254    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51255  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51256    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51257        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51258        wsock32.lib winmm.lib version.lib psapi.lib"
51259    fi
51260
51261  # Set OPENJDK_BUILD_JVM_ASFLAGS
51262  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51263    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51264      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51265    fi
51266  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51267    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51268  fi
51269
51270  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286  # Tests are only ever compiled for TARGET
51287  # Flags for compiling test libraries
51288  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51289  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51290
51291  # Flags for compiling test executables
51292  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51293  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51294
51295
51296
51297
51298
51299
51300  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51301  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51302
51303
51304
51305
51306
51307
51308  # Some Zero and Shark settings.
51309  # ZERO_ARCHFLAG tells the compiler which mode to build for
51310  case "${OPENJDK_TARGET_CPU}" in
51311    s390)
51312      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51313      ;;
51314    *)
51315      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51316  esac
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359    # Execute function body
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408    # Execute function body
51409
51410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51411$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51412  supports=yes
51413
51414  saved_cflags="$CFLAGS"
51415  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51416  ac_ext=c
51417ac_cpp='$CPP $CPPFLAGS'
51418ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51419ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51420ac_compiler_gnu=$ac_cv_c_compiler_gnu
51421
51422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51423/* end confdefs.h.  */
51424int i;
51425_ACEOF
51426if ac_fn_c_try_compile "$LINENO"; then :
51427
51428else
51429  supports=no
51430fi
51431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51432  ac_ext=cpp
51433ac_cpp='$CXXCPP $CPPFLAGS'
51434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51437
51438  CFLAGS="$saved_cflags"
51439
51440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51441$as_echo "$supports" >&6; }
51442  if test "x$supports" = "xyes" ; then
51443    :
51444    C_COMP_SUPPORTS="yes"
51445  else
51446    :
51447    C_COMP_SUPPORTS="no"
51448  fi
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508    # Execute function body
51509
51510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51511$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51512  supports=yes
51513
51514  saved_cxxflags="$CXXFLAGS"
51515  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51516  ac_ext=cpp
51517ac_cpp='$CXXCPP $CPPFLAGS'
51518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51521
51522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51523/* end confdefs.h.  */
51524int i;
51525_ACEOF
51526if ac_fn_cxx_try_compile "$LINENO"; then :
51527
51528else
51529  supports=no
51530fi
51531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51532  ac_ext=cpp
51533ac_cpp='$CXXCPP $CPPFLAGS'
51534ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51535ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51536ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51537
51538  CXXFLAGS="$saved_cxxflags"
51539
51540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51541$as_echo "$supports" >&6; }
51542  if test "x$supports" = "xyes" ; then
51543    :
51544    CXX_COMP_SUPPORTS="yes"
51545  else
51546    :
51547    CXX_COMP_SUPPORTS="no"
51548  fi
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51563$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51564  supports=no
51565  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51566
51567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51568$as_echo "$supports" >&6; }
51569  if test "x$supports" = "xyes" ; then
51570    :
51571
51572  else
51573    :
51574    ZERO_ARCHFLAG=""
51575  fi
51576
51577
51578
51579
51580
51581
51582
51583
51584  # Check that the compiler supports -mX (or -qX on AIX) flags
51585  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633    # Execute function body
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    # Execute function body
51683
51684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51685$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51686  supports=yes
51687
51688  saved_cflags="$CFLAGS"
51689  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51690  ac_ext=c
51691ac_cpp='$CPP $CPPFLAGS'
51692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51694ac_compiler_gnu=$ac_cv_c_compiler_gnu
51695
51696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51697/* end confdefs.h.  */
51698int i;
51699_ACEOF
51700if ac_fn_c_try_compile "$LINENO"; then :
51701
51702else
51703  supports=no
51704fi
51705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51706  ac_ext=cpp
51707ac_cpp='$CXXCPP $CPPFLAGS'
51708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51711
51712  CFLAGS="$saved_cflags"
51713
51714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51715$as_echo "$supports" >&6; }
51716  if test "x$supports" = "xyes" ; then
51717    :
51718    C_COMP_SUPPORTS="yes"
51719  else
51720    :
51721    C_COMP_SUPPORTS="no"
51722  fi
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782    # Execute function body
51783
51784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51785$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51786  supports=yes
51787
51788  saved_cxxflags="$CXXFLAGS"
51789  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51790  ac_ext=cpp
51791ac_cpp='$CXXCPP $CPPFLAGS'
51792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51795
51796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51797/* end confdefs.h.  */
51798int i;
51799_ACEOF
51800if ac_fn_cxx_try_compile "$LINENO"; then :
51801
51802else
51803  supports=no
51804fi
51805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51806  ac_ext=cpp
51807ac_cpp='$CXXCPP $CPPFLAGS'
51808ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51809ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51810ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51811
51812  CXXFLAGS="$saved_cxxflags"
51813
51814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51815$as_echo "$supports" >&6; }
51816  if test "x$supports" = "xyes" ; then
51817    :
51818    CXX_COMP_SUPPORTS="yes"
51819  else
51820    :
51821    CXX_COMP_SUPPORTS="no"
51822  fi
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51837$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51838  supports=no
51839  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51840
51841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51842$as_echo "$supports" >&6; }
51843  if test "x$supports" = "xyes" ; then
51844    :
51845    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51846  else
51847    :
51848    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51849  fi
51850
51851
51852
51853
51854
51855
51856
51857
51858  # Check whether --enable-warnings-as-errors was given.
51859if test "${enable_warnings_as_errors+set}" = set; then :
51860  enableval=$enable_warnings_as_errors;
51861fi
51862
51863
51864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51865$as_echo_n "checking if native warnings are errors... " >&6; }
51866  if test "x$enable_warnings_as_errors" = "xyes"; then
51867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51868$as_echo "yes (explicitly set)" >&6; }
51869    WARNINGS_AS_ERRORS=true
51870  elif test "x$enable_warnings_as_errors" = "xno"; then
51871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51872$as_echo "no" >&6; }
51873    WARNINGS_AS_ERRORS=false
51874  elif test "x$enable_warnings_as_errors" = "x"; then
51875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51876$as_echo "yes (default)" >&6; }
51877    WARNINGS_AS_ERRORS=true
51878  else
51879    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51880  fi
51881
51882  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51883    # Set legacy hotspot variable
51884    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51885  else
51886    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51887  fi
51888
51889
51890
51891
51892  case "${TOOLCHAIN_TYPE}" in
51893    microsoft)
51894      DISABLE_WARNING_PREFIX="-wd"
51895      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51896      ;;
51897    solstudio)
51898      DISABLE_WARNING_PREFIX="-erroff="
51899      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51900      ;;
51901    gcc)
51902      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950    # Execute function body
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999    # Execute function body
52000
52001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52002$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52003  supports=yes
52004
52005  saved_cflags="$CFLAGS"
52006  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52007  ac_ext=c
52008ac_cpp='$CPP $CPPFLAGS'
52009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52011ac_compiler_gnu=$ac_cv_c_compiler_gnu
52012
52013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52014/* end confdefs.h.  */
52015int i;
52016_ACEOF
52017if ac_fn_c_try_compile "$LINENO"; then :
52018
52019else
52020  supports=no
52021fi
52022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52023  ac_ext=cpp
52024ac_cpp='$CXXCPP $CPPFLAGS'
52025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52028
52029  CFLAGS="$saved_cflags"
52030
52031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52032$as_echo "$supports" >&6; }
52033  if test "x$supports" = "xyes" ; then
52034    :
52035    C_COMP_SUPPORTS="yes"
52036  else
52037    :
52038    C_COMP_SUPPORTS="no"
52039  fi
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099    # Execute function body
52100
52101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52102$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52103  supports=yes
52104
52105  saved_cxxflags="$CXXFLAGS"
52106  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52107  ac_ext=cpp
52108ac_cpp='$CXXCPP $CPPFLAGS'
52109ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52110ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52111ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52112
52113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52114/* end confdefs.h.  */
52115int i;
52116_ACEOF
52117if ac_fn_cxx_try_compile "$LINENO"; then :
52118
52119else
52120  supports=no
52121fi
52122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52123  ac_ext=cpp
52124ac_cpp='$CXXCPP $CPPFLAGS'
52125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52128
52129  CXXFLAGS="$saved_cxxflags"
52130
52131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52132$as_echo "$supports" >&6; }
52133  if test "x$supports" = "xyes" ; then
52134    :
52135    CXX_COMP_SUPPORTS="yes"
52136  else
52137    :
52138    CXX_COMP_SUPPORTS="no"
52139  fi
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52154$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52155  supports=no
52156  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52157
52158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52159$as_echo "$supports" >&6; }
52160  if test "x$supports" = "xyes" ; then
52161    :
52162    GCC_CAN_DISABLE_WARNINGS=true
52163  else
52164    :
52165    GCC_CAN_DISABLE_WARNINGS=false
52166
52167  fi
52168
52169
52170
52171
52172
52173
52174      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52175        DISABLE_WARNING_PREFIX="-Wno-"
52176      else
52177        DISABLE_WARNING_PREFIX=
52178      fi
52179      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52180      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52181      # CFLAGS since any target specific flags will likely not work with the
52182      # build compiler
52183      CC_OLD="$CC"
52184      CXX_OLD="$CXX"
52185      CC="$BUILD_CC"
52186      CXX="$BUILD_CXX"
52187      CFLAGS_OLD="$CFLAGS"
52188      CFLAGS=""
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236    # Execute function body
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
52281
52282
52283
52284
52285    # Execute function body
52286
52287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52288$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52289  supports=yes
52290
52291  saved_cflags="$CFLAGS"
52292  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52293  ac_ext=c
52294ac_cpp='$CPP $CPPFLAGS'
52295ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52296ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52297ac_compiler_gnu=$ac_cv_c_compiler_gnu
52298
52299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52300/* end confdefs.h.  */
52301int i;
52302_ACEOF
52303if ac_fn_c_try_compile "$LINENO"; then :
52304
52305else
52306  supports=no
52307fi
52308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52309  ac_ext=cpp
52310ac_cpp='$CXXCPP $CPPFLAGS'
52311ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52312ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52313ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52314
52315  CFLAGS="$saved_cflags"
52316
52317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52318$as_echo "$supports" >&6; }
52319  if test "x$supports" = "xyes" ; then
52320    :
52321    C_COMP_SUPPORTS="yes"
52322  else
52323    :
52324    C_COMP_SUPPORTS="no"
52325  fi
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385    # Execute function body
52386
52387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52388$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52389  supports=yes
52390
52391  saved_cxxflags="$CXXFLAGS"
52392  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52393  ac_ext=cpp
52394ac_cpp='$CXXCPP $CPPFLAGS'
52395ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52396ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52397ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52398
52399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52400/* end confdefs.h.  */
52401int i;
52402_ACEOF
52403if ac_fn_cxx_try_compile "$LINENO"; then :
52404
52405else
52406  supports=no
52407fi
52408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52409  ac_ext=cpp
52410ac_cpp='$CXXCPP $CPPFLAGS'
52411ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52412ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52413ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52414
52415  CXXFLAGS="$saved_cxxflags"
52416
52417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52418$as_echo "$supports" >&6; }
52419  if test "x$supports" = "xyes" ; then
52420    :
52421    CXX_COMP_SUPPORTS="yes"
52422  else
52423    :
52424    CXX_COMP_SUPPORTS="no"
52425  fi
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52440$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52441  supports=no
52442  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52443
52444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52445$as_echo "$supports" >&6; }
52446  if test "x$supports" = "xyes" ; then
52447    :
52448    BUILD_CC_CAN_DISABLE_WARNINGS=true
52449  else
52450    :
52451    BUILD_CC_CAN_DISABLE_WARNINGS=false
52452
52453  fi
52454
52455
52456
52457
52458
52459
52460      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52461        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52462      else
52463        BUILD_CC_DISABLE_WARNING_PREFIX=
52464      fi
52465      CC="$CC_OLD"
52466      CXX="$CXX_OLD"
52467      CFLAGS="$CFLAGS_OLD"
52468      ;;
52469    clang)
52470      DISABLE_WARNING_PREFIX="-Wno-"
52471      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52472      ;;
52473    xlc)
52474      DISABLE_WARNING_PREFIX="-qsuppress="
52475      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52476      ;;
52477  esac
52478
52479
52480
52481
52482
52483# Setup debug symbols (need objcopy from the toolchain for that)
52484
52485  #
52486  # NATIVE_DEBUG_SYMBOLS
52487  # This must be done after the toolchain is setup, since we're looking at objcopy.
52488  #
52489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52490$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52491
52492# Check whether --with-native-debug-symbols was given.
52493if test "${with_native_debug_symbols+set}" = set; then :
52494  withval=$with_native_debug_symbols;
52495        if test "x$OPENJDK_TARGET_OS" = xaix; then
52496          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52497            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52498          fi
52499        fi
52500
52501else
52502
52503        if test "x$OPENJDK_TARGET_OS" = xaix; then
52504          # AIX doesn't support 'zipped' so use 'internal' as default
52505          with_native_debug_symbols="internal"
52506        else
52507          if test "x$STATIC_BUILD" = xtrue; then
52508            with_native_debug_symbols="none"
52509          else
52510            with_native_debug_symbols="zipped"
52511          fi
52512        fi
52513
52514fi
52515
52516  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52518$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52519
52520  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52521
52522    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52523      if test "x$OBJCOPY" = x; then
52524        # enabling of enable-debug-symbols and can't find objcopy
52525        # this is an error
52526        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52527      fi
52528    fi
52529
52530    COMPILE_WITH_DEBUG_SYMBOLS=true
52531    COPY_DEBUG_SYMBOLS=true
52532    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52533  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52534    COMPILE_WITH_DEBUG_SYMBOLS=false
52535    COPY_DEBUG_SYMBOLS=false
52536    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52537  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52538    COMPILE_WITH_DEBUG_SYMBOLS=true
52539    COPY_DEBUG_SYMBOLS=false
52540    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52541  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52542
52543    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52544      if test "x$OBJCOPY" = x; then
52545        # enabling of enable-debug-symbols and can't find objcopy
52546        # this is an error
52547        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52548      fi
52549    fi
52550
52551    COMPILE_WITH_DEBUG_SYMBOLS=true
52552    COPY_DEBUG_SYMBOLS=true
52553    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52554  else
52555    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52556  fi
52557
52558  # --enable-debug-symbols is deprecated.
52559  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52560
52561  # Check whether --enable-debug-symbols was given.
52562if test "${enable_debug_symbols+set}" = set; then :
52563  enableval=$enable_debug_symbols;
52564fi
52565
52566  if test "x$enable_debug_symbols" != x; then
52567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52568$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52569
52570    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52571      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52572$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52573    fi
52574
52575  fi
52576
52577
52578  # --enable-zip-debug-info is deprecated.
52579  # Please use --with-native-debug-symbols=zipped .
52580
52581  # Check whether --enable-zip-debug-info was given.
52582if test "${enable_zip_debug_info+set}" = set; then :
52583  enableval=$enable_zip_debug_info;
52584fi
52585
52586  if test "x$enable_zip_debug_info" != x; then
52587    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52588$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52589
52590    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52591      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52592$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52593    fi
52594
52595  fi
52596
52597
52598
52599
52600
52601
52602
52603  # Check whether --enable-native-coverage was given.
52604if test "${enable_native_coverage+set}" = set; then :
52605  enableval=$enable_native_coverage;
52606fi
52607
52608  GCOV_ENABLED="false"
52609  if test "x$enable_native_coverage" = "xyes"; then
52610    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52612$as_echo_n "checking if native coverage is enabled... " >&6; }
52613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52614$as_echo "yes" >&6; }
52615      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52616      GCOV_LDFLAGS="-fprofile-arcs"
52617      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52618      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52619      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52620      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52621      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52622      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52623      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52624      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52625      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52626      GCOV_ENABLED="true"
52627    else
52628      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52629    fi
52630  elif test "x$enable_native_coverage" = "xno"; then
52631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52632$as_echo_n "checking if native coverage is enabled... " >&6; }
52633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52634$as_echo "no" >&6; }
52635  elif test "x$enable_native_coverage" != "x"; then
52636    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52637  fi
52638
52639
52640
52641
52642# Need toolchain to setup dtrace
52643
52644  # Test for dtrace dependencies
52645  # Check whether --enable-dtrace was given.
52646if test "${enable_dtrace+set}" = set; then :
52647  enableval=$enable_dtrace;
52648fi
52649
52650
52651  DTRACE_DEP_MISSING=false
52652
52653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52654$as_echo_n "checking for dtrace tool... " >&6; }
52655  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52657$as_echo "$DTRACE" >&6; }
52658  else
52659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52660$as_echo "not found, cannot build dtrace" >&6; }
52661    DTRACE_DEP_MISSING=true
52662  fi
52663
52664  for ac_header in sys/sdt.h
52665do :
52666  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52667if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52668  cat >>confdefs.h <<_ACEOF
52669#define HAVE_SYS_SDT_H 1
52670_ACEOF
52671 DTRACE_HEADERS_OK=yes
52672else
52673  DTRACE_HEADERS_OK=no
52674fi
52675
52676done
52677
52678  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52679    DTRACE_DEP_MISSING=true
52680  fi
52681
52682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52683$as_echo_n "checking if dtrace should be built... " >&6; }
52684  if test "x$enable_dtrace" = "xyes"; then
52685    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52687$as_echo "no, missing dependencies" >&6; }
52688
52689  # Print a helpful message on how to acquire the necessary build dependency.
52690  # dtrace is the help tag: freetype, cups, alsa etc
52691  MISSING_DEPENDENCY=dtrace
52692
52693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52694    cygwin_help $MISSING_DEPENDENCY
52695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52696    msys_help $MISSING_DEPENDENCY
52697  else
52698    PKGHANDLER_COMMAND=
52699
52700    case $PKGHANDLER in
52701      apt-get)
52702        apt_help     $MISSING_DEPENDENCY ;;
52703      yum)
52704        yum_help     $MISSING_DEPENDENCY ;;
52705      port)
52706        port_help    $MISSING_DEPENDENCY ;;
52707      pkgutil)
52708        pkgutil_help $MISSING_DEPENDENCY ;;
52709      pkgadd)
52710        pkgadd_help  $MISSING_DEPENDENCY ;;
52711    esac
52712
52713    if test "x$PKGHANDLER_COMMAND" != x; then
52714      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52715    fi
52716  fi
52717
52718      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52719    else
52720      INCLUDE_DTRACE=true
52721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52722$as_echo "yes, forced" >&6; }
52723    fi
52724  elif test "x$enable_dtrace" = "xno"; then
52725    INCLUDE_DTRACE=false
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52727$as_echo "no, forced" >&6; }
52728  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52729    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52730      INCLUDE_DTRACE=false
52731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52732$as_echo "no, missing dependencies" >&6; }
52733    else
52734      INCLUDE_DTRACE=true
52735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52736$as_echo "yes, dependencies present" >&6; }
52737    fi
52738  else
52739    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52740  fi
52741
52742
52743
52744  # The user can in some cases supply additional jvm features. For the custom
52745  # variant, this defines the entire variant.
52746
52747# Check whether --with-jvm-features was given.
52748if test "${with_jvm_features+set}" = set; then :
52749  withval=$with_jvm_features;
52750fi
52751
52752  if test "x$with_jvm_features" != x; then
52753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52754$as_echo_n "checking additional JVM features... " >&6; }
52755    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52757$as_echo "$JVM_FEATURES" >&6; }
52758  fi
52759
52760  # Verify that dependencies are met for explicitly set features.
52761  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52762    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52763  fi
52764
52765  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52766    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52767  fi
52768
52769  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52770    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52771  fi
52772
52773  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52774    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52775  fi
52776
52777  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52778    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52779  fi
52780
52781  # Turn on additional features based on other parts of configure
52782  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52783    JVM_FEATURES="$JVM_FEATURES dtrace"
52784  else
52785    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52786      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52787    fi
52788  fi
52789
52790  if test "x$STATIC_BUILD" = "xtrue"; then
52791    JVM_FEATURES="$JVM_FEATURES static-build"
52792  else
52793    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52794      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52795    fi
52796  fi
52797
52798  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52799    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52800      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52801    fi
52802  fi
52803
52804  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52805    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52806      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52807    fi
52808  fi
52809
52810  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52811  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52812      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52813      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52814    JVM_FEATURES_jvmci="jvmci"
52815  else
52816    JVM_FEATURES_jvmci=""
52817  fi
52818
52819  # All variants but minimal (and custom) get these features
52820  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52821
52822  # Enable features depending on variant.
52823  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52824  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52825  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52826  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52827  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52828  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52829  JVM_FEATURES_custom="$JVM_FEATURES"
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839  # Used for verification of Makefiles by check-jvm-feature
52840
52841
52842  # We don't support --with-jvm-interpreter anymore, use zero instead.
52843
52844
52845# Check whether --with-jvm-interpreter was given.
52846if test "${with_jvm_interpreter+set}" = set; then :
52847  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52848$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52849fi
52850
52851
52852
52853
52854  # Check whether --enable-hotspot-gtest was given.
52855if test "${enable_hotspot_gtest+set}" = set; then :
52856  enableval=$enable_hotspot_gtest;
52857fi
52858
52859
52860  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52861    GTEST_DIR_EXISTS="true"
52862  else
52863    GTEST_DIR_EXISTS="false"
52864  fi
52865
52866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52867$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52868  if test "x$enable_hotspot_gtest" = "xyes"; then
52869    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52871$as_echo "yes, forced" >&6; }
52872      BUILD_GTEST="true"
52873    else
52874      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52875    fi
52876  elif test "x$enable_hotspot_gtest" = "xno"; then
52877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52878$as_echo "no, forced" >&6; }
52879    BUILD_GTEST="false"
52880  elif test "x$enable_hotspot_gtest" = "x"; then
52881    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52883$as_echo "yes" >&6; }
52884      BUILD_GTEST="true"
52885    else
52886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52887$as_echo "no" >&6; }
52888      BUILD_GTEST="false"
52889    fi
52890  else
52891    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52892  fi
52893
52894
52895
52896
52897###############################################################################
52898#
52899# Check dependencies for external and internal libraries.
52900#
52901###############################################################################
52902
52903# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52904
52905  # When using cygwin or msys, we need a wrapper binary that renames
52906  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52907  # @files and rewrites these too! This wrapper binary is
52908  # called fixpath.
52909  FIXPATH=
52910  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52912$as_echo_n "checking if fixpath can be created... " >&6; }
52913    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52914    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52915    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52916    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52917      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52918      FIXPATH="$FIXPATH_BIN -c"
52919    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52920      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52921      # @ was chosen as separator to minimize risk of other tools messing around with it
52922      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52923          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52924      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52925      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52926    fi
52927    FIXPATH_SRC_W="$FIXPATH_SRC"
52928    FIXPATH_BIN_W="$FIXPATH_BIN"
52929
52930  unix_path="$FIXPATH_SRC_W"
52931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52932    windows_path=`$CYGPATH -m "$unix_path"`
52933    FIXPATH_SRC_W="$windows_path"
52934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52935    windows_path=`cmd //c echo $unix_path`
52936    FIXPATH_SRC_W="$windows_path"
52937  fi
52938
52939
52940  unix_path="$FIXPATH_BIN_W"
52941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52942    windows_path=`$CYGPATH -m "$unix_path"`
52943    FIXPATH_BIN_W="$windows_path"
52944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52945    windows_path=`cmd //c echo $unix_path`
52946    FIXPATH_BIN_W="$windows_path"
52947  fi
52948
52949    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52950    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52951    cd $FIXPATH_DIR
52952    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52953    cd $CURDIR
52954
52955    if test ! -x $FIXPATH_BIN; then
52956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52957$as_echo "no" >&6; }
52958      cat $FIXPATH_DIR/fixpath1.log
52959      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52960    fi
52961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52962$as_echo "yes" >&6; }
52963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52964$as_echo_n "checking if fixpath.exe works... " >&6; }
52965    cd $FIXPATH_DIR
52966    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52967        > $FIXPATH_DIR/fixpath2.log 2>&1
52968    cd $CURDIR
52969    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52971$as_echo "no" >&6; }
52972      cat $FIXPATH_DIR/fixpath2.log
52973      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52974    fi
52975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52976$as_echo "yes" >&6; }
52977
52978    FIXPATH_DETACH_FLAG="--detach"
52979  fi
52980
52981
52982
52983
52984
52985
52986  # Check if X11 is needed
52987  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52988    # No X11 support on windows or macosx
52989    NEEDS_LIB_X11=false
52990  else
52991    # All other instances need X11, even if building headless only, libawt still
52992    # needs X11 headers.
52993    NEEDS_LIB_X11=true
52994  fi
52995
52996  # Check if cups is needed
52997  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52998    # Windows have a separate print system
52999    NEEDS_LIB_CUPS=false
53000  else
53001    NEEDS_LIB_CUPS=true
53002  fi
53003
53004  # A custom hook may have set this already
53005  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53006    NEEDS_LIB_FREETYPE=true
53007  fi
53008
53009  # Check if alsa is needed
53010  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53011    NEEDS_LIB_ALSA=true
53012  else
53013    NEEDS_LIB_ALSA=false
53014  fi
53015
53016  # Check if ffi is needed
53017  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53018    NEEDS_LIB_FFI=true
53019  else
53020    NEEDS_LIB_FFI=false
53021  fi
53022
53023
53024  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53025  # dynamic build is configured on command line.
53026
53027# Check whether --with-stdc++lib was given.
53028if test "${with_stdc__lib+set}" = set; then :
53029  withval=$with_stdc__lib;
53030        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53031                && test "x$with_stdc__lib" != xdefault; then
53032          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53033        fi
53034
53035else
53036  with_stdc__lib=default
53037
53038fi
53039
53040
53041  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53042    # Test if stdc++ can be linked statically.
53043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53044$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53045    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53046    ac_ext=cpp
53047ac_cpp='$CXXCPP $CPPFLAGS'
53048ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53049ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53050ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53051
53052    OLD_LIBS="$LIBS"
53053    LIBS="$STATIC_STDCXX_FLAGS"
53054    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53055/* end confdefs.h.  */
53056
53057int
53058main ()
53059{
53060return 0;
53061  ;
53062  return 0;
53063}
53064_ACEOF
53065if ac_fn_cxx_try_link "$LINENO"; then :
53066  has_static_libstdcxx=yes
53067else
53068  has_static_libstdcxx=no
53069fi
53070rm -f core conftest.err conftest.$ac_objext \
53071    conftest$ac_exeext conftest.$ac_ext
53072    LIBS="$OLD_LIBS"
53073    ac_ext=cpp
53074ac_cpp='$CXXCPP $CPPFLAGS'
53075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53078
53079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53080$as_echo "$has_static_libstdcxx" >&6; }
53081
53082    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53083      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53084    fi
53085
53086    # If dynamic was requested, it's available since it would fail above otherwise.
53087    # If dynamic wasn't requested, go with static unless it isn't available.
53088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53089$as_echo_n "checking how to link with libstdc++... " >&6; }
53090    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53091        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53093$as_echo "dynamic" >&6; }
53094    else
53095      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53096      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53097      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53098      # just use the same setting as for the TARGET toolchain.
53099      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53101$as_echo "static" >&6; }
53102    fi
53103  fi
53104
53105  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53106  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53107    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53108  fi
53109
53110
53111
53112  # Setup Windows runtime dlls
53113  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53114
53115
53116# Check whether --with-msvcr-dll was given.
53117if test "${with_msvcr_dll+set}" = set; then :
53118  withval=$with_msvcr_dll;
53119fi
53120
53121
53122  if test "x$with_msvcr_dll" != x; then
53123    # If given explicitly by user, do not probe. If not present, fail directly.
53124
53125  DLL_NAME="$MSVCR_NAME"
53126  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53127  METHOD="--with-msvcr-dll"
53128  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53130$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53131
53132    # Need to check if the found msvcr is correct architecture
53133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53134$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53135    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53137      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53138      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53140        CORRECT_MSVCR_ARCH="PE32 executable"
53141      else
53142        CORRECT_MSVCR_ARCH="PE32+ executable"
53143      fi
53144    else
53145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53146        CORRECT_MSVCR_ARCH=386
53147      else
53148        CORRECT_MSVCR_ARCH=x86-64
53149      fi
53150    fi
53151    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53153$as_echo "ok" >&6; }
53154      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53155
53156  # Only process if variable expands to non-empty
53157
53158  if test "x$MSVC_DLL" != x; then
53159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53160
53161  # Input might be given as Windows format, start by converting to
53162  # unix format.
53163  path="$MSVC_DLL"
53164  new_path=`$CYGPATH -u "$path"`
53165
53166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53169  # "foo.exe" is OK but "foo" is an error.
53170  #
53171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53172  # It is also a way to make sure we got the proper file name for the real test later on.
53173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53174  if test "x$test_shortpath" = x; then
53175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53176$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53177    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53178  fi
53179
53180  # Call helper function which possibly converts this using DOS-style short mode.
53181  # If so, the updated path is stored in $new_path.
53182
53183  input_path="$new_path"
53184  # Check if we need to convert this using DOS-style short mode. If the path
53185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53186  # take no chances and rewrite it.
53187  # Note: m4 eats our [], so we need to use [ and ] instead.
53188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53189  if test "x$has_forbidden_chars" != x; then
53190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53194      # Going to short mode and back again did indeed matter. Since short mode is
53195      # case insensitive, let's make it lowercase to improve readability.
53196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53197      # Now convert it back to Unix-style (cygpath)
53198      input_path=`$CYGPATH -u "$shortmode_path"`
53199      new_path="$input_path"
53200    fi
53201  fi
53202
53203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53204  if test "x$test_cygdrive_prefix" = x; then
53205    # As a simple fix, exclude /usr/bin since it's not a real path.
53206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53208      # a path prefixed by /cygdrive for fixpath to work.
53209      new_path="$CYGWIN_ROOT_PATH$input_path"
53210    fi
53211  fi
53212
53213
53214  if test "x$path" != "x$new_path"; then
53215    MSVC_DLL="$new_path"
53216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53217$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53218  fi
53219
53220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53221
53222  path="$MSVC_DLL"
53223  has_colon=`$ECHO $path | $GREP ^.:`
53224  new_path="$path"
53225  if test "x$has_colon" = x; then
53226    # Not in mixed or Windows style, start by that.
53227    new_path=`cmd //c echo $path`
53228  fi
53229
53230
53231  input_path="$new_path"
53232  # Check if we need to convert this using DOS-style short mode. If the path
53233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53234  # take no chances and rewrite it.
53235  # Note: m4 eats our [], so we need to use [ and ] instead.
53236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53237  if test "x$has_forbidden_chars" != x; then
53238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53240  fi
53241
53242
53243  windows_path="$new_path"
53244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53245    unix_path=`$CYGPATH -u "$windows_path"`
53246    new_path="$unix_path"
53247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53249    new_path="$unix_path"
53250  fi
53251
53252  if test "x$path" != "x$new_path"; then
53253    MSVC_DLL="$new_path"
53254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53255$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53256  fi
53257
53258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53260
53261    else
53262      # We're on a unix platform. Hooray! :)
53263      path="$MSVC_DLL"
53264      has_space=`$ECHO "$path" | $GREP " "`
53265      if test "x$has_space" != x; then
53266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53267$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53269      fi
53270
53271      # Use eval to expand a potential ~
53272      eval path="$path"
53273      if test ! -f "$path" && test ! -d "$path"; then
53274        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53275      fi
53276
53277      if test -d "$path"; then
53278        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53279      else
53280        dir="`$DIRNAME "$path"`"
53281        base="`$BASENAME "$path"`"
53282        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53283      fi
53284    fi
53285  fi
53286
53287      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53288$as_echo_n "checking for $DLL_NAME... " >&6; }
53289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53290$as_echo "$MSVC_DLL" >&6; }
53291    else
53292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53293$as_echo "incorrect, ignoring" >&6; }
53294      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53295$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53296    fi
53297  fi
53298
53299    if test "x$MSVC_DLL" = x; then
53300      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53301    fi
53302    MSVCR_DLL="$MSVC_DLL"
53303  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53304
53305  DLL_NAME="$MSVCR_NAME"
53306  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53307  METHOD="devkit"
53308  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53310$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53311
53312    # Need to check if the found msvcr is correct architecture
53313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53314$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53315    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53317      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53318      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53320        CORRECT_MSVCR_ARCH="PE32 executable"
53321      else
53322        CORRECT_MSVCR_ARCH="PE32+ executable"
53323      fi
53324    else
53325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53326        CORRECT_MSVCR_ARCH=386
53327      else
53328        CORRECT_MSVCR_ARCH=x86-64
53329      fi
53330    fi
53331    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53333$as_echo "ok" >&6; }
53334      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53335
53336  # Only process if variable expands to non-empty
53337
53338  if test "x$MSVC_DLL" != x; then
53339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53340
53341  # Input might be given as Windows format, start by converting to
53342  # unix format.
53343  path="$MSVC_DLL"
53344  new_path=`$CYGPATH -u "$path"`
53345
53346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53349  # "foo.exe" is OK but "foo" is an error.
53350  #
53351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53352  # It is also a way to make sure we got the proper file name for the real test later on.
53353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53354  if test "x$test_shortpath" = x; then
53355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53356$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53357    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53358  fi
53359
53360  # Call helper function which possibly converts this using DOS-style short mode.
53361  # If so, the updated path is stored in $new_path.
53362
53363  input_path="$new_path"
53364  # Check if we need to convert this using DOS-style short mode. If the path
53365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53366  # take no chances and rewrite it.
53367  # Note: m4 eats our [], so we need to use [ and ] instead.
53368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53369  if test "x$has_forbidden_chars" != x; then
53370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53374      # Going to short mode and back again did indeed matter. Since short mode is
53375      # case insensitive, let's make it lowercase to improve readability.
53376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53377      # Now convert it back to Unix-style (cygpath)
53378      input_path=`$CYGPATH -u "$shortmode_path"`
53379      new_path="$input_path"
53380    fi
53381  fi
53382
53383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53384  if test "x$test_cygdrive_prefix" = x; then
53385    # As a simple fix, exclude /usr/bin since it's not a real path.
53386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53388      # a path prefixed by /cygdrive for fixpath to work.
53389      new_path="$CYGWIN_ROOT_PATH$input_path"
53390    fi
53391  fi
53392
53393
53394  if test "x$path" != "x$new_path"; then
53395    MSVC_DLL="$new_path"
53396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53398  fi
53399
53400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53401
53402  path="$MSVC_DLL"
53403  has_colon=`$ECHO $path | $GREP ^.:`
53404  new_path="$path"
53405  if test "x$has_colon" = x; then
53406    # Not in mixed or Windows style, start by that.
53407    new_path=`cmd //c echo $path`
53408  fi
53409
53410
53411  input_path="$new_path"
53412  # Check if we need to convert this using DOS-style short mode. If the path
53413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53414  # take no chances and rewrite it.
53415  # Note: m4 eats our [], so we need to use [ and ] instead.
53416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53417  if test "x$has_forbidden_chars" != x; then
53418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53420  fi
53421
53422
53423  windows_path="$new_path"
53424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53425    unix_path=`$CYGPATH -u "$windows_path"`
53426    new_path="$unix_path"
53427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53429    new_path="$unix_path"
53430  fi
53431
53432  if test "x$path" != "x$new_path"; then
53433    MSVC_DLL="$new_path"
53434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53435$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53436  fi
53437
53438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53440
53441    else
53442      # We're on a unix platform. Hooray! :)
53443      path="$MSVC_DLL"
53444      has_space=`$ECHO "$path" | $GREP " "`
53445      if test "x$has_space" != x; then
53446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53449      fi
53450
53451      # Use eval to expand a potential ~
53452      eval path="$path"
53453      if test ! -f "$path" && test ! -d "$path"; then
53454        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53455      fi
53456
53457      if test -d "$path"; then
53458        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53459      else
53460        dir="`$DIRNAME "$path"`"
53461        base="`$BASENAME "$path"`"
53462        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53463      fi
53464    fi
53465  fi
53466
53467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53468$as_echo_n "checking for $DLL_NAME... " >&6; }
53469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53470$as_echo "$MSVC_DLL" >&6; }
53471    else
53472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53473$as_echo "incorrect, ignoring" >&6; }
53474      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53475$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53476    fi
53477  fi
53478
53479    if test "x$MSVC_DLL" = x; then
53480      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53481    fi
53482    MSVCR_DLL="$MSVC_DLL"
53483  else
53484
53485  DLL_NAME="${MSVCR_NAME}"
53486  MSVC_DLL=
53487
53488  if test "x$MSVC_DLL" = x; then
53489    # Probe: Using well-known location from Visual Studio 10.0
53490    if test "x$VCINSTALLDIR" != x; then
53491      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53492
53493  windows_path="$CYGWIN_VC_INSTALL_DIR"
53494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53495    unix_path=`$CYGPATH -u "$windows_path"`
53496    CYGWIN_VC_INSTALL_DIR="$unix_path"
53497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53499    CYGWIN_VC_INSTALL_DIR="$unix_path"
53500  fi
53501
53502      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53503        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53504      else
53505        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53506      fi
53507      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53508
53509  DLL_NAME="$DLL_NAME"
53510  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53511  METHOD="well-known location in VCINSTALLDIR"
53512  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53514$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53515
53516    # Need to check if the found msvcr is correct architecture
53517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53518$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53519    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53521      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53522      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53524        CORRECT_MSVCR_ARCH="PE32 executable"
53525      else
53526        CORRECT_MSVCR_ARCH="PE32+ executable"
53527      fi
53528    else
53529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53530        CORRECT_MSVCR_ARCH=386
53531      else
53532        CORRECT_MSVCR_ARCH=x86-64
53533      fi
53534    fi
53535    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53537$as_echo "ok" >&6; }
53538      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53539
53540  # Only process if variable expands to non-empty
53541
53542  if test "x$MSVC_DLL" != x; then
53543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53544
53545  # Input might be given as Windows format, start by converting to
53546  # unix format.
53547  path="$MSVC_DLL"
53548  new_path=`$CYGPATH -u "$path"`
53549
53550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53553  # "foo.exe" is OK but "foo" is an error.
53554  #
53555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53556  # It is also a way to make sure we got the proper file name for the real test later on.
53557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53558  if test "x$test_shortpath" = x; then
53559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53560$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53561    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53562  fi
53563
53564  # Call helper function which possibly converts this using DOS-style short mode.
53565  # If so, the updated path is stored in $new_path.
53566
53567  input_path="$new_path"
53568  # Check if we need to convert this using DOS-style short mode. If the path
53569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53570  # take no chances and rewrite it.
53571  # Note: m4 eats our [], so we need to use [ and ] instead.
53572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53573  if test "x$has_forbidden_chars" != x; then
53574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53578      # Going to short mode and back again did indeed matter. Since short mode is
53579      # case insensitive, let's make it lowercase to improve readability.
53580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53581      # Now convert it back to Unix-style (cygpath)
53582      input_path=`$CYGPATH -u "$shortmode_path"`
53583      new_path="$input_path"
53584    fi
53585  fi
53586
53587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53588  if test "x$test_cygdrive_prefix" = x; then
53589    # As a simple fix, exclude /usr/bin since it's not a real path.
53590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53592      # a path prefixed by /cygdrive for fixpath to work.
53593      new_path="$CYGWIN_ROOT_PATH$input_path"
53594    fi
53595  fi
53596
53597
53598  if test "x$path" != "x$new_path"; then
53599    MSVC_DLL="$new_path"
53600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53602  fi
53603
53604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53605
53606  path="$MSVC_DLL"
53607  has_colon=`$ECHO $path | $GREP ^.:`
53608  new_path="$path"
53609  if test "x$has_colon" = x; then
53610    # Not in mixed or Windows style, start by that.
53611    new_path=`cmd //c echo $path`
53612  fi
53613
53614
53615  input_path="$new_path"
53616  # Check if we need to convert this using DOS-style short mode. If the path
53617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53618  # take no chances and rewrite it.
53619  # Note: m4 eats our [], so we need to use [ and ] instead.
53620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53621  if test "x$has_forbidden_chars" != x; then
53622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53624  fi
53625
53626
53627  windows_path="$new_path"
53628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53629    unix_path=`$CYGPATH -u "$windows_path"`
53630    new_path="$unix_path"
53631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53633    new_path="$unix_path"
53634  fi
53635
53636  if test "x$path" != "x$new_path"; then
53637    MSVC_DLL="$new_path"
53638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53640  fi
53641
53642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53644
53645    else
53646      # We're on a unix platform. Hooray! :)
53647      path="$MSVC_DLL"
53648      has_space=`$ECHO "$path" | $GREP " "`
53649      if test "x$has_space" != x; then
53650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53651$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53653      fi
53654
53655      # Use eval to expand a potential ~
53656      eval path="$path"
53657      if test ! -f "$path" && test ! -d "$path"; then
53658        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53659      fi
53660
53661      if test -d "$path"; then
53662        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53663      else
53664        dir="`$DIRNAME "$path"`"
53665        base="`$BASENAME "$path"`"
53666        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53667      fi
53668    fi
53669  fi
53670
53671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53672$as_echo_n "checking for $DLL_NAME... " >&6; }
53673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53674$as_echo "$MSVC_DLL" >&6; }
53675    else
53676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53677$as_echo "incorrect, ignoring" >&6; }
53678      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53679$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53680    fi
53681  fi
53682
53683    fi
53684  fi
53685
53686  if test "x$MSVC_DLL" = x; then
53687    # Probe: Check in the Boot JDK directory.
53688    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53689
53690  DLL_NAME="$DLL_NAME"
53691  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53692  METHOD="well-known location in Boot JDK"
53693  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53694    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53695$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53696
53697    # Need to check if the found msvcr is correct architecture
53698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53699$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53700    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53702      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53703      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53705        CORRECT_MSVCR_ARCH="PE32 executable"
53706      else
53707        CORRECT_MSVCR_ARCH="PE32+ executable"
53708      fi
53709    else
53710      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53711        CORRECT_MSVCR_ARCH=386
53712      else
53713        CORRECT_MSVCR_ARCH=x86-64
53714      fi
53715    fi
53716    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53718$as_echo "ok" >&6; }
53719      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53720
53721  # Only process if variable expands to non-empty
53722
53723  if test "x$MSVC_DLL" != x; then
53724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53725
53726  # Input might be given as Windows format, start by converting to
53727  # unix format.
53728  path="$MSVC_DLL"
53729  new_path=`$CYGPATH -u "$path"`
53730
53731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53734  # "foo.exe" is OK but "foo" is an error.
53735  #
53736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53737  # It is also a way to make sure we got the proper file name for the real test later on.
53738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53739  if test "x$test_shortpath" = x; then
53740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53741$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53742    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53743  fi
53744
53745  # Call helper function which possibly converts this using DOS-style short mode.
53746  # If so, the updated path is stored in $new_path.
53747
53748  input_path="$new_path"
53749  # Check if we need to convert this using DOS-style short mode. If the path
53750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53751  # take no chances and rewrite it.
53752  # Note: m4 eats our [], so we need to use [ and ] instead.
53753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53754  if test "x$has_forbidden_chars" != x; then
53755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53759      # Going to short mode and back again did indeed matter. Since short mode is
53760      # case insensitive, let's make it lowercase to improve readability.
53761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53762      # Now convert it back to Unix-style (cygpath)
53763      input_path=`$CYGPATH -u "$shortmode_path"`
53764      new_path="$input_path"
53765    fi
53766  fi
53767
53768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53769  if test "x$test_cygdrive_prefix" = x; then
53770    # As a simple fix, exclude /usr/bin since it's not a real path.
53771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53773      # a path prefixed by /cygdrive for fixpath to work.
53774      new_path="$CYGWIN_ROOT_PATH$input_path"
53775    fi
53776  fi
53777
53778
53779  if test "x$path" != "x$new_path"; then
53780    MSVC_DLL="$new_path"
53781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53782$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53783  fi
53784
53785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53786
53787  path="$MSVC_DLL"
53788  has_colon=`$ECHO $path | $GREP ^.:`
53789  new_path="$path"
53790  if test "x$has_colon" = x; then
53791    # Not in mixed or Windows style, start by that.
53792    new_path=`cmd //c echo $path`
53793  fi
53794
53795
53796  input_path="$new_path"
53797  # Check if we need to convert this using DOS-style short mode. If the path
53798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53799  # take no chances and rewrite it.
53800  # Note: m4 eats our [], so we need to use [ and ] instead.
53801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53802  if test "x$has_forbidden_chars" != x; then
53803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53805  fi
53806
53807
53808  windows_path="$new_path"
53809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53810    unix_path=`$CYGPATH -u "$windows_path"`
53811    new_path="$unix_path"
53812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53814    new_path="$unix_path"
53815  fi
53816
53817  if test "x$path" != "x$new_path"; then
53818    MSVC_DLL="$new_path"
53819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53820$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53821  fi
53822
53823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53825
53826    else
53827      # We're on a unix platform. Hooray! :)
53828      path="$MSVC_DLL"
53829      has_space=`$ECHO "$path" | $GREP " "`
53830      if test "x$has_space" != x; then
53831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53832$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53834      fi
53835
53836      # Use eval to expand a potential ~
53837      eval path="$path"
53838      if test ! -f "$path" && test ! -d "$path"; then
53839        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53840      fi
53841
53842      if test -d "$path"; then
53843        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53844      else
53845        dir="`$DIRNAME "$path"`"
53846        base="`$BASENAME "$path"`"
53847        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53848      fi
53849    fi
53850  fi
53851
53852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53853$as_echo_n "checking for $DLL_NAME... " >&6; }
53854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53855$as_echo "$MSVC_DLL" >&6; }
53856    else
53857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53858$as_echo "incorrect, ignoring" >&6; }
53859      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53860$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53861    fi
53862  fi
53863
53864  fi
53865
53866  if test "x$MSVC_DLL" = x; then
53867    # Probe: Look in the Windows system32 directory
53868    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53869
53870  windows_path="$CYGWIN_SYSTEMROOT"
53871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53872    unix_path=`$CYGPATH -u "$windows_path"`
53873    CYGWIN_SYSTEMROOT="$unix_path"
53874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53876    CYGWIN_SYSTEMROOT="$unix_path"
53877  fi
53878
53879    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53880
53881  DLL_NAME="$DLL_NAME"
53882  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53883  METHOD="well-known location in SYSTEMROOT"
53884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53887
53888    # Need to check if the found msvcr is correct architecture
53889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53896        CORRECT_MSVCR_ARCH="PE32 executable"
53897      else
53898        CORRECT_MSVCR_ARCH="PE32+ executable"
53899      fi
53900    else
53901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53902        CORRECT_MSVCR_ARCH=386
53903      else
53904        CORRECT_MSVCR_ARCH=x86-64
53905      fi
53906    fi
53907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53909$as_echo "ok" >&6; }
53910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53911
53912  # Only process if variable expands to non-empty
53913
53914  if test "x$MSVC_DLL" != x; then
53915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53916
53917  # Input might be given as Windows format, start by converting to
53918  # unix format.
53919  path="$MSVC_DLL"
53920  new_path=`$CYGPATH -u "$path"`
53921
53922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53925  # "foo.exe" is OK but "foo" is an error.
53926  #
53927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53928  # It is also a way to make sure we got the proper file name for the real test later on.
53929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53930  if test "x$test_shortpath" = x; then
53931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53934  fi
53935
53936  # Call helper function which possibly converts this using DOS-style short mode.
53937  # If so, the updated path is stored in $new_path.
53938
53939  input_path="$new_path"
53940  # Check if we need to convert this using DOS-style short mode. If the path
53941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53942  # take no chances and rewrite it.
53943  # Note: m4 eats our [], so we need to use [ and ] instead.
53944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53945  if test "x$has_forbidden_chars" != x; then
53946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53950      # Going to short mode and back again did indeed matter. Since short mode is
53951      # case insensitive, let's make it lowercase to improve readability.
53952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53953      # Now convert it back to Unix-style (cygpath)
53954      input_path=`$CYGPATH -u "$shortmode_path"`
53955      new_path="$input_path"
53956    fi
53957  fi
53958
53959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53960  if test "x$test_cygdrive_prefix" = x; then
53961    # As a simple fix, exclude /usr/bin since it's not a real path.
53962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53964      # a path prefixed by /cygdrive for fixpath to work.
53965      new_path="$CYGWIN_ROOT_PATH$input_path"
53966    fi
53967  fi
53968
53969
53970  if test "x$path" != "x$new_path"; then
53971    MSVC_DLL="$new_path"
53972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53974  fi
53975
53976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53977
53978  path="$MSVC_DLL"
53979  has_colon=`$ECHO $path | $GREP ^.:`
53980  new_path="$path"
53981  if test "x$has_colon" = x; then
53982    # Not in mixed or Windows style, start by that.
53983    new_path=`cmd //c echo $path`
53984  fi
53985
53986
53987  input_path="$new_path"
53988  # Check if we need to convert this using DOS-style short mode. If the path
53989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53990  # take no chances and rewrite it.
53991  # Note: m4 eats our [], so we need to use [ and ] instead.
53992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53993  if test "x$has_forbidden_chars" != x; then
53994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53996  fi
53997
53998
53999  windows_path="$new_path"
54000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54001    unix_path=`$CYGPATH -u "$windows_path"`
54002    new_path="$unix_path"
54003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54005    new_path="$unix_path"
54006  fi
54007
54008  if test "x$path" != "x$new_path"; then
54009    MSVC_DLL="$new_path"
54010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54012  fi
54013
54014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54016
54017    else
54018      # We're on a unix platform. Hooray! :)
54019      path="$MSVC_DLL"
54020      has_space=`$ECHO "$path" | $GREP " "`
54021      if test "x$has_space" != x; then
54022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54025      fi
54026
54027      # Use eval to expand a potential ~
54028      eval path="$path"
54029      if test ! -f "$path" && test ! -d "$path"; then
54030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54031      fi
54032
54033      if test -d "$path"; then
54034        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54035      else
54036        dir="`$DIRNAME "$path"`"
54037        base="`$BASENAME "$path"`"
54038        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54039      fi
54040    fi
54041  fi
54042
54043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54044$as_echo_n "checking for $DLL_NAME... " >&6; }
54045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54046$as_echo "$MSVC_DLL" >&6; }
54047    else
54048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54049$as_echo "incorrect, ignoring" >&6; }
54050      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54051$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54052    fi
54053  fi
54054
54055  fi
54056
54057  if test "x$MSVC_DLL" = x; then
54058    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54059    if test "x$VS100COMNTOOLS" != x; then
54060      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54061
54062  windows_path="$CYGWIN_VS_TOOLS_DIR"
54063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54064    unix_path=`$CYGPATH -u "$windows_path"`
54065    CYGWIN_VS_TOOLS_DIR="$unix_path"
54066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54068    CYGWIN_VS_TOOLS_DIR="$unix_path"
54069  fi
54070
54071      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54072        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54073	    | $GREP -i /x64/ | $HEAD --lines 1`
54074      else
54075        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54076	    | $GREP -i /x86/ | $HEAD --lines 1`
54077      fi
54078
54079  DLL_NAME="$DLL_NAME"
54080  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54081  METHOD="search of VS100COMNTOOLS"
54082  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54084$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54085
54086    # Need to check if the found msvcr is correct architecture
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54088$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54089    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54091      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54092      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54093      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54094        CORRECT_MSVCR_ARCH="PE32 executable"
54095      else
54096        CORRECT_MSVCR_ARCH="PE32+ executable"
54097      fi
54098    else
54099      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54100        CORRECT_MSVCR_ARCH=386
54101      else
54102        CORRECT_MSVCR_ARCH=x86-64
54103      fi
54104    fi
54105    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54107$as_echo "ok" >&6; }
54108      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54109
54110  # Only process if variable expands to non-empty
54111
54112  if test "x$MSVC_DLL" != x; then
54113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54114
54115  # Input might be given as Windows format, start by converting to
54116  # unix format.
54117  path="$MSVC_DLL"
54118  new_path=`$CYGPATH -u "$path"`
54119
54120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54123  # "foo.exe" is OK but "foo" is an error.
54124  #
54125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54126  # It is also a way to make sure we got the proper file name for the real test later on.
54127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54128  if test "x$test_shortpath" = x; then
54129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54130$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54131    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54132  fi
54133
54134  # Call helper function which possibly converts this using DOS-style short mode.
54135  # If so, the updated path is stored in $new_path.
54136
54137  input_path="$new_path"
54138  # Check if we need to convert this using DOS-style short mode. If the path
54139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54140  # take no chances and rewrite it.
54141  # Note: m4 eats our [], so we need to use [ and ] instead.
54142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54143  if test "x$has_forbidden_chars" != x; then
54144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54148      # Going to short mode and back again did indeed matter. Since short mode is
54149      # case insensitive, let's make it lowercase to improve readability.
54150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54151      # Now convert it back to Unix-style (cygpath)
54152      input_path=`$CYGPATH -u "$shortmode_path"`
54153      new_path="$input_path"
54154    fi
54155  fi
54156
54157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54158  if test "x$test_cygdrive_prefix" = x; then
54159    # As a simple fix, exclude /usr/bin since it's not a real path.
54160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54162      # a path prefixed by /cygdrive for fixpath to work.
54163      new_path="$CYGWIN_ROOT_PATH$input_path"
54164    fi
54165  fi
54166
54167
54168  if test "x$path" != "x$new_path"; then
54169    MSVC_DLL="$new_path"
54170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54171$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54172  fi
54173
54174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54175
54176  path="$MSVC_DLL"
54177  has_colon=`$ECHO $path | $GREP ^.:`
54178  new_path="$path"
54179  if test "x$has_colon" = x; then
54180    # Not in mixed or Windows style, start by that.
54181    new_path=`cmd //c echo $path`
54182  fi
54183
54184
54185  input_path="$new_path"
54186  # Check if we need to convert this using DOS-style short mode. If the path
54187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54188  # take no chances and rewrite it.
54189  # Note: m4 eats our [], so we need to use [ and ] instead.
54190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54191  if test "x$has_forbidden_chars" != x; then
54192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54194  fi
54195
54196
54197  windows_path="$new_path"
54198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54199    unix_path=`$CYGPATH -u "$windows_path"`
54200    new_path="$unix_path"
54201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54203    new_path="$unix_path"
54204  fi
54205
54206  if test "x$path" != "x$new_path"; then
54207    MSVC_DLL="$new_path"
54208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54209$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54210  fi
54211
54212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54214
54215    else
54216      # We're on a unix platform. Hooray! :)
54217      path="$MSVC_DLL"
54218      has_space=`$ECHO "$path" | $GREP " "`
54219      if test "x$has_space" != x; then
54220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54223      fi
54224
54225      # Use eval to expand a potential ~
54226      eval path="$path"
54227      if test ! -f "$path" && test ! -d "$path"; then
54228        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54229      fi
54230
54231      if test -d "$path"; then
54232        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54233      else
54234        dir="`$DIRNAME "$path"`"
54235        base="`$BASENAME "$path"`"
54236        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54237      fi
54238    fi
54239  fi
54240
54241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54242$as_echo_n "checking for $DLL_NAME... " >&6; }
54243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54244$as_echo "$MSVC_DLL" >&6; }
54245    else
54246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54247$as_echo "incorrect, ignoring" >&6; }
54248      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54249$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54250    fi
54251  fi
54252
54253    fi
54254  fi
54255
54256  if test "x$MSVC_DLL" = x; then
54257    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54258    # (This was the original behaviour; kept since it might turn something up)
54259    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54260      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54261        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54262	    | $GREP x64 | $HEAD --lines 1`
54263      else
54264        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54265	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54266        if test "x$POSSIBLE_MSVC_DLL" = x; then
54267          # We're grasping at straws now...
54268          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54269	      | $HEAD --lines 1`
54270        fi
54271      fi
54272
54273
54274  DLL_NAME="$DLL_NAME"
54275  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54276  METHOD="search of VCINSTALLDIR"
54277  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54278    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54279$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54280
54281    # Need to check if the found msvcr is correct architecture
54282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54283$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54284    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54286      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54287      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54288      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54289        CORRECT_MSVCR_ARCH="PE32 executable"
54290      else
54291        CORRECT_MSVCR_ARCH="PE32+ executable"
54292      fi
54293    else
54294      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54295        CORRECT_MSVCR_ARCH=386
54296      else
54297        CORRECT_MSVCR_ARCH=x86-64
54298      fi
54299    fi
54300    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54302$as_echo "ok" >&6; }
54303      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54304
54305  # Only process if variable expands to non-empty
54306
54307  if test "x$MSVC_DLL" != x; then
54308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54309
54310  # Input might be given as Windows format, start by converting to
54311  # unix format.
54312  path="$MSVC_DLL"
54313  new_path=`$CYGPATH -u "$path"`
54314
54315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54318  # "foo.exe" is OK but "foo" is an error.
54319  #
54320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54321  # It is also a way to make sure we got the proper file name for the real test later on.
54322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54323  if test "x$test_shortpath" = x; then
54324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54325$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54326    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54327  fi
54328
54329  # Call helper function which possibly converts this using DOS-style short mode.
54330  # If so, the updated path is stored in $new_path.
54331
54332  input_path="$new_path"
54333  # Check if we need to convert this using DOS-style short mode. If the path
54334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54335  # take no chances and rewrite it.
54336  # Note: m4 eats our [], so we need to use [ and ] instead.
54337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54338  if test "x$has_forbidden_chars" != x; then
54339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54343      # Going to short mode and back again did indeed matter. Since short mode is
54344      # case insensitive, let's make it lowercase to improve readability.
54345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54346      # Now convert it back to Unix-style (cygpath)
54347      input_path=`$CYGPATH -u "$shortmode_path"`
54348      new_path="$input_path"
54349    fi
54350  fi
54351
54352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54353  if test "x$test_cygdrive_prefix" = x; then
54354    # As a simple fix, exclude /usr/bin since it's not a real path.
54355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54357      # a path prefixed by /cygdrive for fixpath to work.
54358      new_path="$CYGWIN_ROOT_PATH$input_path"
54359    fi
54360  fi
54361
54362
54363  if test "x$path" != "x$new_path"; then
54364    MSVC_DLL="$new_path"
54365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54366$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54367  fi
54368
54369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54370
54371  path="$MSVC_DLL"
54372  has_colon=`$ECHO $path | $GREP ^.:`
54373  new_path="$path"
54374  if test "x$has_colon" = x; then
54375    # Not in mixed or Windows style, start by that.
54376    new_path=`cmd //c echo $path`
54377  fi
54378
54379
54380  input_path="$new_path"
54381  # Check if we need to convert this using DOS-style short mode. If the path
54382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54383  # take no chances and rewrite it.
54384  # Note: m4 eats our [], so we need to use [ and ] instead.
54385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54386  if test "x$has_forbidden_chars" != x; then
54387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54389  fi
54390
54391
54392  windows_path="$new_path"
54393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54394    unix_path=`$CYGPATH -u "$windows_path"`
54395    new_path="$unix_path"
54396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54398    new_path="$unix_path"
54399  fi
54400
54401  if test "x$path" != "x$new_path"; then
54402    MSVC_DLL="$new_path"
54403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54404$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54405  fi
54406
54407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54409
54410    else
54411      # We're on a unix platform. Hooray! :)
54412      path="$MSVC_DLL"
54413      has_space=`$ECHO "$path" | $GREP " "`
54414      if test "x$has_space" != x; then
54415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54416$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54418      fi
54419
54420      # Use eval to expand a potential ~
54421      eval path="$path"
54422      if test ! -f "$path" && test ! -d "$path"; then
54423        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54424      fi
54425
54426      if test -d "$path"; then
54427        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54428      else
54429        dir="`$DIRNAME "$path"`"
54430        base="`$BASENAME "$path"`"
54431        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54432      fi
54433    fi
54434  fi
54435
54436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54437$as_echo_n "checking for $DLL_NAME... " >&6; }
54438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54439$as_echo "$MSVC_DLL" >&6; }
54440    else
54441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54442$as_echo "incorrect, ignoring" >&6; }
54443      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54444$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54445    fi
54446  fi
54447
54448    fi
54449  fi
54450
54451  if test "x$MSVC_DLL" = x; then
54452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54453$as_echo_n "checking for $DLL_NAME... " >&6; }
54454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54455$as_echo "no" >&6; }
54456    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54457  fi
54458
54459    MSVCR_DLL="$MSVC_DLL"
54460  fi
54461
54462
54463
54464# Check whether --with-msvcp-dll was given.
54465if test "${with_msvcp_dll+set}" = set; then :
54466  withval=$with_msvcp_dll;
54467fi
54468
54469
54470  if test "x$MSVCP_NAME" != "x"; then
54471    if test "x$with_msvcp_dll" != x; then
54472      # If given explicitly by user, do not probe. If not present, fail directly.
54473
54474  DLL_NAME="$MSVCP_NAME"
54475  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54476  METHOD="--with-msvcp-dll"
54477  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54479$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54480
54481    # Need to check if the found msvcr is correct architecture
54482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54483$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54484    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54486      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54487      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54488      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54489        CORRECT_MSVCR_ARCH="PE32 executable"
54490      else
54491        CORRECT_MSVCR_ARCH="PE32+ executable"
54492      fi
54493    else
54494      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54495        CORRECT_MSVCR_ARCH=386
54496      else
54497        CORRECT_MSVCR_ARCH=x86-64
54498      fi
54499    fi
54500    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54502$as_echo "ok" >&6; }
54503      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54504
54505  # Only process if variable expands to non-empty
54506
54507  if test "x$MSVC_DLL" != x; then
54508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54509
54510  # Input might be given as Windows format, start by converting to
54511  # unix format.
54512  path="$MSVC_DLL"
54513  new_path=`$CYGPATH -u "$path"`
54514
54515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54518  # "foo.exe" is OK but "foo" is an error.
54519  #
54520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54521  # It is also a way to make sure we got the proper file name for the real test later on.
54522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54523  if test "x$test_shortpath" = x; then
54524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54525$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54526    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54527  fi
54528
54529  # Call helper function which possibly converts this using DOS-style short mode.
54530  # If so, the updated path is stored in $new_path.
54531
54532  input_path="$new_path"
54533  # Check if we need to convert this using DOS-style short mode. If the path
54534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54535  # take no chances and rewrite it.
54536  # Note: m4 eats our [], so we need to use [ and ] instead.
54537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54538  if test "x$has_forbidden_chars" != x; then
54539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54543      # Going to short mode and back again did indeed matter. Since short mode is
54544      # case insensitive, let's make it lowercase to improve readability.
54545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54546      # Now convert it back to Unix-style (cygpath)
54547      input_path=`$CYGPATH -u "$shortmode_path"`
54548      new_path="$input_path"
54549    fi
54550  fi
54551
54552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54553  if test "x$test_cygdrive_prefix" = x; then
54554    # As a simple fix, exclude /usr/bin since it's not a real path.
54555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54557      # a path prefixed by /cygdrive for fixpath to work.
54558      new_path="$CYGWIN_ROOT_PATH$input_path"
54559    fi
54560  fi
54561
54562
54563  if test "x$path" != "x$new_path"; then
54564    MSVC_DLL="$new_path"
54565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54567  fi
54568
54569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54570
54571  path="$MSVC_DLL"
54572  has_colon=`$ECHO $path | $GREP ^.:`
54573  new_path="$path"
54574  if test "x$has_colon" = x; then
54575    # Not in mixed or Windows style, start by that.
54576    new_path=`cmd //c echo $path`
54577  fi
54578
54579
54580  input_path="$new_path"
54581  # Check if we need to convert this using DOS-style short mode. If the path
54582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54583  # take no chances and rewrite it.
54584  # Note: m4 eats our [], so we need to use [ and ] instead.
54585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54586  if test "x$has_forbidden_chars" != x; then
54587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54589  fi
54590
54591
54592  windows_path="$new_path"
54593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54594    unix_path=`$CYGPATH -u "$windows_path"`
54595    new_path="$unix_path"
54596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54598    new_path="$unix_path"
54599  fi
54600
54601  if test "x$path" != "x$new_path"; then
54602    MSVC_DLL="$new_path"
54603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54604$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54605  fi
54606
54607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54609
54610    else
54611      # We're on a unix platform. Hooray! :)
54612      path="$MSVC_DLL"
54613      has_space=`$ECHO "$path" | $GREP " "`
54614      if test "x$has_space" != x; then
54615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54616$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54618      fi
54619
54620      # Use eval to expand a potential ~
54621      eval path="$path"
54622      if test ! -f "$path" && test ! -d "$path"; then
54623        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54624      fi
54625
54626      if test -d "$path"; then
54627        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54628      else
54629        dir="`$DIRNAME "$path"`"
54630        base="`$BASENAME "$path"`"
54631        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54632      fi
54633    fi
54634  fi
54635
54636      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54637$as_echo_n "checking for $DLL_NAME... " >&6; }
54638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54639$as_echo "$MSVC_DLL" >&6; }
54640    else
54641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54642$as_echo "incorrect, ignoring" >&6; }
54643      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54644$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54645    fi
54646  fi
54647
54648      if test "x$MSVC_DLL" = x; then
54649        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54650      fi
54651      MSVCP_DLL="$MSVC_DLL"
54652    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54653
54654  DLL_NAME="$MSVCP_NAME"
54655  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54656  METHOD="devkit"
54657  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54659$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54660
54661    # Need to check if the found msvcr is correct architecture
54662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54663$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54664    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54666      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54667      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54668      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54669        CORRECT_MSVCR_ARCH="PE32 executable"
54670      else
54671        CORRECT_MSVCR_ARCH="PE32+ executable"
54672      fi
54673    else
54674      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54675        CORRECT_MSVCR_ARCH=386
54676      else
54677        CORRECT_MSVCR_ARCH=x86-64
54678      fi
54679    fi
54680    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54682$as_echo "ok" >&6; }
54683      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54684
54685  # Only process if variable expands to non-empty
54686
54687  if test "x$MSVC_DLL" != x; then
54688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54689
54690  # Input might be given as Windows format, start by converting to
54691  # unix format.
54692  path="$MSVC_DLL"
54693  new_path=`$CYGPATH -u "$path"`
54694
54695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54698  # "foo.exe" is OK but "foo" is an error.
54699  #
54700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54701  # It is also a way to make sure we got the proper file name for the real test later on.
54702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54703  if test "x$test_shortpath" = x; then
54704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54705$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54706    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54707  fi
54708
54709  # Call helper function which possibly converts this using DOS-style short mode.
54710  # If so, the updated path is stored in $new_path.
54711
54712  input_path="$new_path"
54713  # Check if we need to convert this using DOS-style short mode. If the path
54714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54715  # take no chances and rewrite it.
54716  # Note: m4 eats our [], so we need to use [ and ] instead.
54717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54718  if test "x$has_forbidden_chars" != x; then
54719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54723      # Going to short mode and back again did indeed matter. Since short mode is
54724      # case insensitive, let's make it lowercase to improve readability.
54725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54726      # Now convert it back to Unix-style (cygpath)
54727      input_path=`$CYGPATH -u "$shortmode_path"`
54728      new_path="$input_path"
54729    fi
54730  fi
54731
54732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54733  if test "x$test_cygdrive_prefix" = x; then
54734    # As a simple fix, exclude /usr/bin since it's not a real path.
54735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54737      # a path prefixed by /cygdrive for fixpath to work.
54738      new_path="$CYGWIN_ROOT_PATH$input_path"
54739    fi
54740  fi
54741
54742
54743  if test "x$path" != "x$new_path"; then
54744    MSVC_DLL="$new_path"
54745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54746$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54747  fi
54748
54749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54750
54751  path="$MSVC_DLL"
54752  has_colon=`$ECHO $path | $GREP ^.:`
54753  new_path="$path"
54754  if test "x$has_colon" = x; then
54755    # Not in mixed or Windows style, start by that.
54756    new_path=`cmd //c echo $path`
54757  fi
54758
54759
54760  input_path="$new_path"
54761  # Check if we need to convert this using DOS-style short mode. If the path
54762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54763  # take no chances and rewrite it.
54764  # Note: m4 eats our [], so we need to use [ and ] instead.
54765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54766  if test "x$has_forbidden_chars" != x; then
54767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54769  fi
54770
54771
54772  windows_path="$new_path"
54773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54774    unix_path=`$CYGPATH -u "$windows_path"`
54775    new_path="$unix_path"
54776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54778    new_path="$unix_path"
54779  fi
54780
54781  if test "x$path" != "x$new_path"; then
54782    MSVC_DLL="$new_path"
54783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54784$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54785  fi
54786
54787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54789
54790    else
54791      # We're on a unix platform. Hooray! :)
54792      path="$MSVC_DLL"
54793      has_space=`$ECHO "$path" | $GREP " "`
54794      if test "x$has_space" != x; then
54795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54796$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54798      fi
54799
54800      # Use eval to expand a potential ~
54801      eval path="$path"
54802      if test ! -f "$path" && test ! -d "$path"; then
54803        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54804      fi
54805
54806      if test -d "$path"; then
54807        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54808      else
54809        dir="`$DIRNAME "$path"`"
54810        base="`$BASENAME "$path"`"
54811        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54812      fi
54813    fi
54814  fi
54815
54816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54817$as_echo_n "checking for $DLL_NAME... " >&6; }
54818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54819$as_echo "$MSVC_DLL" >&6; }
54820    else
54821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54822$as_echo "incorrect, ignoring" >&6; }
54823      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54824$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54825    fi
54826  fi
54827
54828      if test "x$MSVC_DLL" = x; then
54829        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54830      fi
54831      MSVCP_DLL="$MSVC_DLL"
54832    else
54833
54834  DLL_NAME="${MSVCP_NAME}"
54835  MSVC_DLL=
54836
54837  if test "x$MSVC_DLL" = x; then
54838    # Probe: Using well-known location from Visual Studio 10.0
54839    if test "x$VCINSTALLDIR" != x; then
54840      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54841
54842  windows_path="$CYGWIN_VC_INSTALL_DIR"
54843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54844    unix_path=`$CYGPATH -u "$windows_path"`
54845    CYGWIN_VC_INSTALL_DIR="$unix_path"
54846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54848    CYGWIN_VC_INSTALL_DIR="$unix_path"
54849  fi
54850
54851      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54852        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54853      else
54854        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54855      fi
54856      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54857
54858  DLL_NAME="$DLL_NAME"
54859  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54860  METHOD="well-known location in VCINSTALLDIR"
54861  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54863$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54864
54865    # Need to check if the found msvcr is correct architecture
54866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54867$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54868    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54870      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54871      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54873        CORRECT_MSVCR_ARCH="PE32 executable"
54874      else
54875        CORRECT_MSVCR_ARCH="PE32+ executable"
54876      fi
54877    else
54878      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54879        CORRECT_MSVCR_ARCH=386
54880      else
54881        CORRECT_MSVCR_ARCH=x86-64
54882      fi
54883    fi
54884    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54886$as_echo "ok" >&6; }
54887      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54888
54889  # Only process if variable expands to non-empty
54890
54891  if test "x$MSVC_DLL" != x; then
54892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54893
54894  # Input might be given as Windows format, start by converting to
54895  # unix format.
54896  path="$MSVC_DLL"
54897  new_path=`$CYGPATH -u "$path"`
54898
54899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54902  # "foo.exe" is OK but "foo" is an error.
54903  #
54904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54905  # It is also a way to make sure we got the proper file name for the real test later on.
54906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54907  if test "x$test_shortpath" = x; then
54908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54909$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54910    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54911  fi
54912
54913  # Call helper function which possibly converts this using DOS-style short mode.
54914  # If so, the updated path is stored in $new_path.
54915
54916  input_path="$new_path"
54917  # Check if we need to convert this using DOS-style short mode. If the path
54918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54919  # take no chances and rewrite it.
54920  # Note: m4 eats our [], so we need to use [ and ] instead.
54921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54922  if test "x$has_forbidden_chars" != x; then
54923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54927      # Going to short mode and back again did indeed matter. Since short mode is
54928      # case insensitive, let's make it lowercase to improve readability.
54929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54930      # Now convert it back to Unix-style (cygpath)
54931      input_path=`$CYGPATH -u "$shortmode_path"`
54932      new_path="$input_path"
54933    fi
54934  fi
54935
54936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54937  if test "x$test_cygdrive_prefix" = x; then
54938    # As a simple fix, exclude /usr/bin since it's not a real path.
54939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54941      # a path prefixed by /cygdrive for fixpath to work.
54942      new_path="$CYGWIN_ROOT_PATH$input_path"
54943    fi
54944  fi
54945
54946
54947  if test "x$path" != "x$new_path"; then
54948    MSVC_DLL="$new_path"
54949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54950$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54951  fi
54952
54953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54954
54955  path="$MSVC_DLL"
54956  has_colon=`$ECHO $path | $GREP ^.:`
54957  new_path="$path"
54958  if test "x$has_colon" = x; then
54959    # Not in mixed or Windows style, start by that.
54960    new_path=`cmd //c echo $path`
54961  fi
54962
54963
54964  input_path="$new_path"
54965  # Check if we need to convert this using DOS-style short mode. If the path
54966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54967  # take no chances and rewrite it.
54968  # Note: m4 eats our [], so we need to use [ and ] instead.
54969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54970  if test "x$has_forbidden_chars" != x; then
54971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54973  fi
54974
54975
54976  windows_path="$new_path"
54977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54978    unix_path=`$CYGPATH -u "$windows_path"`
54979    new_path="$unix_path"
54980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54982    new_path="$unix_path"
54983  fi
54984
54985  if test "x$path" != "x$new_path"; then
54986    MSVC_DLL="$new_path"
54987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54988$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54989  fi
54990
54991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54993
54994    else
54995      # We're on a unix platform. Hooray! :)
54996      path="$MSVC_DLL"
54997      has_space=`$ECHO "$path" | $GREP " "`
54998      if test "x$has_space" != x; then
54999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55000$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55002      fi
55003
55004      # Use eval to expand a potential ~
55005      eval path="$path"
55006      if test ! -f "$path" && test ! -d "$path"; then
55007        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55008      fi
55009
55010      if test -d "$path"; then
55011        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55012      else
55013        dir="`$DIRNAME "$path"`"
55014        base="`$BASENAME "$path"`"
55015        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55016      fi
55017    fi
55018  fi
55019
55020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55021$as_echo_n "checking for $DLL_NAME... " >&6; }
55022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55023$as_echo "$MSVC_DLL" >&6; }
55024    else
55025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55026$as_echo "incorrect, ignoring" >&6; }
55027      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55028$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55029    fi
55030  fi
55031
55032    fi
55033  fi
55034
55035  if test "x$MSVC_DLL" = x; then
55036    # Probe: Check in the Boot JDK directory.
55037    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55038
55039  DLL_NAME="$DLL_NAME"
55040  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55041  METHOD="well-known location in Boot JDK"
55042  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55043    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55044$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55045
55046    # Need to check if the found msvcr is correct architecture
55047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55048$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55049    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55051      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55052      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55053      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55054        CORRECT_MSVCR_ARCH="PE32 executable"
55055      else
55056        CORRECT_MSVCR_ARCH="PE32+ executable"
55057      fi
55058    else
55059      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55060        CORRECT_MSVCR_ARCH=386
55061      else
55062        CORRECT_MSVCR_ARCH=x86-64
55063      fi
55064    fi
55065    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55067$as_echo "ok" >&6; }
55068      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55069
55070  # Only process if variable expands to non-empty
55071
55072  if test "x$MSVC_DLL" != x; then
55073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55074
55075  # Input might be given as Windows format, start by converting to
55076  # unix format.
55077  path="$MSVC_DLL"
55078  new_path=`$CYGPATH -u "$path"`
55079
55080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55083  # "foo.exe" is OK but "foo" is an error.
55084  #
55085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55086  # It is also a way to make sure we got the proper file name for the real test later on.
55087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55088  if test "x$test_shortpath" = x; then
55089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55090$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55091    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55092  fi
55093
55094  # Call helper function which possibly converts this using DOS-style short mode.
55095  # If so, the updated path is stored in $new_path.
55096
55097  input_path="$new_path"
55098  # Check if we need to convert this using DOS-style short mode. If the path
55099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55100  # take no chances and rewrite it.
55101  # Note: m4 eats our [], so we need to use [ and ] instead.
55102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55103  if test "x$has_forbidden_chars" != x; then
55104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55108      # Going to short mode and back again did indeed matter. Since short mode is
55109      # case insensitive, let's make it lowercase to improve readability.
55110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55111      # Now convert it back to Unix-style (cygpath)
55112      input_path=`$CYGPATH -u "$shortmode_path"`
55113      new_path="$input_path"
55114    fi
55115  fi
55116
55117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55118  if test "x$test_cygdrive_prefix" = x; then
55119    # As a simple fix, exclude /usr/bin since it's not a real path.
55120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55122      # a path prefixed by /cygdrive for fixpath to work.
55123      new_path="$CYGWIN_ROOT_PATH$input_path"
55124    fi
55125  fi
55126
55127
55128  if test "x$path" != "x$new_path"; then
55129    MSVC_DLL="$new_path"
55130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55131$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55132  fi
55133
55134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55135
55136  path="$MSVC_DLL"
55137  has_colon=`$ECHO $path | $GREP ^.:`
55138  new_path="$path"
55139  if test "x$has_colon" = x; then
55140    # Not in mixed or Windows style, start by that.
55141    new_path=`cmd //c echo $path`
55142  fi
55143
55144
55145  input_path="$new_path"
55146  # Check if we need to convert this using DOS-style short mode. If the path
55147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55148  # take no chances and rewrite it.
55149  # Note: m4 eats our [], so we need to use [ and ] instead.
55150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55151  if test "x$has_forbidden_chars" != x; then
55152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55154  fi
55155
55156
55157  windows_path="$new_path"
55158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55159    unix_path=`$CYGPATH -u "$windows_path"`
55160    new_path="$unix_path"
55161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55163    new_path="$unix_path"
55164  fi
55165
55166  if test "x$path" != "x$new_path"; then
55167    MSVC_DLL="$new_path"
55168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55169$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55170  fi
55171
55172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55174
55175    else
55176      # We're on a unix platform. Hooray! :)
55177      path="$MSVC_DLL"
55178      has_space=`$ECHO "$path" | $GREP " "`
55179      if test "x$has_space" != x; then
55180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55181$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55183      fi
55184
55185      # Use eval to expand a potential ~
55186      eval path="$path"
55187      if test ! -f "$path" && test ! -d "$path"; then
55188        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55189      fi
55190
55191      if test -d "$path"; then
55192        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55193      else
55194        dir="`$DIRNAME "$path"`"
55195        base="`$BASENAME "$path"`"
55196        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55197      fi
55198    fi
55199  fi
55200
55201      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55202$as_echo_n "checking for $DLL_NAME... " >&6; }
55203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55204$as_echo "$MSVC_DLL" >&6; }
55205    else
55206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55207$as_echo "incorrect, ignoring" >&6; }
55208      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55209$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55210    fi
55211  fi
55212
55213  fi
55214
55215  if test "x$MSVC_DLL" = x; then
55216    # Probe: Look in the Windows system32 directory
55217    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55218
55219  windows_path="$CYGWIN_SYSTEMROOT"
55220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55221    unix_path=`$CYGPATH -u "$windows_path"`
55222    CYGWIN_SYSTEMROOT="$unix_path"
55223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55225    CYGWIN_SYSTEMROOT="$unix_path"
55226  fi
55227
55228    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55229
55230  DLL_NAME="$DLL_NAME"
55231  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55232  METHOD="well-known location in SYSTEMROOT"
55233  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55235$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55236
55237    # Need to check if the found msvcr is correct architecture
55238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55239$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55240    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55242      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55243      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55244      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55245        CORRECT_MSVCR_ARCH="PE32 executable"
55246      else
55247        CORRECT_MSVCR_ARCH="PE32+ executable"
55248      fi
55249    else
55250      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55251        CORRECT_MSVCR_ARCH=386
55252      else
55253        CORRECT_MSVCR_ARCH=x86-64
55254      fi
55255    fi
55256    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55258$as_echo "ok" >&6; }
55259      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55260
55261  # Only process if variable expands to non-empty
55262
55263  if test "x$MSVC_DLL" != x; then
55264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55265
55266  # Input might be given as Windows format, start by converting to
55267  # unix format.
55268  path="$MSVC_DLL"
55269  new_path=`$CYGPATH -u "$path"`
55270
55271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55274  # "foo.exe" is OK but "foo" is an error.
55275  #
55276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55277  # It is also a way to make sure we got the proper file name for the real test later on.
55278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55279  if test "x$test_shortpath" = x; then
55280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55281$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55282    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55283  fi
55284
55285  # Call helper function which possibly converts this using DOS-style short mode.
55286  # If so, the updated path is stored in $new_path.
55287
55288  input_path="$new_path"
55289  # Check if we need to convert this using DOS-style short mode. If the path
55290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55291  # take no chances and rewrite it.
55292  # Note: m4 eats our [], so we need to use [ and ] instead.
55293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55294  if test "x$has_forbidden_chars" != x; then
55295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55299      # Going to short mode and back again did indeed matter. Since short mode is
55300      # case insensitive, let's make it lowercase to improve readability.
55301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55302      # Now convert it back to Unix-style (cygpath)
55303      input_path=`$CYGPATH -u "$shortmode_path"`
55304      new_path="$input_path"
55305    fi
55306  fi
55307
55308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55309  if test "x$test_cygdrive_prefix" = x; then
55310    # As a simple fix, exclude /usr/bin since it's not a real path.
55311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55313      # a path prefixed by /cygdrive for fixpath to work.
55314      new_path="$CYGWIN_ROOT_PATH$input_path"
55315    fi
55316  fi
55317
55318
55319  if test "x$path" != "x$new_path"; then
55320    MSVC_DLL="$new_path"
55321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55322$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55323  fi
55324
55325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55326
55327  path="$MSVC_DLL"
55328  has_colon=`$ECHO $path | $GREP ^.:`
55329  new_path="$path"
55330  if test "x$has_colon" = x; then
55331    # Not in mixed or Windows style, start by that.
55332    new_path=`cmd //c echo $path`
55333  fi
55334
55335
55336  input_path="$new_path"
55337  # Check if we need to convert this using DOS-style short mode. If the path
55338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55339  # take no chances and rewrite it.
55340  # Note: m4 eats our [], so we need to use [ and ] instead.
55341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55342  if test "x$has_forbidden_chars" != x; then
55343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55345  fi
55346
55347
55348  windows_path="$new_path"
55349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55350    unix_path=`$CYGPATH -u "$windows_path"`
55351    new_path="$unix_path"
55352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55354    new_path="$unix_path"
55355  fi
55356
55357  if test "x$path" != "x$new_path"; then
55358    MSVC_DLL="$new_path"
55359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55360$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55361  fi
55362
55363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55365
55366    else
55367      # We're on a unix platform. Hooray! :)
55368      path="$MSVC_DLL"
55369      has_space=`$ECHO "$path" | $GREP " "`
55370      if test "x$has_space" != x; then
55371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55372$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55374      fi
55375
55376      # Use eval to expand a potential ~
55377      eval path="$path"
55378      if test ! -f "$path" && test ! -d "$path"; then
55379        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55380      fi
55381
55382      if test -d "$path"; then
55383        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55384      else
55385        dir="`$DIRNAME "$path"`"
55386        base="`$BASENAME "$path"`"
55387        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55388      fi
55389    fi
55390  fi
55391
55392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55393$as_echo_n "checking for $DLL_NAME... " >&6; }
55394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55395$as_echo "$MSVC_DLL" >&6; }
55396    else
55397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55398$as_echo "incorrect, ignoring" >&6; }
55399      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55400$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55401    fi
55402  fi
55403
55404  fi
55405
55406  if test "x$MSVC_DLL" = x; then
55407    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55408    if test "x$VS100COMNTOOLS" != x; then
55409      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55410
55411  windows_path="$CYGWIN_VS_TOOLS_DIR"
55412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55413    unix_path=`$CYGPATH -u "$windows_path"`
55414    CYGWIN_VS_TOOLS_DIR="$unix_path"
55415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55417    CYGWIN_VS_TOOLS_DIR="$unix_path"
55418  fi
55419
55420      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55421        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55422	    | $GREP -i /x64/ | $HEAD --lines 1`
55423      else
55424        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55425	    | $GREP -i /x86/ | $HEAD --lines 1`
55426      fi
55427
55428  DLL_NAME="$DLL_NAME"
55429  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55430  METHOD="search of VS100COMNTOOLS"
55431  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55432    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55433$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55434
55435    # Need to check if the found msvcr is correct architecture
55436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55437$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55438    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55440      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55441      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55442      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55443        CORRECT_MSVCR_ARCH="PE32 executable"
55444      else
55445        CORRECT_MSVCR_ARCH="PE32+ executable"
55446      fi
55447    else
55448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55449        CORRECT_MSVCR_ARCH=386
55450      else
55451        CORRECT_MSVCR_ARCH=x86-64
55452      fi
55453    fi
55454    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55456$as_echo "ok" >&6; }
55457      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55458
55459  # Only process if variable expands to non-empty
55460
55461  if test "x$MSVC_DLL" != x; then
55462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55463
55464  # Input might be given as Windows format, start by converting to
55465  # unix format.
55466  path="$MSVC_DLL"
55467  new_path=`$CYGPATH -u "$path"`
55468
55469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55472  # "foo.exe" is OK but "foo" is an error.
55473  #
55474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55475  # It is also a way to make sure we got the proper file name for the real test later on.
55476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55477  if test "x$test_shortpath" = x; then
55478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55479$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55480    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55481  fi
55482
55483  # Call helper function which possibly converts this using DOS-style short mode.
55484  # If so, the updated path is stored in $new_path.
55485
55486  input_path="$new_path"
55487  # Check if we need to convert this using DOS-style short mode. If the path
55488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55489  # take no chances and rewrite it.
55490  # Note: m4 eats our [], so we need to use [ and ] instead.
55491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55492  if test "x$has_forbidden_chars" != x; then
55493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55497      # Going to short mode and back again did indeed matter. Since short mode is
55498      # case insensitive, let's make it lowercase to improve readability.
55499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55500      # Now convert it back to Unix-style (cygpath)
55501      input_path=`$CYGPATH -u "$shortmode_path"`
55502      new_path="$input_path"
55503    fi
55504  fi
55505
55506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55507  if test "x$test_cygdrive_prefix" = x; then
55508    # As a simple fix, exclude /usr/bin since it's not a real path.
55509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55511      # a path prefixed by /cygdrive for fixpath to work.
55512      new_path="$CYGWIN_ROOT_PATH$input_path"
55513    fi
55514  fi
55515
55516
55517  if test "x$path" != "x$new_path"; then
55518    MSVC_DLL="$new_path"
55519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55520$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55521  fi
55522
55523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55524
55525  path="$MSVC_DLL"
55526  has_colon=`$ECHO $path | $GREP ^.:`
55527  new_path="$path"
55528  if test "x$has_colon" = x; then
55529    # Not in mixed or Windows style, start by that.
55530    new_path=`cmd //c echo $path`
55531  fi
55532
55533
55534  input_path="$new_path"
55535  # Check if we need to convert this using DOS-style short mode. If the path
55536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55537  # take no chances and rewrite it.
55538  # Note: m4 eats our [], so we need to use [ and ] instead.
55539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55540  if test "x$has_forbidden_chars" != x; then
55541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55543  fi
55544
55545
55546  windows_path="$new_path"
55547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55548    unix_path=`$CYGPATH -u "$windows_path"`
55549    new_path="$unix_path"
55550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55552    new_path="$unix_path"
55553  fi
55554
55555  if test "x$path" != "x$new_path"; then
55556    MSVC_DLL="$new_path"
55557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55558$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55559  fi
55560
55561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55563
55564    else
55565      # We're on a unix platform. Hooray! :)
55566      path="$MSVC_DLL"
55567      has_space=`$ECHO "$path" | $GREP " "`
55568      if test "x$has_space" != x; then
55569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55570$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55572      fi
55573
55574      # Use eval to expand a potential ~
55575      eval path="$path"
55576      if test ! -f "$path" && test ! -d "$path"; then
55577        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55578      fi
55579
55580      if test -d "$path"; then
55581        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55582      else
55583        dir="`$DIRNAME "$path"`"
55584        base="`$BASENAME "$path"`"
55585        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55586      fi
55587    fi
55588  fi
55589
55590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55591$as_echo_n "checking for $DLL_NAME... " >&6; }
55592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55593$as_echo "$MSVC_DLL" >&6; }
55594    else
55595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55596$as_echo "incorrect, ignoring" >&6; }
55597      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55598$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55599    fi
55600  fi
55601
55602    fi
55603  fi
55604
55605  if test "x$MSVC_DLL" = x; then
55606    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55607    # (This was the original behaviour; kept since it might turn something up)
55608    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55609      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55610        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55611	    | $GREP x64 | $HEAD --lines 1`
55612      else
55613        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55614	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55615        if test "x$POSSIBLE_MSVC_DLL" = x; then
55616          # We're grasping at straws now...
55617          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55618	      | $HEAD --lines 1`
55619        fi
55620      fi
55621
55622
55623  DLL_NAME="$DLL_NAME"
55624  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55625  METHOD="search of VCINSTALLDIR"
55626  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55627    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55628$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55629
55630    # Need to check if the found msvcr is correct architecture
55631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55632$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55633    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55635      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55636      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55637      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55638        CORRECT_MSVCR_ARCH="PE32 executable"
55639      else
55640        CORRECT_MSVCR_ARCH="PE32+ executable"
55641      fi
55642    else
55643      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55644        CORRECT_MSVCR_ARCH=386
55645      else
55646        CORRECT_MSVCR_ARCH=x86-64
55647      fi
55648    fi
55649    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55651$as_echo "ok" >&6; }
55652      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55653
55654  # Only process if variable expands to non-empty
55655
55656  if test "x$MSVC_DLL" != x; then
55657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55658
55659  # Input might be given as Windows format, start by converting to
55660  # unix format.
55661  path="$MSVC_DLL"
55662  new_path=`$CYGPATH -u "$path"`
55663
55664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55667  # "foo.exe" is OK but "foo" is an error.
55668  #
55669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55670  # It is also a way to make sure we got the proper file name for the real test later on.
55671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55672  if test "x$test_shortpath" = x; then
55673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55674$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55675    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55676  fi
55677
55678  # Call helper function which possibly converts this using DOS-style short mode.
55679  # If so, the updated path is stored in $new_path.
55680
55681  input_path="$new_path"
55682  # Check if we need to convert this using DOS-style short mode. If the path
55683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55684  # take no chances and rewrite it.
55685  # Note: m4 eats our [], so we need to use [ and ] instead.
55686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55687  if test "x$has_forbidden_chars" != x; then
55688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55692      # Going to short mode and back again did indeed matter. Since short mode is
55693      # case insensitive, let's make it lowercase to improve readability.
55694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55695      # Now convert it back to Unix-style (cygpath)
55696      input_path=`$CYGPATH -u "$shortmode_path"`
55697      new_path="$input_path"
55698    fi
55699  fi
55700
55701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55702  if test "x$test_cygdrive_prefix" = x; then
55703    # As a simple fix, exclude /usr/bin since it's not a real path.
55704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55706      # a path prefixed by /cygdrive for fixpath to work.
55707      new_path="$CYGWIN_ROOT_PATH$input_path"
55708    fi
55709  fi
55710
55711
55712  if test "x$path" != "x$new_path"; then
55713    MSVC_DLL="$new_path"
55714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55715$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55716  fi
55717
55718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55719
55720  path="$MSVC_DLL"
55721  has_colon=`$ECHO $path | $GREP ^.:`
55722  new_path="$path"
55723  if test "x$has_colon" = x; then
55724    # Not in mixed or Windows style, start by that.
55725    new_path=`cmd //c echo $path`
55726  fi
55727
55728
55729  input_path="$new_path"
55730  # Check if we need to convert this using DOS-style short mode. If the path
55731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55732  # take no chances and rewrite it.
55733  # Note: m4 eats our [], so we need to use [ and ] instead.
55734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55735  if test "x$has_forbidden_chars" != x; then
55736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55738  fi
55739
55740
55741  windows_path="$new_path"
55742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55743    unix_path=`$CYGPATH -u "$windows_path"`
55744    new_path="$unix_path"
55745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55747    new_path="$unix_path"
55748  fi
55749
55750  if test "x$path" != "x$new_path"; then
55751    MSVC_DLL="$new_path"
55752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55753$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55754  fi
55755
55756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55758
55759    else
55760      # We're on a unix platform. Hooray! :)
55761      path="$MSVC_DLL"
55762      has_space=`$ECHO "$path" | $GREP " "`
55763      if test "x$has_space" != x; then
55764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55765$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55767      fi
55768
55769      # Use eval to expand a potential ~
55770      eval path="$path"
55771      if test ! -f "$path" && test ! -d "$path"; then
55772        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55773      fi
55774
55775      if test -d "$path"; then
55776        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55777      else
55778        dir="`$DIRNAME "$path"`"
55779        base="`$BASENAME "$path"`"
55780        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55781      fi
55782    fi
55783  fi
55784
55785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55786$as_echo_n "checking for $DLL_NAME... " >&6; }
55787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55788$as_echo "$MSVC_DLL" >&6; }
55789    else
55790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55791$as_echo "incorrect, ignoring" >&6; }
55792      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55793$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55794    fi
55795  fi
55796
55797    fi
55798  fi
55799
55800  if test "x$MSVC_DLL" = x; then
55801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55802$as_echo_n "checking for $DLL_NAME... " >&6; }
55803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55804$as_echo "no" >&6; }
55805    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55806  fi
55807
55808      MSVCP_DLL="$MSVC_DLL"
55809    fi
55810
55811  fi
55812
55813  fi
55814
55815
55816  if test "x$NEEDS_LIB_X11" = xfalse; then
55817    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55818      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55819$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55820    fi
55821    X_CFLAGS=
55822    X_LIBS=
55823  else
55824
55825    if test "x${with_x}" = xno; then
55826      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55827    fi
55828
55829    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55830      # The user has specified a X11 base directory. Use it for includes and
55831      # libraries, unless explicitly overridden.
55832      if test "x$x_includes" = xNONE; then
55833        x_includes="${with_x}/include"
55834      fi
55835      if test "x$x_libraries" = xNONE; then
55836        x_libraries="${with_x}/lib"
55837      fi
55838    else
55839      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55840      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55841      # --x-libraries for the sysroot, if that seems to be correct.
55842      if test "x$SYSROOT" != "x"; then
55843        if test "x$x_includes" = xNONE; then
55844          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55845            x_includes="$SYSROOT/usr/X11R6/include"
55846          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55847            x_includes="$SYSROOT/usr/include"
55848          fi
55849        fi
55850        if test "x$x_libraries" = xNONE; then
55851          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55852            x_libraries="$SYSROOT/usr/X11R6/lib"
55853          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55854            x_libraries="$SYSROOT/usr/lib64"
55855          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55856            x_libraries="$SYSROOT/usr/lib"
55857          fi
55858        fi
55859      fi
55860    fi
55861
55862    # Now let autoconf do it's magic
55863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55864$as_echo_n "checking for X... " >&6; }
55865
55866
55867# Check whether --with-x was given.
55868if test "${with_x+set}" = set; then :
55869  withval=$with_x;
55870fi
55871
55872# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55873if test "x$with_x" = xno; then
55874  # The user explicitly disabled X.
55875  have_x=disabled
55876else
55877  case $x_includes,$x_libraries in #(
55878    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55879    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55880  $as_echo_n "(cached) " >&6
55881else
55882  # One or both of the vars are not set, and there is no cached value.
55883ac_x_includes=no ac_x_libraries=no
55884rm -f -r conftest.dir
55885if mkdir conftest.dir; then
55886  cd conftest.dir
55887  cat >Imakefile <<'_ACEOF'
55888incroot:
55889	@echo incroot='${INCROOT}'
55890usrlibdir:
55891	@echo usrlibdir='${USRLIBDIR}'
55892libdir:
55893	@echo libdir='${LIBDIR}'
55894_ACEOF
55895  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55896    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55897    for ac_var in incroot usrlibdir libdir; do
55898      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55899    done
55900    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55901    for ac_extension in a so sl dylib la dll; do
55902      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55903	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55904	ac_im_usrlibdir=$ac_im_libdir; break
55905      fi
55906    done
55907    # Screen out bogus values from the imake configuration.  They are
55908    # bogus both because they are the default anyway, and because
55909    # using them would break gcc on systems where it needs fixed includes.
55910    case $ac_im_incroot in
55911	/usr/include) ac_x_includes= ;;
55912	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55913    esac
55914    case $ac_im_usrlibdir in
55915	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55916	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55917    esac
55918  fi
55919  cd ..
55920  rm -f -r conftest.dir
55921fi
55922
55923# Standard set of common directories for X headers.
55924# Check X11 before X11Rn because it is often a symlink to the current release.
55925ac_x_header_dirs='
55926/usr/X11/include
55927/usr/X11R7/include
55928/usr/X11R6/include
55929/usr/X11R5/include
55930/usr/X11R4/include
55931
55932/usr/include/X11
55933/usr/include/X11R7
55934/usr/include/X11R6
55935/usr/include/X11R5
55936/usr/include/X11R4
55937
55938/usr/local/X11/include
55939/usr/local/X11R7/include
55940/usr/local/X11R6/include
55941/usr/local/X11R5/include
55942/usr/local/X11R4/include
55943
55944/usr/local/include/X11
55945/usr/local/include/X11R7
55946/usr/local/include/X11R6
55947/usr/local/include/X11R5
55948/usr/local/include/X11R4
55949
55950/usr/X386/include
55951/usr/x386/include
55952/usr/XFree86/include/X11
55953
55954/usr/include
55955/usr/local/include
55956/usr/unsupported/include
55957/usr/athena/include
55958/usr/local/x11r5/include
55959/usr/lpp/Xamples/include
55960
55961/usr/openwin/include
55962/usr/openwin/share/include'
55963
55964if test "$ac_x_includes" = no; then
55965  # Guess where to find include files, by looking for Xlib.h.
55966  # First, try using that file with no special directory specified.
55967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55968/* end confdefs.h.  */
55969#include <X11/Xlib.h>
55970_ACEOF
55971if ac_fn_cxx_try_cpp "$LINENO"; then :
55972  # We can compile using X headers with no special include directory.
55973ac_x_includes=
55974else
55975  for ac_dir in $ac_x_header_dirs; do
55976  if test -r "$ac_dir/X11/Xlib.h"; then
55977    ac_x_includes=$ac_dir
55978    break
55979  fi
55980done
55981fi
55982rm -f conftest.err conftest.i conftest.$ac_ext
55983fi # $ac_x_includes = no
55984
55985if test "$ac_x_libraries" = no; then
55986  # Check for the libraries.
55987  # See if we find them without any special options.
55988  # Don't add to $LIBS permanently.
55989  ac_save_LIBS=$LIBS
55990  LIBS="-lX11 $LIBS"
55991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55992/* end confdefs.h.  */
55993#include <X11/Xlib.h>
55994int
55995main ()
55996{
55997XrmInitialize ()
55998  ;
55999  return 0;
56000}
56001_ACEOF
56002if ac_fn_cxx_try_link "$LINENO"; then :
56003  LIBS=$ac_save_LIBS
56004# We can link X programs with no special library path.
56005ac_x_libraries=
56006else
56007  LIBS=$ac_save_LIBS
56008for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56009do
56010  # Don't even attempt the hair of trying to link an X program!
56011  for ac_extension in a so sl dylib la dll; do
56012    if test -r "$ac_dir/libX11.$ac_extension"; then
56013      ac_x_libraries=$ac_dir
56014      break 2
56015    fi
56016  done
56017done
56018fi
56019rm -f core conftest.err conftest.$ac_objext \
56020    conftest$ac_exeext conftest.$ac_ext
56021fi # $ac_x_libraries = no
56022
56023case $ac_x_includes,$ac_x_libraries in #(
56024  no,* | *,no | *\'*)
56025    # Didn't find X, or a directory has "'" in its name.
56026    ac_cv_have_x="have_x=no";; #(
56027  *)
56028    # Record where we found X for the cache.
56029    ac_cv_have_x="have_x=yes\
56030	ac_x_includes='$ac_x_includes'\
56031	ac_x_libraries='$ac_x_libraries'"
56032esac
56033fi
56034;; #(
56035    *) have_x=yes;;
56036  esac
56037  eval "$ac_cv_have_x"
56038fi # $with_x != no
56039
56040if test "$have_x" != yes; then
56041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56042$as_echo "$have_x" >&6; }
56043  no_x=yes
56044else
56045  # If each of the values was on the command line, it overrides each guess.
56046  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56047  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56048  # Update the cache value to reflect the command line values.
56049  ac_cv_have_x="have_x=yes\
56050	ac_x_includes='$x_includes'\
56051	ac_x_libraries='$x_libraries'"
56052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56053$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56054fi
56055
56056    if test "$no_x" = yes; then
56057  # Not all programs may use this symbol, but it does not hurt to define it.
56058
56059$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56060
56061  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56062else
56063  if test -n "$x_includes"; then
56064    X_CFLAGS="$X_CFLAGS -I$x_includes"
56065  fi
56066
56067  # It would also be nice to do this for all -L options, not just this one.
56068  if test -n "$x_libraries"; then
56069    X_LIBS="$X_LIBS -L$x_libraries"
56070    # For Solaris; some versions of Sun CC require a space after -R and
56071    # others require no space.  Words are not sufficient . . . .
56072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56073$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56074    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56075    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56076    ac_cxx_werror_flag=yes
56077    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56078/* end confdefs.h.  */
56079
56080int
56081main ()
56082{
56083
56084  ;
56085  return 0;
56086}
56087_ACEOF
56088if ac_fn_cxx_try_link "$LINENO"; then :
56089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56090$as_echo "no" >&6; }
56091       X_LIBS="$X_LIBS -R$x_libraries"
56092else
56093  LIBS="$ac_xsave_LIBS -R $x_libraries"
56094       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56095/* end confdefs.h.  */
56096
56097int
56098main ()
56099{
56100
56101  ;
56102  return 0;
56103}
56104_ACEOF
56105if ac_fn_cxx_try_link "$LINENO"; then :
56106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56107$as_echo "yes" >&6; }
56108	  X_LIBS="$X_LIBS -R $x_libraries"
56109else
56110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56111$as_echo "neither works" >&6; }
56112fi
56113rm -f core conftest.err conftest.$ac_objext \
56114    conftest$ac_exeext conftest.$ac_ext
56115fi
56116rm -f core conftest.err conftest.$ac_objext \
56117    conftest$ac_exeext conftest.$ac_ext
56118    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56119    LIBS=$ac_xsave_LIBS
56120  fi
56121
56122  # Check for system-dependent libraries X programs must link with.
56123  # Do this before checking for the system-independent R6 libraries
56124  # (-lICE), since we may need -lsocket or whatever for X linking.
56125
56126  if test "$ISC" = yes; then
56127    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56128  else
56129    # Martyn Johnson says this is needed for Ultrix, if the X
56130    # libraries were built with DECnet support.  And Karl Berry says
56131    # the Alpha needs dnet_stub (dnet does not exist).
56132    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56133    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56134/* end confdefs.h.  */
56135
56136/* Override any GCC internal prototype to avoid an error.
56137   Use char because int might match the return type of a GCC
56138   builtin and then its argument prototype would still apply.  */
56139#ifdef __cplusplus
56140extern "C"
56141#endif
56142char XOpenDisplay ();
56143int
56144main ()
56145{
56146return XOpenDisplay ();
56147  ;
56148  return 0;
56149}
56150_ACEOF
56151if ac_fn_cxx_try_link "$LINENO"; then :
56152
56153else
56154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56155$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56156if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56157  $as_echo_n "(cached) " >&6
56158else
56159  ac_check_lib_save_LIBS=$LIBS
56160LIBS="-ldnet  $LIBS"
56161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56162/* end confdefs.h.  */
56163
56164/* Override any GCC internal prototype to avoid an error.
56165   Use char because int might match the return type of a GCC
56166   builtin and then its argument prototype would still apply.  */
56167#ifdef __cplusplus
56168extern "C"
56169#endif
56170char dnet_ntoa ();
56171int
56172main ()
56173{
56174return dnet_ntoa ();
56175  ;
56176  return 0;
56177}
56178_ACEOF
56179if ac_fn_cxx_try_link "$LINENO"; then :
56180  ac_cv_lib_dnet_dnet_ntoa=yes
56181else
56182  ac_cv_lib_dnet_dnet_ntoa=no
56183fi
56184rm -f core conftest.err conftest.$ac_objext \
56185    conftest$ac_exeext conftest.$ac_ext
56186LIBS=$ac_check_lib_save_LIBS
56187fi
56188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56189$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56190if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56191  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56192fi
56193
56194    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56196$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56197if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56198  $as_echo_n "(cached) " >&6
56199else
56200  ac_check_lib_save_LIBS=$LIBS
56201LIBS="-ldnet_stub  $LIBS"
56202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56203/* end confdefs.h.  */
56204
56205/* Override any GCC internal prototype to avoid an error.
56206   Use char because int might match the return type of a GCC
56207   builtin and then its argument prototype would still apply.  */
56208#ifdef __cplusplus
56209extern "C"
56210#endif
56211char dnet_ntoa ();
56212int
56213main ()
56214{
56215return dnet_ntoa ();
56216  ;
56217  return 0;
56218}
56219_ACEOF
56220if ac_fn_cxx_try_link "$LINENO"; then :
56221  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56222else
56223  ac_cv_lib_dnet_stub_dnet_ntoa=no
56224fi
56225rm -f core conftest.err conftest.$ac_objext \
56226    conftest$ac_exeext conftest.$ac_ext
56227LIBS=$ac_check_lib_save_LIBS
56228fi
56229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56230$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56231if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56232  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56233fi
56234
56235    fi
56236fi
56237rm -f core conftest.err conftest.$ac_objext \
56238    conftest$ac_exeext conftest.$ac_ext
56239    LIBS="$ac_xsave_LIBS"
56240
56241    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56242    # to get the SysV transport functions.
56243    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56244    # needs -lnsl.
56245    # The nsl library prevents programs from opening the X display
56246    # on Irix 5.2, according to T.E. Dickey.
56247    # The functions gethostbyname, getservbyname, and inet_addr are
56248    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56249    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56250if test "x$ac_cv_func_gethostbyname" = xyes; then :
56251
56252fi
56253
56254    if test $ac_cv_func_gethostbyname = no; then
56255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56256$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56257if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56258  $as_echo_n "(cached) " >&6
56259else
56260  ac_check_lib_save_LIBS=$LIBS
56261LIBS="-lnsl  $LIBS"
56262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56263/* end confdefs.h.  */
56264
56265/* Override any GCC internal prototype to avoid an error.
56266   Use char because int might match the return type of a GCC
56267   builtin and then its argument prototype would still apply.  */
56268#ifdef __cplusplus
56269extern "C"
56270#endif
56271char gethostbyname ();
56272int
56273main ()
56274{
56275return gethostbyname ();
56276  ;
56277  return 0;
56278}
56279_ACEOF
56280if ac_fn_cxx_try_link "$LINENO"; then :
56281  ac_cv_lib_nsl_gethostbyname=yes
56282else
56283  ac_cv_lib_nsl_gethostbyname=no
56284fi
56285rm -f core conftest.err conftest.$ac_objext \
56286    conftest$ac_exeext conftest.$ac_ext
56287LIBS=$ac_check_lib_save_LIBS
56288fi
56289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56290$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56291if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56292  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56293fi
56294
56295      if test $ac_cv_lib_nsl_gethostbyname = no; then
56296	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56297$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56298if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56299  $as_echo_n "(cached) " >&6
56300else
56301  ac_check_lib_save_LIBS=$LIBS
56302LIBS="-lbsd  $LIBS"
56303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56304/* end confdefs.h.  */
56305
56306/* Override any GCC internal prototype to avoid an error.
56307   Use char because int might match the return type of a GCC
56308   builtin and then its argument prototype would still apply.  */
56309#ifdef __cplusplus
56310extern "C"
56311#endif
56312char gethostbyname ();
56313int
56314main ()
56315{
56316return gethostbyname ();
56317  ;
56318  return 0;
56319}
56320_ACEOF
56321if ac_fn_cxx_try_link "$LINENO"; then :
56322  ac_cv_lib_bsd_gethostbyname=yes
56323else
56324  ac_cv_lib_bsd_gethostbyname=no
56325fi
56326rm -f core conftest.err conftest.$ac_objext \
56327    conftest$ac_exeext conftest.$ac_ext
56328LIBS=$ac_check_lib_save_LIBS
56329fi
56330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56331$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56332if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56333  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56334fi
56335
56336      fi
56337    fi
56338
56339    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56340    # socket/setsockopt and other routines are undefined under SCO ODT
56341    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56342    # on later versions), says Simon Leinen: it contains gethostby*
56343    # variants that don't use the name server (or something).  -lsocket
56344    # must be given before -lnsl if both are needed.  We assume that
56345    # if connect needs -lnsl, so does gethostbyname.
56346    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56347if test "x$ac_cv_func_connect" = xyes; then :
56348
56349fi
56350
56351    if test $ac_cv_func_connect = no; then
56352      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56353$as_echo_n "checking for connect in -lsocket... " >&6; }
56354if ${ac_cv_lib_socket_connect+:} false; then :
56355  $as_echo_n "(cached) " >&6
56356else
56357  ac_check_lib_save_LIBS=$LIBS
56358LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56360/* end confdefs.h.  */
56361
56362/* Override any GCC internal prototype to avoid an error.
56363   Use char because int might match the return type of a GCC
56364   builtin and then its argument prototype would still apply.  */
56365#ifdef __cplusplus
56366extern "C"
56367#endif
56368char connect ();
56369int
56370main ()
56371{
56372return connect ();
56373  ;
56374  return 0;
56375}
56376_ACEOF
56377if ac_fn_cxx_try_link "$LINENO"; then :
56378  ac_cv_lib_socket_connect=yes
56379else
56380  ac_cv_lib_socket_connect=no
56381fi
56382rm -f core conftest.err conftest.$ac_objext \
56383    conftest$ac_exeext conftest.$ac_ext
56384LIBS=$ac_check_lib_save_LIBS
56385fi
56386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56387$as_echo "$ac_cv_lib_socket_connect" >&6; }
56388if test "x$ac_cv_lib_socket_connect" = xyes; then :
56389  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56390fi
56391
56392    fi
56393
56394    # Guillermo Gomez says -lposix is necessary on A/UX.
56395    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56396if test "x$ac_cv_func_remove" = xyes; then :
56397
56398fi
56399
56400    if test $ac_cv_func_remove = no; then
56401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56402$as_echo_n "checking for remove in -lposix... " >&6; }
56403if ${ac_cv_lib_posix_remove+:} false; then :
56404  $as_echo_n "(cached) " >&6
56405else
56406  ac_check_lib_save_LIBS=$LIBS
56407LIBS="-lposix  $LIBS"
56408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56409/* end confdefs.h.  */
56410
56411/* Override any GCC internal prototype to avoid an error.
56412   Use char because int might match the return type of a GCC
56413   builtin and then its argument prototype would still apply.  */
56414#ifdef __cplusplus
56415extern "C"
56416#endif
56417char remove ();
56418int
56419main ()
56420{
56421return remove ();
56422  ;
56423  return 0;
56424}
56425_ACEOF
56426if ac_fn_cxx_try_link "$LINENO"; then :
56427  ac_cv_lib_posix_remove=yes
56428else
56429  ac_cv_lib_posix_remove=no
56430fi
56431rm -f core conftest.err conftest.$ac_objext \
56432    conftest$ac_exeext conftest.$ac_ext
56433LIBS=$ac_check_lib_save_LIBS
56434fi
56435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56436$as_echo "$ac_cv_lib_posix_remove" >&6; }
56437if test "x$ac_cv_lib_posix_remove" = xyes; then :
56438  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56439fi
56440
56441    fi
56442
56443    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56444    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56445if test "x$ac_cv_func_shmat" = xyes; then :
56446
56447fi
56448
56449    if test $ac_cv_func_shmat = no; then
56450      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56451$as_echo_n "checking for shmat in -lipc... " >&6; }
56452if ${ac_cv_lib_ipc_shmat+:} false; then :
56453  $as_echo_n "(cached) " >&6
56454else
56455  ac_check_lib_save_LIBS=$LIBS
56456LIBS="-lipc  $LIBS"
56457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56458/* end confdefs.h.  */
56459
56460/* Override any GCC internal prototype to avoid an error.
56461   Use char because int might match the return type of a GCC
56462   builtin and then its argument prototype would still apply.  */
56463#ifdef __cplusplus
56464extern "C"
56465#endif
56466char shmat ();
56467int
56468main ()
56469{
56470return shmat ();
56471  ;
56472  return 0;
56473}
56474_ACEOF
56475if ac_fn_cxx_try_link "$LINENO"; then :
56476  ac_cv_lib_ipc_shmat=yes
56477else
56478  ac_cv_lib_ipc_shmat=no
56479fi
56480rm -f core conftest.err conftest.$ac_objext \
56481    conftest$ac_exeext conftest.$ac_ext
56482LIBS=$ac_check_lib_save_LIBS
56483fi
56484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56485$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56486if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56487  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56488fi
56489
56490    fi
56491  fi
56492
56493  # Check for libraries that X11R6 Xt/Xaw programs need.
56494  ac_save_LDFLAGS=$LDFLAGS
56495  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56496  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56497  # check for ICE first), but we must link in the order -lSM -lICE or
56498  # we get undefined symbols.  So assume we have SM if we have ICE.
56499  # These have to be linked with before -lX11, unlike the other
56500  # libraries we check for below, so use a different variable.
56501  # John Interrante, Karl Berry
56502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56503$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56504if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56505  $as_echo_n "(cached) " >&6
56506else
56507  ac_check_lib_save_LIBS=$LIBS
56508LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56510/* end confdefs.h.  */
56511
56512/* Override any GCC internal prototype to avoid an error.
56513   Use char because int might match the return type of a GCC
56514   builtin and then its argument prototype would still apply.  */
56515#ifdef __cplusplus
56516extern "C"
56517#endif
56518char IceConnectionNumber ();
56519int
56520main ()
56521{
56522return IceConnectionNumber ();
56523  ;
56524  return 0;
56525}
56526_ACEOF
56527if ac_fn_cxx_try_link "$LINENO"; then :
56528  ac_cv_lib_ICE_IceConnectionNumber=yes
56529else
56530  ac_cv_lib_ICE_IceConnectionNumber=no
56531fi
56532rm -f core conftest.err conftest.$ac_objext \
56533    conftest$ac_exeext conftest.$ac_ext
56534LIBS=$ac_check_lib_save_LIBS
56535fi
56536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56537$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56538if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56539  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56540fi
56541
56542  LDFLAGS=$ac_save_LDFLAGS
56543
56544fi
56545
56546
56547    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56548    # this doesn't make sense so we remove it.
56549    if test "x$COMPILE_TYPE" = xcross; then
56550      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56551    fi
56552
56553    if test "x$no_x" = xyes; then
56554
56555  # Print a helpful message on how to acquire the necessary build dependency.
56556  # x11 is the help tag: freetype, cups, alsa etc
56557  MISSING_DEPENDENCY=x11
56558
56559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56560    cygwin_help $MISSING_DEPENDENCY
56561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56562    msys_help $MISSING_DEPENDENCY
56563  else
56564    PKGHANDLER_COMMAND=
56565
56566    case $PKGHANDLER in
56567      apt-get)
56568        apt_help     $MISSING_DEPENDENCY ;;
56569      yum)
56570        yum_help     $MISSING_DEPENDENCY ;;
56571      port)
56572        port_help    $MISSING_DEPENDENCY ;;
56573      pkgutil)
56574        pkgutil_help $MISSING_DEPENDENCY ;;
56575      pkgadd)
56576        pkgadd_help  $MISSING_DEPENDENCY ;;
56577    esac
56578
56579    if test "x$PKGHANDLER_COMMAND" != x; then
56580      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56581    fi
56582  fi
56583
56584      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56585    fi
56586
56587    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56588      OPENWIN_HOME="/usr/openwin"
56589      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56590      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56591          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56592    fi
56593
56594    ac_ext=c
56595ac_cpp='$CPP $CPPFLAGS'
56596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56598ac_compiler_gnu=$ac_cv_c_compiler_gnu
56599
56600    OLD_CFLAGS="$CFLAGS"
56601    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56602
56603    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56604    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56605do :
56606  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56607ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56608          # include <X11/Xlib.h>
56609          # include <X11/Xutil.h>
56610
56611
56612"
56613if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56614  cat >>confdefs.h <<_ACEOF
56615#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56616_ACEOF
56617 X11_HEADERS_OK=yes
56618else
56619  X11_HEADERS_OK=no; break
56620fi
56621
56622done
56623
56624
56625    if test "x$X11_HEADERS_OK" = xno; then
56626
56627  # Print a helpful message on how to acquire the necessary build dependency.
56628  # x11 is the help tag: freetype, cups, alsa etc
56629  MISSING_DEPENDENCY=x11
56630
56631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56632    cygwin_help $MISSING_DEPENDENCY
56633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56634    msys_help $MISSING_DEPENDENCY
56635  else
56636    PKGHANDLER_COMMAND=
56637
56638    case $PKGHANDLER in
56639      apt-get)
56640        apt_help     $MISSING_DEPENDENCY ;;
56641      yum)
56642        yum_help     $MISSING_DEPENDENCY ;;
56643      port)
56644        port_help    $MISSING_DEPENDENCY ;;
56645      pkgutil)
56646        pkgutil_help $MISSING_DEPENDENCY ;;
56647      pkgadd)
56648        pkgadd_help  $MISSING_DEPENDENCY ;;
56649    esac
56650
56651    if test "x$PKGHANDLER_COMMAND" != x; then
56652      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56653    fi
56654  fi
56655
56656      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56657    fi
56658
56659    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56660    # defined in libawt_xawt.
56661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56662$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56663    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56664/* end confdefs.h.  */
56665#include <X11/extensions/Xrender.h>
56666int
56667main ()
56668{
56669XLinearGradient x;
56670  ;
56671  return 0;
56672}
56673_ACEOF
56674if ac_fn_c_try_compile "$LINENO"; then :
56675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56676$as_echo "yes" >&6; }
56677else
56678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56679$as_echo "no" >&6; }
56680         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56681fi
56682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56683
56684    CFLAGS="$OLD_CFLAGS"
56685    ac_ext=cpp
56686ac_cpp='$CXXCPP $CPPFLAGS'
56687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56690
56691  fi # NEEDS_LIB_X11
56692
56693
56694
56695
56696
56697
56698# Check whether --with-cups was given.
56699if test "${with_cups+set}" = set; then :
56700  withval=$with_cups;
56701fi
56702
56703
56704# Check whether --with-cups-include was given.
56705if test "${with_cups_include+set}" = set; then :
56706  withval=$with_cups_include;
56707fi
56708
56709
56710  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56711    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56712        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56713      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56714$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56715    fi
56716    CUPS_CFLAGS=
56717  else
56718    CUPS_FOUND=no
56719
56720    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56721      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56722    fi
56723
56724    if test "x${with_cups}" != x; then
56725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56726$as_echo_n "checking for cups headers... " >&6; }
56727      if test -s "${with_cups}/include/cups/cups.h"; then
56728        CUPS_CFLAGS="-I${with_cups}/include"
56729        CUPS_FOUND=yes
56730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56731$as_echo "$CUPS_FOUND" >&6; }
56732      else
56733        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56734      fi
56735    fi
56736    if test "x${with_cups_include}" != x; then
56737      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56738$as_echo_n "checking for cups headers... " >&6; }
56739      if test -s "${with_cups_include}/cups/cups.h"; then
56740        CUPS_CFLAGS="-I${with_cups_include}"
56741        CUPS_FOUND=yes
56742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56743$as_echo "$CUPS_FOUND" >&6; }
56744      else
56745        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56746      fi
56747    fi
56748    if test "x$CUPS_FOUND" = xno; then
56749      # Are the cups headers installed in the default /usr/include location?
56750      for ac_header in cups/cups.h cups/ppd.h
56751do :
56752  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56753ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56754if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56755  cat >>confdefs.h <<_ACEOF
56756#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56757_ACEOF
56758
56759          CUPS_FOUND=yes
56760          CUPS_CFLAGS=
56761          DEFAULT_CUPS=yes
56762
56763fi
56764
56765done
56766
56767    fi
56768    if test "x$CUPS_FOUND" = xno; then
56769
56770  # Print a helpful message on how to acquire the necessary build dependency.
56771  # cups is the help tag: freetype, cups, alsa etc
56772  MISSING_DEPENDENCY=cups
56773
56774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56775    cygwin_help $MISSING_DEPENDENCY
56776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56777    msys_help $MISSING_DEPENDENCY
56778  else
56779    PKGHANDLER_COMMAND=
56780
56781    case $PKGHANDLER in
56782      apt-get)
56783        apt_help     $MISSING_DEPENDENCY ;;
56784      yum)
56785        yum_help     $MISSING_DEPENDENCY ;;
56786      port)
56787        port_help    $MISSING_DEPENDENCY ;;
56788      pkgutil)
56789        pkgutil_help $MISSING_DEPENDENCY ;;
56790      pkgadd)
56791        pkgadd_help  $MISSING_DEPENDENCY ;;
56792    esac
56793
56794    if test "x$PKGHANDLER_COMMAND" != x; then
56795      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56796    fi
56797  fi
56798
56799      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56800    fi
56801  fi
56802
56803
56804
56805
56806
56807# Check whether --with-freetype was given.
56808if test "${with_freetype+set}" = set; then :
56809  withval=$with_freetype;
56810fi
56811
56812
56813# Check whether --with-freetype-include was given.
56814if test "${with_freetype_include+set}" = set; then :
56815  withval=$with_freetype_include;
56816fi
56817
56818
56819# Check whether --with-freetype-lib was given.
56820if test "${with_freetype_lib+set}" = set; then :
56821  withval=$with_freetype_lib;
56822fi
56823
56824
56825# Check whether --with-freetype-src was given.
56826if test "${with_freetype_src+set}" = set; then :
56827  withval=$with_freetype_src;
56828fi
56829
56830  # Check whether --enable-freetype-bundling was given.
56831if test "${enable_freetype_bundling+set}" = set; then :
56832  enableval=$enable_freetype_bundling;
56833fi
56834
56835
56836  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56837  FREETYPE_BASE_NAME=freetype
56838  FREETYPE_CFLAGS=
56839  FREETYPE_LIBS=
56840  FREETYPE_BUNDLE_LIB_PATH=
56841
56842  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56843    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56844        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56845        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56846        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56847      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56848$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56849    fi
56850    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56851      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56852$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56853    fi
56854  else
56855    # freetype is needed to build; go get it!
56856
56857    BUNDLE_FREETYPE="$enable_freetype_bundling"
56858
56859    if  test "x$with_freetype_src" != x; then
56860      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56861        # Try to build freetype if --with-freetype-src was given on Windows
56862
56863  FREETYPE_SRC_PATH="$with_freetype_src"
56864  BUILD_FREETYPE=yes
56865
56866  # Check if the freetype sources are acessible..
56867  if ! test -d $FREETYPE_SRC_PATH; then
56868    { $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
56869$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56870    BUILD_FREETYPE=no
56871  fi
56872  # ..and contain a vc2010 project file
56873  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56874  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56875    { $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
56876$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56877    BUILD_FREETYPE=no
56878  fi
56879  # Now check if configure found a version of 'msbuild.exe'
56880  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56881    { $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
56882$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;}
56883    BUILD_FREETYPE=no
56884  fi
56885
56886  # Ready to go..
56887  if test "x$BUILD_FREETYPE" = xyes; then
56888    # msbuild requires trailing slashes for output directories
56889    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56890    freetype_lib_path_unix="$freetype_lib_path"
56891    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56892
56893  unix_path="$vcxproj_path"
56894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56895    windows_path=`$CYGPATH -m "$unix_path"`
56896    vcxproj_path="$windows_path"
56897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56898    windows_path=`cmd //c echo $unix_path`
56899    vcxproj_path="$windows_path"
56900  fi
56901
56902
56903  unix_path="$freetype_lib_path"
56904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56905    windows_path=`$CYGPATH -m "$unix_path"`
56906    freetype_lib_path="$windows_path"
56907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56908    windows_path=`cmd //c echo $unix_path`
56909    freetype_lib_path="$windows_path"
56910  fi
56911
56912
56913  unix_path="$freetype_obj_path"
56914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56915    windows_path=`$CYGPATH -m "$unix_path"`
56916    freetype_obj_path="$windows_path"
56917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56918    windows_path=`cmd //c echo $unix_path`
56919    freetype_obj_path="$windows_path"
56920  fi
56921
56922    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56923      freetype_platform=x64
56924    else
56925      freetype_platform=win32
56926    fi
56927
56928    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56929    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56930    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56931    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56932    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56933$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56934
56935    # First we try to build the freetype.dll
56936    $ECHO -e "@echo off\n"\
56937        "$MSBUILD $vcxproj_path "\
56938        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56939        "/p:Configuration=\"Release Multithreaded\" "\
56940        "/p:Platform=$freetype_platform "\
56941        "/p:ConfigurationType=DynamicLibrary "\
56942        "/p:TargetName=freetype "\
56943        "/p:OutDir=\"$freetype_lib_path\" "\
56944        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56945    cmd /c freetype.bat
56946
56947    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56948      # If that succeeds we also build freetype.lib
56949      $ECHO -e "@echo off\n"\
56950          "$MSBUILD $vcxproj_path "\
56951          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56952          "/p:Configuration=\"Release Multithreaded\" "\
56953          "/p:Platform=$freetype_platform "\
56954          "/p:ConfigurationType=StaticLibrary "\
56955          "/p:TargetName=freetype "\
56956          "/p:OutDir=\"$freetype_lib_path\" "\
56957          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56958      cmd /c freetype.bat
56959
56960      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56961        # Once we build both, lib and dll, set freetype lib and include path appropriately
56962        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56963        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56964        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56965$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56966      else
56967        BUILD_FREETYPE=no
56968      fi
56969    else
56970      BUILD_FREETYPE=no
56971    fi
56972  fi
56973
56974        if test "x$BUILD_FREETYPE" = xyes; then
56975          # Okay, we built it. Check that it works.
56976
56977  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56978  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56979  METHOD="--with-freetype-src"
56980
56981  # Let's start with an optimistic view of the world :-)
56982  FOUND_FREETYPE=yes
56983
56984  # First look for the canonical freetype main include file ft2build.h.
56985  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56986    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56987    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56988    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56989      # Fail.
56990      FOUND_FREETYPE=no
56991    fi
56992  fi
56993
56994  if test "x$FOUND_FREETYPE" = xyes; then
56995    # Include file found, let's continue the sanity check.
56996    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56997$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56998
56999    # Reset to default value
57000    FREETYPE_BASE_NAME=freetype
57001    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57002    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57003      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57004          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57005        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57006        # for the .6 version explicitly.
57007        FREETYPE_BASE_NAME=freetype.6
57008        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57009        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57010$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57011      else
57012        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57013$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57014        FOUND_FREETYPE=no
57015      fi
57016    else
57017      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57018        # On Windows, we will need both .lib and .dll file.
57019        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57020          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57021$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57022          FOUND_FREETYPE=no
57023        fi
57024      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57025          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57026        # Found lib in isa dir, use that instead.
57027        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57028        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57029$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57030      fi
57031    fi
57032  fi
57033
57034  if test "x$FOUND_FREETYPE" = xyes; then
57035
57036  # Only process if variable expands to non-empty
57037
57038  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57040
57041  # Input might be given as Windows format, start by converting to
57042  # unix format.
57043  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57044  new_path=`$CYGPATH -u "$path"`
57045
57046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57049  # "foo.exe" is OK but "foo" is an error.
57050  #
57051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57052  # It is also a way to make sure we got the proper file name for the real test later on.
57053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57054  if test "x$test_shortpath" = x; then
57055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57056$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57057    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57058  fi
57059
57060  # Call helper function which possibly converts this using DOS-style short mode.
57061  # If so, the updated path is stored in $new_path.
57062
57063  input_path="$new_path"
57064  # Check if we need to convert this using DOS-style short mode. If the path
57065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57066  # take no chances and rewrite it.
57067  # Note: m4 eats our [], so we need to use [ and ] instead.
57068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57069  if test "x$has_forbidden_chars" != x; then
57070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57074      # Going to short mode and back again did indeed matter. Since short mode is
57075      # case insensitive, let's make it lowercase to improve readability.
57076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57077      # Now convert it back to Unix-style (cygpath)
57078      input_path=`$CYGPATH -u "$shortmode_path"`
57079      new_path="$input_path"
57080    fi
57081  fi
57082
57083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57084  if test "x$test_cygdrive_prefix" = x; then
57085    # As a simple fix, exclude /usr/bin since it's not a real path.
57086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57088      # a path prefixed by /cygdrive for fixpath to work.
57089      new_path="$CYGWIN_ROOT_PATH$input_path"
57090    fi
57091  fi
57092
57093
57094  if test "x$path" != "x$new_path"; then
57095    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57097$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57098  fi
57099
57100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57101
57102  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57103  has_colon=`$ECHO $path | $GREP ^.:`
57104  new_path="$path"
57105  if test "x$has_colon" = x; then
57106    # Not in mixed or Windows style, start by that.
57107    new_path=`cmd //c echo $path`
57108  fi
57109
57110
57111  input_path="$new_path"
57112  # Check if we need to convert this using DOS-style short mode. If the path
57113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57114  # take no chances and rewrite it.
57115  # Note: m4 eats our [], so we need to use [ and ] instead.
57116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57117  if test "x$has_forbidden_chars" != x; then
57118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57120  fi
57121
57122
57123  windows_path="$new_path"
57124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57125    unix_path=`$CYGPATH -u "$windows_path"`
57126    new_path="$unix_path"
57127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57129    new_path="$unix_path"
57130  fi
57131
57132  if test "x$path" != "x$new_path"; then
57133    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57136  fi
57137
57138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57140
57141    else
57142      # We're on a unix platform. Hooray! :)
57143      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57144      has_space=`$ECHO "$path" | $GREP " "`
57145      if test "x$has_space" != x; then
57146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57147$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57149      fi
57150
57151      # Use eval to expand a potential ~
57152      eval path="$path"
57153      if test ! -f "$path" && test ! -d "$path"; then
57154        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57155      fi
57156
57157      if test -d "$path"; then
57158        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57159      else
57160        dir="`$DIRNAME "$path"`"
57161        base="`$BASENAME "$path"`"
57162        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57163      fi
57164    fi
57165  fi
57166
57167
57168  # Only process if variable expands to non-empty
57169
57170  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57172
57173  # Input might be given as Windows format, start by converting to
57174  # unix format.
57175  path="$POTENTIAL_FREETYPE_LIB_PATH"
57176  new_path=`$CYGPATH -u "$path"`
57177
57178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57181  # "foo.exe" is OK but "foo" is an error.
57182  #
57183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57184  # It is also a way to make sure we got the proper file name for the real test later on.
57185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57186  if test "x$test_shortpath" = x; then
57187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57188$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57189    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57190  fi
57191
57192  # Call helper function which possibly converts this using DOS-style short mode.
57193  # If so, the updated path is stored in $new_path.
57194
57195  input_path="$new_path"
57196  # Check if we need to convert this using DOS-style short mode. If the path
57197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57198  # take no chances and rewrite it.
57199  # Note: m4 eats our [], so we need to use [ and ] instead.
57200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57201  if test "x$has_forbidden_chars" != x; then
57202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57206      # Going to short mode and back again did indeed matter. Since short mode is
57207      # case insensitive, let's make it lowercase to improve readability.
57208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57209      # Now convert it back to Unix-style (cygpath)
57210      input_path=`$CYGPATH -u "$shortmode_path"`
57211      new_path="$input_path"
57212    fi
57213  fi
57214
57215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57216  if test "x$test_cygdrive_prefix" = x; then
57217    # As a simple fix, exclude /usr/bin since it's not a real path.
57218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57220      # a path prefixed by /cygdrive for fixpath to work.
57221      new_path="$CYGWIN_ROOT_PATH$input_path"
57222    fi
57223  fi
57224
57225
57226  if test "x$path" != "x$new_path"; then
57227    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57230  fi
57231
57232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57233
57234  path="$POTENTIAL_FREETYPE_LIB_PATH"
57235  has_colon=`$ECHO $path | $GREP ^.:`
57236  new_path="$path"
57237  if test "x$has_colon" = x; then
57238    # Not in mixed or Windows style, start by that.
57239    new_path=`cmd //c echo $path`
57240  fi
57241
57242
57243  input_path="$new_path"
57244  # Check if we need to convert this using DOS-style short mode. If the path
57245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57246  # take no chances and rewrite it.
57247  # Note: m4 eats our [], so we need to use [ and ] instead.
57248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57249  if test "x$has_forbidden_chars" != x; then
57250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57252  fi
57253
57254
57255  windows_path="$new_path"
57256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57257    unix_path=`$CYGPATH -u "$windows_path"`
57258    new_path="$unix_path"
57259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57261    new_path="$unix_path"
57262  fi
57263
57264  if test "x$path" != "x$new_path"; then
57265    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57268  fi
57269
57270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57272
57273    else
57274      # We're on a unix platform. Hooray! :)
57275      path="$POTENTIAL_FREETYPE_LIB_PATH"
57276      has_space=`$ECHO "$path" | $GREP " "`
57277      if test "x$has_space" != x; then
57278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57279$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57281      fi
57282
57283      # Use eval to expand a potential ~
57284      eval path="$path"
57285      if test ! -f "$path" && test ! -d "$path"; then
57286        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57287      fi
57288
57289      if test -d "$path"; then
57290        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57291      else
57292        dir="`$DIRNAME "$path"`"
57293        base="`$BASENAME "$path"`"
57294        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57295      fi
57296    fi
57297  fi
57298
57299
57300    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57302$as_echo_n "checking for freetype includes... " >&6; }
57303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57304$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57305    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57307$as_echo_n "checking for freetype libraries... " >&6; }
57308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57309$as_echo "$FREETYPE_LIB_PATH" >&6; }
57310  fi
57311
57312          if test "x$FOUND_FREETYPE" != xyes; then
57313            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57314          fi
57315        else
57316          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57317$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57318          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57319        fi
57320      else
57321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57322$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57323      fi
57324    fi
57325
57326    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57327      # User has specified settings
57328
57329      if test "x$BUNDLE_FREETYPE" = x; then
57330        # If not specified, default is to bundle freetype
57331        BUNDLE_FREETYPE=yes
57332      fi
57333
57334      if test "x$with_freetype" != x; then
57335        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57336        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57337      fi
57338
57339      # Allow --with-freetype-lib and --with-freetype-include to override
57340      if test "x$with_freetype_include" != x; then
57341        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57342      fi
57343      if test "x$with_freetype_lib" != x; then
57344        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57345      fi
57346
57347      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57348        # Okay, we got it. Check that it works.
57349
57350  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57351  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57352  METHOD="--with-freetype"
57353
57354  # Let's start with an optimistic view of the world :-)
57355  FOUND_FREETYPE=yes
57356
57357  # First look for the canonical freetype main include file ft2build.h.
57358  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57359    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57360    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57361    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57362      # Fail.
57363      FOUND_FREETYPE=no
57364    fi
57365  fi
57366
57367  if test "x$FOUND_FREETYPE" = xyes; then
57368    # Include file found, let's continue the sanity check.
57369    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57370$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57371
57372    # Reset to default value
57373    FREETYPE_BASE_NAME=freetype
57374    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57375    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57376      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57377          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57378        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57379        # for the .6 version explicitly.
57380        FREETYPE_BASE_NAME=freetype.6
57381        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57382        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57383$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57384      else
57385        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57386$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57387        FOUND_FREETYPE=no
57388      fi
57389    else
57390      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57391        # On Windows, we will need both .lib and .dll file.
57392        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57393          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57394$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57395          FOUND_FREETYPE=no
57396        fi
57397      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57398          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57399        # Found lib in isa dir, use that instead.
57400        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57401        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57402$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57403      fi
57404    fi
57405  fi
57406
57407  if test "x$FOUND_FREETYPE" = xyes; then
57408
57409  # Only process if variable expands to non-empty
57410
57411  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57413
57414  # Input might be given as Windows format, start by converting to
57415  # unix format.
57416  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57417  new_path=`$CYGPATH -u "$path"`
57418
57419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57422  # "foo.exe" is OK but "foo" is an error.
57423  #
57424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57425  # It is also a way to make sure we got the proper file name for the real test later on.
57426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57427  if test "x$test_shortpath" = x; then
57428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57430    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57431  fi
57432
57433  # Call helper function which possibly converts this using DOS-style short mode.
57434  # If so, the updated path is stored in $new_path.
57435
57436  input_path="$new_path"
57437  # Check if we need to convert this using DOS-style short mode. If the path
57438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57439  # take no chances and rewrite it.
57440  # Note: m4 eats our [], so we need to use [ and ] instead.
57441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57442  if test "x$has_forbidden_chars" != x; then
57443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57447      # Going to short mode and back again did indeed matter. Since short mode is
57448      # case insensitive, let's make it lowercase to improve readability.
57449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57450      # Now convert it back to Unix-style (cygpath)
57451      input_path=`$CYGPATH -u "$shortmode_path"`
57452      new_path="$input_path"
57453    fi
57454  fi
57455
57456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57457  if test "x$test_cygdrive_prefix" = x; then
57458    # As a simple fix, exclude /usr/bin since it's not a real path.
57459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57461      # a path prefixed by /cygdrive for fixpath to work.
57462      new_path="$CYGWIN_ROOT_PATH$input_path"
57463    fi
57464  fi
57465
57466
57467  if test "x$path" != "x$new_path"; then
57468    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57470$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57471  fi
57472
57473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57474
57475  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57476  has_colon=`$ECHO $path | $GREP ^.:`
57477  new_path="$path"
57478  if test "x$has_colon" = x; then
57479    # Not in mixed or Windows style, start by that.
57480    new_path=`cmd //c echo $path`
57481  fi
57482
57483
57484  input_path="$new_path"
57485  # Check if we need to convert this using DOS-style short mode. If the path
57486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57487  # take no chances and rewrite it.
57488  # Note: m4 eats our [], so we need to use [ and ] instead.
57489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57490  if test "x$has_forbidden_chars" != x; then
57491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57493  fi
57494
57495
57496  windows_path="$new_path"
57497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57498    unix_path=`$CYGPATH -u "$windows_path"`
57499    new_path="$unix_path"
57500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57502    new_path="$unix_path"
57503  fi
57504
57505  if test "x$path" != "x$new_path"; then
57506    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57508$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57509  fi
57510
57511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57513
57514    else
57515      # We're on a unix platform. Hooray! :)
57516      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57517      has_space=`$ECHO "$path" | $GREP " "`
57518      if test "x$has_space" != x; then
57519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57520$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57521        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57522      fi
57523
57524      # Use eval to expand a potential ~
57525      eval path="$path"
57526      if test ! -f "$path" && test ! -d "$path"; then
57527        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57528      fi
57529
57530      if test -d "$path"; then
57531        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57532      else
57533        dir="`$DIRNAME "$path"`"
57534        base="`$BASENAME "$path"`"
57535        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57536      fi
57537    fi
57538  fi
57539
57540
57541  # Only process if variable expands to non-empty
57542
57543  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57545
57546  # Input might be given as Windows format, start by converting to
57547  # unix format.
57548  path="$POTENTIAL_FREETYPE_LIB_PATH"
57549  new_path=`$CYGPATH -u "$path"`
57550
57551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57554  # "foo.exe" is OK but "foo" is an error.
57555  #
57556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57557  # It is also a way to make sure we got the proper file name for the real test later on.
57558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57559  if test "x$test_shortpath" = x; then
57560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57561$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57562    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57563  fi
57564
57565  # Call helper function which possibly converts this using DOS-style short mode.
57566  # If so, the updated path is stored in $new_path.
57567
57568  input_path="$new_path"
57569  # Check if we need to convert this using DOS-style short mode. If the path
57570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57571  # take no chances and rewrite it.
57572  # Note: m4 eats our [], so we need to use [ and ] instead.
57573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57574  if test "x$has_forbidden_chars" != x; then
57575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57579      # Going to short mode and back again did indeed matter. Since short mode is
57580      # case insensitive, let's make it lowercase to improve readability.
57581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57582      # Now convert it back to Unix-style (cygpath)
57583      input_path=`$CYGPATH -u "$shortmode_path"`
57584      new_path="$input_path"
57585    fi
57586  fi
57587
57588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57589  if test "x$test_cygdrive_prefix" = x; then
57590    # As a simple fix, exclude /usr/bin since it's not a real path.
57591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57593      # a path prefixed by /cygdrive for fixpath to work.
57594      new_path="$CYGWIN_ROOT_PATH$input_path"
57595    fi
57596  fi
57597
57598
57599  if test "x$path" != "x$new_path"; then
57600    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57603  fi
57604
57605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57606
57607  path="$POTENTIAL_FREETYPE_LIB_PATH"
57608  has_colon=`$ECHO $path | $GREP ^.:`
57609  new_path="$path"
57610  if test "x$has_colon" = x; then
57611    # Not in mixed or Windows style, start by that.
57612    new_path=`cmd //c echo $path`
57613  fi
57614
57615
57616  input_path="$new_path"
57617  # Check if we need to convert this using DOS-style short mode. If the path
57618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57619  # take no chances and rewrite it.
57620  # Note: m4 eats our [], so we need to use [ and ] instead.
57621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57622  if test "x$has_forbidden_chars" != x; then
57623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57625  fi
57626
57627
57628  windows_path="$new_path"
57629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57630    unix_path=`$CYGPATH -u "$windows_path"`
57631    new_path="$unix_path"
57632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57634    new_path="$unix_path"
57635  fi
57636
57637  if test "x$path" != "x$new_path"; then
57638    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57640$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57641  fi
57642
57643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57645
57646    else
57647      # We're on a unix platform. Hooray! :)
57648      path="$POTENTIAL_FREETYPE_LIB_PATH"
57649      has_space=`$ECHO "$path" | $GREP " "`
57650      if test "x$has_space" != x; then
57651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57654      fi
57655
57656      # Use eval to expand a potential ~
57657      eval path="$path"
57658      if test ! -f "$path" && test ! -d "$path"; then
57659        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57660      fi
57661
57662      if test -d "$path"; then
57663        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57664      else
57665        dir="`$DIRNAME "$path"`"
57666        base="`$BASENAME "$path"`"
57667        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57668      fi
57669    fi
57670  fi
57671
57672
57673    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57675$as_echo_n "checking for freetype includes... " >&6; }
57676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57677$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57678    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57680$as_echo_n "checking for freetype libraries... " >&6; }
57681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57682$as_echo "$FREETYPE_LIB_PATH" >&6; }
57683  fi
57684
57685        if test "x$FOUND_FREETYPE" != xyes; then
57686          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57687        fi
57688      else
57689        # User specified only one of lib or include. This is an error.
57690        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57691          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57692$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57693          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57694        else
57695          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57696$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57697          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57698        fi
57699      fi
57700    else
57701      # User did not specify settings, but we need freetype. Try to locate it.
57702
57703      if test "x$BUNDLE_FREETYPE" = x; then
57704        # If not specified, default is to bundle freetype only on windows
57705        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57706          BUNDLE_FREETYPE=yes
57707        else
57708          BUNDLE_FREETYPE=no
57709        fi
57710      fi
57711
57712      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57713      if test "x$SYSROOT" = x; then
57714        if test "x$FOUND_FREETYPE" != xyes; then
57715          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57716          if test "x$PKG_CONFIG" != x; then
57717
57718pkg_failed=no
57719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57720$as_echo_n "checking for FREETYPE... " >&6; }
57721
57722if test -n "$FREETYPE_CFLAGS"; then
57723    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57724 elif test -n "$PKG_CONFIG"; then
57725    if test -n "$PKG_CONFIG" && \
57726    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57727  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57728  ac_status=$?
57729  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57730  test $ac_status = 0; }; then
57731  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57732else
57733  pkg_failed=yes
57734fi
57735 else
57736    pkg_failed=untried
57737fi
57738if test -n "$FREETYPE_LIBS"; then
57739    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57740 elif test -n "$PKG_CONFIG"; then
57741    if test -n "$PKG_CONFIG" && \
57742    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57743  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57744  ac_status=$?
57745  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57746  test $ac_status = 0; }; then
57747  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57748else
57749  pkg_failed=yes
57750fi
57751 else
57752    pkg_failed=untried
57753fi
57754
57755
57756
57757if test $pkg_failed = yes; then
57758
57759if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57760        _pkg_short_errors_supported=yes
57761else
57762        _pkg_short_errors_supported=no
57763fi
57764        if test $_pkg_short_errors_supported = yes; then
57765	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57766        else
57767	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57768        fi
57769	# Put the nasty error message in config.log where it belongs
57770	echo "$FREETYPE_PKG_ERRORS" >&5
57771
57772	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57773$as_echo "no" >&6; }
57774                FOUND_FREETYPE=no
57775elif test $pkg_failed = untried; then
57776	FOUND_FREETYPE=no
57777else
57778	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57779	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57781$as_echo "yes" >&6; }
57782	FOUND_FREETYPE=yes
57783fi
57784            if test "x$FOUND_FREETYPE" = xyes; then
57785              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57786              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57787              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57788              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57789                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57790              fi
57791              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57792              if test "x$BUNDLE_FREETYPE" = xyes; then
57793                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57794$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57795                FOUND_FREETYPE=no
57796              else
57797                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57798$as_echo_n "checking for freetype... " >&6; }
57799                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57800$as_echo "yes (using pkg-config)" >&6; }
57801              fi
57802            fi
57803          fi
57804        fi
57805      fi
57806
57807      if test "x$FOUND_FREETYPE" != xyes; then
57808        # Check in well-known locations
57809        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57810          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57811
57812  windows_path="$FREETYPE_BASE_DIR"
57813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57814    unix_path=`$CYGPATH -u "$windows_path"`
57815    FREETYPE_BASE_DIR="$unix_path"
57816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57818    FREETYPE_BASE_DIR="$unix_path"
57819  fi
57820
57821
57822  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57823  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57824  METHOD="well-known location"
57825
57826  # Let's start with an optimistic view of the world :-)
57827  FOUND_FREETYPE=yes
57828
57829  # First look for the canonical freetype main include file ft2build.h.
57830  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57831    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57832    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57833    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57834      # Fail.
57835      FOUND_FREETYPE=no
57836    fi
57837  fi
57838
57839  if test "x$FOUND_FREETYPE" = xyes; then
57840    # Include file found, let's continue the sanity check.
57841    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57842$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57843
57844    # Reset to default value
57845    FREETYPE_BASE_NAME=freetype
57846    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57847    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57848      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57849          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57850        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57851        # for the .6 version explicitly.
57852        FREETYPE_BASE_NAME=freetype.6
57853        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57854        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57855$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57856      else
57857        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57859        FOUND_FREETYPE=no
57860      fi
57861    else
57862      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57863        # On Windows, we will need both .lib and .dll file.
57864        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57865          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57867          FOUND_FREETYPE=no
57868        fi
57869      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57870          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57871        # Found lib in isa dir, use that instead.
57872        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57873        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57874$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57875      fi
57876    fi
57877  fi
57878
57879  if test "x$FOUND_FREETYPE" = xyes; then
57880
57881  # Only process if variable expands to non-empty
57882
57883  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57885
57886  # Input might be given as Windows format, start by converting to
57887  # unix format.
57888  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57889  new_path=`$CYGPATH -u "$path"`
57890
57891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57894  # "foo.exe" is OK but "foo" is an error.
57895  #
57896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57897  # It is also a way to make sure we got the proper file name for the real test later on.
57898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57899  if test "x$test_shortpath" = x; then
57900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57902    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57903  fi
57904
57905  # Call helper function which possibly converts this using DOS-style short mode.
57906  # If so, the updated path is stored in $new_path.
57907
57908  input_path="$new_path"
57909  # Check if we need to convert this using DOS-style short mode. If the path
57910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57911  # take no chances and rewrite it.
57912  # Note: m4 eats our [], so we need to use [ and ] instead.
57913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57914  if test "x$has_forbidden_chars" != x; then
57915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57919      # Going to short mode and back again did indeed matter. Since short mode is
57920      # case insensitive, let's make it lowercase to improve readability.
57921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57922      # Now convert it back to Unix-style (cygpath)
57923      input_path=`$CYGPATH -u "$shortmode_path"`
57924      new_path="$input_path"
57925    fi
57926  fi
57927
57928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57929  if test "x$test_cygdrive_prefix" = x; then
57930    # As a simple fix, exclude /usr/bin since it's not a real path.
57931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57933      # a path prefixed by /cygdrive for fixpath to work.
57934      new_path="$CYGWIN_ROOT_PATH$input_path"
57935    fi
57936  fi
57937
57938
57939  if test "x$path" != "x$new_path"; then
57940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57943  fi
57944
57945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57946
57947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57948  has_colon=`$ECHO $path | $GREP ^.:`
57949  new_path="$path"
57950  if test "x$has_colon" = x; then
57951    # Not in mixed or Windows style, start by that.
57952    new_path=`cmd //c echo $path`
57953  fi
57954
57955
57956  input_path="$new_path"
57957  # Check if we need to convert this using DOS-style short mode. If the path
57958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57959  # take no chances and rewrite it.
57960  # Note: m4 eats our [], so we need to use [ and ] instead.
57961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57962  if test "x$has_forbidden_chars" != x; then
57963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57965  fi
57966
57967
57968  windows_path="$new_path"
57969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57970    unix_path=`$CYGPATH -u "$windows_path"`
57971    new_path="$unix_path"
57972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57974    new_path="$unix_path"
57975  fi
57976
57977  if test "x$path" != "x$new_path"; then
57978    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57981  fi
57982
57983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57985
57986    else
57987      # We're on a unix platform. Hooray! :)
57988      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57989      has_space=`$ECHO "$path" | $GREP " "`
57990      if test "x$has_space" != x; then
57991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57994      fi
57995
57996      # Use eval to expand a potential ~
57997      eval path="$path"
57998      if test ! -f "$path" && test ! -d "$path"; then
57999        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58000      fi
58001
58002      if test -d "$path"; then
58003        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58004      else
58005        dir="`$DIRNAME "$path"`"
58006        base="`$BASENAME "$path"`"
58007        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58008      fi
58009    fi
58010  fi
58011
58012
58013  # Only process if variable expands to non-empty
58014
58015  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58017
58018  # Input might be given as Windows format, start by converting to
58019  # unix format.
58020  path="$POTENTIAL_FREETYPE_LIB_PATH"
58021  new_path=`$CYGPATH -u "$path"`
58022
58023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58026  # "foo.exe" is OK but "foo" is an error.
58027  #
58028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58029  # It is also a way to make sure we got the proper file name for the real test later on.
58030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58031  if test "x$test_shortpath" = x; then
58032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58034    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58035  fi
58036
58037  # Call helper function which possibly converts this using DOS-style short mode.
58038  # If so, the updated path is stored in $new_path.
58039
58040  input_path="$new_path"
58041  # Check if we need to convert this using DOS-style short mode. If the path
58042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58043  # take no chances and rewrite it.
58044  # Note: m4 eats our [], so we need to use [ and ] instead.
58045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58046  if test "x$has_forbidden_chars" != x; then
58047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58051      # Going to short mode and back again did indeed matter. Since short mode is
58052      # case insensitive, let's make it lowercase to improve readability.
58053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58054      # Now convert it back to Unix-style (cygpath)
58055      input_path=`$CYGPATH -u "$shortmode_path"`
58056      new_path="$input_path"
58057    fi
58058  fi
58059
58060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58061  if test "x$test_cygdrive_prefix" = x; then
58062    # As a simple fix, exclude /usr/bin since it's not a real path.
58063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58065      # a path prefixed by /cygdrive for fixpath to work.
58066      new_path="$CYGWIN_ROOT_PATH$input_path"
58067    fi
58068  fi
58069
58070
58071  if test "x$path" != "x$new_path"; then
58072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58075  fi
58076
58077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58078
58079  path="$POTENTIAL_FREETYPE_LIB_PATH"
58080  has_colon=`$ECHO $path | $GREP ^.:`
58081  new_path="$path"
58082  if test "x$has_colon" = x; then
58083    # Not in mixed or Windows style, start by that.
58084    new_path=`cmd //c echo $path`
58085  fi
58086
58087
58088  input_path="$new_path"
58089  # Check if we need to convert this using DOS-style short mode. If the path
58090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58091  # take no chances and rewrite it.
58092  # Note: m4 eats our [], so we need to use [ and ] instead.
58093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58094  if test "x$has_forbidden_chars" != x; then
58095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58097  fi
58098
58099
58100  windows_path="$new_path"
58101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58102    unix_path=`$CYGPATH -u "$windows_path"`
58103    new_path="$unix_path"
58104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58106    new_path="$unix_path"
58107  fi
58108
58109  if test "x$path" != "x$new_path"; then
58110    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58113  fi
58114
58115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58117
58118    else
58119      # We're on a unix platform. Hooray! :)
58120      path="$POTENTIAL_FREETYPE_LIB_PATH"
58121      has_space=`$ECHO "$path" | $GREP " "`
58122      if test "x$has_space" != x; then
58123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58126      fi
58127
58128      # Use eval to expand a potential ~
58129      eval path="$path"
58130      if test ! -f "$path" && test ! -d "$path"; then
58131        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58132      fi
58133
58134      if test -d "$path"; then
58135        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58136      else
58137        dir="`$DIRNAME "$path"`"
58138        base="`$BASENAME "$path"`"
58139        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58140      fi
58141    fi
58142  fi
58143
58144
58145    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58147$as_echo_n "checking for freetype includes... " >&6; }
58148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58149$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58150    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58152$as_echo_n "checking for freetype libraries... " >&6; }
58153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58154$as_echo "$FREETYPE_LIB_PATH" >&6; }
58155  fi
58156
58157          if test "x$FOUND_FREETYPE" != xyes; then
58158            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58159
58160  windows_path="$FREETYPE_BASE_DIR"
58161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58162    unix_path=`$CYGPATH -u "$windows_path"`
58163    FREETYPE_BASE_DIR="$unix_path"
58164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58166    FREETYPE_BASE_DIR="$unix_path"
58167  fi
58168
58169
58170  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58171  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58172  METHOD="well-known location"
58173
58174  # Let's start with an optimistic view of the world :-)
58175  FOUND_FREETYPE=yes
58176
58177  # First look for the canonical freetype main include file ft2build.h.
58178  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58179    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58180    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58181    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58182      # Fail.
58183      FOUND_FREETYPE=no
58184    fi
58185  fi
58186
58187  if test "x$FOUND_FREETYPE" = xyes; then
58188    # Include file found, let's continue the sanity check.
58189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58190$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58191
58192    # Reset to default value
58193    FREETYPE_BASE_NAME=freetype
58194    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58195    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58196      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58197          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58198        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58199        # for the .6 version explicitly.
58200        FREETYPE_BASE_NAME=freetype.6
58201        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58202        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58203$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58204      else
58205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58206$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58207        FOUND_FREETYPE=no
58208      fi
58209    else
58210      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58211        # On Windows, we will need both .lib and .dll file.
58212        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58213          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58214$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58215          FOUND_FREETYPE=no
58216        fi
58217      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58218          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58219        # Found lib in isa dir, use that instead.
58220        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58221        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58222$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58223      fi
58224    fi
58225  fi
58226
58227  if test "x$FOUND_FREETYPE" = xyes; then
58228
58229  # Only process if variable expands to non-empty
58230
58231  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58233
58234  # Input might be given as Windows format, start by converting to
58235  # unix format.
58236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58237  new_path=`$CYGPATH -u "$path"`
58238
58239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58242  # "foo.exe" is OK but "foo" is an error.
58243  #
58244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58245  # It is also a way to make sure we got the proper file name for the real test later on.
58246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58247  if test "x$test_shortpath" = x; then
58248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58250    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58251  fi
58252
58253  # Call helper function which possibly converts this using DOS-style short mode.
58254  # If so, the updated path is stored in $new_path.
58255
58256  input_path="$new_path"
58257  # Check if we need to convert this using DOS-style short mode. If the path
58258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58259  # take no chances and rewrite it.
58260  # Note: m4 eats our [], so we need to use [ and ] instead.
58261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58262  if test "x$has_forbidden_chars" != x; then
58263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58267      # Going to short mode and back again did indeed matter. Since short mode is
58268      # case insensitive, let's make it lowercase to improve readability.
58269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58270      # Now convert it back to Unix-style (cygpath)
58271      input_path=`$CYGPATH -u "$shortmode_path"`
58272      new_path="$input_path"
58273    fi
58274  fi
58275
58276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58277  if test "x$test_cygdrive_prefix" = x; then
58278    # As a simple fix, exclude /usr/bin since it's not a real path.
58279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58281      # a path prefixed by /cygdrive for fixpath to work.
58282      new_path="$CYGWIN_ROOT_PATH$input_path"
58283    fi
58284  fi
58285
58286
58287  if test "x$path" != "x$new_path"; then
58288    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58290$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58291  fi
58292
58293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58294
58295  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58296  has_colon=`$ECHO $path | $GREP ^.:`
58297  new_path="$path"
58298  if test "x$has_colon" = x; then
58299    # Not in mixed or Windows style, start by that.
58300    new_path=`cmd //c echo $path`
58301  fi
58302
58303
58304  input_path="$new_path"
58305  # Check if we need to convert this using DOS-style short mode. If the path
58306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58307  # take no chances and rewrite it.
58308  # Note: m4 eats our [], so we need to use [ and ] instead.
58309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58310  if test "x$has_forbidden_chars" != x; then
58311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58313  fi
58314
58315
58316  windows_path="$new_path"
58317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58318    unix_path=`$CYGPATH -u "$windows_path"`
58319    new_path="$unix_path"
58320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58322    new_path="$unix_path"
58323  fi
58324
58325  if test "x$path" != "x$new_path"; then
58326    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58328$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58329  fi
58330
58331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58333
58334    else
58335      # We're on a unix platform. Hooray! :)
58336      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58337      has_space=`$ECHO "$path" | $GREP " "`
58338      if test "x$has_space" != x; then
58339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58341        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58342      fi
58343
58344      # Use eval to expand a potential ~
58345      eval path="$path"
58346      if test ! -f "$path" && test ! -d "$path"; then
58347        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58348      fi
58349
58350      if test -d "$path"; then
58351        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58352      else
58353        dir="`$DIRNAME "$path"`"
58354        base="`$BASENAME "$path"`"
58355        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58356      fi
58357    fi
58358  fi
58359
58360
58361  # Only process if variable expands to non-empty
58362
58363  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58365
58366  # Input might be given as Windows format, start by converting to
58367  # unix format.
58368  path="$POTENTIAL_FREETYPE_LIB_PATH"
58369  new_path=`$CYGPATH -u "$path"`
58370
58371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58374  # "foo.exe" is OK but "foo" is an error.
58375  #
58376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58377  # It is also a way to make sure we got the proper file name for the real test later on.
58378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58379  if test "x$test_shortpath" = x; then
58380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58382    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58383  fi
58384
58385  # Call helper function which possibly converts this using DOS-style short mode.
58386  # If so, the updated path is stored in $new_path.
58387
58388  input_path="$new_path"
58389  # Check if we need to convert this using DOS-style short mode. If the path
58390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58391  # take no chances and rewrite it.
58392  # Note: m4 eats our [], so we need to use [ and ] instead.
58393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58394  if test "x$has_forbidden_chars" != x; then
58395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58399      # Going to short mode and back again did indeed matter. Since short mode is
58400      # case insensitive, let's make it lowercase to improve readability.
58401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58402      # Now convert it back to Unix-style (cygpath)
58403      input_path=`$CYGPATH -u "$shortmode_path"`
58404      new_path="$input_path"
58405    fi
58406  fi
58407
58408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58409  if test "x$test_cygdrive_prefix" = x; then
58410    # As a simple fix, exclude /usr/bin since it's not a real path.
58411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58413      # a path prefixed by /cygdrive for fixpath to work.
58414      new_path="$CYGWIN_ROOT_PATH$input_path"
58415    fi
58416  fi
58417
58418
58419  if test "x$path" != "x$new_path"; then
58420    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58422$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58423  fi
58424
58425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58426
58427  path="$POTENTIAL_FREETYPE_LIB_PATH"
58428  has_colon=`$ECHO $path | $GREP ^.:`
58429  new_path="$path"
58430  if test "x$has_colon" = x; then
58431    # Not in mixed or Windows style, start by that.
58432    new_path=`cmd //c echo $path`
58433  fi
58434
58435
58436  input_path="$new_path"
58437  # Check if we need to convert this using DOS-style short mode. If the path
58438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58439  # take no chances and rewrite it.
58440  # Note: m4 eats our [], so we need to use [ and ] instead.
58441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58442  if test "x$has_forbidden_chars" != x; then
58443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58445  fi
58446
58447
58448  windows_path="$new_path"
58449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58450    unix_path=`$CYGPATH -u "$windows_path"`
58451    new_path="$unix_path"
58452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58454    new_path="$unix_path"
58455  fi
58456
58457  if test "x$path" != "x$new_path"; then
58458    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58461  fi
58462
58463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58465
58466    else
58467      # We're on a unix platform. Hooray! :)
58468      path="$POTENTIAL_FREETYPE_LIB_PATH"
58469      has_space=`$ECHO "$path" | $GREP " "`
58470      if test "x$has_space" != x; then
58471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58474      fi
58475
58476      # Use eval to expand a potential ~
58477      eval path="$path"
58478      if test ! -f "$path" && test ! -d "$path"; then
58479        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58480      fi
58481
58482      if test -d "$path"; then
58483        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58484      else
58485        dir="`$DIRNAME "$path"`"
58486        base="`$BASENAME "$path"`"
58487        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58488      fi
58489    fi
58490  fi
58491
58492
58493    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58495$as_echo_n "checking for freetype includes... " >&6; }
58496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58497$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58498    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58500$as_echo_n "checking for freetype libraries... " >&6; }
58501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58502$as_echo "$FREETYPE_LIB_PATH" >&6; }
58503  fi
58504
58505          fi
58506          if test "x$FOUND_FREETYPE" != xyes; then
58507            FREETYPE_BASE_DIR="$HOME/freetype"
58508
58509  windows_path="$FREETYPE_BASE_DIR"
58510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58511    unix_path=`$CYGPATH -u "$windows_path"`
58512    FREETYPE_BASE_DIR="$unix_path"
58513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58515    FREETYPE_BASE_DIR="$unix_path"
58516  fi
58517
58518            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58519
58520  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58521  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58522  METHOD="well-known location"
58523
58524  # Let's start with an optimistic view of the world :-)
58525  FOUND_FREETYPE=yes
58526
58527  # First look for the canonical freetype main include file ft2build.h.
58528  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58529    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58530    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58531    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58532      # Fail.
58533      FOUND_FREETYPE=no
58534    fi
58535  fi
58536
58537  if test "x$FOUND_FREETYPE" = xyes; then
58538    # Include file found, let's continue the sanity check.
58539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58540$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58541
58542    # Reset to default value
58543    FREETYPE_BASE_NAME=freetype
58544    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58545    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58546      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58547          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58548        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58549        # for the .6 version explicitly.
58550        FREETYPE_BASE_NAME=freetype.6
58551        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58552        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58553$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58554      else
58555        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58556$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58557        FOUND_FREETYPE=no
58558      fi
58559    else
58560      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58561        # On Windows, we will need both .lib and .dll file.
58562        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58563          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58564$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58565          FOUND_FREETYPE=no
58566        fi
58567      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58568          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58569        # Found lib in isa dir, use that instead.
58570        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58571        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58572$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58573      fi
58574    fi
58575  fi
58576
58577  if test "x$FOUND_FREETYPE" = xyes; then
58578
58579  # Only process if variable expands to non-empty
58580
58581  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58583
58584  # Input might be given as Windows format, start by converting to
58585  # unix format.
58586  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58587  new_path=`$CYGPATH -u "$path"`
58588
58589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58592  # "foo.exe" is OK but "foo" is an error.
58593  #
58594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58595  # It is also a way to make sure we got the proper file name for the real test later on.
58596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58597  if test "x$test_shortpath" = x; then
58598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58600    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58601  fi
58602
58603  # Call helper function which possibly converts this using DOS-style short mode.
58604  # If so, the updated path is stored in $new_path.
58605
58606  input_path="$new_path"
58607  # Check if we need to convert this using DOS-style short mode. If the path
58608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58609  # take no chances and rewrite it.
58610  # Note: m4 eats our [], so we need to use [ and ] instead.
58611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58612  if test "x$has_forbidden_chars" != x; then
58613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58617      # Going to short mode and back again did indeed matter. Since short mode is
58618      # case insensitive, let's make it lowercase to improve readability.
58619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58620      # Now convert it back to Unix-style (cygpath)
58621      input_path=`$CYGPATH -u "$shortmode_path"`
58622      new_path="$input_path"
58623    fi
58624  fi
58625
58626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58627  if test "x$test_cygdrive_prefix" = x; then
58628    # As a simple fix, exclude /usr/bin since it's not a real path.
58629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58631      # a path prefixed by /cygdrive for fixpath to work.
58632      new_path="$CYGWIN_ROOT_PATH$input_path"
58633    fi
58634  fi
58635
58636
58637  if test "x$path" != "x$new_path"; then
58638    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58640$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58641  fi
58642
58643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58644
58645  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58646  has_colon=`$ECHO $path | $GREP ^.:`
58647  new_path="$path"
58648  if test "x$has_colon" = x; then
58649    # Not in mixed or Windows style, start by that.
58650    new_path=`cmd //c echo $path`
58651  fi
58652
58653
58654  input_path="$new_path"
58655  # Check if we need to convert this using DOS-style short mode. If the path
58656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58657  # take no chances and rewrite it.
58658  # Note: m4 eats our [], so we need to use [ and ] instead.
58659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58660  if test "x$has_forbidden_chars" != x; then
58661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58663  fi
58664
58665
58666  windows_path="$new_path"
58667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58668    unix_path=`$CYGPATH -u "$windows_path"`
58669    new_path="$unix_path"
58670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58672    new_path="$unix_path"
58673  fi
58674
58675  if test "x$path" != "x$new_path"; then
58676    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58678$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58679  fi
58680
58681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58683
58684    else
58685      # We're on a unix platform. Hooray! :)
58686      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58687      has_space=`$ECHO "$path" | $GREP " "`
58688      if test "x$has_space" != x; then
58689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58690$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58692      fi
58693
58694      # Use eval to expand a potential ~
58695      eval path="$path"
58696      if test ! -f "$path" && test ! -d "$path"; then
58697        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58698      fi
58699
58700      if test -d "$path"; then
58701        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58702      else
58703        dir="`$DIRNAME "$path"`"
58704        base="`$BASENAME "$path"`"
58705        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58706      fi
58707    fi
58708  fi
58709
58710
58711  # Only process if variable expands to non-empty
58712
58713  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58715
58716  # Input might be given as Windows format, start by converting to
58717  # unix format.
58718  path="$POTENTIAL_FREETYPE_LIB_PATH"
58719  new_path=`$CYGPATH -u "$path"`
58720
58721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58724  # "foo.exe" is OK but "foo" is an error.
58725  #
58726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58727  # It is also a way to make sure we got the proper file name for the real test later on.
58728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58729  if test "x$test_shortpath" = x; then
58730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58732    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58733  fi
58734
58735  # Call helper function which possibly converts this using DOS-style short mode.
58736  # If so, the updated path is stored in $new_path.
58737
58738  input_path="$new_path"
58739  # Check if we need to convert this using DOS-style short mode. If the path
58740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58741  # take no chances and rewrite it.
58742  # Note: m4 eats our [], so we need to use [ and ] instead.
58743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58744  if test "x$has_forbidden_chars" != x; then
58745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58749      # Going to short mode and back again did indeed matter. Since short mode is
58750      # case insensitive, let's make it lowercase to improve readability.
58751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58752      # Now convert it back to Unix-style (cygpath)
58753      input_path=`$CYGPATH -u "$shortmode_path"`
58754      new_path="$input_path"
58755    fi
58756  fi
58757
58758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58759  if test "x$test_cygdrive_prefix" = x; then
58760    # As a simple fix, exclude /usr/bin since it's not a real path.
58761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58763      # a path prefixed by /cygdrive for fixpath to work.
58764      new_path="$CYGWIN_ROOT_PATH$input_path"
58765    fi
58766  fi
58767
58768
58769  if test "x$path" != "x$new_path"; then
58770    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58772$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58773  fi
58774
58775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58776
58777  path="$POTENTIAL_FREETYPE_LIB_PATH"
58778  has_colon=`$ECHO $path | $GREP ^.:`
58779  new_path="$path"
58780  if test "x$has_colon" = x; then
58781    # Not in mixed or Windows style, start by that.
58782    new_path=`cmd //c echo $path`
58783  fi
58784
58785
58786  input_path="$new_path"
58787  # Check if we need to convert this using DOS-style short mode. If the path
58788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58789  # take no chances and rewrite it.
58790  # Note: m4 eats our [], so we need to use [ and ] instead.
58791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58792  if test "x$has_forbidden_chars" != x; then
58793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58795  fi
58796
58797
58798  windows_path="$new_path"
58799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58800    unix_path=`$CYGPATH -u "$windows_path"`
58801    new_path="$unix_path"
58802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58804    new_path="$unix_path"
58805  fi
58806
58807  if test "x$path" != "x$new_path"; then
58808    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58811  fi
58812
58813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58815
58816    else
58817      # We're on a unix platform. Hooray! :)
58818      path="$POTENTIAL_FREETYPE_LIB_PATH"
58819      has_space=`$ECHO "$path" | $GREP " "`
58820      if test "x$has_space" != x; then
58821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58822$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58824      fi
58825
58826      # Use eval to expand a potential ~
58827      eval path="$path"
58828      if test ! -f "$path" && test ! -d "$path"; then
58829        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58830      fi
58831
58832      if test -d "$path"; then
58833        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58834      else
58835        dir="`$DIRNAME "$path"`"
58836        base="`$BASENAME "$path"`"
58837        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58838      fi
58839    fi
58840  fi
58841
58842
58843    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58845$as_echo_n "checking for freetype includes... " >&6; }
58846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58847$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58848    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58850$as_echo_n "checking for freetype libraries... " >&6; }
58851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58852$as_echo "$FREETYPE_LIB_PATH" >&6; }
58853  fi
58854
58855            else
58856
58857  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58858  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58859  METHOD="well-known location"
58860
58861  # Let's start with an optimistic view of the world :-)
58862  FOUND_FREETYPE=yes
58863
58864  # First look for the canonical freetype main include file ft2build.h.
58865  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58866    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58867    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58868    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58869      # Fail.
58870      FOUND_FREETYPE=no
58871    fi
58872  fi
58873
58874  if test "x$FOUND_FREETYPE" = xyes; then
58875    # Include file found, let's continue the sanity check.
58876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58877$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58878
58879    # Reset to default value
58880    FREETYPE_BASE_NAME=freetype
58881    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58882    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58883      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58884          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58885        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58886        # for the .6 version explicitly.
58887        FREETYPE_BASE_NAME=freetype.6
58888        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58889        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58890$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58891      else
58892        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58893$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58894        FOUND_FREETYPE=no
58895      fi
58896    else
58897      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58898        # On Windows, we will need both .lib and .dll file.
58899        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58900          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58902          FOUND_FREETYPE=no
58903        fi
58904      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58905          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58906        # Found lib in isa dir, use that instead.
58907        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58908        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58909$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58910      fi
58911    fi
58912  fi
58913
58914  if test "x$FOUND_FREETYPE" = xyes; then
58915
58916  # Only process if variable expands to non-empty
58917
58918  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58920
58921  # Input might be given as Windows format, start by converting to
58922  # unix format.
58923  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58924  new_path=`$CYGPATH -u "$path"`
58925
58926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58929  # "foo.exe" is OK but "foo" is an error.
58930  #
58931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58932  # It is also a way to make sure we got the proper file name for the real test later on.
58933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58934  if test "x$test_shortpath" = x; then
58935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58937    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58938  fi
58939
58940  # Call helper function which possibly converts this using DOS-style short mode.
58941  # If so, the updated path is stored in $new_path.
58942
58943  input_path="$new_path"
58944  # Check if we need to convert this using DOS-style short mode. If the path
58945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58946  # take no chances and rewrite it.
58947  # Note: m4 eats our [], so we need to use [ and ] instead.
58948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58949  if test "x$has_forbidden_chars" != x; then
58950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58954      # Going to short mode and back again did indeed matter. Since short mode is
58955      # case insensitive, let's make it lowercase to improve readability.
58956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58957      # Now convert it back to Unix-style (cygpath)
58958      input_path=`$CYGPATH -u "$shortmode_path"`
58959      new_path="$input_path"
58960    fi
58961  fi
58962
58963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58964  if test "x$test_cygdrive_prefix" = x; then
58965    # As a simple fix, exclude /usr/bin since it's not a real path.
58966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58968      # a path prefixed by /cygdrive for fixpath to work.
58969      new_path="$CYGWIN_ROOT_PATH$input_path"
58970    fi
58971  fi
58972
58973
58974  if test "x$path" != "x$new_path"; then
58975    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58977$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58978  fi
58979
58980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58981
58982  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58983  has_colon=`$ECHO $path | $GREP ^.:`
58984  new_path="$path"
58985  if test "x$has_colon" = x; then
58986    # Not in mixed or Windows style, start by that.
58987    new_path=`cmd //c echo $path`
58988  fi
58989
58990
58991  input_path="$new_path"
58992  # Check if we need to convert this using DOS-style short mode. If the path
58993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58994  # take no chances and rewrite it.
58995  # Note: m4 eats our [], so we need to use [ and ] instead.
58996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58997  if test "x$has_forbidden_chars" != x; then
58998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59000  fi
59001
59002
59003  windows_path="$new_path"
59004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59005    unix_path=`$CYGPATH -u "$windows_path"`
59006    new_path="$unix_path"
59007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59009    new_path="$unix_path"
59010  fi
59011
59012  if test "x$path" != "x$new_path"; then
59013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59016  fi
59017
59018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59020
59021    else
59022      # We're on a unix platform. Hooray! :)
59023      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59024      has_space=`$ECHO "$path" | $GREP " "`
59025      if test "x$has_space" != x; then
59026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59028        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59029      fi
59030
59031      # Use eval to expand a potential ~
59032      eval path="$path"
59033      if test ! -f "$path" && test ! -d "$path"; then
59034        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59035      fi
59036
59037      if test -d "$path"; then
59038        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59039      else
59040        dir="`$DIRNAME "$path"`"
59041        base="`$BASENAME "$path"`"
59042        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59043      fi
59044    fi
59045  fi
59046
59047
59048  # Only process if variable expands to non-empty
59049
59050  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59052
59053  # Input might be given as Windows format, start by converting to
59054  # unix format.
59055  path="$POTENTIAL_FREETYPE_LIB_PATH"
59056  new_path=`$CYGPATH -u "$path"`
59057
59058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59061  # "foo.exe" is OK but "foo" is an error.
59062  #
59063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59064  # It is also a way to make sure we got the proper file name for the real test later on.
59065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59066  if test "x$test_shortpath" = x; then
59067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59069    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59070  fi
59071
59072  # Call helper function which possibly converts this using DOS-style short mode.
59073  # If so, the updated path is stored in $new_path.
59074
59075  input_path="$new_path"
59076  # Check if we need to convert this using DOS-style short mode. If the path
59077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59078  # take no chances and rewrite it.
59079  # Note: m4 eats our [], so we need to use [ and ] instead.
59080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59081  if test "x$has_forbidden_chars" != x; then
59082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59086      # Going to short mode and back again did indeed matter. Since short mode is
59087      # case insensitive, let's make it lowercase to improve readability.
59088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59089      # Now convert it back to Unix-style (cygpath)
59090      input_path=`$CYGPATH -u "$shortmode_path"`
59091      new_path="$input_path"
59092    fi
59093  fi
59094
59095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59096  if test "x$test_cygdrive_prefix" = x; then
59097    # As a simple fix, exclude /usr/bin since it's not a real path.
59098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59100      # a path prefixed by /cygdrive for fixpath to work.
59101      new_path="$CYGWIN_ROOT_PATH$input_path"
59102    fi
59103  fi
59104
59105
59106  if test "x$path" != "x$new_path"; then
59107    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59110  fi
59111
59112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59113
59114  path="$POTENTIAL_FREETYPE_LIB_PATH"
59115  has_colon=`$ECHO $path | $GREP ^.:`
59116  new_path="$path"
59117  if test "x$has_colon" = x; then
59118    # Not in mixed or Windows style, start by that.
59119    new_path=`cmd //c echo $path`
59120  fi
59121
59122
59123  input_path="$new_path"
59124  # Check if we need to convert this using DOS-style short mode. If the path
59125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59126  # take no chances and rewrite it.
59127  # Note: m4 eats our [], so we need to use [ and ] instead.
59128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59129  if test "x$has_forbidden_chars" != x; then
59130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59132  fi
59133
59134
59135  windows_path="$new_path"
59136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59137    unix_path=`$CYGPATH -u "$windows_path"`
59138    new_path="$unix_path"
59139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59141    new_path="$unix_path"
59142  fi
59143
59144  if test "x$path" != "x$new_path"; then
59145    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59148  fi
59149
59150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59152
59153    else
59154      # We're on a unix platform. Hooray! :)
59155      path="$POTENTIAL_FREETYPE_LIB_PATH"
59156      has_space=`$ECHO "$path" | $GREP " "`
59157      if test "x$has_space" != x; then
59158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59161      fi
59162
59163      # Use eval to expand a potential ~
59164      eval path="$path"
59165      if test ! -f "$path" && test ! -d "$path"; then
59166        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59167      fi
59168
59169      if test -d "$path"; then
59170        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59171      else
59172        dir="`$DIRNAME "$path"`"
59173        base="`$BASENAME "$path"`"
59174        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59175      fi
59176    fi
59177  fi
59178
59179
59180    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59182$as_echo_n "checking for freetype includes... " >&6; }
59183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59184$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59185    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59187$as_echo_n "checking for freetype libraries... " >&6; }
59188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59189$as_echo "$FREETYPE_LIB_PATH" >&6; }
59190  fi
59191
59192            fi
59193            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59194                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59195              # Source is available, as a last resort try to build freetype in default location
59196
59197  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59198  BUILD_FREETYPE=yes
59199
59200  # Check if the freetype sources are acessible..
59201  if ! test -d $FREETYPE_SRC_PATH; then
59202    { $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
59203$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59204    BUILD_FREETYPE=no
59205  fi
59206  # ..and contain a vc2010 project file
59207  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59208  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59209    { $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
59210$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59211    BUILD_FREETYPE=no
59212  fi
59213  # Now check if configure found a version of 'msbuild.exe'
59214  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59215    { $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
59216$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;}
59217    BUILD_FREETYPE=no
59218  fi
59219
59220  # Ready to go..
59221  if test "x$BUILD_FREETYPE" = xyes; then
59222    # msbuild requires trailing slashes for output directories
59223    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59224    freetype_lib_path_unix="$freetype_lib_path"
59225    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59226
59227  unix_path="$vcxproj_path"
59228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59229    windows_path=`$CYGPATH -m "$unix_path"`
59230    vcxproj_path="$windows_path"
59231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59232    windows_path=`cmd //c echo $unix_path`
59233    vcxproj_path="$windows_path"
59234  fi
59235
59236
59237  unix_path="$freetype_lib_path"
59238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59239    windows_path=`$CYGPATH -m "$unix_path"`
59240    freetype_lib_path="$windows_path"
59241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59242    windows_path=`cmd //c echo $unix_path`
59243    freetype_lib_path="$windows_path"
59244  fi
59245
59246
59247  unix_path="$freetype_obj_path"
59248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59249    windows_path=`$CYGPATH -m "$unix_path"`
59250    freetype_obj_path="$windows_path"
59251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59252    windows_path=`cmd //c echo $unix_path`
59253    freetype_obj_path="$windows_path"
59254  fi
59255
59256    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59257      freetype_platform=x64
59258    else
59259      freetype_platform=win32
59260    fi
59261
59262    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59263    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59264    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59265    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59266    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59267$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59268
59269    # First we try to build the freetype.dll
59270    $ECHO -e "@echo off\n"\
59271        "$MSBUILD $vcxproj_path "\
59272        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59273        "/p:Configuration=\"Release Multithreaded\" "\
59274        "/p:Platform=$freetype_platform "\
59275        "/p:ConfigurationType=DynamicLibrary "\
59276        "/p:TargetName=freetype "\
59277        "/p:OutDir=\"$freetype_lib_path\" "\
59278        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59279    cmd /c freetype.bat
59280
59281    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59282      # If that succeeds we also build freetype.lib
59283      $ECHO -e "@echo off\n"\
59284          "$MSBUILD $vcxproj_path "\
59285          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59286          "/p:Configuration=\"Release Multithreaded\" "\
59287          "/p:Platform=$freetype_platform "\
59288          "/p:ConfigurationType=StaticLibrary "\
59289          "/p:TargetName=freetype "\
59290          "/p:OutDir=\"$freetype_lib_path\" "\
59291          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59292      cmd /c freetype.bat
59293
59294      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59295        # Once we build both, lib and dll, set freetype lib and include path appropriately
59296        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59297        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59298        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59299$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59300      else
59301        BUILD_FREETYPE=no
59302      fi
59303    else
59304      BUILD_FREETYPE=no
59305    fi
59306  fi
59307
59308              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59309
59310  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59311  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59312  METHOD="well-known location"
59313
59314  # Let's start with an optimistic view of the world :-)
59315  FOUND_FREETYPE=yes
59316
59317  # First look for the canonical freetype main include file ft2build.h.
59318  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59319    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59320    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59321    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59322      # Fail.
59323      FOUND_FREETYPE=no
59324    fi
59325  fi
59326
59327  if test "x$FOUND_FREETYPE" = xyes; then
59328    # Include file found, let's continue the sanity check.
59329    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59330$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59331
59332    # Reset to default value
59333    FREETYPE_BASE_NAME=freetype
59334    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59335    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59336      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59337          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59338        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59339        # for the .6 version explicitly.
59340        FREETYPE_BASE_NAME=freetype.6
59341        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59342        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59343$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59344      else
59345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59346$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59347        FOUND_FREETYPE=no
59348      fi
59349    else
59350      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59351        # On Windows, we will need both .lib and .dll file.
59352        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59353          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59354$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59355          FOUND_FREETYPE=no
59356        fi
59357      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59358          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59359        # Found lib in isa dir, use that instead.
59360        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59361        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59362$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59363      fi
59364    fi
59365  fi
59366
59367  if test "x$FOUND_FREETYPE" = xyes; then
59368
59369  # Only process if variable expands to non-empty
59370
59371  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59373
59374  # Input might be given as Windows format, start by converting to
59375  # unix format.
59376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59377  new_path=`$CYGPATH -u "$path"`
59378
59379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59382  # "foo.exe" is OK but "foo" is an error.
59383  #
59384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59385  # It is also a way to make sure we got the proper file name for the real test later on.
59386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59387  if test "x$test_shortpath" = x; then
59388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59391  fi
59392
59393  # Call helper function which possibly converts this using DOS-style short mode.
59394  # If so, the updated path is stored in $new_path.
59395
59396  input_path="$new_path"
59397  # Check if we need to convert this using DOS-style short mode. If the path
59398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59399  # take no chances and rewrite it.
59400  # Note: m4 eats our [], so we need to use [ and ] instead.
59401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59402  if test "x$has_forbidden_chars" != x; then
59403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59407      # Going to short mode and back again did indeed matter. Since short mode is
59408      # case insensitive, let's make it lowercase to improve readability.
59409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59410      # Now convert it back to Unix-style (cygpath)
59411      input_path=`$CYGPATH -u "$shortmode_path"`
59412      new_path="$input_path"
59413    fi
59414  fi
59415
59416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59417  if test "x$test_cygdrive_prefix" = x; then
59418    # As a simple fix, exclude /usr/bin since it's not a real path.
59419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59421      # a path prefixed by /cygdrive for fixpath to work.
59422      new_path="$CYGWIN_ROOT_PATH$input_path"
59423    fi
59424  fi
59425
59426
59427  if test "x$path" != "x$new_path"; then
59428    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59431  fi
59432
59433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59434
59435  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59436  has_colon=`$ECHO $path | $GREP ^.:`
59437  new_path="$path"
59438  if test "x$has_colon" = x; then
59439    # Not in mixed or Windows style, start by that.
59440    new_path=`cmd //c echo $path`
59441  fi
59442
59443
59444  input_path="$new_path"
59445  # Check if we need to convert this using DOS-style short mode. If the path
59446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59447  # take no chances and rewrite it.
59448  # Note: m4 eats our [], so we need to use [ and ] instead.
59449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59450  if test "x$has_forbidden_chars" != x; then
59451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59453  fi
59454
59455
59456  windows_path="$new_path"
59457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59458    unix_path=`$CYGPATH -u "$windows_path"`
59459    new_path="$unix_path"
59460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59462    new_path="$unix_path"
59463  fi
59464
59465  if test "x$path" != "x$new_path"; then
59466    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59469  fi
59470
59471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59473
59474    else
59475      # We're on a unix platform. Hooray! :)
59476      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59477      has_space=`$ECHO "$path" | $GREP " "`
59478      if test "x$has_space" != x; then
59479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59482      fi
59483
59484      # Use eval to expand a potential ~
59485      eval path="$path"
59486      if test ! -f "$path" && test ! -d "$path"; then
59487        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59488      fi
59489
59490      if test -d "$path"; then
59491        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59492      else
59493        dir="`$DIRNAME "$path"`"
59494        base="`$BASENAME "$path"`"
59495        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59496      fi
59497    fi
59498  fi
59499
59500
59501  # Only process if variable expands to non-empty
59502
59503  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59505
59506  # Input might be given as Windows format, start by converting to
59507  # unix format.
59508  path="$POTENTIAL_FREETYPE_LIB_PATH"
59509  new_path=`$CYGPATH -u "$path"`
59510
59511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59514  # "foo.exe" is OK but "foo" is an error.
59515  #
59516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59517  # It is also a way to make sure we got the proper file name for the real test later on.
59518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59519  if test "x$test_shortpath" = x; then
59520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59521$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59522    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59523  fi
59524
59525  # Call helper function which possibly converts this using DOS-style short mode.
59526  # If so, the updated path is stored in $new_path.
59527
59528  input_path="$new_path"
59529  # Check if we need to convert this using DOS-style short mode. If the path
59530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59531  # take no chances and rewrite it.
59532  # Note: m4 eats our [], so we need to use [ and ] instead.
59533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59534  if test "x$has_forbidden_chars" != x; then
59535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59539      # Going to short mode and back again did indeed matter. Since short mode is
59540      # case insensitive, let's make it lowercase to improve readability.
59541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59542      # Now convert it back to Unix-style (cygpath)
59543      input_path=`$CYGPATH -u "$shortmode_path"`
59544      new_path="$input_path"
59545    fi
59546  fi
59547
59548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59549  if test "x$test_cygdrive_prefix" = x; then
59550    # As a simple fix, exclude /usr/bin since it's not a real path.
59551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59553      # a path prefixed by /cygdrive for fixpath to work.
59554      new_path="$CYGWIN_ROOT_PATH$input_path"
59555    fi
59556  fi
59557
59558
59559  if test "x$path" != "x$new_path"; then
59560    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59562$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59563  fi
59564
59565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59566
59567  path="$POTENTIAL_FREETYPE_LIB_PATH"
59568  has_colon=`$ECHO $path | $GREP ^.:`
59569  new_path="$path"
59570  if test "x$has_colon" = x; then
59571    # Not in mixed or Windows style, start by that.
59572    new_path=`cmd //c echo $path`
59573  fi
59574
59575
59576  input_path="$new_path"
59577  # Check if we need to convert this using DOS-style short mode. If the path
59578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59579  # take no chances and rewrite it.
59580  # Note: m4 eats our [], so we need to use [ and ] instead.
59581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59582  if test "x$has_forbidden_chars" != x; then
59583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59585  fi
59586
59587
59588  windows_path="$new_path"
59589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59590    unix_path=`$CYGPATH -u "$windows_path"`
59591    new_path="$unix_path"
59592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59594    new_path="$unix_path"
59595  fi
59596
59597  if test "x$path" != "x$new_path"; then
59598    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59600$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59601  fi
59602
59603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59605
59606    else
59607      # We're on a unix platform. Hooray! :)
59608      path="$POTENTIAL_FREETYPE_LIB_PATH"
59609      has_space=`$ECHO "$path" | $GREP " "`
59610      if test "x$has_space" != x; then
59611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59614      fi
59615
59616      # Use eval to expand a potential ~
59617      eval path="$path"
59618      if test ! -f "$path" && test ! -d "$path"; then
59619        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59620      fi
59621
59622      if test -d "$path"; then
59623        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59624      else
59625        dir="`$DIRNAME "$path"`"
59626        base="`$BASENAME "$path"`"
59627        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59628      fi
59629    fi
59630  fi
59631
59632
59633    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59635$as_echo_n "checking for freetype includes... " >&6; }
59636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59637$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59638    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59640$as_echo_n "checking for freetype libraries... " >&6; }
59641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59642$as_echo "$FREETYPE_LIB_PATH" >&6; }
59643  fi
59644
59645              else
59646
59647  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59648  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59649  METHOD="well-known location"
59650
59651  # Let's start with an optimistic view of the world :-)
59652  FOUND_FREETYPE=yes
59653
59654  # First look for the canonical freetype main include file ft2build.h.
59655  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59656    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59657    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59658    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59659      # Fail.
59660      FOUND_FREETYPE=no
59661    fi
59662  fi
59663
59664  if test "x$FOUND_FREETYPE" = xyes; then
59665    # Include file found, let's continue the sanity check.
59666    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59667$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59668
59669    # Reset to default value
59670    FREETYPE_BASE_NAME=freetype
59671    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59672    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59673      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59675        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59676        # for the .6 version explicitly.
59677        FREETYPE_BASE_NAME=freetype.6
59678        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59679        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59680$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59681      else
59682        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59683$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59684        FOUND_FREETYPE=no
59685      fi
59686    else
59687      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59688        # On Windows, we will need both .lib and .dll file.
59689        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59690          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59691$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59692          FOUND_FREETYPE=no
59693        fi
59694      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59695          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59696        # Found lib in isa dir, use that instead.
59697        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59698        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59699$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59700      fi
59701    fi
59702  fi
59703
59704  if test "x$FOUND_FREETYPE" = xyes; then
59705
59706  # Only process if variable expands to non-empty
59707
59708  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59710
59711  # Input might be given as Windows format, start by converting to
59712  # unix format.
59713  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59714  new_path=`$CYGPATH -u "$path"`
59715
59716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59719  # "foo.exe" is OK but "foo" is an error.
59720  #
59721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59722  # It is also a way to make sure we got the proper file name for the real test later on.
59723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59724  if test "x$test_shortpath" = x; then
59725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59727    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59728  fi
59729
59730  # Call helper function which possibly converts this using DOS-style short mode.
59731  # If so, the updated path is stored in $new_path.
59732
59733  input_path="$new_path"
59734  # Check if we need to convert this using DOS-style short mode. If the path
59735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59736  # take no chances and rewrite it.
59737  # Note: m4 eats our [], so we need to use [ and ] instead.
59738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59739  if test "x$has_forbidden_chars" != x; then
59740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59744      # Going to short mode and back again did indeed matter. Since short mode is
59745      # case insensitive, let's make it lowercase to improve readability.
59746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59747      # Now convert it back to Unix-style (cygpath)
59748      input_path=`$CYGPATH -u "$shortmode_path"`
59749      new_path="$input_path"
59750    fi
59751  fi
59752
59753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59754  if test "x$test_cygdrive_prefix" = x; then
59755    # As a simple fix, exclude /usr/bin since it's not a real path.
59756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59758      # a path prefixed by /cygdrive for fixpath to work.
59759      new_path="$CYGWIN_ROOT_PATH$input_path"
59760    fi
59761  fi
59762
59763
59764  if test "x$path" != "x$new_path"; then
59765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59768  fi
59769
59770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59771
59772  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59773  has_colon=`$ECHO $path | $GREP ^.:`
59774  new_path="$path"
59775  if test "x$has_colon" = x; then
59776    # Not in mixed or Windows style, start by that.
59777    new_path=`cmd //c echo $path`
59778  fi
59779
59780
59781  input_path="$new_path"
59782  # Check if we need to convert this using DOS-style short mode. If the path
59783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59784  # take no chances and rewrite it.
59785  # Note: m4 eats our [], so we need to use [ and ] instead.
59786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59787  if test "x$has_forbidden_chars" != x; then
59788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59790  fi
59791
59792
59793  windows_path="$new_path"
59794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59795    unix_path=`$CYGPATH -u "$windows_path"`
59796    new_path="$unix_path"
59797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59799    new_path="$unix_path"
59800  fi
59801
59802  if test "x$path" != "x$new_path"; then
59803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59806  fi
59807
59808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59810
59811    else
59812      # We're on a unix platform. Hooray! :)
59813      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59814      has_space=`$ECHO "$path" | $GREP " "`
59815      if test "x$has_space" != x; then
59816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59819      fi
59820
59821      # Use eval to expand a potential ~
59822      eval path="$path"
59823      if test ! -f "$path" && test ! -d "$path"; then
59824        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59825      fi
59826
59827      if test -d "$path"; then
59828        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59829      else
59830        dir="`$DIRNAME "$path"`"
59831        base="`$BASENAME "$path"`"
59832        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59833      fi
59834    fi
59835  fi
59836
59837
59838  # Only process if variable expands to non-empty
59839
59840  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59842
59843  # Input might be given as Windows format, start by converting to
59844  # unix format.
59845  path="$POTENTIAL_FREETYPE_LIB_PATH"
59846  new_path=`$CYGPATH -u "$path"`
59847
59848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59851  # "foo.exe" is OK but "foo" is an error.
59852  #
59853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59854  # It is also a way to make sure we got the proper file name for the real test later on.
59855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59856  if test "x$test_shortpath" = x; then
59857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59859    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59860  fi
59861
59862  # Call helper function which possibly converts this using DOS-style short mode.
59863  # If so, the updated path is stored in $new_path.
59864
59865  input_path="$new_path"
59866  # Check if we need to convert this using DOS-style short mode. If the path
59867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59868  # take no chances and rewrite it.
59869  # Note: m4 eats our [], so we need to use [ and ] instead.
59870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59871  if test "x$has_forbidden_chars" != x; then
59872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59876      # Going to short mode and back again did indeed matter. Since short mode is
59877      # case insensitive, let's make it lowercase to improve readability.
59878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59879      # Now convert it back to Unix-style (cygpath)
59880      input_path=`$CYGPATH -u "$shortmode_path"`
59881      new_path="$input_path"
59882    fi
59883  fi
59884
59885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59886  if test "x$test_cygdrive_prefix" = x; then
59887    # As a simple fix, exclude /usr/bin since it's not a real path.
59888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59890      # a path prefixed by /cygdrive for fixpath to work.
59891      new_path="$CYGWIN_ROOT_PATH$input_path"
59892    fi
59893  fi
59894
59895
59896  if test "x$path" != "x$new_path"; then
59897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59900  fi
59901
59902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59903
59904  path="$POTENTIAL_FREETYPE_LIB_PATH"
59905  has_colon=`$ECHO $path | $GREP ^.:`
59906  new_path="$path"
59907  if test "x$has_colon" = x; then
59908    # Not in mixed or Windows style, start by that.
59909    new_path=`cmd //c echo $path`
59910  fi
59911
59912
59913  input_path="$new_path"
59914  # Check if we need to convert this using DOS-style short mode. If the path
59915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59916  # take no chances and rewrite it.
59917  # Note: m4 eats our [], so we need to use [ and ] instead.
59918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59919  if test "x$has_forbidden_chars" != x; then
59920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59922  fi
59923
59924
59925  windows_path="$new_path"
59926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59927    unix_path=`$CYGPATH -u "$windows_path"`
59928    new_path="$unix_path"
59929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59931    new_path="$unix_path"
59932  fi
59933
59934  if test "x$path" != "x$new_path"; then
59935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59938  fi
59939
59940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59942
59943    else
59944      # We're on a unix platform. Hooray! :)
59945      path="$POTENTIAL_FREETYPE_LIB_PATH"
59946      has_space=`$ECHO "$path" | $GREP " "`
59947      if test "x$has_space" != x; then
59948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59951      fi
59952
59953      # Use eval to expand a potential ~
59954      eval path="$path"
59955      if test ! -f "$path" && test ! -d "$path"; then
59956        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59957      fi
59958
59959      if test -d "$path"; then
59960        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59961      else
59962        dir="`$DIRNAME "$path"`"
59963        base="`$BASENAME "$path"`"
59964        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59965      fi
59966    fi
59967  fi
59968
59969
59970    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59972$as_echo_n "checking for freetype includes... " >&6; }
59973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59974$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59975    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59977$as_echo_n "checking for freetype libraries... " >&6; }
59978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59979$as_echo "$FREETYPE_LIB_PATH" >&6; }
59980  fi
59981
59982              fi
59983            fi
59984          fi
59985        else
59986          FREETYPE_BASE_DIR="$SYSROOT/usr"
59987
59988  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59989  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59990  METHOD="well-known location"
59991
59992  # Let's start with an optimistic view of the world :-)
59993  FOUND_FREETYPE=yes
59994
59995  # First look for the canonical freetype main include file ft2build.h.
59996  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59997    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59998    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59999    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60000      # Fail.
60001      FOUND_FREETYPE=no
60002    fi
60003  fi
60004
60005  if test "x$FOUND_FREETYPE" = xyes; then
60006    # Include file found, let's continue the sanity check.
60007    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60008$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60009
60010    # Reset to default value
60011    FREETYPE_BASE_NAME=freetype
60012    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60013    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60014      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60015          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60016        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60017        # for the .6 version explicitly.
60018        FREETYPE_BASE_NAME=freetype.6
60019        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60020        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60021$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60022      else
60023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60024$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60025        FOUND_FREETYPE=no
60026      fi
60027    else
60028      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60029        # On Windows, we will need both .lib and .dll file.
60030        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60031          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60032$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60033          FOUND_FREETYPE=no
60034        fi
60035      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60036          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60037        # Found lib in isa dir, use that instead.
60038        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60039        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60040$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60041      fi
60042    fi
60043  fi
60044
60045  if test "x$FOUND_FREETYPE" = xyes; then
60046
60047  # Only process if variable expands to non-empty
60048
60049  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60051
60052  # Input might be given as Windows format, start by converting to
60053  # unix format.
60054  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60055  new_path=`$CYGPATH -u "$path"`
60056
60057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60060  # "foo.exe" is OK but "foo" is an error.
60061  #
60062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60063  # It is also a way to make sure we got the proper file name for the real test later on.
60064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60065  if test "x$test_shortpath" = x; then
60066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60068    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60069  fi
60070
60071  # Call helper function which possibly converts this using DOS-style short mode.
60072  # If so, the updated path is stored in $new_path.
60073
60074  input_path="$new_path"
60075  # Check if we need to convert this using DOS-style short mode. If the path
60076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60077  # take no chances and rewrite it.
60078  # Note: m4 eats our [], so we need to use [ and ] instead.
60079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60080  if test "x$has_forbidden_chars" != x; then
60081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60085      # Going to short mode and back again did indeed matter. Since short mode is
60086      # case insensitive, let's make it lowercase to improve readability.
60087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60088      # Now convert it back to Unix-style (cygpath)
60089      input_path=`$CYGPATH -u "$shortmode_path"`
60090      new_path="$input_path"
60091    fi
60092  fi
60093
60094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60095  if test "x$test_cygdrive_prefix" = x; then
60096    # As a simple fix, exclude /usr/bin since it's not a real path.
60097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60099      # a path prefixed by /cygdrive for fixpath to work.
60100      new_path="$CYGWIN_ROOT_PATH$input_path"
60101    fi
60102  fi
60103
60104
60105  if test "x$path" != "x$new_path"; then
60106    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60108$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60109  fi
60110
60111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60112
60113  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60114  has_colon=`$ECHO $path | $GREP ^.:`
60115  new_path="$path"
60116  if test "x$has_colon" = x; then
60117    # Not in mixed or Windows style, start by that.
60118    new_path=`cmd //c echo $path`
60119  fi
60120
60121
60122  input_path="$new_path"
60123  # Check if we need to convert this using DOS-style short mode. If the path
60124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60125  # take no chances and rewrite it.
60126  # Note: m4 eats our [], so we need to use [ and ] instead.
60127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60128  if test "x$has_forbidden_chars" != x; then
60129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60131  fi
60132
60133
60134  windows_path="$new_path"
60135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60136    unix_path=`$CYGPATH -u "$windows_path"`
60137    new_path="$unix_path"
60138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60140    new_path="$unix_path"
60141  fi
60142
60143  if test "x$path" != "x$new_path"; then
60144    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60146$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60147  fi
60148
60149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60151
60152    else
60153      # We're on a unix platform. Hooray! :)
60154      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60155      has_space=`$ECHO "$path" | $GREP " "`
60156      if test "x$has_space" != x; then
60157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60158$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60160      fi
60161
60162      # Use eval to expand a potential ~
60163      eval path="$path"
60164      if test ! -f "$path" && test ! -d "$path"; then
60165        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60166      fi
60167
60168      if test -d "$path"; then
60169        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60170      else
60171        dir="`$DIRNAME "$path"`"
60172        base="`$BASENAME "$path"`"
60173        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60174      fi
60175    fi
60176  fi
60177
60178
60179  # Only process if variable expands to non-empty
60180
60181  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60183
60184  # Input might be given as Windows format, start by converting to
60185  # unix format.
60186  path="$POTENTIAL_FREETYPE_LIB_PATH"
60187  new_path=`$CYGPATH -u "$path"`
60188
60189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60192  # "foo.exe" is OK but "foo" is an error.
60193  #
60194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60195  # It is also a way to make sure we got the proper file name for the real test later on.
60196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60197  if test "x$test_shortpath" = x; then
60198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60201  fi
60202
60203  # Call helper function which possibly converts this using DOS-style short mode.
60204  # If so, the updated path is stored in $new_path.
60205
60206  input_path="$new_path"
60207  # Check if we need to convert this using DOS-style short mode. If the path
60208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60209  # take no chances and rewrite it.
60210  # Note: m4 eats our [], so we need to use [ and ] instead.
60211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60212  if test "x$has_forbidden_chars" != x; then
60213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60217      # Going to short mode and back again did indeed matter. Since short mode is
60218      # case insensitive, let's make it lowercase to improve readability.
60219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60220      # Now convert it back to Unix-style (cygpath)
60221      input_path=`$CYGPATH -u "$shortmode_path"`
60222      new_path="$input_path"
60223    fi
60224  fi
60225
60226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60227  if test "x$test_cygdrive_prefix" = x; then
60228    # As a simple fix, exclude /usr/bin since it's not a real path.
60229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60231      # a path prefixed by /cygdrive for fixpath to work.
60232      new_path="$CYGWIN_ROOT_PATH$input_path"
60233    fi
60234  fi
60235
60236
60237  if test "x$path" != "x$new_path"; then
60238    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60241  fi
60242
60243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60244
60245  path="$POTENTIAL_FREETYPE_LIB_PATH"
60246  has_colon=`$ECHO $path | $GREP ^.:`
60247  new_path="$path"
60248  if test "x$has_colon" = x; then
60249    # Not in mixed or Windows style, start by that.
60250    new_path=`cmd //c echo $path`
60251  fi
60252
60253
60254  input_path="$new_path"
60255  # Check if we need to convert this using DOS-style short mode. If the path
60256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60257  # take no chances and rewrite it.
60258  # Note: m4 eats our [], so we need to use [ and ] instead.
60259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60260  if test "x$has_forbidden_chars" != x; then
60261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60263  fi
60264
60265
60266  windows_path="$new_path"
60267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60268    unix_path=`$CYGPATH -u "$windows_path"`
60269    new_path="$unix_path"
60270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60272    new_path="$unix_path"
60273  fi
60274
60275  if test "x$path" != "x$new_path"; then
60276    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60279  fi
60280
60281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60283
60284    else
60285      # We're on a unix platform. Hooray! :)
60286      path="$POTENTIAL_FREETYPE_LIB_PATH"
60287      has_space=`$ECHO "$path" | $GREP " "`
60288      if test "x$has_space" != x; then
60289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60292      fi
60293
60294      # Use eval to expand a potential ~
60295      eval path="$path"
60296      if test ! -f "$path" && test ! -d "$path"; then
60297        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60298      fi
60299
60300      if test -d "$path"; then
60301        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60302      else
60303        dir="`$DIRNAME "$path"`"
60304        base="`$BASENAME "$path"`"
60305        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60306      fi
60307    fi
60308  fi
60309
60310
60311    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60313$as_echo_n "checking for freetype includes... " >&6; }
60314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60315$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60316    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60318$as_echo_n "checking for freetype libraries... " >&6; }
60319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60320$as_echo "$FREETYPE_LIB_PATH" >&6; }
60321  fi
60322
60323
60324          if test "x$FOUND_FREETYPE" != xyes; then
60325            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60326
60327  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60328  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60329  METHOD="well-known location"
60330
60331  # Let's start with an optimistic view of the world :-)
60332  FOUND_FREETYPE=yes
60333
60334  # First look for the canonical freetype main include file ft2build.h.
60335  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60336    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60337    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60338    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60339      # Fail.
60340      FOUND_FREETYPE=no
60341    fi
60342  fi
60343
60344  if test "x$FOUND_FREETYPE" = xyes; then
60345    # Include file found, let's continue the sanity check.
60346    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60347$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60348
60349    # Reset to default value
60350    FREETYPE_BASE_NAME=freetype
60351    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60352    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60353      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60354          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60355        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60356        # for the .6 version explicitly.
60357        FREETYPE_BASE_NAME=freetype.6
60358        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60359        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60360$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60361      else
60362        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60363$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60364        FOUND_FREETYPE=no
60365      fi
60366    else
60367      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60368        # On Windows, we will need both .lib and .dll file.
60369        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60370          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60371$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60372          FOUND_FREETYPE=no
60373        fi
60374      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60375          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60376        # Found lib in isa dir, use that instead.
60377        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60378        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60379$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60380      fi
60381    fi
60382  fi
60383
60384  if test "x$FOUND_FREETYPE" = xyes; then
60385
60386  # Only process if variable expands to non-empty
60387
60388  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60390
60391  # Input might be given as Windows format, start by converting to
60392  # unix format.
60393  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60394  new_path=`$CYGPATH -u "$path"`
60395
60396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60399  # "foo.exe" is OK but "foo" is an error.
60400  #
60401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60402  # It is also a way to make sure we got the proper file name for the real test later on.
60403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60404  if test "x$test_shortpath" = x; then
60405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60407    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60408  fi
60409
60410  # Call helper function which possibly converts this using DOS-style short mode.
60411  # If so, the updated path is stored in $new_path.
60412
60413  input_path="$new_path"
60414  # Check if we need to convert this using DOS-style short mode. If the path
60415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60416  # take no chances and rewrite it.
60417  # Note: m4 eats our [], so we need to use [ and ] instead.
60418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60419  if test "x$has_forbidden_chars" != x; then
60420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60424      # Going to short mode and back again did indeed matter. Since short mode is
60425      # case insensitive, let's make it lowercase to improve readability.
60426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60427      # Now convert it back to Unix-style (cygpath)
60428      input_path=`$CYGPATH -u "$shortmode_path"`
60429      new_path="$input_path"
60430    fi
60431  fi
60432
60433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60434  if test "x$test_cygdrive_prefix" = x; then
60435    # As a simple fix, exclude /usr/bin since it's not a real path.
60436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60438      # a path prefixed by /cygdrive for fixpath to work.
60439      new_path="$CYGWIN_ROOT_PATH$input_path"
60440    fi
60441  fi
60442
60443
60444  if test "x$path" != "x$new_path"; then
60445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60448  fi
60449
60450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60451
60452  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60453  has_colon=`$ECHO $path | $GREP ^.:`
60454  new_path="$path"
60455  if test "x$has_colon" = x; then
60456    # Not in mixed or Windows style, start by that.
60457    new_path=`cmd //c echo $path`
60458  fi
60459
60460
60461  input_path="$new_path"
60462  # Check if we need to convert this using DOS-style short mode. If the path
60463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60464  # take no chances and rewrite it.
60465  # Note: m4 eats our [], so we need to use [ and ] instead.
60466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60467  if test "x$has_forbidden_chars" != x; then
60468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60470  fi
60471
60472
60473  windows_path="$new_path"
60474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60475    unix_path=`$CYGPATH -u "$windows_path"`
60476    new_path="$unix_path"
60477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60479    new_path="$unix_path"
60480  fi
60481
60482  if test "x$path" != "x$new_path"; then
60483    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60486  fi
60487
60488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60490
60491    else
60492      # We're on a unix platform. Hooray! :)
60493      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60494      has_space=`$ECHO "$path" | $GREP " "`
60495      if test "x$has_space" != x; then
60496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60497$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60499      fi
60500
60501      # Use eval to expand a potential ~
60502      eval path="$path"
60503      if test ! -f "$path" && test ! -d "$path"; then
60504        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60505      fi
60506
60507      if test -d "$path"; then
60508        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60509      else
60510        dir="`$DIRNAME "$path"`"
60511        base="`$BASENAME "$path"`"
60512        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60513      fi
60514    fi
60515  fi
60516
60517
60518  # Only process if variable expands to non-empty
60519
60520  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60522
60523  # Input might be given as Windows format, start by converting to
60524  # unix format.
60525  path="$POTENTIAL_FREETYPE_LIB_PATH"
60526  new_path=`$CYGPATH -u "$path"`
60527
60528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60531  # "foo.exe" is OK but "foo" is an error.
60532  #
60533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60534  # It is also a way to make sure we got the proper file name for the real test later on.
60535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60536  if test "x$test_shortpath" = x; then
60537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60539    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60540  fi
60541
60542  # Call helper function which possibly converts this using DOS-style short mode.
60543  # If so, the updated path is stored in $new_path.
60544
60545  input_path="$new_path"
60546  # Check if we need to convert this using DOS-style short mode. If the path
60547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60548  # take no chances and rewrite it.
60549  # Note: m4 eats our [], so we need to use [ and ] instead.
60550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60551  if test "x$has_forbidden_chars" != x; then
60552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60556      # Going to short mode and back again did indeed matter. Since short mode is
60557      # case insensitive, let's make it lowercase to improve readability.
60558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60559      # Now convert it back to Unix-style (cygpath)
60560      input_path=`$CYGPATH -u "$shortmode_path"`
60561      new_path="$input_path"
60562    fi
60563  fi
60564
60565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60566  if test "x$test_cygdrive_prefix" = x; then
60567    # As a simple fix, exclude /usr/bin since it's not a real path.
60568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60570      # a path prefixed by /cygdrive for fixpath to work.
60571      new_path="$CYGWIN_ROOT_PATH$input_path"
60572    fi
60573  fi
60574
60575
60576  if test "x$path" != "x$new_path"; then
60577    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60580  fi
60581
60582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60583
60584  path="$POTENTIAL_FREETYPE_LIB_PATH"
60585  has_colon=`$ECHO $path | $GREP ^.:`
60586  new_path="$path"
60587  if test "x$has_colon" = x; then
60588    # Not in mixed or Windows style, start by that.
60589    new_path=`cmd //c echo $path`
60590  fi
60591
60592
60593  input_path="$new_path"
60594  # Check if we need to convert this using DOS-style short mode. If the path
60595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60596  # take no chances and rewrite it.
60597  # Note: m4 eats our [], so we need to use [ and ] instead.
60598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60599  if test "x$has_forbidden_chars" != x; then
60600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60602  fi
60603
60604
60605  windows_path="$new_path"
60606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60607    unix_path=`$CYGPATH -u "$windows_path"`
60608    new_path="$unix_path"
60609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60611    new_path="$unix_path"
60612  fi
60613
60614  if test "x$path" != "x$new_path"; then
60615    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60617$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60618  fi
60619
60620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60622
60623    else
60624      # We're on a unix platform. Hooray! :)
60625      path="$POTENTIAL_FREETYPE_LIB_PATH"
60626      has_space=`$ECHO "$path" | $GREP " "`
60627      if test "x$has_space" != x; then
60628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60629$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60631      fi
60632
60633      # Use eval to expand a potential ~
60634      eval path="$path"
60635      if test ! -f "$path" && test ! -d "$path"; then
60636        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60637      fi
60638
60639      if test -d "$path"; then
60640        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60641      else
60642        dir="`$DIRNAME "$path"`"
60643        base="`$BASENAME "$path"`"
60644        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60645      fi
60646    fi
60647  fi
60648
60649
60650    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60652$as_echo_n "checking for freetype includes... " >&6; }
60653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60654$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60655    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60657$as_echo_n "checking for freetype libraries... " >&6; }
60658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60659$as_echo "$FREETYPE_LIB_PATH" >&6; }
60660  fi
60661
60662          fi
60663
60664          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60665            if test "x$FOUND_FREETYPE" != xyes; then
60666              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60667              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60668
60669  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60670  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60671  METHOD="well-known location"
60672
60673  # Let's start with an optimistic view of the world :-)
60674  FOUND_FREETYPE=yes
60675
60676  # First look for the canonical freetype main include file ft2build.h.
60677  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60678    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60679    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60680    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60681      # Fail.
60682      FOUND_FREETYPE=no
60683    fi
60684  fi
60685
60686  if test "x$FOUND_FREETYPE" = xyes; then
60687    # Include file found, let's continue the sanity check.
60688    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60689$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60690
60691    # Reset to default value
60692    FREETYPE_BASE_NAME=freetype
60693    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60694    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60695      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60696          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60697        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60698        # for the .6 version explicitly.
60699        FREETYPE_BASE_NAME=freetype.6
60700        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60701        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60702$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60703      else
60704        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60705$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60706        FOUND_FREETYPE=no
60707      fi
60708    else
60709      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60710        # On Windows, we will need both .lib and .dll file.
60711        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60712          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60713$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60714          FOUND_FREETYPE=no
60715        fi
60716      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60717          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60718        # Found lib in isa dir, use that instead.
60719        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60720        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60721$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60722      fi
60723    fi
60724  fi
60725
60726  if test "x$FOUND_FREETYPE" = xyes; then
60727
60728  # Only process if variable expands to non-empty
60729
60730  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60732
60733  # Input might be given as Windows format, start by converting to
60734  # unix format.
60735  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60736  new_path=`$CYGPATH -u "$path"`
60737
60738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60741  # "foo.exe" is OK but "foo" is an error.
60742  #
60743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60744  # It is also a way to make sure we got the proper file name for the real test later on.
60745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60746  if test "x$test_shortpath" = x; then
60747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60749    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60750  fi
60751
60752  # Call helper function which possibly converts this using DOS-style short mode.
60753  # If so, the updated path is stored in $new_path.
60754
60755  input_path="$new_path"
60756  # Check if we need to convert this using DOS-style short mode. If the path
60757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60758  # take no chances and rewrite it.
60759  # Note: m4 eats our [], so we need to use [ and ] instead.
60760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60761  if test "x$has_forbidden_chars" != x; then
60762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60766      # Going to short mode and back again did indeed matter. Since short mode is
60767      # case insensitive, let's make it lowercase to improve readability.
60768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60769      # Now convert it back to Unix-style (cygpath)
60770      input_path=`$CYGPATH -u "$shortmode_path"`
60771      new_path="$input_path"
60772    fi
60773  fi
60774
60775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60776  if test "x$test_cygdrive_prefix" = x; then
60777    # As a simple fix, exclude /usr/bin since it's not a real path.
60778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60780      # a path prefixed by /cygdrive for fixpath to work.
60781      new_path="$CYGWIN_ROOT_PATH$input_path"
60782    fi
60783  fi
60784
60785
60786  if test "x$path" != "x$new_path"; then
60787    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60789$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60790  fi
60791
60792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60793
60794  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60795  has_colon=`$ECHO $path | $GREP ^.:`
60796  new_path="$path"
60797  if test "x$has_colon" = x; then
60798    # Not in mixed or Windows style, start by that.
60799    new_path=`cmd //c echo $path`
60800  fi
60801
60802
60803  input_path="$new_path"
60804  # Check if we need to convert this using DOS-style short mode. If the path
60805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60806  # take no chances and rewrite it.
60807  # Note: m4 eats our [], so we need to use [ and ] instead.
60808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60809  if test "x$has_forbidden_chars" != x; then
60810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60812  fi
60813
60814
60815  windows_path="$new_path"
60816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60817    unix_path=`$CYGPATH -u "$windows_path"`
60818    new_path="$unix_path"
60819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60821    new_path="$unix_path"
60822  fi
60823
60824  if test "x$path" != "x$new_path"; then
60825    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60828  fi
60829
60830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60832
60833    else
60834      # We're on a unix platform. Hooray! :)
60835      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60836      has_space=`$ECHO "$path" | $GREP " "`
60837      if test "x$has_space" != x; then
60838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60841      fi
60842
60843      # Use eval to expand a potential ~
60844      eval path="$path"
60845      if test ! -f "$path" && test ! -d "$path"; then
60846        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60847      fi
60848
60849      if test -d "$path"; then
60850        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60851      else
60852        dir="`$DIRNAME "$path"`"
60853        base="`$BASENAME "$path"`"
60854        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60855      fi
60856    fi
60857  fi
60858
60859
60860  # Only process if variable expands to non-empty
60861
60862  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60864
60865  # Input might be given as Windows format, start by converting to
60866  # unix format.
60867  path="$POTENTIAL_FREETYPE_LIB_PATH"
60868  new_path=`$CYGPATH -u "$path"`
60869
60870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60873  # "foo.exe" is OK but "foo" is an error.
60874  #
60875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60876  # It is also a way to make sure we got the proper file name for the real test later on.
60877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60878  if test "x$test_shortpath" = x; then
60879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60880$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60881    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60882  fi
60883
60884  # Call helper function which possibly converts this using DOS-style short mode.
60885  # If so, the updated path is stored in $new_path.
60886
60887  input_path="$new_path"
60888  # Check if we need to convert this using DOS-style short mode. If the path
60889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60890  # take no chances and rewrite it.
60891  # Note: m4 eats our [], so we need to use [ and ] instead.
60892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60893  if test "x$has_forbidden_chars" != x; then
60894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60898      # Going to short mode and back again did indeed matter. Since short mode is
60899      # case insensitive, let's make it lowercase to improve readability.
60900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60901      # Now convert it back to Unix-style (cygpath)
60902      input_path=`$CYGPATH -u "$shortmode_path"`
60903      new_path="$input_path"
60904    fi
60905  fi
60906
60907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60908  if test "x$test_cygdrive_prefix" = x; then
60909    # As a simple fix, exclude /usr/bin since it's not a real path.
60910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60912      # a path prefixed by /cygdrive for fixpath to work.
60913      new_path="$CYGWIN_ROOT_PATH$input_path"
60914    fi
60915  fi
60916
60917
60918  if test "x$path" != "x$new_path"; then
60919    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60922  fi
60923
60924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60925
60926  path="$POTENTIAL_FREETYPE_LIB_PATH"
60927  has_colon=`$ECHO $path | $GREP ^.:`
60928  new_path="$path"
60929  if test "x$has_colon" = x; then
60930    # Not in mixed or Windows style, start by that.
60931    new_path=`cmd //c echo $path`
60932  fi
60933
60934
60935  input_path="$new_path"
60936  # Check if we need to convert this using DOS-style short mode. If the path
60937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60938  # take no chances and rewrite it.
60939  # Note: m4 eats our [], so we need to use [ and ] instead.
60940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60941  if test "x$has_forbidden_chars" != x; then
60942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60944  fi
60945
60946
60947  windows_path="$new_path"
60948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60949    unix_path=`$CYGPATH -u "$windows_path"`
60950    new_path="$unix_path"
60951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60953    new_path="$unix_path"
60954  fi
60955
60956  if test "x$path" != "x$new_path"; then
60957    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60959$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60960  fi
60961
60962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60964
60965    else
60966      # We're on a unix platform. Hooray! :)
60967      path="$POTENTIAL_FREETYPE_LIB_PATH"
60968      has_space=`$ECHO "$path" | $GREP " "`
60969      if test "x$has_space" != x; then
60970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60973      fi
60974
60975      # Use eval to expand a potential ~
60976      eval path="$path"
60977      if test ! -f "$path" && test ! -d "$path"; then
60978        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60979      fi
60980
60981      if test -d "$path"; then
60982        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60983      else
60984        dir="`$DIRNAME "$path"`"
60985        base="`$BASENAME "$path"`"
60986        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60987      fi
60988    fi
60989  fi
60990
60991
60992    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60994$as_echo_n "checking for freetype includes... " >&6; }
60995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60996$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60997    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60999$as_echo_n "checking for freetype libraries... " >&6; }
61000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61001$as_echo "$FREETYPE_LIB_PATH" >&6; }
61002  fi
61003
61004            fi
61005          fi
61006
61007          if test "x$FOUND_FREETYPE" != xyes; then
61008            FREETYPE_BASE_DIR="$SYSROOT/usr"
61009            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61010
61011  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61012  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61013  METHOD="well-known location"
61014
61015  # Let's start with an optimistic view of the world :-)
61016  FOUND_FREETYPE=yes
61017
61018  # First look for the canonical freetype main include file ft2build.h.
61019  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61020    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61021    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61022    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61023      # Fail.
61024      FOUND_FREETYPE=no
61025    fi
61026  fi
61027
61028  if test "x$FOUND_FREETYPE" = xyes; then
61029    # Include file found, let's continue the sanity check.
61030    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61031$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61032
61033    # Reset to default value
61034    FREETYPE_BASE_NAME=freetype
61035    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61036    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61037      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61038          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61039        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61040        # for the .6 version explicitly.
61041        FREETYPE_BASE_NAME=freetype.6
61042        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61043        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61044$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61045      else
61046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61048        FOUND_FREETYPE=no
61049      fi
61050    else
61051      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61052        # On Windows, we will need both .lib and .dll file.
61053        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61054          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61055$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61056          FOUND_FREETYPE=no
61057        fi
61058      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61059          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61060        # Found lib in isa dir, use that instead.
61061        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61062        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61063$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61064      fi
61065    fi
61066  fi
61067
61068  if test "x$FOUND_FREETYPE" = xyes; then
61069
61070  # Only process if variable expands to non-empty
61071
61072  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61074
61075  # Input might be given as Windows format, start by converting to
61076  # unix format.
61077  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61078  new_path=`$CYGPATH -u "$path"`
61079
61080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61083  # "foo.exe" is OK but "foo" is an error.
61084  #
61085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61086  # It is also a way to make sure we got the proper file name for the real test later on.
61087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61088  if test "x$test_shortpath" = x; then
61089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61091    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61092  fi
61093
61094  # Call helper function which possibly converts this using DOS-style short mode.
61095  # If so, the updated path is stored in $new_path.
61096
61097  input_path="$new_path"
61098  # Check if we need to convert this using DOS-style short mode. If the path
61099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61100  # take no chances and rewrite it.
61101  # Note: m4 eats our [], so we need to use [ and ] instead.
61102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61103  if test "x$has_forbidden_chars" != x; then
61104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61108      # Going to short mode and back again did indeed matter. Since short mode is
61109      # case insensitive, let's make it lowercase to improve readability.
61110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61111      # Now convert it back to Unix-style (cygpath)
61112      input_path=`$CYGPATH -u "$shortmode_path"`
61113      new_path="$input_path"
61114    fi
61115  fi
61116
61117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61118  if test "x$test_cygdrive_prefix" = x; then
61119    # As a simple fix, exclude /usr/bin since it's not a real path.
61120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61122      # a path prefixed by /cygdrive for fixpath to work.
61123      new_path="$CYGWIN_ROOT_PATH$input_path"
61124    fi
61125  fi
61126
61127
61128  if test "x$path" != "x$new_path"; then
61129    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61131$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61132  fi
61133
61134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61135
61136  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61137  has_colon=`$ECHO $path | $GREP ^.:`
61138  new_path="$path"
61139  if test "x$has_colon" = x; then
61140    # Not in mixed or Windows style, start by that.
61141    new_path=`cmd //c echo $path`
61142  fi
61143
61144
61145  input_path="$new_path"
61146  # Check if we need to convert this using DOS-style short mode. If the path
61147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61148  # take no chances and rewrite it.
61149  # Note: m4 eats our [], so we need to use [ and ] instead.
61150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61151  if test "x$has_forbidden_chars" != x; then
61152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61154  fi
61155
61156
61157  windows_path="$new_path"
61158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61159    unix_path=`$CYGPATH -u "$windows_path"`
61160    new_path="$unix_path"
61161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61163    new_path="$unix_path"
61164  fi
61165
61166  if test "x$path" != "x$new_path"; then
61167    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61170  fi
61171
61172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61174
61175    else
61176      # We're on a unix platform. Hooray! :)
61177      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61178      has_space=`$ECHO "$path" | $GREP " "`
61179      if test "x$has_space" != x; then
61180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61183      fi
61184
61185      # Use eval to expand a potential ~
61186      eval path="$path"
61187      if test ! -f "$path" && test ! -d "$path"; then
61188        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61189      fi
61190
61191      if test -d "$path"; then
61192        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61193      else
61194        dir="`$DIRNAME "$path"`"
61195        base="`$BASENAME "$path"`"
61196        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61197      fi
61198    fi
61199  fi
61200
61201
61202  # Only process if variable expands to non-empty
61203
61204  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61206
61207  # Input might be given as Windows format, start by converting to
61208  # unix format.
61209  path="$POTENTIAL_FREETYPE_LIB_PATH"
61210  new_path=`$CYGPATH -u "$path"`
61211
61212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61215  # "foo.exe" is OK but "foo" is an error.
61216  #
61217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61218  # It is also a way to make sure we got the proper file name for the real test later on.
61219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61220  if test "x$test_shortpath" = x; then
61221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61223    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61224  fi
61225
61226  # Call helper function which possibly converts this using DOS-style short mode.
61227  # If so, the updated path is stored in $new_path.
61228
61229  input_path="$new_path"
61230  # Check if we need to convert this using DOS-style short mode. If the path
61231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61232  # take no chances and rewrite it.
61233  # Note: m4 eats our [], so we need to use [ and ] instead.
61234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61235  if test "x$has_forbidden_chars" != x; then
61236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61240      # Going to short mode and back again did indeed matter. Since short mode is
61241      # case insensitive, let's make it lowercase to improve readability.
61242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61243      # Now convert it back to Unix-style (cygpath)
61244      input_path=`$CYGPATH -u "$shortmode_path"`
61245      new_path="$input_path"
61246    fi
61247  fi
61248
61249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61250  if test "x$test_cygdrive_prefix" = x; then
61251    # As a simple fix, exclude /usr/bin since it's not a real path.
61252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61254      # a path prefixed by /cygdrive for fixpath to work.
61255      new_path="$CYGWIN_ROOT_PATH$input_path"
61256    fi
61257  fi
61258
61259
61260  if test "x$path" != "x$new_path"; then
61261    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61263$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61264  fi
61265
61266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61267
61268  path="$POTENTIAL_FREETYPE_LIB_PATH"
61269  has_colon=`$ECHO $path | $GREP ^.:`
61270  new_path="$path"
61271  if test "x$has_colon" = x; then
61272    # Not in mixed or Windows style, start by that.
61273    new_path=`cmd //c echo $path`
61274  fi
61275
61276
61277  input_path="$new_path"
61278  # Check if we need to convert this using DOS-style short mode. If the path
61279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61280  # take no chances and rewrite it.
61281  # Note: m4 eats our [], so we need to use [ and ] instead.
61282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61283  if test "x$has_forbidden_chars" != x; then
61284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61286  fi
61287
61288
61289  windows_path="$new_path"
61290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61291    unix_path=`$CYGPATH -u "$windows_path"`
61292    new_path="$unix_path"
61293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61295    new_path="$unix_path"
61296  fi
61297
61298  if test "x$path" != "x$new_path"; then
61299    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61301$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61302  fi
61303
61304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61306
61307    else
61308      # We're on a unix platform. Hooray! :)
61309      path="$POTENTIAL_FREETYPE_LIB_PATH"
61310      has_space=`$ECHO "$path" | $GREP " "`
61311      if test "x$has_space" != x; then
61312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61315      fi
61316
61317      # Use eval to expand a potential ~
61318      eval path="$path"
61319      if test ! -f "$path" && test ! -d "$path"; then
61320        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61321      fi
61322
61323      if test -d "$path"; then
61324        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61325      else
61326        dir="`$DIRNAME "$path"`"
61327        base="`$BASENAME "$path"`"
61328        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61329      fi
61330    fi
61331  fi
61332
61333
61334    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61336$as_echo_n "checking for freetype includes... " >&6; }
61337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61338$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61339    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61341$as_echo_n "checking for freetype libraries... " >&6; }
61342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61343$as_echo "$FREETYPE_LIB_PATH" >&6; }
61344  fi
61345
61346            else
61347
61348  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61349  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61350  METHOD="well-known location"
61351
61352  # Let's start with an optimistic view of the world :-)
61353  FOUND_FREETYPE=yes
61354
61355  # First look for the canonical freetype main include file ft2build.h.
61356  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61357    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61358    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61359    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61360      # Fail.
61361      FOUND_FREETYPE=no
61362    fi
61363  fi
61364
61365  if test "x$FOUND_FREETYPE" = xyes; then
61366    # Include file found, let's continue the sanity check.
61367    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61368$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61369
61370    # Reset to default value
61371    FREETYPE_BASE_NAME=freetype
61372    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61373    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61374      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61375          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61376        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61377        # for the .6 version explicitly.
61378        FREETYPE_BASE_NAME=freetype.6
61379        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61380        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61381$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61382      else
61383        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61384$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61385        FOUND_FREETYPE=no
61386      fi
61387    else
61388      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61389        # On Windows, we will need both .lib and .dll file.
61390        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61391          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61392$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61393          FOUND_FREETYPE=no
61394        fi
61395      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61396          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61397        # Found lib in isa dir, use that instead.
61398        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61399        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61400$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61401      fi
61402    fi
61403  fi
61404
61405  if test "x$FOUND_FREETYPE" = xyes; then
61406
61407  # Only process if variable expands to non-empty
61408
61409  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61411
61412  # Input might be given as Windows format, start by converting to
61413  # unix format.
61414  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61415  new_path=`$CYGPATH -u "$path"`
61416
61417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61420  # "foo.exe" is OK but "foo" is an error.
61421  #
61422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61423  # It is also a way to make sure we got the proper file name for the real test later on.
61424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61425  if test "x$test_shortpath" = x; then
61426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61428    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61429  fi
61430
61431  # Call helper function which possibly converts this using DOS-style short mode.
61432  # If so, the updated path is stored in $new_path.
61433
61434  input_path="$new_path"
61435  # Check if we need to convert this using DOS-style short mode. If the path
61436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61437  # take no chances and rewrite it.
61438  # Note: m4 eats our [], so we need to use [ and ] instead.
61439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61440  if test "x$has_forbidden_chars" != x; then
61441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61445      # Going to short mode and back again did indeed matter. Since short mode is
61446      # case insensitive, let's make it lowercase to improve readability.
61447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61448      # Now convert it back to Unix-style (cygpath)
61449      input_path=`$CYGPATH -u "$shortmode_path"`
61450      new_path="$input_path"
61451    fi
61452  fi
61453
61454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61455  if test "x$test_cygdrive_prefix" = x; then
61456    # As a simple fix, exclude /usr/bin since it's not a real path.
61457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61459      # a path prefixed by /cygdrive for fixpath to work.
61460      new_path="$CYGWIN_ROOT_PATH$input_path"
61461    fi
61462  fi
61463
61464
61465  if test "x$path" != "x$new_path"; then
61466    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61469  fi
61470
61471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61472
61473  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61474  has_colon=`$ECHO $path | $GREP ^.:`
61475  new_path="$path"
61476  if test "x$has_colon" = x; then
61477    # Not in mixed or Windows style, start by that.
61478    new_path=`cmd //c echo $path`
61479  fi
61480
61481
61482  input_path="$new_path"
61483  # Check if we need to convert this using DOS-style short mode. If the path
61484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61485  # take no chances and rewrite it.
61486  # Note: m4 eats our [], so we need to use [ and ] instead.
61487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61488  if test "x$has_forbidden_chars" != x; then
61489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61491  fi
61492
61493
61494  windows_path="$new_path"
61495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61496    unix_path=`$CYGPATH -u "$windows_path"`
61497    new_path="$unix_path"
61498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61500    new_path="$unix_path"
61501  fi
61502
61503  if test "x$path" != "x$new_path"; then
61504    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61506$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61507  fi
61508
61509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61511
61512    else
61513      # We're on a unix platform. Hooray! :)
61514      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61515      has_space=`$ECHO "$path" | $GREP " "`
61516      if test "x$has_space" != x; then
61517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61520      fi
61521
61522      # Use eval to expand a potential ~
61523      eval path="$path"
61524      if test ! -f "$path" && test ! -d "$path"; then
61525        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61526      fi
61527
61528      if test -d "$path"; then
61529        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61530      else
61531        dir="`$DIRNAME "$path"`"
61532        base="`$BASENAME "$path"`"
61533        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61534      fi
61535    fi
61536  fi
61537
61538
61539  # Only process if variable expands to non-empty
61540
61541  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61543
61544  # Input might be given as Windows format, start by converting to
61545  # unix format.
61546  path="$POTENTIAL_FREETYPE_LIB_PATH"
61547  new_path=`$CYGPATH -u "$path"`
61548
61549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61552  # "foo.exe" is OK but "foo" is an error.
61553  #
61554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61555  # It is also a way to make sure we got the proper file name for the real test later on.
61556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61557  if test "x$test_shortpath" = x; then
61558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61560    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61561  fi
61562
61563  # Call helper function which possibly converts this using DOS-style short mode.
61564  # If so, the updated path is stored in $new_path.
61565
61566  input_path="$new_path"
61567  # Check if we need to convert this using DOS-style short mode. If the path
61568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61569  # take no chances and rewrite it.
61570  # Note: m4 eats our [], so we need to use [ and ] instead.
61571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61572  if test "x$has_forbidden_chars" != x; then
61573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61577      # Going to short mode and back again did indeed matter. Since short mode is
61578      # case insensitive, let's make it lowercase to improve readability.
61579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61580      # Now convert it back to Unix-style (cygpath)
61581      input_path=`$CYGPATH -u "$shortmode_path"`
61582      new_path="$input_path"
61583    fi
61584  fi
61585
61586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61587  if test "x$test_cygdrive_prefix" = x; then
61588    # As a simple fix, exclude /usr/bin since it's not a real path.
61589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61591      # a path prefixed by /cygdrive for fixpath to work.
61592      new_path="$CYGWIN_ROOT_PATH$input_path"
61593    fi
61594  fi
61595
61596
61597  if test "x$path" != "x$new_path"; then
61598    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61600$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61601  fi
61602
61603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61604
61605  path="$POTENTIAL_FREETYPE_LIB_PATH"
61606  has_colon=`$ECHO $path | $GREP ^.:`
61607  new_path="$path"
61608  if test "x$has_colon" = x; then
61609    # Not in mixed or Windows style, start by that.
61610    new_path=`cmd //c echo $path`
61611  fi
61612
61613
61614  input_path="$new_path"
61615  # Check if we need to convert this using DOS-style short mode. If the path
61616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61617  # take no chances and rewrite it.
61618  # Note: m4 eats our [], so we need to use [ and ] instead.
61619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61620  if test "x$has_forbidden_chars" != x; then
61621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61623  fi
61624
61625
61626  windows_path="$new_path"
61627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61628    unix_path=`$CYGPATH -u "$windows_path"`
61629    new_path="$unix_path"
61630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61632    new_path="$unix_path"
61633  fi
61634
61635  if test "x$path" != "x$new_path"; then
61636    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61639  fi
61640
61641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61643
61644    else
61645      # We're on a unix platform. Hooray! :)
61646      path="$POTENTIAL_FREETYPE_LIB_PATH"
61647      has_space=`$ECHO "$path" | $GREP " "`
61648      if test "x$has_space" != x; then
61649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61652      fi
61653
61654      # Use eval to expand a potential ~
61655      eval path="$path"
61656      if test ! -f "$path" && test ! -d "$path"; then
61657        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61658      fi
61659
61660      if test -d "$path"; then
61661        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61662      else
61663        dir="`$DIRNAME "$path"`"
61664        base="`$BASENAME "$path"`"
61665        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61666      fi
61667    fi
61668  fi
61669
61670
61671    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61673$as_echo_n "checking for freetype includes... " >&6; }
61674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61675$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61676    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61678$as_echo_n "checking for freetype libraries... " >&6; }
61679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61680$as_echo "$FREETYPE_LIB_PATH" >&6; }
61681  fi
61682
61683              if test "x$FOUND_FREETYPE" != xyes; then
61684
61685  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61686  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61687  METHOD="well-known location"
61688
61689  # Let's start with an optimistic view of the world :-)
61690  FOUND_FREETYPE=yes
61691
61692  # First look for the canonical freetype main include file ft2build.h.
61693  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61694    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61695    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61696    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61697      # Fail.
61698      FOUND_FREETYPE=no
61699    fi
61700  fi
61701
61702  if test "x$FOUND_FREETYPE" = xyes; then
61703    # Include file found, let's continue the sanity check.
61704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61705$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61706
61707    # Reset to default value
61708    FREETYPE_BASE_NAME=freetype
61709    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61710    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61711      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61712          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61713        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61714        # for the .6 version explicitly.
61715        FREETYPE_BASE_NAME=freetype.6
61716        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61717        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61718$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61719      else
61720        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61721$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61722        FOUND_FREETYPE=no
61723      fi
61724    else
61725      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61726        # On Windows, we will need both .lib and .dll file.
61727        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61728          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61729$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61730          FOUND_FREETYPE=no
61731        fi
61732      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61733          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61734        # Found lib in isa dir, use that instead.
61735        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61736        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61737$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61738      fi
61739    fi
61740  fi
61741
61742  if test "x$FOUND_FREETYPE" = xyes; then
61743
61744  # Only process if variable expands to non-empty
61745
61746  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61748
61749  # Input might be given as Windows format, start by converting to
61750  # unix format.
61751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61752  new_path=`$CYGPATH -u "$path"`
61753
61754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61757  # "foo.exe" is OK but "foo" is an error.
61758  #
61759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61760  # It is also a way to make sure we got the proper file name for the real test later on.
61761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61762  if test "x$test_shortpath" = x; then
61763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61765    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61766  fi
61767
61768  # Call helper function which possibly converts this using DOS-style short mode.
61769  # If so, the updated path is stored in $new_path.
61770
61771  input_path="$new_path"
61772  # Check if we need to convert this using DOS-style short mode. If the path
61773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61774  # take no chances and rewrite it.
61775  # Note: m4 eats our [], so we need to use [ and ] instead.
61776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61777  if test "x$has_forbidden_chars" != x; then
61778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61782      # Going to short mode and back again did indeed matter. Since short mode is
61783      # case insensitive, let's make it lowercase to improve readability.
61784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61785      # Now convert it back to Unix-style (cygpath)
61786      input_path=`$CYGPATH -u "$shortmode_path"`
61787      new_path="$input_path"
61788    fi
61789  fi
61790
61791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61792  if test "x$test_cygdrive_prefix" = x; then
61793    # As a simple fix, exclude /usr/bin since it's not a real path.
61794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61796      # a path prefixed by /cygdrive for fixpath to work.
61797      new_path="$CYGWIN_ROOT_PATH$input_path"
61798    fi
61799  fi
61800
61801
61802  if test "x$path" != "x$new_path"; then
61803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61806  fi
61807
61808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61809
61810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61811  has_colon=`$ECHO $path | $GREP ^.:`
61812  new_path="$path"
61813  if test "x$has_colon" = x; then
61814    # Not in mixed or Windows style, start by that.
61815    new_path=`cmd //c echo $path`
61816  fi
61817
61818
61819  input_path="$new_path"
61820  # Check if we need to convert this using DOS-style short mode. If the path
61821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61822  # take no chances and rewrite it.
61823  # Note: m4 eats our [], so we need to use [ and ] instead.
61824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61825  if test "x$has_forbidden_chars" != x; then
61826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61828  fi
61829
61830
61831  windows_path="$new_path"
61832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61833    unix_path=`$CYGPATH -u "$windows_path"`
61834    new_path="$unix_path"
61835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61837    new_path="$unix_path"
61838  fi
61839
61840  if test "x$path" != "x$new_path"; then
61841    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61844  fi
61845
61846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61848
61849    else
61850      # We're on a unix platform. Hooray! :)
61851      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61852      has_space=`$ECHO "$path" | $GREP " "`
61853      if test "x$has_space" != x; then
61854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61857      fi
61858
61859      # Use eval to expand a potential ~
61860      eval path="$path"
61861      if test ! -f "$path" && test ! -d "$path"; then
61862        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61863      fi
61864
61865      if test -d "$path"; then
61866        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61867      else
61868        dir="`$DIRNAME "$path"`"
61869        base="`$BASENAME "$path"`"
61870        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61871      fi
61872    fi
61873  fi
61874
61875
61876  # Only process if variable expands to non-empty
61877
61878  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61880
61881  # Input might be given as Windows format, start by converting to
61882  # unix format.
61883  path="$POTENTIAL_FREETYPE_LIB_PATH"
61884  new_path=`$CYGPATH -u "$path"`
61885
61886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61889  # "foo.exe" is OK but "foo" is an error.
61890  #
61891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61892  # It is also a way to make sure we got the proper file name for the real test later on.
61893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61894  if test "x$test_shortpath" = x; then
61895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61897    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61898  fi
61899
61900  # Call helper function which possibly converts this using DOS-style short mode.
61901  # If so, the updated path is stored in $new_path.
61902
61903  input_path="$new_path"
61904  # Check if we need to convert this using DOS-style short mode. If the path
61905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61906  # take no chances and rewrite it.
61907  # Note: m4 eats our [], so we need to use [ and ] instead.
61908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61909  if test "x$has_forbidden_chars" != x; then
61910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61914      # Going to short mode and back again did indeed matter. Since short mode is
61915      # case insensitive, let's make it lowercase to improve readability.
61916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61917      # Now convert it back to Unix-style (cygpath)
61918      input_path=`$CYGPATH -u "$shortmode_path"`
61919      new_path="$input_path"
61920    fi
61921  fi
61922
61923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61924  if test "x$test_cygdrive_prefix" = x; then
61925    # As a simple fix, exclude /usr/bin since it's not a real path.
61926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61928      # a path prefixed by /cygdrive for fixpath to work.
61929      new_path="$CYGWIN_ROOT_PATH$input_path"
61930    fi
61931  fi
61932
61933
61934  if test "x$path" != "x$new_path"; then
61935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61938  fi
61939
61940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61941
61942  path="$POTENTIAL_FREETYPE_LIB_PATH"
61943  has_colon=`$ECHO $path | $GREP ^.:`
61944  new_path="$path"
61945  if test "x$has_colon" = x; then
61946    # Not in mixed or Windows style, start by that.
61947    new_path=`cmd //c echo $path`
61948  fi
61949
61950
61951  input_path="$new_path"
61952  # Check if we need to convert this using DOS-style short mode. If the path
61953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61954  # take no chances and rewrite it.
61955  # Note: m4 eats our [], so we need to use [ and ] instead.
61956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61957  if test "x$has_forbidden_chars" != x; then
61958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61960  fi
61961
61962
61963  windows_path="$new_path"
61964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61965    unix_path=`$CYGPATH -u "$windows_path"`
61966    new_path="$unix_path"
61967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61969    new_path="$unix_path"
61970  fi
61971
61972  if test "x$path" != "x$new_path"; then
61973    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61976  fi
61977
61978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61980
61981    else
61982      # We're on a unix platform. Hooray! :)
61983      path="$POTENTIAL_FREETYPE_LIB_PATH"
61984      has_space=`$ECHO "$path" | $GREP " "`
61985      if test "x$has_space" != x; then
61986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61988        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61989      fi
61990
61991      # Use eval to expand a potential ~
61992      eval path="$path"
61993      if test ! -f "$path" && test ! -d "$path"; then
61994        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61995      fi
61996
61997      if test -d "$path"; then
61998        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61999      else
62000        dir="`$DIRNAME "$path"`"
62001        base="`$BASENAME "$path"`"
62002        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62003      fi
62004    fi
62005  fi
62006
62007
62008    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62010$as_echo_n "checking for freetype includes... " >&6; }
62011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62012$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62013    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62015$as_echo_n "checking for freetype libraries... " >&6; }
62016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62017$as_echo "$FREETYPE_LIB_PATH" >&6; }
62018  fi
62019
62020              fi
62021            fi
62022          fi
62023        fi
62024      fi # end check in well-known locations
62025
62026      if test "x$FOUND_FREETYPE" != xyes; then
62027
62028  # Print a helpful message on how to acquire the necessary build dependency.
62029  # freetype is the help tag: freetype, cups, alsa etc
62030  MISSING_DEPENDENCY=freetype
62031
62032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62033    cygwin_help $MISSING_DEPENDENCY
62034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62035    msys_help $MISSING_DEPENDENCY
62036  else
62037    PKGHANDLER_COMMAND=
62038
62039    case $PKGHANDLER in
62040      apt-get)
62041        apt_help     $MISSING_DEPENDENCY ;;
62042      yum)
62043        yum_help     $MISSING_DEPENDENCY ;;
62044      port)
62045        port_help    $MISSING_DEPENDENCY ;;
62046      pkgutil)
62047        pkgutil_help $MISSING_DEPENDENCY ;;
62048      pkgadd)
62049        pkgadd_help  $MISSING_DEPENDENCY ;;
62050    esac
62051
62052    if test "x$PKGHANDLER_COMMAND" != x; then
62053      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62054    fi
62055  fi
62056
62057        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62058      fi
62059    fi # end user specified settings
62060
62061    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62062    if test "x$FREETYPE_CFLAGS" = x; then
62063
62064  # Only process if variable expands to non-empty
62065
62066  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62068
62069  # Input might be given as Windows format, start by converting to
62070  # unix format.
62071  path="$FREETYPE_INCLUDE_PATH"
62072  new_path=`$CYGPATH -u "$path"`
62073
62074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62077  # "foo.exe" is OK but "foo" is an error.
62078  #
62079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62080  # It is also a way to make sure we got the proper file name for the real test later on.
62081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62082  if test "x$test_shortpath" = x; then
62083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62084$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62085    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62086  fi
62087
62088  # Call helper function which possibly converts this using DOS-style short mode.
62089  # If so, the updated path is stored in $new_path.
62090
62091  input_path="$new_path"
62092  # Check if we need to convert this using DOS-style short mode. If the path
62093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62094  # take no chances and rewrite it.
62095  # Note: m4 eats our [], so we need to use [ and ] instead.
62096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62097  if test "x$has_forbidden_chars" != x; then
62098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62102      # Going to short mode and back again did indeed matter. Since short mode is
62103      # case insensitive, let's make it lowercase to improve readability.
62104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62105      # Now convert it back to Unix-style (cygpath)
62106      input_path=`$CYGPATH -u "$shortmode_path"`
62107      new_path="$input_path"
62108    fi
62109  fi
62110
62111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62112  if test "x$test_cygdrive_prefix" = x; then
62113    # As a simple fix, exclude /usr/bin since it's not a real path.
62114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62116      # a path prefixed by /cygdrive for fixpath to work.
62117      new_path="$CYGWIN_ROOT_PATH$input_path"
62118    fi
62119  fi
62120
62121
62122  if test "x$path" != "x$new_path"; then
62123    FREETYPE_INCLUDE_PATH="$new_path"
62124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62125$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62126  fi
62127
62128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62129
62130  path="$FREETYPE_INCLUDE_PATH"
62131  has_colon=`$ECHO $path | $GREP ^.:`
62132  new_path="$path"
62133  if test "x$has_colon" = x; then
62134    # Not in mixed or Windows style, start by that.
62135    new_path=`cmd //c echo $path`
62136  fi
62137
62138
62139  input_path="$new_path"
62140  # Check if we need to convert this using DOS-style short mode. If the path
62141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62142  # take no chances and rewrite it.
62143  # Note: m4 eats our [], so we need to use [ and ] instead.
62144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62145  if test "x$has_forbidden_chars" != x; then
62146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62148  fi
62149
62150
62151  windows_path="$new_path"
62152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62153    unix_path=`$CYGPATH -u "$windows_path"`
62154    new_path="$unix_path"
62155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62157    new_path="$unix_path"
62158  fi
62159
62160  if test "x$path" != "x$new_path"; then
62161    FREETYPE_INCLUDE_PATH="$new_path"
62162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62163$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62164  fi
62165
62166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62168
62169    else
62170      # We're on a unix platform. Hooray! :)
62171      path="$FREETYPE_INCLUDE_PATH"
62172      has_space=`$ECHO "$path" | $GREP " "`
62173      if test "x$has_space" != x; then
62174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62175$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62177      fi
62178
62179      # Use eval to expand a potential ~
62180      eval path="$path"
62181      if test ! -f "$path" && test ! -d "$path"; then
62182        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62183      fi
62184
62185      if test -d "$path"; then
62186        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62187      else
62188        dir="`$DIRNAME "$path"`"
62189        base="`$BASENAME "$path"`"
62190        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62191      fi
62192    fi
62193  fi
62194
62195      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62196        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62197      else
62198        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62199      fi
62200    fi
62201
62202    if test "x$FREETYPE_LIBS" = x; then
62203
62204  # Only process if variable expands to non-empty
62205
62206  if test "x$FREETYPE_LIB_PATH" != x; then
62207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62208
62209  # Input might be given as Windows format, start by converting to
62210  # unix format.
62211  path="$FREETYPE_LIB_PATH"
62212  new_path=`$CYGPATH -u "$path"`
62213
62214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62217  # "foo.exe" is OK but "foo" is an error.
62218  #
62219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62220  # It is also a way to make sure we got the proper file name for the real test later on.
62221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62222  if test "x$test_shortpath" = x; then
62223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62224$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62225    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62226  fi
62227
62228  # Call helper function which possibly converts this using DOS-style short mode.
62229  # If so, the updated path is stored in $new_path.
62230
62231  input_path="$new_path"
62232  # Check if we need to convert this using DOS-style short mode. If the path
62233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62234  # take no chances and rewrite it.
62235  # Note: m4 eats our [], so we need to use [ and ] instead.
62236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62237  if test "x$has_forbidden_chars" != x; then
62238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62242      # Going to short mode and back again did indeed matter. Since short mode is
62243      # case insensitive, let's make it lowercase to improve readability.
62244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62245      # Now convert it back to Unix-style (cygpath)
62246      input_path=`$CYGPATH -u "$shortmode_path"`
62247      new_path="$input_path"
62248    fi
62249  fi
62250
62251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62252  if test "x$test_cygdrive_prefix" = x; then
62253    # As a simple fix, exclude /usr/bin since it's not a real path.
62254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62256      # a path prefixed by /cygdrive for fixpath to work.
62257      new_path="$CYGWIN_ROOT_PATH$input_path"
62258    fi
62259  fi
62260
62261
62262  if test "x$path" != "x$new_path"; then
62263    FREETYPE_LIB_PATH="$new_path"
62264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62265$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62266  fi
62267
62268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62269
62270  path="$FREETYPE_LIB_PATH"
62271  has_colon=`$ECHO $path | $GREP ^.:`
62272  new_path="$path"
62273  if test "x$has_colon" = x; then
62274    # Not in mixed or Windows style, start by that.
62275    new_path=`cmd //c echo $path`
62276  fi
62277
62278
62279  input_path="$new_path"
62280  # Check if we need to convert this using DOS-style short mode. If the path
62281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62282  # take no chances and rewrite it.
62283  # Note: m4 eats our [], so we need to use [ and ] instead.
62284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62285  if test "x$has_forbidden_chars" != x; then
62286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62288  fi
62289
62290
62291  windows_path="$new_path"
62292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62293    unix_path=`$CYGPATH -u "$windows_path"`
62294    new_path="$unix_path"
62295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62297    new_path="$unix_path"
62298  fi
62299
62300  if test "x$path" != "x$new_path"; then
62301    FREETYPE_LIB_PATH="$new_path"
62302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62303$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62304  fi
62305
62306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62308
62309    else
62310      # We're on a unix platform. Hooray! :)
62311      path="$FREETYPE_LIB_PATH"
62312      has_space=`$ECHO "$path" | $GREP " "`
62313      if test "x$has_space" != x; then
62314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62315$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62317      fi
62318
62319      # Use eval to expand a potential ~
62320      eval path="$path"
62321      if test ! -f "$path" && test ! -d "$path"; then
62322        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62323      fi
62324
62325      if test -d "$path"; then
62326        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62327      else
62328        dir="`$DIRNAME "$path"`"
62329        base="`$BASENAME "$path"`"
62330        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62331      fi
62332    fi
62333  fi
62334
62335      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62336        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62337      else
62338        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62339      fi
62340    fi
62341
62342    # Try to compile it
62343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62344$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62345    ac_ext=cpp
62346ac_cpp='$CXXCPP $CPPFLAGS'
62347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62350
62351    PREV_CXXCFLAGS="$CXXFLAGS"
62352    PREV_LIBS="$LIBS"
62353    PREV_CXX="$CXX"
62354    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62355    LIBS="$LIBS $FREETYPE_LIBS"
62356    CXX="$FIXPATH $CXX"
62357    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62358/* end confdefs.h.  */
62359
62360          #include<ft2build.h>
62361          #include FT_FREETYPE_H
62362          int main () {
62363            FT_Init_FreeType(NULL);
62364            return 0;
62365          }
62366
62367_ACEOF
62368if ac_fn_cxx_try_link "$LINENO"; then :
62369
62370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62371$as_echo "yes" >&6; }
62372
62373else
62374
62375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62376$as_echo "no" >&6; }
62377          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62378$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62379          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62380$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62381
62382
62383  # Print a helpful message on how to acquire the necessary build dependency.
62384  # freetype is the help tag: freetype, cups, alsa etc
62385  MISSING_DEPENDENCY=freetype
62386
62387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62388    cygwin_help $MISSING_DEPENDENCY
62389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62390    msys_help $MISSING_DEPENDENCY
62391  else
62392    PKGHANDLER_COMMAND=
62393
62394    case $PKGHANDLER in
62395      apt-get)
62396        apt_help     $MISSING_DEPENDENCY ;;
62397      yum)
62398        yum_help     $MISSING_DEPENDENCY ;;
62399      port)
62400        port_help    $MISSING_DEPENDENCY ;;
62401      pkgutil)
62402        pkgutil_help $MISSING_DEPENDENCY ;;
62403      pkgadd)
62404        pkgadd_help  $MISSING_DEPENDENCY ;;
62405    esac
62406
62407    if test "x$PKGHANDLER_COMMAND" != x; then
62408      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62409    fi
62410  fi
62411
62412
62413          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62414
62415
62416fi
62417rm -f core conftest.err conftest.$ac_objext \
62418    conftest$ac_exeext conftest.$ac_ext
62419    CXXCFLAGS="$PREV_CXXFLAGS"
62420    LIBS="$PREV_LIBS"
62421    CXX="$PREV_CXX"
62422    ac_ext=cpp
62423ac_cpp='$CXXCPP $CPPFLAGS'
62424ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62425ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62426ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62427
62428
62429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62430$as_echo_n "checking if we should bundle freetype... " >&6; }
62431    if test "x$BUNDLE_FREETYPE" = xyes; then
62432      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62433    fi
62434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62435$as_echo "$BUNDLE_FREETYPE" >&6; }
62436
62437  fi # end freetype needed
62438
62439
62440
62441
62442
62443
62444
62445# Check whether --with-alsa was given.
62446if test "${with_alsa+set}" = set; then :
62447  withval=$with_alsa;
62448fi
62449
62450
62451# Check whether --with-alsa-include was given.
62452if test "${with_alsa_include+set}" = set; then :
62453  withval=$with_alsa_include;
62454fi
62455
62456
62457# Check whether --with-alsa-lib was given.
62458if test "${with_alsa_lib+set}" = set; then :
62459  withval=$with_alsa_lib;
62460fi
62461
62462
62463  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62464    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62465        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62466        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62467      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62468$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62469    fi
62470    ALSA_CFLAGS=
62471    ALSA_LIBS=
62472  else
62473    ALSA_FOUND=no
62474
62475    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62476      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62477    fi
62478
62479    if test "x${with_alsa}" != x; then
62480      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62481      ALSA_CFLAGS="-I${with_alsa}/include"
62482      ALSA_FOUND=yes
62483    fi
62484    if test "x${with_alsa_include}" != x; then
62485      ALSA_CFLAGS="-I${with_alsa_include}"
62486      ALSA_FOUND=yes
62487    fi
62488    if test "x${with_alsa_lib}" != x; then
62489      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62490      ALSA_FOUND=yes
62491    fi
62492    # Do not try pkg-config if we have a sysroot set.
62493    if test "x$SYSROOT" = x; then
62494      if test "x$ALSA_FOUND" = xno; then
62495
62496pkg_failed=no
62497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62498$as_echo_n "checking for ALSA... " >&6; }
62499
62500if test -n "$ALSA_CFLAGS"; then
62501    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62502 elif test -n "$PKG_CONFIG"; then
62503    if test -n "$PKG_CONFIG" && \
62504    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62505  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62506  ac_status=$?
62507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62508  test $ac_status = 0; }; then
62509  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62510else
62511  pkg_failed=yes
62512fi
62513 else
62514    pkg_failed=untried
62515fi
62516if test -n "$ALSA_LIBS"; then
62517    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62518 elif test -n "$PKG_CONFIG"; then
62519    if test -n "$PKG_CONFIG" && \
62520    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62521  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62522  ac_status=$?
62523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62524  test $ac_status = 0; }; then
62525  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62526else
62527  pkg_failed=yes
62528fi
62529 else
62530    pkg_failed=untried
62531fi
62532
62533
62534
62535if test $pkg_failed = yes; then
62536
62537if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62538        _pkg_short_errors_supported=yes
62539else
62540        _pkg_short_errors_supported=no
62541fi
62542        if test $_pkg_short_errors_supported = yes; then
62543	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62544        else
62545	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62546        fi
62547	# Put the nasty error message in config.log where it belongs
62548	echo "$ALSA_PKG_ERRORS" >&5
62549
62550	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62551$as_echo "no" >&6; }
62552                ALSA_FOUND=no
62553elif test $pkg_failed = untried; then
62554	ALSA_FOUND=no
62555else
62556	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62557	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62559$as_echo "yes" >&6; }
62560	ALSA_FOUND=yes
62561fi
62562      fi
62563    fi
62564    if test "x$ALSA_FOUND" = xno; then
62565      for ac_header in alsa/asoundlib.h
62566do :
62567  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62568if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62569  cat >>confdefs.h <<_ACEOF
62570#define HAVE_ALSA_ASOUNDLIB_H 1
62571_ACEOF
62572
62573            ALSA_FOUND=yes
62574            ALSA_CFLAGS=-Iignoreme
62575            ALSA_LIBS=-lasound
62576            DEFAULT_ALSA=yes
62577
62578else
62579  ALSA_FOUND=no
62580
62581fi
62582
62583done
62584
62585    fi
62586    if test "x$ALSA_FOUND" = xno; then
62587
62588  # Print a helpful message on how to acquire the necessary build dependency.
62589  # alsa is the help tag: freetype, cups, alsa etc
62590  MISSING_DEPENDENCY=alsa
62591
62592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62593    cygwin_help $MISSING_DEPENDENCY
62594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62595    msys_help $MISSING_DEPENDENCY
62596  else
62597    PKGHANDLER_COMMAND=
62598
62599    case $PKGHANDLER in
62600      apt-get)
62601        apt_help     $MISSING_DEPENDENCY ;;
62602      yum)
62603        yum_help     $MISSING_DEPENDENCY ;;
62604      port)
62605        port_help    $MISSING_DEPENDENCY ;;
62606      pkgutil)
62607        pkgutil_help $MISSING_DEPENDENCY ;;
62608      pkgadd)
62609        pkgadd_help  $MISSING_DEPENDENCY ;;
62610    esac
62611
62612    if test "x$PKGHANDLER_COMMAND" != x; then
62613      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62614    fi
62615  fi
62616
62617      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62618    fi
62619  fi
62620
62621
62622
62623
62624
62625
62626# Check whether --with-libffi was given.
62627if test "${with_libffi+set}" = set; then :
62628  withval=$with_libffi;
62629fi
62630
62631
62632# Check whether --with-libffi-include was given.
62633if test "${with_libffi_include+set}" = set; then :
62634  withval=$with_libffi_include;
62635fi
62636
62637
62638# Check whether --with-libffi-lib was given.
62639if test "${with_libffi_lib+set}" = set; then :
62640  withval=$with_libffi_lib;
62641fi
62642
62643  # Check whether --enable-libffi-bundling was given.
62644if test "${enable_libffi_bundling+set}" = set; then :
62645  enableval=$enable_libffi_bundling;
62646fi
62647
62648
62649  if test "x$NEEDS_LIB_FFI" = xfalse; then
62650    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62651        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62652        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62653      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62654$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62655    fi
62656    LIBFFI_CFLAGS=
62657    LIBFFI_LIBS=
62658  else
62659    LIBFFI_FOUND=no
62660
62661    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62662      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62663    fi
62664
62665    if test "x${with_libffi}" != x; then
62666      LIBFFI_LIB_PATH="${with_libffi}/lib"
62667      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62668      LIBFFI_CFLAGS="-I${with_libffi}/include"
62669      LIBFFI_FOUND=yes
62670    fi
62671    if test "x${with_libffi_include}" != x; then
62672      LIBFFI_CFLAGS="-I${with_libffi_include}"
62673      LIBFFI_FOUND=yes
62674    fi
62675    if test "x${with_libffi_lib}" != x; then
62676      LIBFFI_LIB_PATH="${with_libffi_lib}"
62677      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62678      LIBFFI_FOUND=yes
62679    fi
62680    # Do not try pkg-config if we have a sysroot set.
62681    if test "x$SYSROOT" = x; then
62682      if test "x$LIBFFI_FOUND" = xno; then
62683        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62684
62685pkg_failed=no
62686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62687$as_echo_n "checking for LIBFFI... " >&6; }
62688
62689if test -n "$LIBFFI_CFLAGS"; then
62690    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62691 elif test -n "$PKG_CONFIG"; then
62692    if test -n "$PKG_CONFIG" && \
62693    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62694  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62695  ac_status=$?
62696  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62697  test $ac_status = 0; }; then
62698  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62699else
62700  pkg_failed=yes
62701fi
62702 else
62703    pkg_failed=untried
62704fi
62705if test -n "$LIBFFI_LIBS"; then
62706    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62707 elif test -n "$PKG_CONFIG"; then
62708    if test -n "$PKG_CONFIG" && \
62709    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62710  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62711  ac_status=$?
62712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62713  test $ac_status = 0; }; then
62714  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62715else
62716  pkg_failed=yes
62717fi
62718 else
62719    pkg_failed=untried
62720fi
62721
62722
62723
62724if test $pkg_failed = yes; then
62725
62726if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62727        _pkg_short_errors_supported=yes
62728else
62729        _pkg_short_errors_supported=no
62730fi
62731        if test $_pkg_short_errors_supported = yes; then
62732	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62733        else
62734	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62735        fi
62736	# Put the nasty error message in config.log where it belongs
62737	echo "$LIBFFI_PKG_ERRORS" >&5
62738
62739	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62740$as_echo "no" >&6; }
62741                LIBFFI_FOUND=no
62742elif test $pkg_failed = untried; then
62743	LIBFFI_FOUND=no
62744else
62745	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62746	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62748$as_echo "yes" >&6; }
62749	LIBFFI_FOUND=yes
62750fi
62751      fi
62752    fi
62753    if test "x$LIBFFI_FOUND" = xno; then
62754      for ac_header in ffi.h
62755do :
62756  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62757if test "x$ac_cv_header_ffi_h" = xyes; then :
62758  cat >>confdefs.h <<_ACEOF
62759#define HAVE_FFI_H 1
62760_ACEOF
62761
62762            LIBFFI_FOUND=yes
62763            LIBFFI_CFLAGS=
62764            LIBFFI_LIBS=-lffi
62765
62766else
62767  LIBFFI_FOUND=no
62768
62769fi
62770
62771done
62772
62773    fi
62774    if test "x$LIBFFI_FOUND" = xno; then
62775
62776  # Print a helpful message on how to acquire the necessary build dependency.
62777  # ffi is the help tag: freetype, cups, alsa etc
62778  MISSING_DEPENDENCY=ffi
62779
62780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62781    cygwin_help $MISSING_DEPENDENCY
62782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62783    msys_help $MISSING_DEPENDENCY
62784  else
62785    PKGHANDLER_COMMAND=
62786
62787    case $PKGHANDLER in
62788      apt-get)
62789        apt_help     $MISSING_DEPENDENCY ;;
62790      yum)
62791        yum_help     $MISSING_DEPENDENCY ;;
62792      port)
62793        port_help    $MISSING_DEPENDENCY ;;
62794      pkgutil)
62795        pkgutil_help $MISSING_DEPENDENCY ;;
62796      pkgadd)
62797        pkgadd_help  $MISSING_DEPENDENCY ;;
62798    esac
62799
62800    if test "x$PKGHANDLER_COMMAND" != x; then
62801      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62802    fi
62803  fi
62804
62805      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62806    fi
62807
62808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62809$as_echo_n "checking if libffi works... " >&6; }
62810    ac_ext=c
62811ac_cpp='$CPP $CPPFLAGS'
62812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62814ac_compiler_gnu=$ac_cv_c_compiler_gnu
62815
62816    OLD_CFLAGS="$CFLAGS"
62817    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62818    OLD_LIBS="$LIBS"
62819    LIBS="$LIBS $LIBFFI_LIBS"
62820    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62821/* end confdefs.h.  */
62822#include <ffi.h>
62823int
62824main ()
62825{
62826
62827          ffi_call(NULL, NULL, NULL, NULL);
62828          return 0;
62829
62830  ;
62831  return 0;
62832}
62833_ACEOF
62834if ac_fn_c_try_link "$LINENO"; then :
62835  LIBFFI_WORKS=yes
62836else
62837  LIBFFI_WORKS=no
62838
62839fi
62840rm -f core conftest.err conftest.$ac_objext \
62841    conftest$ac_exeext conftest.$ac_ext
62842    CFLAGS="$OLD_CFLAGS"
62843    LIBS="$OLD_LIBS"
62844    ac_ext=cpp
62845ac_cpp='$CXXCPP $CPPFLAGS'
62846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62849
62850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62851$as_echo "$LIBFFI_WORKS" >&6; }
62852
62853    if test "x$LIBFFI_WORKS" = xno; then
62854
62855  # Print a helpful message on how to acquire the necessary build dependency.
62856  # ffi is the help tag: freetype, cups, alsa etc
62857  MISSING_DEPENDENCY=ffi
62858
62859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62860    cygwin_help $MISSING_DEPENDENCY
62861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62862    msys_help $MISSING_DEPENDENCY
62863  else
62864    PKGHANDLER_COMMAND=
62865
62866    case $PKGHANDLER in
62867      apt-get)
62868        apt_help     $MISSING_DEPENDENCY ;;
62869      yum)
62870        yum_help     $MISSING_DEPENDENCY ;;
62871      port)
62872        port_help    $MISSING_DEPENDENCY ;;
62873      pkgutil)
62874        pkgutil_help $MISSING_DEPENDENCY ;;
62875      pkgadd)
62876        pkgadd_help  $MISSING_DEPENDENCY ;;
62877    esac
62878
62879    if test "x$PKGHANDLER_COMMAND" != x; then
62880      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62881    fi
62882  fi
62883
62884      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62885    fi
62886
62887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62888$as_echo_n "checking if libffi should be bundled... " >&6; }
62889    if test "x$enable_libffi_bundling" = "x"; then
62890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62891$as_echo "no" >&6; }
62892      ENABLE_LIBFFI_BUNDLING=false
62893    elif  test "x$enable_libffi_bundling" = "xno"; then
62894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62895$as_echo "no, forced" >&6; }
62896      ENABLE_LIBFFI_BUNDLING=false
62897    elif  test "x$enable_libffi_bundling" = "xyes"; then
62898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62899$as_echo "yes, forced" >&6; }
62900      ENABLE_LIBFFI_BUNDLING=true
62901    else
62902      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
62903    fi
62904
62905    # Find the libffi.so.X to bundle
62906    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
62907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
62908$as_echo_n "checking for libffi lib file location... " >&6; }
62909      if test "x${LIBFFI_LIB_PATH}" != x; then
62910        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
62911          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
62912        else
62913          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
62914        fi
62915      else
62916        # If we don't have an explicit path, look in a few obvious places
62917        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
62918          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62919            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62920          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
62921            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
62922          else
62923            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62924          fi
62925        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
62926          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
62927            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
62928          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
62929            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
62930          else
62931            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62932          fi
62933        else
62934          # Fallback on the default /usr/lib dir
62935          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62936            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62937          else
62938            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62939          fi
62940        fi
62941      fi
62942      # Make sure the wildcard is evaluated
62943      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
62944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
62945$as_echo "${LIBFFI_LIB_FILE}" >&6; }
62946    fi
62947  fi
62948
62949
62950
62951
62952
62953
62954
62955  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62956    # Extract the first word of "llvm-config", so it can be a program name with args.
62957set dummy llvm-config; ac_word=$2
62958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62959$as_echo_n "checking for $ac_word... " >&6; }
62960if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62961  $as_echo_n "(cached) " >&6
62962else
62963  if test -n "$LLVM_CONFIG"; then
62964  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62965else
62966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62967for as_dir in $PATH
62968do
62969  IFS=$as_save_IFS
62970  test -z "$as_dir" && as_dir=.
62971    for ac_exec_ext in '' $ac_executable_extensions; do
62972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62973    ac_cv_prog_LLVM_CONFIG="llvm-config"
62974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62975    break 2
62976  fi
62977done
62978  done
62979IFS=$as_save_IFS
62980
62981fi
62982fi
62983LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62984if test -n "$LLVM_CONFIG"; then
62985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62986$as_echo "$LLVM_CONFIG" >&6; }
62987else
62988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62989$as_echo "no" >&6; }
62990fi
62991
62992
62993
62994    if test "x$LLVM_CONFIG" != xllvm-config; then
62995      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62996    fi
62997
62998    llvm_components="jit mcjit engine nativecodegen native"
62999    unset LLVM_CFLAGS
63000    for flag in $("$LLVM_CONFIG" --cxxflags); do
63001      if echo "${flag}" | grep -q '^-[ID]'; then
63002        if test "${flag}" != "-D_DEBUG" ; then
63003          if test "${LLVM_CFLAGS}" != "" ; then
63004            LLVM_CFLAGS="${LLVM_CFLAGS} "
63005          fi
63006          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63007        fi
63008      fi
63009    done
63010    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63011    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63012
63013    unset LLVM_LDFLAGS
63014    for flag in $("${LLVM_CONFIG}" --ldflags); do
63015      if echo "${flag}" | grep -q '^-L'; then
63016        if test "${LLVM_LDFLAGS}" != ""; then
63017          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63018        fi
63019        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63020      fi
63021    done
63022
63023    unset LLVM_LIBS
63024    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63025      if echo "${flag}" | grep -q '^-l'; then
63026        if test "${LLVM_LIBS}" != ""; then
63027          LLVM_LIBS="${LLVM_LIBS} "
63028        fi
63029        LLVM_LIBS="${LLVM_LIBS}${flag}"
63030      fi
63031    done
63032
63033    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63034    # always properly detect -ltinfo
63035    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63036
63037
63038
63039
63040  fi
63041
63042
63043
63044# Check whether --with-libjpeg was given.
63045if test "${with_libjpeg+set}" = set; then :
63046  withval=$with_libjpeg;
63047fi
63048
63049
63050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63051$as_echo_n "checking for which libjpeg to use... " >&6; }
63052  # default is bundled
63053  DEFAULT_LIBJPEG=bundled
63054  # if user didn't specify, use DEFAULT_LIBJPEG
63055  if test "x${with_libjpeg}" = "x"; then
63056    with_libjpeg=${DEFAULT_LIBJPEG}
63057  fi
63058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63059$as_echo "${with_libjpeg}" >&6; }
63060
63061  if test "x${with_libjpeg}" = "xbundled"; then
63062    USE_EXTERNAL_LIBJPEG=false
63063  elif test "x${with_libjpeg}" = "xsystem"; then
63064    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63065if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63066
63067else
63068   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63069fi
63070
63071
63072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63073$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63074if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63075  $as_echo_n "(cached) " >&6
63076else
63077  ac_check_lib_save_LIBS=$LIBS
63078LIBS="-ljpeg  $LIBS"
63079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63080/* end confdefs.h.  */
63081
63082/* Override any GCC internal prototype to avoid an error.
63083   Use char because int might match the return type of a GCC
63084   builtin and then its argument prototype would still apply.  */
63085#ifdef __cplusplus
63086extern "C"
63087#endif
63088char jpeg_CreateDecompress ();
63089int
63090main ()
63091{
63092return jpeg_CreateDecompress ();
63093  ;
63094  return 0;
63095}
63096_ACEOF
63097if ac_fn_cxx_try_link "$LINENO"; then :
63098  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63099else
63100  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63101fi
63102rm -f core conftest.err conftest.$ac_objext \
63103    conftest$ac_exeext conftest.$ac_ext
63104LIBS=$ac_check_lib_save_LIBS
63105fi
63106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63107$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63108if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63109  cat >>confdefs.h <<_ACEOF
63110#define HAVE_LIBJPEG 1
63111_ACEOF
63112
63113  LIBS="-ljpeg $LIBS"
63114
63115else
63116   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63117fi
63118
63119
63120    USE_EXTERNAL_LIBJPEG=true
63121  else
63122    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63123  fi
63124
63125
63126
63127
63128
63129# Check whether --with-giflib was given.
63130if test "${with_giflib+set}" = set; then :
63131  withval=$with_giflib;
63132fi
63133
63134
63135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63136$as_echo_n "checking for which giflib to use... " >&6; }
63137  # default is bundled
63138  DEFAULT_GIFLIB=bundled
63139  # if user didn't specify, use DEFAULT_GIFLIB
63140  if test "x${with_giflib}" = "x"; then
63141    with_giflib=${DEFAULT_GIFLIB}
63142  fi
63143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63144$as_echo "${with_giflib}" >&6; }
63145
63146  if test "x${with_giflib}" = "xbundled"; then
63147    USE_EXTERNAL_LIBGIF=false
63148  elif test "x${with_giflib}" = "xsystem"; then
63149    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63150if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63151
63152else
63153   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63154fi
63155
63156
63157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63158$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63159if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63160  $as_echo_n "(cached) " >&6
63161else
63162  ac_check_lib_save_LIBS=$LIBS
63163LIBS="-lgif  $LIBS"
63164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63165/* end confdefs.h.  */
63166
63167/* Override any GCC internal prototype to avoid an error.
63168   Use char because int might match the return type of a GCC
63169   builtin and then its argument prototype would still apply.  */
63170#ifdef __cplusplus
63171extern "C"
63172#endif
63173char DGifGetCode ();
63174int
63175main ()
63176{
63177return DGifGetCode ();
63178  ;
63179  return 0;
63180}
63181_ACEOF
63182if ac_fn_cxx_try_link "$LINENO"; then :
63183  ac_cv_lib_gif_DGifGetCode=yes
63184else
63185  ac_cv_lib_gif_DGifGetCode=no
63186fi
63187rm -f core conftest.err conftest.$ac_objext \
63188    conftest$ac_exeext conftest.$ac_ext
63189LIBS=$ac_check_lib_save_LIBS
63190fi
63191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63192$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63193if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63194  cat >>confdefs.h <<_ACEOF
63195#define HAVE_LIBGIF 1
63196_ACEOF
63197
63198  LIBS="-lgif $LIBS"
63199
63200else
63201   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63202fi
63203
63204
63205    USE_EXTERNAL_LIBGIF=true
63206  else
63207    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63208  fi
63209
63210
63211
63212
63213
63214# Check whether --with-libpng was given.
63215if test "${with_libpng+set}" = set; then :
63216  withval=$with_libpng;
63217fi
63218
63219
63220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63221$as_echo_n "checking for which libpng to use... " >&6; }
63222
63223  # default is bundled
63224  DEFAULT_LIBPNG=bundled
63225  # if user didn't specify, use DEFAULT_LIBPNG
63226  if test "x${with_libpng}" = "x"; then
63227      with_libpng=${DEFAULT_LIBPNG}
63228  fi
63229
63230  if test "x${with_libpng}" = "xbundled"; then
63231      USE_EXTERNAL_LIBPNG=false
63232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63233$as_echo "bundled" >&6; }
63234  elif test "x${with_libpng}" = "xsystem"; then
63235
63236pkg_failed=no
63237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63238$as_echo_n "checking for PNG... " >&6; }
63239
63240if test -n "$PNG_CFLAGS"; then
63241    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63242 elif test -n "$PKG_CONFIG"; then
63243    if test -n "$PKG_CONFIG" && \
63244    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63245  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63246  ac_status=$?
63247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63248  test $ac_status = 0; }; then
63249  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63250else
63251  pkg_failed=yes
63252fi
63253 else
63254    pkg_failed=untried
63255fi
63256if test -n "$PNG_LIBS"; then
63257    pkg_cv_PNG_LIBS="$PNG_LIBS"
63258 elif test -n "$PKG_CONFIG"; then
63259    if test -n "$PKG_CONFIG" && \
63260    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63261  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63262  ac_status=$?
63263  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63264  test $ac_status = 0; }; then
63265  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63266else
63267  pkg_failed=yes
63268fi
63269 else
63270    pkg_failed=untried
63271fi
63272
63273
63274
63275if test $pkg_failed = yes; then
63276
63277if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63278        _pkg_short_errors_supported=yes
63279else
63280        _pkg_short_errors_supported=no
63281fi
63282        if test $_pkg_short_errors_supported = yes; then
63283	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63284        else
63285	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63286        fi
63287	# Put the nasty error message in config.log where it belongs
63288	echo "$PNG_PKG_ERRORS" >&5
63289
63290	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63291$as_echo "no" >&6; }
63292                 LIBPNG_FOUND=no
63293elif test $pkg_failed = untried; then
63294	 LIBPNG_FOUND=no
63295else
63296	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63297	PNG_LIBS=$pkg_cv_PNG_LIBS
63298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63299$as_echo "yes" >&6; }
63300	 LIBPNG_FOUND=yes
63301fi
63302      if test "x${LIBPNG_FOUND}" = "xyes"; then
63303          USE_EXTERNAL_LIBPNG=true
63304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63305$as_echo "system" >&6; }
63306      else
63307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63308$as_echo "system not found" >&6; }
63309          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63310      fi
63311  else
63312      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63313  fi
63314
63315
63316
63317
63318
63319# Check whether --with-zlib was given.
63320if test "${with_zlib+set}" = set; then :
63321  withval=$with_zlib;
63322fi
63323
63324
63325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63326$as_echo_n "checking for compress in -lz... " >&6; }
63327if ${ac_cv_lib_z_compress+:} false; then :
63328  $as_echo_n "(cached) " >&6
63329else
63330  ac_check_lib_save_LIBS=$LIBS
63331LIBS="-lz  $LIBS"
63332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63333/* end confdefs.h.  */
63334
63335/* Override any GCC internal prototype to avoid an error.
63336   Use char because int might match the return type of a GCC
63337   builtin and then its argument prototype would still apply.  */
63338#ifdef __cplusplus
63339extern "C"
63340#endif
63341char compress ();
63342int
63343main ()
63344{
63345return compress ();
63346  ;
63347  return 0;
63348}
63349_ACEOF
63350if ac_fn_cxx_try_link "$LINENO"; then :
63351  ac_cv_lib_z_compress=yes
63352else
63353  ac_cv_lib_z_compress=no
63354fi
63355rm -f core conftest.err conftest.$ac_objext \
63356    conftest$ac_exeext conftest.$ac_ext
63357LIBS=$ac_check_lib_save_LIBS
63358fi
63359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63360$as_echo "$ac_cv_lib_z_compress" >&6; }
63361if test "x$ac_cv_lib_z_compress" = xyes; then :
63362   ZLIB_FOUND=yes
63363else
63364   ZLIB_FOUND=no
63365fi
63366
63367
63368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63369$as_echo_n "checking for which zlib to use... " >&6; }
63370
63371  DEFAULT_ZLIB=system
63372  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63373    # On windows default is bundled...on others default is system
63374    DEFAULT_ZLIB=bundled
63375  fi
63376
63377  if test "x${ZLIB_FOUND}" != "xyes"; then
63378    # If we don't find any system...set default to bundled
63379    DEFAULT_ZLIB=bundled
63380  fi
63381
63382  # If user didn't specify, use DEFAULT_ZLIB
63383  if test "x${with_zlib}" = "x"; then
63384    with_zlib=${DEFAULT_ZLIB}
63385  fi
63386
63387  if test "x${with_zlib}" = "xbundled"; then
63388    USE_EXTERNAL_LIBZ=false
63389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63390$as_echo "bundled" >&6; }
63391  elif test "x${with_zlib}" = "xsystem"; then
63392    if test "x${ZLIB_FOUND}" = "xyes"; then
63393      USE_EXTERNAL_LIBZ=true
63394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63395$as_echo "system" >&6; }
63396    else
63397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63398$as_echo "system not found" >&6; }
63399      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63400    fi
63401  else
63402    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63403  fi
63404
63405
63406
63407
63408
63409# Check whether --with-lcms was given.
63410if test "${with_lcms+set}" = set; then :
63411  withval=$with_lcms;
63412fi
63413
63414
63415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63416$as_echo_n "checking for which lcms to use... " >&6; }
63417
63418  DEFAULT_LCMS=bundled
63419  # If user didn't specify, use DEFAULT_LCMS
63420  if test "x${with_lcms}" = "x"; then
63421      with_lcms=${DEFAULT_LCMS}
63422  fi
63423
63424  if test "x${with_lcms}" = "xbundled"; then
63425    USE_EXTERNAL_LCMS=false
63426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63427$as_echo "bundled" >&6; }
63428  elif test "x${with_lcms}" = "xsystem"; then
63429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63430$as_echo "system" >&6; }
63431
63432pkg_failed=no
63433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63434$as_echo_n "checking for LCMS... " >&6; }
63435
63436if test -n "$LCMS_CFLAGS"; then
63437    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63438 elif test -n "$PKG_CONFIG"; then
63439    if test -n "$PKG_CONFIG" && \
63440    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63441  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63442  ac_status=$?
63443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63444  test $ac_status = 0; }; then
63445  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63446else
63447  pkg_failed=yes
63448fi
63449 else
63450    pkg_failed=untried
63451fi
63452if test -n "$LCMS_LIBS"; then
63453    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63454 elif test -n "$PKG_CONFIG"; then
63455    if test -n "$PKG_CONFIG" && \
63456    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63457  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63458  ac_status=$?
63459  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63460  test $ac_status = 0; }; then
63461  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63462else
63463  pkg_failed=yes
63464fi
63465 else
63466    pkg_failed=untried
63467fi
63468
63469
63470
63471if test $pkg_failed = yes; then
63472
63473if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63474        _pkg_short_errors_supported=yes
63475else
63476        _pkg_short_errors_supported=no
63477fi
63478        if test $_pkg_short_errors_supported = yes; then
63479	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63480        else
63481	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63482        fi
63483	# Put the nasty error message in config.log where it belongs
63484	echo "$LCMS_PKG_ERRORS" >&5
63485
63486	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63487$as_echo "no" >&6; }
63488                LCMS_FOUND=no
63489elif test $pkg_failed = untried; then
63490	LCMS_FOUND=no
63491else
63492	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63493	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63495$as_echo "yes" >&6; }
63496	LCMS_FOUND=yes
63497fi
63498    if test "x${LCMS_FOUND}" = "xyes"; then
63499      USE_EXTERNAL_LCMS=true
63500    else
63501      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63502    fi
63503  else
63504    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63505  fi
63506
63507
63508
63509
63510
63511
63512
63513
63514
63515
63516
63517  # Setup libm (the maths library)
63518  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63520$as_echo_n "checking for cos in -lm... " >&6; }
63521if ${ac_cv_lib_m_cos+:} false; then :
63522  $as_echo_n "(cached) " >&6
63523else
63524  ac_check_lib_save_LIBS=$LIBS
63525LIBS="-lm  $LIBS"
63526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63527/* end confdefs.h.  */
63528
63529/* Override any GCC internal prototype to avoid an error.
63530   Use char because int might match the return type of a GCC
63531   builtin and then its argument prototype would still apply.  */
63532#ifdef __cplusplus
63533extern "C"
63534#endif
63535char cos ();
63536int
63537main ()
63538{
63539return cos ();
63540  ;
63541  return 0;
63542}
63543_ACEOF
63544if ac_fn_cxx_try_link "$LINENO"; then :
63545  ac_cv_lib_m_cos=yes
63546else
63547  ac_cv_lib_m_cos=no
63548fi
63549rm -f core conftest.err conftest.$ac_objext \
63550    conftest$ac_exeext conftest.$ac_ext
63551LIBS=$ac_check_lib_save_LIBS
63552fi
63553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63554$as_echo "$ac_cv_lib_m_cos" >&6; }
63555if test "x$ac_cv_lib_m_cos" = xyes; then :
63556  cat >>confdefs.h <<_ACEOF
63557#define HAVE_LIBM 1
63558_ACEOF
63559
63560  LIBS="-lm $LIBS"
63561
63562else
63563
63564        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63565$as_echo "$as_me: Maths library was not found" >&6;}
63566
63567fi
63568
63569    LIBM="-lm"
63570  else
63571    LIBM=""
63572  fi
63573
63574
63575  # Setup libdl (for dynamic library loading)
63576  save_LIBS="$LIBS"
63577  LIBS=""
63578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63579$as_echo_n "checking for dlopen in -ldl... " >&6; }
63580if ${ac_cv_lib_dl_dlopen+:} false; then :
63581  $as_echo_n "(cached) " >&6
63582else
63583  ac_check_lib_save_LIBS=$LIBS
63584LIBS="-ldl  $LIBS"
63585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63586/* end confdefs.h.  */
63587
63588/* Override any GCC internal prototype to avoid an error.
63589   Use char because int might match the return type of a GCC
63590   builtin and then its argument prototype would still apply.  */
63591#ifdef __cplusplus
63592extern "C"
63593#endif
63594char dlopen ();
63595int
63596main ()
63597{
63598return dlopen ();
63599  ;
63600  return 0;
63601}
63602_ACEOF
63603if ac_fn_cxx_try_link "$LINENO"; then :
63604  ac_cv_lib_dl_dlopen=yes
63605else
63606  ac_cv_lib_dl_dlopen=no
63607fi
63608rm -f core conftest.err conftest.$ac_objext \
63609    conftest$ac_exeext conftest.$ac_ext
63610LIBS=$ac_check_lib_save_LIBS
63611fi
63612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63613$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63614if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63615  cat >>confdefs.h <<_ACEOF
63616#define HAVE_LIBDL 1
63617_ACEOF
63618
63619  LIBS="-ldl $LIBS"
63620
63621fi
63622
63623  LIBDL="$LIBS"
63624
63625  LIBS="$save_LIBS"
63626
63627  # Deprecated libraries, keep the flags for backwards compatibility
63628  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63629
63630
63631# Check whether --with-dxsdk was given.
63632if test "${with_dxsdk+set}" = set; then :
63633  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63634$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63635fi
63636
63637
63638
63639
63640# Check whether --with-dxsdk-lib was given.
63641if test "${with_dxsdk_lib+set}" = set; then :
63642  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63643$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63644fi
63645
63646
63647
63648
63649# Check whether --with-dxsdk-include was given.
63650if test "${with_dxsdk_include+set}" = set; then :
63651  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63652$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63653fi
63654
63655
63656  fi
63657
63658  # Control if libzip can use mmap. Available for purposes of overriding.
63659  LIBZIP_CAN_USE_MMAP=true
63660
63661
63662
63663  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63664    # Find the root of the Solaris Studio installation from the compiler path
63665    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63666    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63668$as_echo_n "checking for libstlport.so.1... " >&6; }
63669    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63670      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63671      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63672    fi
63673    if test -f "$STLPORT_LIB"; then
63674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63675$as_echo "yes, $STLPORT_LIB" >&6; }
63676
63677  # Only process if variable expands to non-empty
63678
63679  if test "x$STLPORT_LIB" != x; then
63680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63681
63682  # Input might be given as Windows format, start by converting to
63683  # unix format.
63684  path="$STLPORT_LIB"
63685  new_path=`$CYGPATH -u "$path"`
63686
63687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63690  # "foo.exe" is OK but "foo" is an error.
63691  #
63692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63693  # It is also a way to make sure we got the proper file name for the real test later on.
63694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63695  if test "x$test_shortpath" = x; then
63696    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63697$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63698    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63699  fi
63700
63701  # Call helper function which possibly converts this using DOS-style short mode.
63702  # If so, the updated path is stored in $new_path.
63703
63704  input_path="$new_path"
63705  # Check if we need to convert this using DOS-style short mode. If the path
63706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63707  # take no chances and rewrite it.
63708  # Note: m4 eats our [], so we need to use [ and ] instead.
63709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63710  if test "x$has_forbidden_chars" != x; then
63711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63715      # Going to short mode and back again did indeed matter. Since short mode is
63716      # case insensitive, let's make it lowercase to improve readability.
63717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63718      # Now convert it back to Unix-style (cygpath)
63719      input_path=`$CYGPATH -u "$shortmode_path"`
63720      new_path="$input_path"
63721    fi
63722  fi
63723
63724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63725  if test "x$test_cygdrive_prefix" = x; then
63726    # As a simple fix, exclude /usr/bin since it's not a real path.
63727    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63729      # a path prefixed by /cygdrive for fixpath to work.
63730      new_path="$CYGWIN_ROOT_PATH$input_path"
63731    fi
63732  fi
63733
63734
63735  if test "x$path" != "x$new_path"; then
63736    STLPORT_LIB="$new_path"
63737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63738$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63739  fi
63740
63741    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63742
63743  path="$STLPORT_LIB"
63744  has_colon=`$ECHO $path | $GREP ^.:`
63745  new_path="$path"
63746  if test "x$has_colon" = x; then
63747    # Not in mixed or Windows style, start by that.
63748    new_path=`cmd //c echo $path`
63749  fi
63750
63751
63752  input_path="$new_path"
63753  # Check if we need to convert this using DOS-style short mode. If the path
63754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63755  # take no chances and rewrite it.
63756  # Note: m4 eats our [], so we need to use [ and ] instead.
63757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63758  if test "x$has_forbidden_chars" != x; then
63759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63761  fi
63762
63763
63764  windows_path="$new_path"
63765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63766    unix_path=`$CYGPATH -u "$windows_path"`
63767    new_path="$unix_path"
63768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63770    new_path="$unix_path"
63771  fi
63772
63773  if test "x$path" != "x$new_path"; then
63774    STLPORT_LIB="$new_path"
63775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63776$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63777  fi
63778
63779  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63780  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63781
63782    else
63783      # We're on a unix platform. Hooray! :)
63784      path="$STLPORT_LIB"
63785      has_space=`$ECHO "$path" | $GREP " "`
63786      if test "x$has_space" != x; then
63787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63788$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63789        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63790      fi
63791
63792      # Use eval to expand a potential ~
63793      eval path="$path"
63794      if test ! -f "$path" && test ! -d "$path"; then
63795        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63796      fi
63797
63798      if test -d "$path"; then
63799        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63800      else
63801        dir="`$DIRNAME "$path"`"
63802        base="`$BASENAME "$path"`"
63803        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63804      fi
63805    fi
63806  fi
63807
63808    else
63809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63810$as_echo "no, not found at $STLPORT_LIB" >&6; }
63811      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63812    fi
63813
63814  fi
63815
63816
63817
63818
63819
63820
63821
63822
63823
63824
63825
63826
63827
63828
63829###############################################################################
63830#
63831# We need to do some final tweaking, when everything else is done.
63832#
63833###############################################################################
63834
63835
63836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63837$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63838
63839  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63840    ENABLE_INTREE_EC=yes
63841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63842$as_echo "yes" >&6; }
63843  else
63844    ENABLE_INTREE_EC=no
63845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63846$as_echo "no" >&6; }
63847  fi
63848
63849
63850
63851
63852  # Check whether --enable-jtreg-failure-handler was given.
63853if test "${enable_jtreg_failure_handler+set}" = set; then :
63854  enableval=$enable_jtreg_failure_handler;
63855fi
63856
63857
63858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63859$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63860
63861  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63862    if test "x$JT_HOME" = "x"; then
63863      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63864    else
63865      BUILD_FAILURE_HANDLER=true
63866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63867$as_echo "yes, forced" >&6; }
63868    fi
63869  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63870    BUILD_FAILURE_HANDLER=false
63871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63872$as_echo "no, forced" >&6; }
63873  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63874      || test "x$enable_jtreg_failure_handler" = "x"; then
63875    if test "x$JT_HOME" = "x"; then
63876      BUILD_FAILURE_HANDLER=false
63877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63878$as_echo "no, missing jtreg" >&6; }
63879    else
63880      BUILD_FAILURE_HANDLER=true
63881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63882$as_echo "yes, jtreg present" >&6; }
63883    fi
63884  else
63885    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63886  fi
63887
63888
63889
63890
63891  # Check whether --enable-generate-classlist was given.
63892if test "${enable_generate_classlist+set}" = set; then :
63893  enableval=$enable_generate_classlist;
63894fi
63895
63896
63897  # Check if it's likely that it's possible to generate the classlist. Depending
63898  # on exact jvm configuration it could be possible anyway.
63899  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63900    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63901  else
63902    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63903  fi
63904
63905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63906$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63907  if test "x$enable_generate_classlist" = "xyes"; then
63908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63909$as_echo "yes, forced" >&6; }
63910    ENABLE_GENERATE_CLASSLIST="true"
63911    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63912      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63913$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63914    fi
63915  elif test "x$enable_generate_classlist" = "xno"; then
63916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63917$as_echo "no, forced" >&6; }
63918    ENABLE_GENERATE_CLASSLIST="false"
63919  elif test "x$enable_generate_classlist" = "x"; then
63920    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63922$as_echo "yes" >&6; }
63923      ENABLE_GENERATE_CLASSLIST="true"
63924    else
63925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63926$as_echo "no" >&6; }
63927      ENABLE_GENERATE_CLASSLIST="false"
63928    fi
63929  else
63930    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63931  fi
63932
63933
63934
63935
63936###############################################################################
63937#
63938# Configure parts of the build that only affect the build performance,
63939# not the result.
63940#
63941###############################################################################
63942
63943
63944  # How many cores do we have on this build system?
63945
63946# Check whether --with-num-cores was given.
63947if test "${with_num_cores+set}" = set; then :
63948  withval=$with_num_cores;
63949fi
63950
63951  if test "x$with_num_cores" = x; then
63952    # The number of cores were not specified, try to probe them.
63953
63954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63955$as_echo_n "checking for number of cores... " >&6; }
63956  NUM_CORES=1
63957  FOUND_CORES=no
63958
63959  if test -f /proc/cpuinfo; then
63960    # Looks like a Linux (or cygwin) system
63961    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63962    FOUND_CORES=yes
63963  elif test -x /usr/sbin/psrinfo; then
63964    # Looks like a Solaris system
63965    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63966    FOUND_CORES=yes
63967  elif test -x /usr/sbin/sysctl; then
63968    # Looks like a MacOSX system
63969    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63970    FOUND_CORES=yes
63971  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63972    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63973    FOUND_CORES=yes
63974  elif test -n "$NUMBER_OF_PROCESSORS"; then
63975    # On windows, look in the env
63976    NUM_CORES=$NUMBER_OF_PROCESSORS
63977    FOUND_CORES=yes
63978  fi
63979
63980  if test "x$FOUND_CORES" = xyes; then
63981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63982$as_echo "$NUM_CORES" >&6; }
63983  else
63984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63985$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63986    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63987$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63988  fi
63989
63990  else
63991    NUM_CORES=$with_num_cores
63992  fi
63993
63994
63995
63996  # How much memory do we have on this build system?
63997
63998# Check whether --with-memory-size was given.
63999if test "${with_memory_size+set}" = set; then :
64000  withval=$with_memory_size;
64001fi
64002
64003  if test "x$with_memory_size" = x; then
64004    # The memory size was not specified, try to probe it.
64005
64006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64007$as_echo_n "checking for memory size... " >&6; }
64008  # Default to 1024 MB
64009  MEMORY_SIZE=1024
64010  FOUND_MEM=no
64011
64012  if test -f /proc/meminfo; then
64013    # Looks like a Linux (or cygwin) system
64014    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64015    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64016    FOUND_MEM=yes
64017  elif test -x /usr/sbin/prtconf; then
64018    # Looks like a Solaris or AIX system
64019    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64020    FOUND_MEM=yes
64021  elif test -x /usr/sbin/sysctl; then
64022    # Looks like a MacOSX system
64023    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64024    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64025    FOUND_MEM=yes
64026  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64027    # Windows, but without cygwin
64028    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64029    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64030    FOUND_MEM=yes
64031  fi
64032
64033  if test "x$FOUND_MEM" = xyes; then
64034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64035$as_echo "$MEMORY_SIZE MB" >&6; }
64036  else
64037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64038$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64039    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64040$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64041  fi
64042
64043  else
64044    MEMORY_SIZE=$with_memory_size
64045  fi
64046
64047
64048
64049  # Provide a decent default number of parallel jobs for make depending on
64050  # number of cores, amount of memory and machine architecture.
64051
64052# Check whether --with-jobs was given.
64053if test "${with_jobs+set}" = set; then :
64054  withval=$with_jobs;
64055fi
64056
64057  if test "x$with_jobs" = x; then
64058    # Number of jobs was not specified, calculate.
64059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64060$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64061    # Approximate memory in GB.
64062    memory_gb=`expr $MEMORY_SIZE / 1024`
64063    # Pick the lowest of memory in gb and number of cores.
64064    if test "$memory_gb" -lt "$NUM_CORES"; then
64065      JOBS="$memory_gb"
64066    else
64067      JOBS="$NUM_CORES"
64068    fi
64069    if test "$JOBS" -eq "0"; then
64070      JOBS=1
64071    fi
64072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64073$as_echo "$JOBS" >&6; }
64074  else
64075    JOBS=$with_jobs
64076  fi
64077
64078
64079
64080  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64081
64082# Check whether --with-test-jobs was given.
64083if test "${with_test_jobs+set}" = set; then :
64084  withval=$with_test_jobs;
64085fi
64086
64087  if test "x$with_test_jobs" = x; then
64088      TEST_JOBS=0
64089  else
64090      TEST_JOBS=$with_test_jobs
64091  fi
64092
64093
64094
64095# Setup arguments for the boot jdk (after cores and memory have been setup)
64096
64097  ##############################################################################
64098  #
64099  # Specify jvm options for anything that is run with the Boot JDK.
64100  # Not all JVM:s accept the same arguments on the command line.
64101  #
64102
64103# Check whether --with-boot-jdk-jvmargs was given.
64104if test "${with_boot_jdk_jvmargs+set}" = set; then :
64105  withval=$with_boot_jdk_jvmargs;
64106fi
64107
64108
64109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64110$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64111
64112  # Disable special log output when a debug build is used as Boot JDK...
64113
64114  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64115  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64116  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64117  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64118  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64119  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64120    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64121    JVM_ARG_OK=true
64122  else
64123    $ECHO "Arg failed:" >&5
64124    $ECHO "$OUTPUT" >&5
64125    JVM_ARG_OK=false
64126  fi
64127
64128
64129  # Force en-US environment
64130
64131  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64132  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64133  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64134  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64135  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64136  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64137    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64138    JVM_ARG_OK=true
64139  else
64140    $ECHO "Arg failed:" >&5
64141    $ECHO "$OUTPUT" >&5
64142    JVM_ARG_OK=false
64143  fi
64144
64145
64146  # Apply user provided options.
64147
64148  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64149  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64150  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64151  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64152  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64153  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64154    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64155    JVM_ARG_OK=true
64156  else
64157    $ECHO "Arg failed:" >&5
64158    $ECHO "$OUTPUT" >&5
64159    JVM_ARG_OK=false
64160  fi
64161
64162
64163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64164$as_echo "$boot_jdk_jvmargs" >&6; }
64165
64166  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64167  JAVA_FLAGS=$boot_jdk_jvmargs
64168
64169
64170
64171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64172$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64173
64174  # Starting amount of heap memory.
64175
64176  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64177  $ECHO "Command: $JAVA -Xms64M -version" >&5
64178  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64179  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64180  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64181  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64182    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64183    JVM_ARG_OK=true
64184  else
64185    $ECHO "Arg failed:" >&5
64186    $ECHO "$OUTPUT" >&5
64187    JVM_ARG_OK=false
64188  fi
64189
64190  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64191
64192  # Maximum amount of heap memory and stack size.
64193  JVM_HEAP_LIMIT_32="1024"
64194  # Running a 64 bit JVM allows for and requires a bigger heap
64195  JVM_HEAP_LIMIT_64="1600"
64196  STACK_SIZE_32=768
64197  STACK_SIZE_64=1536
64198  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64199  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64200    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64201  fi
64202  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64203    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64204  fi
64205  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64206    JVM_HEAP_LIMIT_32=512
64207    JVM_HEAP_LIMIT_64=512
64208  fi
64209
64210  if test "x$BOOT_JDK_BITS" = "x32"; then
64211    STACK_SIZE=$STACK_SIZE_32
64212    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64213  else
64214    STACK_SIZE=$STACK_SIZE_64
64215    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64216  fi
64217
64218  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64219  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64220  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64221  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64222  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64223  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64224    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64225    JVM_ARG_OK=true
64226  else
64227    $ECHO "Arg failed:" >&5
64228    $ECHO "$OUTPUT" >&5
64229    JVM_ARG_OK=false
64230  fi
64231
64232
64233  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64234  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64235  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64236  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64237  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64238  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64239    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64240    JVM_ARG_OK=true
64241  else
64242    $ECHO "Arg failed:" >&5
64243    $ECHO "$OUTPUT" >&5
64244    JVM_ARG_OK=false
64245  fi
64246
64247
64248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64249$as_echo "$boot_jdk_jvmargs_big" >&6; }
64250
64251  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64252
64253
64254  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64255    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64256    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64257  else
64258    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64259    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64260  fi
64261  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64262  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64264$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64266$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64267
64268
64269  # By default, the main javac compilations use big
64270  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64271
64272
64273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64274$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64275
64276  # Use serial gc for small short lived tools if possible
64277
64278  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64279  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64280  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64281  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64282  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64283  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64284    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64285    JVM_ARG_OK=true
64286  else
64287    $ECHO "Arg failed:" >&5
64288    $ECHO "$OUTPUT" >&5
64289    JVM_ARG_OK=false
64290  fi
64291
64292
64293  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64294  $ECHO "Command: $JAVA -Xms32M -version" >&5
64295  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64296  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64297  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64298  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64299    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64300    JVM_ARG_OK=true
64301  else
64302    $ECHO "Arg failed:" >&5
64303    $ECHO "$OUTPUT" >&5
64304    JVM_ARG_OK=false
64305  fi
64306
64307
64308  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64309  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64310  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64311  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64312  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64313  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64314    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64315    JVM_ARG_OK=true
64316  else
64317    $ECHO "Arg failed:" >&5
64318    $ECHO "$OUTPUT" >&5
64319    JVM_ARG_OK=false
64320  fi
64321
64322
64323  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64324  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64325  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64326  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64327  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64328  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64329    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64330    JVM_ARG_OK=true
64331  else
64332    $ECHO "Arg failed:" >&5
64333    $ECHO "$OUTPUT" >&5
64334    JVM_ARG_OK=false
64335  fi
64336
64337
64338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64339$as_echo "$boot_jdk_jvmargs_small" >&6; }
64340
64341  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64342
64343
64344  JAVA_TOOL_FLAGS_SMALL=""
64345  for f in $JAVA_FLAGS_SMALL; do
64346    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64347  done
64348
64349
64350
64351# Setup smart javac (after cores and memory have been setup)
64352
64353
64354# Check whether --with-sjavac-server-java was given.
64355if test "${with_sjavac_server_java+set}" = set; then :
64356  withval=$with_sjavac_server_java;
64357fi
64358
64359
64360  if test "x$with_sjavac_server_java" != x; then
64361    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64362    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64363    if test "x$FOUND_VERSION" = x; then
64364      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64365    fi
64366  else
64367    SJAVAC_SERVER_JAVA="$JAVA"
64368  fi
64369
64370
64371  if test "$MEMORY_SIZE" -gt "3000"; then
64372
64373  $ECHO "Check if jvm arg is ok: -d64" >&5
64374  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64375  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64376  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64377  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64378  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64379    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64380    JVM_ARG_OK=true
64381  else
64382    $ECHO "Arg failed:" >&5
64383    $ECHO "$OUTPUT" >&5
64384    JVM_ARG_OK=false
64385  fi
64386
64387    if test "$JVM_ARG_OK" = true; then
64388      JVM_64BIT=true
64389      JVM_ARG_OK=false
64390    fi
64391  fi
64392
64393  MX_VALUE=`expr $MEMORY_SIZE / 2`
64394  if test "$JVM_64BIT" = true; then
64395    # Set ms lower than mx since more than one instance of the server might
64396    # get launched at the same time before they figure out which instance won.
64397    MS_VALUE=512
64398    if test "$MX_VALUE" -gt "2048"; then
64399      MX_VALUE=2048
64400    fi
64401  else
64402    MS_VALUE=256
64403    if test "$MX_VALUE" -gt "1500"; then
64404      MX_VALUE=1500
64405    fi
64406  fi
64407  if test "$MX_VALUE" -lt "512"; then
64408    MX_VALUE=512
64409  fi
64410
64411  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64412  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64413  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64414  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64415  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64416  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64417    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64418    JVM_ARG_OK=true
64419  else
64420    $ECHO "Arg failed:" >&5
64421    $ECHO "$OUTPUT" >&5
64422    JVM_ARG_OK=false
64423  fi
64424
64425
64426
64427  # Check whether --enable-sjavac was given.
64428if test "${enable_sjavac+set}" = set; then :
64429  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64430else
64431  ENABLE_SJAVAC="no"
64432fi
64433
64434  if test "x$JVM_ARG_OK" = "xfalse"; then
64435    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64436$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64437    ENABLE_SJAVAC="no"
64438  fi
64439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64440$as_echo_n "checking whether to use sjavac... " >&6; }
64441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64442$as_echo "$ENABLE_SJAVAC" >&6; }
64443
64444
64445  # Check whether --enable-javac-server was given.
64446if test "${enable_javac_server+set}" = set; then :
64447  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64448else
64449  ENABLE_JAVAC_SERVER="yes"
64450fi
64451
64452  if test "x$JVM_ARG_OK" = "xfalse"; then
64453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64454$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64455    ENABLE_JAVAC_SERVER="no"
64456  fi
64457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64458$as_echo_n "checking whether to use javac server... " >&6; }
64459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64460$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64461
64462
64463  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64464    # When using a server javac, the small client instances do not need much
64465    # resources.
64466    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64467  fi
64468
64469
64470# Setup use of icecc if requested
64471
64472  # Check whether --enable-icecc was given.
64473if test "${enable_icecc+set}" = set; then :
64474  enableval=$enable_icecc;
64475fi
64476
64477
64478  if test "x${enable_icecc}" = "xyes"; then
64479
64480
64481
64482  # Publish this variable in the help.
64483
64484
64485  if [ -z "${ICECC_CMD+x}" ]; then
64486    # The variable is not set by user, try to locate tool using the code snippet
64487    for ac_prog in icecc
64488do
64489  # Extract the first word of "$ac_prog", so it can be a program name with args.
64490set dummy $ac_prog; ac_word=$2
64491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64492$as_echo_n "checking for $ac_word... " >&6; }
64493if ${ac_cv_path_ICECC_CMD+:} false; then :
64494  $as_echo_n "(cached) " >&6
64495else
64496  case $ICECC_CMD in
64497  [\\/]* | ?:[\\/]*)
64498  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64499  ;;
64500  *)
64501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64502for as_dir in $PATH
64503do
64504  IFS=$as_save_IFS
64505  test -z "$as_dir" && as_dir=.
64506    for ac_exec_ext in '' $ac_executable_extensions; do
64507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64508    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64510    break 2
64511  fi
64512done
64513  done
64514IFS=$as_save_IFS
64515
64516  ;;
64517esac
64518fi
64519ICECC_CMD=$ac_cv_path_ICECC_CMD
64520if test -n "$ICECC_CMD"; then
64521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64522$as_echo "$ICECC_CMD" >&6; }
64523else
64524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64525$as_echo "no" >&6; }
64526fi
64527
64528
64529  test -n "$ICECC_CMD" && break
64530done
64531
64532  else
64533    # The variable is set, but is it from the command line or the environment?
64534
64535    # Try to remove the string !ICECC_CMD! from our list.
64536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64538      # If it failed, the variable was not from the command line. Ignore it,
64539      # but warn the user (except for BASH, which is always set by the calling BASH).
64540      if test "xICECC_CMD" != xBASH; then
64541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64542$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64543      fi
64544      # Try to locate tool using the code snippet
64545      for ac_prog in icecc
64546do
64547  # Extract the first word of "$ac_prog", so it can be a program name with args.
64548set dummy $ac_prog; ac_word=$2
64549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64550$as_echo_n "checking for $ac_word... " >&6; }
64551if ${ac_cv_path_ICECC_CMD+:} false; then :
64552  $as_echo_n "(cached) " >&6
64553else
64554  case $ICECC_CMD in
64555  [\\/]* | ?:[\\/]*)
64556  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64557  ;;
64558  *)
64559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64560for as_dir in $PATH
64561do
64562  IFS=$as_save_IFS
64563  test -z "$as_dir" && as_dir=.
64564    for ac_exec_ext in '' $ac_executable_extensions; do
64565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64566    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64568    break 2
64569  fi
64570done
64571  done
64572IFS=$as_save_IFS
64573
64574  ;;
64575esac
64576fi
64577ICECC_CMD=$ac_cv_path_ICECC_CMD
64578if test -n "$ICECC_CMD"; then
64579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64580$as_echo "$ICECC_CMD" >&6; }
64581else
64582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64583$as_echo "no" >&6; }
64584fi
64585
64586
64587  test -n "$ICECC_CMD" && break
64588done
64589
64590    else
64591      # If it succeeded, then it was overridden by the user. We will use it
64592      # for the tool.
64593
64594      # First remove it from the list of overridden variables, so we can test
64595      # for unknown variables in the end.
64596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64597
64598      # Check if we try to supply an empty value
64599      if test "x$ICECC_CMD" = x; then
64600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64601$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64603$as_echo_n "checking for ICECC_CMD... " >&6; }
64604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64605$as_echo "disabled" >&6; }
64606      else
64607        # Check if the provided tool contains a complete path.
64608        tool_specified="$ICECC_CMD"
64609        tool_basename="${tool_specified##*/}"
64610        if test "x$tool_basename" = "x$tool_specified"; then
64611          # A command without a complete path is provided, search $PATH.
64612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64613$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64614          # Extract the first word of "$tool_basename", so it can be a program name with args.
64615set dummy $tool_basename; ac_word=$2
64616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64617$as_echo_n "checking for $ac_word... " >&6; }
64618if ${ac_cv_path_ICECC_CMD+:} false; then :
64619  $as_echo_n "(cached) " >&6
64620else
64621  case $ICECC_CMD in
64622  [\\/]* | ?:[\\/]*)
64623  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64624  ;;
64625  *)
64626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64627for as_dir in $PATH
64628do
64629  IFS=$as_save_IFS
64630  test -z "$as_dir" && as_dir=.
64631    for ac_exec_ext in '' $ac_executable_extensions; do
64632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64633    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64635    break 2
64636  fi
64637done
64638  done
64639IFS=$as_save_IFS
64640
64641  ;;
64642esac
64643fi
64644ICECC_CMD=$ac_cv_path_ICECC_CMD
64645if test -n "$ICECC_CMD"; then
64646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64647$as_echo "$ICECC_CMD" >&6; }
64648else
64649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64650$as_echo "no" >&6; }
64651fi
64652
64653
64654          if test "x$ICECC_CMD" = x; then
64655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64656          fi
64657        else
64658          # Otherwise we believe it is a complete path. Use it as it is.
64659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64660$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64662$as_echo_n "checking for ICECC_CMD... " >&6; }
64663          if test ! -x "$tool_specified"; then
64664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64665$as_echo "not found" >&6; }
64666            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64667          fi
64668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64669$as_echo "$tool_specified" >&6; }
64670        fi
64671      fi
64672    fi
64673
64674  fi
64675
64676
64677
64678  if test "x$ICECC_CMD" = x; then
64679    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64680  fi
64681
64682
64683    old_path="$PATH"
64684
64685    # Look for icecc-create-env in some known places
64686    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64687
64688
64689
64690  # Publish this variable in the help.
64691
64692
64693  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64694    # The variable is not set by user, try to locate tool using the code snippet
64695    for ac_prog in icecc-create-env
64696do
64697  # Extract the first word of "$ac_prog", so it can be a program name with args.
64698set dummy $ac_prog; ac_word=$2
64699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64700$as_echo_n "checking for $ac_word... " >&6; }
64701if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64702  $as_echo_n "(cached) " >&6
64703else
64704  case $ICECC_CREATE_ENV in
64705  [\\/]* | ?:[\\/]*)
64706  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64707  ;;
64708  *)
64709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64710for as_dir in $PATH
64711do
64712  IFS=$as_save_IFS
64713  test -z "$as_dir" && as_dir=.
64714    for ac_exec_ext in '' $ac_executable_extensions; do
64715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64716    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64718    break 2
64719  fi
64720done
64721  done
64722IFS=$as_save_IFS
64723
64724  ;;
64725esac
64726fi
64727ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64728if test -n "$ICECC_CREATE_ENV"; then
64729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64730$as_echo "$ICECC_CREATE_ENV" >&6; }
64731else
64732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64733$as_echo "no" >&6; }
64734fi
64735
64736
64737  test -n "$ICECC_CREATE_ENV" && break
64738done
64739
64740  else
64741    # The variable is set, but is it from the command line or the environment?
64742
64743    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64746      # If it failed, the variable was not from the command line. Ignore it,
64747      # but warn the user (except for BASH, which is always set by the calling BASH).
64748      if test "xICECC_CREATE_ENV" != xBASH; then
64749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64750$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64751      fi
64752      # Try to locate tool using the code snippet
64753      for ac_prog in icecc-create-env
64754do
64755  # Extract the first word of "$ac_prog", so it can be a program name with args.
64756set dummy $ac_prog; ac_word=$2
64757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64758$as_echo_n "checking for $ac_word... " >&6; }
64759if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64760  $as_echo_n "(cached) " >&6
64761else
64762  case $ICECC_CREATE_ENV in
64763  [\\/]* | ?:[\\/]*)
64764  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64765  ;;
64766  *)
64767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64768for as_dir in $PATH
64769do
64770  IFS=$as_save_IFS
64771  test -z "$as_dir" && as_dir=.
64772    for ac_exec_ext in '' $ac_executable_extensions; do
64773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64774    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64776    break 2
64777  fi
64778done
64779  done
64780IFS=$as_save_IFS
64781
64782  ;;
64783esac
64784fi
64785ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64786if test -n "$ICECC_CREATE_ENV"; then
64787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64788$as_echo "$ICECC_CREATE_ENV" >&6; }
64789else
64790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64791$as_echo "no" >&6; }
64792fi
64793
64794
64795  test -n "$ICECC_CREATE_ENV" && break
64796done
64797
64798    else
64799      # If it succeeded, then it was overridden by the user. We will use it
64800      # for the tool.
64801
64802      # First remove it from the list of overridden variables, so we can test
64803      # for unknown variables in the end.
64804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64805
64806      # Check if we try to supply an empty value
64807      if test "x$ICECC_CREATE_ENV" = x; then
64808        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64809$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64811$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64813$as_echo "disabled" >&6; }
64814      else
64815        # Check if the provided tool contains a complete path.
64816        tool_specified="$ICECC_CREATE_ENV"
64817        tool_basename="${tool_specified##*/}"
64818        if test "x$tool_basename" = "x$tool_specified"; then
64819          # A command without a complete path is provided, search $PATH.
64820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64821$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64822          # Extract the first word of "$tool_basename", so it can be a program name with args.
64823set dummy $tool_basename; ac_word=$2
64824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64825$as_echo_n "checking for $ac_word... " >&6; }
64826if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64827  $as_echo_n "(cached) " >&6
64828else
64829  case $ICECC_CREATE_ENV in
64830  [\\/]* | ?:[\\/]*)
64831  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64832  ;;
64833  *)
64834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64835for as_dir in $PATH
64836do
64837  IFS=$as_save_IFS
64838  test -z "$as_dir" && as_dir=.
64839    for ac_exec_ext in '' $ac_executable_extensions; do
64840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64841    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64843    break 2
64844  fi
64845done
64846  done
64847IFS=$as_save_IFS
64848
64849  ;;
64850esac
64851fi
64852ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64853if test -n "$ICECC_CREATE_ENV"; then
64854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64855$as_echo "$ICECC_CREATE_ENV" >&6; }
64856else
64857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64858$as_echo "no" >&6; }
64859fi
64860
64861
64862          if test "x$ICECC_CREATE_ENV" = x; then
64863            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64864          fi
64865        else
64866          # Otherwise we believe it is a complete path. Use it as it is.
64867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64868$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64869          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64870$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64871          if test ! -x "$tool_specified"; then
64872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64873$as_echo "not found" >&6; }
64874            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64875          fi
64876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64877$as_echo "$tool_specified" >&6; }
64878        fi
64879      fi
64880    fi
64881
64882  fi
64883
64884
64885
64886  if test "x$ICECC_CREATE_ENV" = x; then
64887    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64888  fi
64889
64890
64891    # Use icecc-create-env to create a minimal compilation environment that can
64892    # be sent to the other hosts in the icecream cluster.
64893    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64894    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64895    # Older versions of icecc does not have the --gcc parameter
64896    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64897      icecc_gcc_arg="--gcc"
64898    fi
64899    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64900
64901  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64902      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64903          ${icecc_create_env_log} 2>&1 )
64904  if test "$?" != "0"; then
64905    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64906$as_echo "$as_me: icecc-create-env output:" >&6;}
64907    cat \
64908          ${icecc_create_env_log}
64909    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64910  fi
64911
64912    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64913      # For clang, the icecc compilerwrapper is needed. It usually resides next
64914      # to icecc-create-env.
64915
64916
64917
64918  # Publish this variable in the help.
64919
64920
64921  if [ -z "${ICECC_WRAPPER+x}" ]; then
64922    # The variable is not set by user, try to locate tool using the code snippet
64923    for ac_prog in compilerwrapper
64924do
64925  # Extract the first word of "$ac_prog", so it can be a program name with args.
64926set dummy $ac_prog; ac_word=$2
64927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64928$as_echo_n "checking for $ac_word... " >&6; }
64929if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64930  $as_echo_n "(cached) " >&6
64931else
64932  case $ICECC_WRAPPER in
64933  [\\/]* | ?:[\\/]*)
64934  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64935  ;;
64936  *)
64937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64938for as_dir in $PATH
64939do
64940  IFS=$as_save_IFS
64941  test -z "$as_dir" && as_dir=.
64942    for ac_exec_ext in '' $ac_executable_extensions; do
64943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64944    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64946    break 2
64947  fi
64948done
64949  done
64950IFS=$as_save_IFS
64951
64952  ;;
64953esac
64954fi
64955ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64956if test -n "$ICECC_WRAPPER"; then
64957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64958$as_echo "$ICECC_WRAPPER" >&6; }
64959else
64960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64961$as_echo "no" >&6; }
64962fi
64963
64964
64965  test -n "$ICECC_WRAPPER" && break
64966done
64967
64968  else
64969    # The variable is set, but is it from the command line or the environment?
64970
64971    # Try to remove the string !ICECC_WRAPPER! from our list.
64972    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64973    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64974      # If it failed, the variable was not from the command line. Ignore it,
64975      # but warn the user (except for BASH, which is always set by the calling BASH).
64976      if test "xICECC_WRAPPER" != xBASH; then
64977        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64978$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64979      fi
64980      # Try to locate tool using the code snippet
64981      for ac_prog in compilerwrapper
64982do
64983  # Extract the first word of "$ac_prog", so it can be a program name with args.
64984set dummy $ac_prog; ac_word=$2
64985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64986$as_echo_n "checking for $ac_word... " >&6; }
64987if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64988  $as_echo_n "(cached) " >&6
64989else
64990  case $ICECC_WRAPPER in
64991  [\\/]* | ?:[\\/]*)
64992  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64993  ;;
64994  *)
64995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64996for as_dir in $PATH
64997do
64998  IFS=$as_save_IFS
64999  test -z "$as_dir" && as_dir=.
65000    for ac_exec_ext in '' $ac_executable_extensions; do
65001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65002    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65004    break 2
65005  fi
65006done
65007  done
65008IFS=$as_save_IFS
65009
65010  ;;
65011esac
65012fi
65013ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65014if test -n "$ICECC_WRAPPER"; then
65015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65016$as_echo "$ICECC_WRAPPER" >&6; }
65017else
65018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65019$as_echo "no" >&6; }
65020fi
65021
65022
65023  test -n "$ICECC_WRAPPER" && break
65024done
65025
65026    else
65027      # If it succeeded, then it was overridden by the user. We will use it
65028      # for the tool.
65029
65030      # First remove it from the list of overridden variables, so we can test
65031      # for unknown variables in the end.
65032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65033
65034      # Check if we try to supply an empty value
65035      if test "x$ICECC_WRAPPER" = x; then
65036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65037$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65039$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65041$as_echo "disabled" >&6; }
65042      else
65043        # Check if the provided tool contains a complete path.
65044        tool_specified="$ICECC_WRAPPER"
65045        tool_basename="${tool_specified##*/}"
65046        if test "x$tool_basename" = "x$tool_specified"; then
65047          # A command without a complete path is provided, search $PATH.
65048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65049$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65050          # Extract the first word of "$tool_basename", so it can be a program name with args.
65051set dummy $tool_basename; ac_word=$2
65052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65053$as_echo_n "checking for $ac_word... " >&6; }
65054if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65055  $as_echo_n "(cached) " >&6
65056else
65057  case $ICECC_WRAPPER in
65058  [\\/]* | ?:[\\/]*)
65059  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65060  ;;
65061  *)
65062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65063for as_dir in $PATH
65064do
65065  IFS=$as_save_IFS
65066  test -z "$as_dir" && as_dir=.
65067    for ac_exec_ext in '' $ac_executable_extensions; do
65068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65069    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65071    break 2
65072  fi
65073done
65074  done
65075IFS=$as_save_IFS
65076
65077  ;;
65078esac
65079fi
65080ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65081if test -n "$ICECC_WRAPPER"; then
65082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65083$as_echo "$ICECC_WRAPPER" >&6; }
65084else
65085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65086$as_echo "no" >&6; }
65087fi
65088
65089
65090          if test "x$ICECC_WRAPPER" = x; then
65091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65092          fi
65093        else
65094          # Otherwise we believe it is a complete path. Use it as it is.
65095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65096$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65098$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65099          if test ! -x "$tool_specified"; then
65100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65101$as_echo "not found" >&6; }
65102            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65103          fi
65104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65105$as_echo "$tool_specified" >&6; }
65106        fi
65107      fi
65108    fi
65109
65110  fi
65111
65112
65113
65114  if test "x$ICECC_WRAPPER" = x; then
65115    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65116  fi
65117
65118
65119
65120  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65121      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65122  if test "$?" != "0"; then
65123    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65124$as_echo "$as_me: icecc-create-env output:" >&6;}
65125    cat ${icecc_create_env_log}
65126    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65127  fi
65128
65129    else
65130      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65131    fi
65132    PATH="$old_path"
65133    # The bundle with the compiler gets a name based on checksums. Parse log file
65134    # to find it.
65135    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65136    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65137    if test ! -f ${ICECC_ENV_BUNDLE}; then
65138      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65139    fi
65140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65141$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65143$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65144    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65145
65146    if test "x${COMPILE_TYPE}" = "xcross"; then
65147      # If cross compiling, create a separate env package for the build compiler
65148      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65149      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65150      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65151
65152  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65153      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65154            ${icecc_create_env_log_build} 2>&1 )
65155  if test "$?" != "0"; then
65156    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65157$as_echo "$as_me: icecc-create-env output:" >&6;}
65158    cat \
65159            ${icecc_create_env_log_build}
65160    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65161  fi
65162
65163      elif test "x${BUILD_CC##*/}" = "xclang"; then
65164
65165  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65166      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65167  if test "$?" != "0"; then
65168    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65169$as_echo "$as_me: icecc-create-env output:" >&6;}
65170    cat ${icecc_create_env_log_build}
65171    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65172  fi
65173
65174      else
65175        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65176      fi
65177      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65178      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65179      if test ! -f ${ICECC_ENV_BUNDLE}; then
65180        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65181      fi
65182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65183$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65185$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65186      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65187          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65188    else
65189      BUILD_ICECC="${ICECC}"
65190    fi
65191
65192
65193  fi
65194
65195
65196# Can the C/C++ compiler use precompiled headers?
65197
65198
65199  ###############################################################################
65200  #
65201  # Can the C/C++ compiler use precompiled headers?
65202  #
65203  # Check whether --enable-precompiled-headers was given.
65204if test "${enable_precompiled_headers+set}" = set; then :
65205  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65206else
65207  ENABLE_PRECOMPH=yes
65208fi
65209
65210
65211  USE_PRECOMPILED_HEADER=1
65212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65213$as_echo_n "checking If precompiled header is enabled... " >&6; }
65214  if test "x$ENABLE_PRECOMPH" = xno; then
65215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65216$as_echo "no, forced" >&6; }
65217    USE_PRECOMPILED_HEADER=0
65218  elif test "x$ICECC" != "x"; then
65219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65220$as_echo "no, does not work effectively with icecc" >&6; }
65221    USE_PRECOMPILED_HEADER=0
65222  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65224$as_echo "no, does not work with Solaris Studio" >&6; }
65225    USE_PRECOMPILED_HEADER=0
65226  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65228$as_echo "no, does not work with xlc" >&6; }
65229    USE_PRECOMPILED_HEADER=0
65230  else
65231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65232$as_echo "yes" >&6; }
65233  fi
65234
65235  if test "x$ENABLE_PRECOMPH" = xyes; then
65236    # Check that the compiler actually supports precomp headers.
65237    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65238      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65239$as_echo_n "checking that precompiled headers work... " >&6; }
65240      echo "int alfa();" > conftest.h
65241      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65242      if test ! -f conftest.hpp.gch; then
65243        USE_PRECOMPILED_HEADER=0
65244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65245$as_echo "no" >&6; }
65246      else
65247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65248$as_echo "yes" >&6; }
65249      fi
65250      $RM conftest.h conftest.hpp.gch
65251    fi
65252  fi
65253
65254
65255
65256
65257# Setup use of ccache, if available
65258
65259  # Check whether --enable-ccache was given.
65260if test "${enable_ccache+set}" = set; then :
65261  enableval=$enable_ccache;
65262fi
65263
65264
65265  CCACHE_STATUS=
65266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65267$as_echo_n "checking is ccache enabled... " >&6; }
65268  if test "x$enable_ccache" = xyes; then
65269    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65271$as_echo "yes" >&6; }
65272      OLD_PATH="$PATH"
65273      if test "x$TOOLCHAIN_PATH" != x; then
65274        PATH=$TOOLCHAIN_PATH:$PATH
65275      fi
65276
65277
65278
65279  # Publish this variable in the help.
65280
65281
65282  if [ -z "${CCACHE+x}" ]; then
65283    # The variable is not set by user, try to locate tool using the code snippet
65284    for ac_prog in ccache
65285do
65286  # Extract the first word of "$ac_prog", so it can be a program name with args.
65287set dummy $ac_prog; ac_word=$2
65288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65289$as_echo_n "checking for $ac_word... " >&6; }
65290if ${ac_cv_path_CCACHE+:} false; then :
65291  $as_echo_n "(cached) " >&6
65292else
65293  case $CCACHE in
65294  [\\/]* | ?:[\\/]*)
65295  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65296  ;;
65297  *)
65298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65299for as_dir in $PATH
65300do
65301  IFS=$as_save_IFS
65302  test -z "$as_dir" && as_dir=.
65303    for ac_exec_ext in '' $ac_executable_extensions; do
65304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65305    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65307    break 2
65308  fi
65309done
65310  done
65311IFS=$as_save_IFS
65312
65313  ;;
65314esac
65315fi
65316CCACHE=$ac_cv_path_CCACHE
65317if test -n "$CCACHE"; then
65318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65319$as_echo "$CCACHE" >&6; }
65320else
65321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65322$as_echo "no" >&6; }
65323fi
65324
65325
65326  test -n "$CCACHE" && break
65327done
65328
65329  else
65330    # The variable is set, but is it from the command line or the environment?
65331
65332    # Try to remove the string !CCACHE! from our list.
65333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65335      # If it failed, the variable was not from the command line. Ignore it,
65336      # but warn the user (except for BASH, which is always set by the calling BASH).
65337      if test "xCCACHE" != xBASH; then
65338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65339$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65340      fi
65341      # Try to locate tool using the code snippet
65342      for ac_prog in ccache
65343do
65344  # Extract the first word of "$ac_prog", so it can be a program name with args.
65345set dummy $ac_prog; ac_word=$2
65346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65347$as_echo_n "checking for $ac_word... " >&6; }
65348if ${ac_cv_path_CCACHE+:} false; then :
65349  $as_echo_n "(cached) " >&6
65350else
65351  case $CCACHE in
65352  [\\/]* | ?:[\\/]*)
65353  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65354  ;;
65355  *)
65356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65357for as_dir in $PATH
65358do
65359  IFS=$as_save_IFS
65360  test -z "$as_dir" && as_dir=.
65361    for ac_exec_ext in '' $ac_executable_extensions; do
65362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65363    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65365    break 2
65366  fi
65367done
65368  done
65369IFS=$as_save_IFS
65370
65371  ;;
65372esac
65373fi
65374CCACHE=$ac_cv_path_CCACHE
65375if test -n "$CCACHE"; then
65376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65377$as_echo "$CCACHE" >&6; }
65378else
65379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65380$as_echo "no" >&6; }
65381fi
65382
65383
65384  test -n "$CCACHE" && break
65385done
65386
65387    else
65388      # If it succeeded, then it was overridden by the user. We will use it
65389      # for the tool.
65390
65391      # First remove it from the list of overridden variables, so we can test
65392      # for unknown variables in the end.
65393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65394
65395      # Check if we try to supply an empty value
65396      if test "x$CCACHE" = x; then
65397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65398$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65400$as_echo_n "checking for CCACHE... " >&6; }
65401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65402$as_echo "disabled" >&6; }
65403      else
65404        # Check if the provided tool contains a complete path.
65405        tool_specified="$CCACHE"
65406        tool_basename="${tool_specified##*/}"
65407        if test "x$tool_basename" = "x$tool_specified"; then
65408          # A command without a complete path is provided, search $PATH.
65409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65410$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65411          # Extract the first word of "$tool_basename", so it can be a program name with args.
65412set dummy $tool_basename; ac_word=$2
65413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65414$as_echo_n "checking for $ac_word... " >&6; }
65415if ${ac_cv_path_CCACHE+:} false; then :
65416  $as_echo_n "(cached) " >&6
65417else
65418  case $CCACHE in
65419  [\\/]* | ?:[\\/]*)
65420  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65421  ;;
65422  *)
65423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65424for as_dir in $PATH
65425do
65426  IFS=$as_save_IFS
65427  test -z "$as_dir" && as_dir=.
65428    for ac_exec_ext in '' $ac_executable_extensions; do
65429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65430    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65432    break 2
65433  fi
65434done
65435  done
65436IFS=$as_save_IFS
65437
65438  ;;
65439esac
65440fi
65441CCACHE=$ac_cv_path_CCACHE
65442if test -n "$CCACHE"; then
65443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65444$as_echo "$CCACHE" >&6; }
65445else
65446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65447$as_echo "no" >&6; }
65448fi
65449
65450
65451          if test "x$CCACHE" = x; then
65452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65453          fi
65454        else
65455          # Otherwise we believe it is a complete path. Use it as it is.
65456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65457$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65459$as_echo_n "checking for CCACHE... " >&6; }
65460          if test ! -x "$tool_specified"; then
65461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65462$as_echo "not found" >&6; }
65463            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65464          fi
65465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65466$as_echo "$tool_specified" >&6; }
65467        fi
65468      fi
65469    fi
65470
65471  fi
65472
65473
65474
65475  if test "x$CCACHE" = x; then
65476    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65477  fi
65478
65479
65480      PATH="$OLD_PATH"
65481      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65482      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65483    else
65484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65485$as_echo "no" >&6; }
65486      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65487$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65488    fi
65489  elif test "x$enable_ccache" = xno; then
65490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65491$as_echo "no, explicitly disabled" >&6; }
65492    CCACHE_STATUS="Disabled"
65493  elif test "x$enable_ccache" = x; then
65494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65495$as_echo "no" >&6; }
65496  else
65497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65498$as_echo "unknown" >&6; }
65499    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65500  fi
65501
65502
65503
65504# Check whether --with-ccache-dir was given.
65505if test "${with_ccache_dir+set}" = set; then :
65506  withval=$with_ccache_dir;
65507fi
65508
65509
65510  if test "x$with_ccache_dir" != x; then
65511    # When using a non home ccache directory, assume the use is to share ccache files
65512    # with other users. Thus change the umask.
65513    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65514    if test "x$CCACHE" = x; then
65515      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65516$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65517    fi
65518  fi
65519
65520  if test "x$CCACHE" != x; then
65521
65522  if test "x$CCACHE" != x; then
65523    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65524      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65525          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65526      if test "x$HAS_BAD_CCACHE" != "x"; then
65527        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65528      fi
65529    fi
65530    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65531      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65532          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65533      if test "x$HAS_BAD_CCACHE" != "x"; then
65534        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65535      fi
65536      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65537$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65538      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65539      PUSHED_FLAGS="$CXXFLAGS"
65540      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65541      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65542/* end confdefs.h.  */
65543
65544int
65545main ()
65546{
65547
65548  ;
65549  return 0;
65550}
65551_ACEOF
65552if ac_fn_cxx_try_compile "$LINENO"; then :
65553  CC_KNOWS_CCACHE_TRICK=yes
65554else
65555  CC_KNOWS_CCACHE_TRICK=no
65556fi
65557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65558      CXXFLAGS="$PUSHED_FLAGS"
65559      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65561$as_echo "yes" >&6; }
65562        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65563
65564        CCACHE_SLOPPINESS=pch_defines,time_macros
65565      else
65566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65567$as_echo "no" >&6; }
65568        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65569      fi
65570    fi
65571
65572    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65573        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65574
65575    if test "x$SET_CCACHE_DIR" != x; then
65576      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65577      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65578    fi
65579  fi
65580
65581  fi
65582
65583
65584###############################################################################
65585#
65586# And now the finish...
65587#
65588###############################################################################
65589
65590# Check for some common pitfalls
65591
65592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65593    file_to_test="$SRC_ROOT/LICENSE"
65594    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65595      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
65596    fi
65597  fi
65598
65599
65600  # Did user specify any unknown variables?
65601
65602  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65603    # Replace the separating ! with spaces before presenting for end user.
65604    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65605    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65606$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65607  fi
65608
65609
65610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65611$as_echo_n "checking if build directory is on local disk... " >&6; }
65612
65613  # df -l lists only local disks; if the given directory is not found then
65614  # a non-zero exit code is given
65615  if test "x$DF" = x; then
65616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65617      # msys does not have df; use Windows "net use" instead.
65618      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65619      if test "x$IS_NETWORK_DISK" = x; then
65620        OUTPUT_DIR_IS_LOCAL="yes"
65621      else
65622        OUTPUT_DIR_IS_LOCAL="no"
65623      fi
65624    else
65625      # No df here, say it's local
65626      OUTPUT_DIR_IS_LOCAL="yes"
65627    fi
65628  else
65629    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65630      OUTPUT_DIR_IS_LOCAL="yes"
65631    else
65632      OUTPUT_DIR_IS_LOCAL="no"
65633    fi
65634  fi
65635
65636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65637$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65638
65639
65640
65641  # Check if the user has any old-style ALT_ variables set.
65642  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65643
65644  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65645  # Since we can't properly handle the dependencies for this, warn the user about the situation
65646  if test -e $OUTPUT_ROOT/spec.gmk; then
65647    IS_RECONFIGURE=yes
65648  else
65649    IS_RECONFIGURE=no
65650  fi
65651
65652
65653# At the end, call the custom hook. (Dummy macro if no custom sources available)
65654
65655
65656# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65657
65658  # Keep feature lists sorted and free of duplicates
65659  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65660  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65661  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65662  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65663  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65664  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65665  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65666
65667  # Validate features
65668  for variant in $JVM_VARIANTS; do
65669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65670$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65671    features_var_name=JVM_FEATURES_$variant
65672    JVM_FEATURES_TO_TEST=${!features_var_name}
65673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65674$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65675    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65676    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65677    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65678    if test "x$INVALID_FEATURES" != x; then
65679      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65680    fi
65681  done
65682
65683
65684# We're messing a bit with internal autoconf variables to put the config.status
65685# in the output directory instead of the current directory.
65686CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65687
65688# Create the actual output files. Now the main work of configure is done.
65689cat >confcache <<\_ACEOF
65690# This file is a shell script that caches the results of configure
65691# tests run on this system so they can be shared between configure
65692# scripts and configure runs, see configure's option --config-cache.
65693# It is not useful on other systems.  If it contains results you don't
65694# want to keep, you may remove or edit it.
65695#
65696# config.status only pays attention to the cache file if you give it
65697# the --recheck option to rerun configure.
65698#
65699# `ac_cv_env_foo' variables (set or unset) will be overridden when
65700# loading this file, other *unset* `ac_cv_foo' will be assigned the
65701# following values.
65702
65703_ACEOF
65704
65705# The following way of writing the cache mishandles newlines in values,
65706# but we know of no workaround that is simple, portable, and efficient.
65707# So, we kill variables containing newlines.
65708# Ultrix sh set writes to stderr and can't be redirected directly,
65709# and sets the high bit in the cache file unless we assign to the vars.
65710(
65711  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65712    eval ac_val=\$$ac_var
65713    case $ac_val in #(
65714    *${as_nl}*)
65715      case $ac_var in #(
65716      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65718      esac
65719      case $ac_var in #(
65720      _ | IFS | as_nl) ;; #(
65721      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65722      *) { eval $ac_var=; unset $ac_var;} ;;
65723      esac ;;
65724    esac
65725  done
65726
65727  (set) 2>&1 |
65728    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65729    *${as_nl}ac_space=\ *)
65730      # `set' does not quote correctly, so add quotes: double-quote
65731      # substitution turns \\\\ into \\, and sed turns \\ into \.
65732      sed -n \
65733	"s/'/'\\\\''/g;
65734	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65735      ;; #(
65736    *)
65737      # `set' quotes correctly as required by POSIX, so do not add quotes.
65738      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65739      ;;
65740    esac |
65741    sort
65742) |
65743  sed '
65744     /^ac_cv_env_/b end
65745     t clear
65746     :clear
65747     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65748     t end
65749     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65750     :end' >>confcache
65751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65752  if test -w "$cache_file"; then
65753    if test "x$cache_file" != "x/dev/null"; then
65754      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65755$as_echo "$as_me: updating cache $cache_file" >&6;}
65756      if test ! -f "$cache_file" || test -h "$cache_file"; then
65757	cat confcache >"$cache_file"
65758      else
65759        case $cache_file in #(
65760        */* | ?:*)
65761	  mv -f confcache "$cache_file"$$ &&
65762	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65763        *)
65764	  mv -f confcache "$cache_file" ;;
65765	esac
65766      fi
65767    fi
65768  else
65769    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65770$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65771  fi
65772fi
65773rm -f confcache
65774
65775test "x$prefix" = xNONE && prefix=$ac_default_prefix
65776# Let make expand exec_prefix.
65777test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65778
65779# Transform confdefs.h into DEFS.
65780# Protect against shell expansion while executing Makefile rules.
65781# Protect against Makefile macro expansion.
65782#
65783# If the first sed substitution is executed (which looks for macros that
65784# take arguments), then branch to the quote section.  Otherwise,
65785# look for a macro that doesn't take arguments.
65786ac_script='
65787:mline
65788/\\$/{
65789 N
65790 s,\\\n,,
65791 b mline
65792}
65793t clear
65794:clear
65795s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65796t quote
65797s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65798t quote
65799b any
65800:quote
65801s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65802s/\[/\\&/g
65803s/\]/\\&/g
65804s/\$/$$/g
65805H
65806:any
65807${
65808	g
65809	s/^\n//
65810	s/\n/ /g
65811	p
65812}
65813'
65814DEFS=`sed -n "$ac_script" confdefs.h`
65815
65816
65817ac_libobjs=
65818ac_ltlibobjs=
65819U=
65820for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65821  # 1. Remove the extension, and $U if already installed.
65822  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65823  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65824  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65825  #    will be set to the directory where LIBOBJS objects are built.
65826  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65827  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65828done
65829LIBOBJS=$ac_libobjs
65830
65831LTLIBOBJS=$ac_ltlibobjs
65832
65833
65834
65835: "${CONFIG_STATUS=./config.status}"
65836ac_write_fail=0
65837ac_clean_files_save=$ac_clean_files
65838ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65839{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65840$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65841as_write_fail=0
65842cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65843#! $SHELL
65844# Generated by $as_me.
65845# Run this file to recreate the current configuration.
65846# Compiler output produced by configure, useful for debugging
65847# configure, is in config.log if it exists.
65848
65849debug=false
65850ac_cs_recheck=false
65851ac_cs_silent=false
65852
65853SHELL=\${CONFIG_SHELL-$SHELL}
65854export SHELL
65855_ASEOF
65856cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65857## -------------------- ##
65858## M4sh Initialization. ##
65859## -------------------- ##
65860
65861# Be more Bourne compatible
65862DUALCASE=1; export DUALCASE # for MKS sh
65863if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65864  emulate sh
65865  NULLCMD=:
65866  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65867  # is contrary to our usage.  Disable this feature.
65868  alias -g '${1+"$@"}'='"$@"'
65869  setopt NO_GLOB_SUBST
65870else
65871  case `(set -o) 2>/dev/null` in #(
65872  *posix*) :
65873    set -o posix ;; #(
65874  *) :
65875     ;;
65876esac
65877fi
65878
65879
65880as_nl='
65881'
65882export as_nl
65883# Printing a long string crashes Solaris 7 /usr/bin/printf.
65884as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65885as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65886as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65887# Prefer a ksh shell builtin over an external printf program on Solaris,
65888# but without wasting forks for bash or zsh.
65889if test -z "$BASH_VERSION$ZSH_VERSION" \
65890    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65891  as_echo='print -r --'
65892  as_echo_n='print -rn --'
65893elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65894  as_echo='printf %s\n'
65895  as_echo_n='printf %s'
65896else
65897  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65898    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65899    as_echo_n='/usr/ucb/echo -n'
65900  else
65901    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65902    as_echo_n_body='eval
65903      arg=$1;
65904      case $arg in #(
65905      *"$as_nl"*)
65906	expr "X$arg" : "X\\(.*\\)$as_nl";
65907	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65908      esac;
65909      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65910    '
65911    export as_echo_n_body
65912    as_echo_n='sh -c $as_echo_n_body as_echo'
65913  fi
65914  export as_echo_body
65915  as_echo='sh -c $as_echo_body as_echo'
65916fi
65917
65918# The user is always right.
65919if test "${PATH_SEPARATOR+set}" != set; then
65920  PATH_SEPARATOR=:
65921  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65922    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65923      PATH_SEPARATOR=';'
65924  }
65925fi
65926
65927
65928# IFS
65929# We need space, tab and new line, in precisely that order.  Quoting is
65930# there to prevent editors from complaining about space-tab.
65931# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65932# splitting by setting IFS to empty value.)
65933IFS=" ""	$as_nl"
65934
65935# Find who we are.  Look in the path if we contain no directory separator.
65936as_myself=
65937case $0 in #((
65938  *[\\/]* ) as_myself=$0 ;;
65939  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65940for as_dir in $PATH
65941do
65942  IFS=$as_save_IFS
65943  test -z "$as_dir" && as_dir=.
65944    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65945  done
65946IFS=$as_save_IFS
65947
65948     ;;
65949esac
65950# We did not find ourselves, most probably we were run as `sh COMMAND'
65951# in which case we are not to be found in the path.
65952if test "x$as_myself" = x; then
65953  as_myself=$0
65954fi
65955if test ! -f "$as_myself"; then
65956  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65957  exit 1
65958fi
65959
65960# Unset variables that we do not need and which cause bugs (e.g. in
65961# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65962# suppresses any "Segmentation fault" message there.  '((' could
65963# trigger a bug in pdksh 5.2.14.
65964for as_var in BASH_ENV ENV MAIL MAILPATH
65965do eval test x\${$as_var+set} = xset \
65966  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65967done
65968PS1='$ '
65969PS2='> '
65970PS4='+ '
65971
65972# NLS nuisances.
65973LC_ALL=C
65974export LC_ALL
65975LANGUAGE=C
65976export LANGUAGE
65977
65978# CDPATH.
65979(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65980
65981
65982# as_fn_error STATUS ERROR [LINENO LOG_FD]
65983# ----------------------------------------
65984# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65985# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65986# script with STATUS, using 1 if that was 0.
65987as_fn_error ()
65988{
65989  as_status=$1; test $as_status -eq 0 && as_status=1
65990  if test "$4"; then
65991    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65992    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65993  fi
65994  $as_echo "$as_me: error: $2" >&2
65995  as_fn_exit $as_status
65996} # as_fn_error
65997
65998
65999# as_fn_set_status STATUS
66000# -----------------------
66001# Set $? to STATUS, without forking.
66002as_fn_set_status ()
66003{
66004  return $1
66005} # as_fn_set_status
66006
66007# as_fn_exit STATUS
66008# -----------------
66009# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66010as_fn_exit ()
66011{
66012  set +e
66013  as_fn_set_status $1
66014  exit $1
66015} # as_fn_exit
66016
66017# as_fn_unset VAR
66018# ---------------
66019# Portably unset VAR.
66020as_fn_unset ()
66021{
66022  { eval $1=; unset $1;}
66023}
66024as_unset=as_fn_unset
66025# as_fn_append VAR VALUE
66026# ----------------------
66027# Append the text in VALUE to the end of the definition contained in VAR. Take
66028# advantage of any shell optimizations that allow amortized linear growth over
66029# repeated appends, instead of the typical quadratic growth present in naive
66030# implementations.
66031if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66032  eval 'as_fn_append ()
66033  {
66034    eval $1+=\$2
66035  }'
66036else
66037  as_fn_append ()
66038  {
66039    eval $1=\$$1\$2
66040  }
66041fi # as_fn_append
66042
66043# as_fn_arith ARG...
66044# ------------------
66045# Perform arithmetic evaluation on the ARGs, and store the result in the
66046# global $as_val. Take advantage of shells that can avoid forks. The arguments
66047# must be portable across $(()) and expr.
66048if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66049  eval 'as_fn_arith ()
66050  {
66051    as_val=$(( $* ))
66052  }'
66053else
66054  as_fn_arith ()
66055  {
66056    as_val=`expr "$@" || test $? -eq 1`
66057  }
66058fi # as_fn_arith
66059
66060
66061if expr a : '\(a\)' >/dev/null 2>&1 &&
66062   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66063  as_expr=expr
66064else
66065  as_expr=false
66066fi
66067
66068if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66069  as_basename=basename
66070else
66071  as_basename=false
66072fi
66073
66074if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66075  as_dirname=dirname
66076else
66077  as_dirname=false
66078fi
66079
66080as_me=`$as_basename -- "$0" ||
66081$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66082	 X"$0" : 'X\(//\)$' \| \
66083	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66084$as_echo X/"$0" |
66085    sed '/^.*\/\([^/][^/]*\)\/*$/{
66086	    s//\1/
66087	    q
66088	  }
66089	  /^X\/\(\/\/\)$/{
66090	    s//\1/
66091	    q
66092	  }
66093	  /^X\/\(\/\).*/{
66094	    s//\1/
66095	    q
66096	  }
66097	  s/.*/./; q'`
66098
66099# Avoid depending upon Character Ranges.
66100as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66101as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66102as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66103as_cr_digits='0123456789'
66104as_cr_alnum=$as_cr_Letters$as_cr_digits
66105
66106ECHO_C= ECHO_N= ECHO_T=
66107case `echo -n x` in #(((((
66108-n*)
66109  case `echo 'xy\c'` in
66110  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66111  xy)  ECHO_C='\c';;
66112  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66113       ECHO_T='	';;
66114  esac;;
66115*)
66116  ECHO_N='-n';;
66117esac
66118
66119rm -f conf$$ conf$$.exe conf$$.file
66120if test -d conf$$.dir; then
66121  rm -f conf$$.dir/conf$$.file
66122else
66123  rm -f conf$$.dir
66124  mkdir conf$$.dir 2>/dev/null
66125fi
66126if (echo >conf$$.file) 2>/dev/null; then
66127  if ln -s conf$$.file conf$$ 2>/dev/null; then
66128    as_ln_s='ln -s'
66129    # ... but there are two gotchas:
66130    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66131    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66132    # In both cases, we have to default to `cp -pR'.
66133    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66134      as_ln_s='cp -pR'
66135  elif ln conf$$.file conf$$ 2>/dev/null; then
66136    as_ln_s=ln
66137  else
66138    as_ln_s='cp -pR'
66139  fi
66140else
66141  as_ln_s='cp -pR'
66142fi
66143rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66144rmdir conf$$.dir 2>/dev/null
66145
66146
66147# as_fn_mkdir_p
66148# -------------
66149# Create "$as_dir" as a directory, including parents if necessary.
66150as_fn_mkdir_p ()
66151{
66152
66153  case $as_dir in #(
66154  -*) as_dir=./$as_dir;;
66155  esac
66156  test -d "$as_dir" || eval $as_mkdir_p || {
66157    as_dirs=
66158    while :; do
66159      case $as_dir in #(
66160      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66161      *) as_qdir=$as_dir;;
66162      esac
66163      as_dirs="'$as_qdir' $as_dirs"
66164      as_dir=`$as_dirname -- "$as_dir" ||
66165$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66166	 X"$as_dir" : 'X\(//\)[^/]' \| \
66167	 X"$as_dir" : 'X\(//\)$' \| \
66168	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66169$as_echo X"$as_dir" |
66170    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66171	    s//\1/
66172	    q
66173	  }
66174	  /^X\(\/\/\)[^/].*/{
66175	    s//\1/
66176	    q
66177	  }
66178	  /^X\(\/\/\)$/{
66179	    s//\1/
66180	    q
66181	  }
66182	  /^X\(\/\).*/{
66183	    s//\1/
66184	    q
66185	  }
66186	  s/.*/./; q'`
66187      test -d "$as_dir" && break
66188    done
66189    test -z "$as_dirs" || eval "mkdir $as_dirs"
66190  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66191
66192
66193} # as_fn_mkdir_p
66194if mkdir -p . 2>/dev/null; then
66195  as_mkdir_p='mkdir -p "$as_dir"'
66196else
66197  test -d ./-p && rmdir ./-p
66198  as_mkdir_p=false
66199fi
66200
66201
66202# as_fn_executable_p FILE
66203# -----------------------
66204# Test if FILE is an executable regular file.
66205as_fn_executable_p ()
66206{
66207  test -f "$1" && test -x "$1"
66208} # as_fn_executable_p
66209as_test_x='test -x'
66210as_executable_p=as_fn_executable_p
66211
66212# Sed expression to map a string onto a valid CPP name.
66213as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66214
66215# Sed expression to map a string onto a valid variable name.
66216as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66217
66218
66219exec 6>&1
66220## ----------------------------------- ##
66221## Main body of $CONFIG_STATUS script. ##
66222## ----------------------------------- ##
66223_ASEOF
66224test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66225
66226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66227# Save the log message, to keep $0 and so on meaningful, and to
66228# report actual input values of CONFIG_FILES etc. instead of their
66229# values after options handling.
66230ac_log="
66231This file was extended by OpenJDK $as_me jdk9, which was
66232generated by GNU Autoconf 2.69.  Invocation command line was
66233
66234  CONFIG_FILES    = $CONFIG_FILES
66235  CONFIG_HEADERS  = $CONFIG_HEADERS
66236  CONFIG_LINKS    = $CONFIG_LINKS
66237  CONFIG_COMMANDS = $CONFIG_COMMANDS
66238  $ $0 $@
66239
66240on `(hostname || uname -n) 2>/dev/null | sed 1q`
66241"
66242
66243_ACEOF
66244
66245case $ac_config_files in *"
66246"*) set x $ac_config_files; shift; ac_config_files=$*;;
66247esac
66248
66249
66250
66251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66252# Files that config.status was made for.
66253config_files="$ac_config_files"
66254
66255_ACEOF
66256
66257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66258ac_cs_usage="\
66259\`$as_me' instantiates files and other configuration actions
66260from templates according to the current configuration.  Unless the files
66261and actions are specified as TAGs, all are instantiated by default.
66262
66263Usage: $0 [OPTION]... [TAG]...
66264
66265  -h, --help       print this help, then exit
66266  -V, --version    print version number and configuration settings, then exit
66267      --config     print configuration, then exit
66268  -q, --quiet, --silent
66269                   do not print progress messages
66270  -d, --debug      don't remove temporary files
66271      --recheck    update $as_me by reconfiguring in the same conditions
66272      --file=FILE[:TEMPLATE]
66273                   instantiate the configuration file FILE
66274
66275Configuration files:
66276$config_files
66277
66278Report bugs to <build-dev@openjdk.java.net>.
66279OpenJDK home page: <http://openjdk.java.net>."
66280
66281_ACEOF
66282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66283ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66284ac_cs_version="\\
66285OpenJDK config.status jdk9
66286configured by $0, generated by GNU Autoconf 2.69,
66287  with options \\"\$ac_cs_config\\"
66288
66289Copyright (C) 2012 Free Software Foundation, Inc.
66290This config.status script is free software; the Free Software Foundation
66291gives unlimited permission to copy, distribute and modify it."
66292
66293ac_pwd='$ac_pwd'
66294srcdir='$srcdir'
66295AWK='$AWK'
66296test -n "\$AWK" || AWK=awk
66297_ACEOF
66298
66299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66300# The default lists apply if the user does not specify any file.
66301ac_need_defaults=:
66302while test $# != 0
66303do
66304  case $1 in
66305  --*=?*)
66306    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66307    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66308    ac_shift=:
66309    ;;
66310  --*=)
66311    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66312    ac_optarg=
66313    ac_shift=:
66314    ;;
66315  *)
66316    ac_option=$1
66317    ac_optarg=$2
66318    ac_shift=shift
66319    ;;
66320  esac
66321
66322  case $ac_option in
66323  # Handling of the options.
66324  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66325    ac_cs_recheck=: ;;
66326  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66327    $as_echo "$ac_cs_version"; exit ;;
66328  --config | --confi | --conf | --con | --co | --c )
66329    $as_echo "$ac_cs_config"; exit ;;
66330  --debug | --debu | --deb | --de | --d | -d )
66331    debug=: ;;
66332  --file | --fil | --fi | --f )
66333    $ac_shift
66334    case $ac_optarg in
66335    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66336    '') as_fn_error $? "missing file argument" ;;
66337    esac
66338    as_fn_append CONFIG_FILES " '$ac_optarg'"
66339    ac_need_defaults=false;;
66340  --he | --h |  --help | --hel | -h )
66341    $as_echo "$ac_cs_usage"; exit ;;
66342  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66343  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66344    ac_cs_silent=: ;;
66345
66346  # This is an error.
66347  -*) as_fn_error $? "unrecognized option: \`$1'
66348Try \`$0 --help' for more information." ;;
66349
66350  *) as_fn_append ac_config_targets " $1"
66351     ac_need_defaults=false ;;
66352
66353  esac
66354  shift
66355done
66356
66357ac_configure_extra_args=
66358
66359if $ac_cs_silent; then
66360  exec 6>/dev/null
66361  ac_configure_extra_args="$ac_configure_extra_args --silent"
66362fi
66363
66364_ACEOF
66365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66366if \$ac_cs_recheck; then
66367  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66368  shift
66369  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66370  CONFIG_SHELL='$SHELL'
66371  export CONFIG_SHELL
66372  exec "\$@"
66373fi
66374
66375_ACEOF
66376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66377exec 5>>config.log
66378{
66379  echo
66380  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66381## Running $as_me. ##
66382_ASBOX
66383  $as_echo "$ac_log"
66384} >&5
66385
66386_ACEOF
66387cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66388_ACEOF
66389
66390cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66391
66392# Handling of arguments.
66393for ac_config_target in $ac_config_targets
66394do
66395  case $ac_config_target in
66396    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66397    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66398    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66399    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66400    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66401
66402  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66403  esac
66404done
66405
66406
66407# If the user did not use the arguments to specify the items to instantiate,
66408# then the envvar interface is used.  Set only those that are not.
66409# We use the long form for the default assignment because of an extremely
66410# bizarre bug on SunOS 4.1.3.
66411if $ac_need_defaults; then
66412  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66413fi
66414
66415# Have a temporary directory for convenience.  Make it in the build tree
66416# simply because there is no reason against having it here, and in addition,
66417# creating and moving files from /tmp can sometimes cause problems.
66418# Hook for its removal unless debugging.
66419# Note that there is a small window in which the directory will not be cleaned:
66420# after its creation but before its name has been assigned to `$tmp'.
66421$debug ||
66422{
66423  tmp= ac_tmp=
66424  trap 'exit_status=$?
66425  : "${ac_tmp:=$tmp}"
66426  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66427' 0
66428  trap 'as_fn_exit 1' 1 2 13 15
66429}
66430# Create a (secure) tmp directory for tmp files.
66431
66432{
66433  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66434  test -d "$tmp"
66435}  ||
66436{
66437  tmp=./conf$$-$RANDOM
66438  (umask 077 && mkdir "$tmp")
66439} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66440ac_tmp=$tmp
66441
66442# Set up the scripts for CONFIG_FILES section.
66443# No need to generate them if there are no CONFIG_FILES.
66444# This happens for instance with `./config.status config.h'.
66445if test -n "$CONFIG_FILES"; then
66446
66447
66448ac_cr=`echo X | tr X '\015'`
66449# On cygwin, bash can eat \r inside `` if the user requested igncr.
66450# But we know of no other shell where ac_cr would be empty at this
66451# point, so we can use a bashism as a fallback.
66452if test "x$ac_cr" = x; then
66453  eval ac_cr=\$\'\\r\'
66454fi
66455ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66456if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66457  ac_cs_awk_cr='\\r'
66458else
66459  ac_cs_awk_cr=$ac_cr
66460fi
66461
66462echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66463_ACEOF
66464
66465
66466{
66467  echo "cat >conf$$subs.awk <<_ACEOF" &&
66468  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66469  echo "_ACEOF"
66470} >conf$$subs.sh ||
66471  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66472ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66473ac_delim='%!_!# '
66474for ac_last_try in false false false false false :; do
66475  . ./conf$$subs.sh ||
66476    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66477
66478  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66479  if test $ac_delim_n = $ac_delim_num; then
66480    break
66481  elif $ac_last_try; then
66482    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66483  else
66484    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66485  fi
66486done
66487rm -f conf$$subs.sh
66488
66489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66490cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66491_ACEOF
66492sed -n '
66493h
66494s/^/S["/; s/!.*/"]=/
66495p
66496g
66497s/^[^!]*!//
66498:repl
66499t repl
66500s/'"$ac_delim"'$//
66501t delim
66502:nl
66503h
66504s/\(.\{148\}\)..*/\1/
66505t more1
66506s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66507p
66508n
66509b repl
66510:more1
66511s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66512p
66513g
66514s/.\{148\}//
66515t nl
66516:delim
66517h
66518s/\(.\{148\}\)..*/\1/
66519t more2
66520s/["\\]/\\&/g; s/^/"/; s/$/"/
66521p
66522b
66523:more2
66524s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66525p
66526g
66527s/.\{148\}//
66528t delim
66529' <conf$$subs.awk | sed '
66530/^[^""]/{
66531  N
66532  s/\n//
66533}
66534' >>$CONFIG_STATUS || ac_write_fail=1
66535rm -f conf$$subs.awk
66536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66537_ACAWK
66538cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66539  for (key in S) S_is_set[key] = 1
66540  FS = ""
66541
66542}
66543{
66544  line = $ 0
66545  nfields = split(line, field, "@")
66546  substed = 0
66547  len = length(field[1])
66548  for (i = 2; i < nfields; i++) {
66549    key = field[i]
66550    keylen = length(key)
66551    if (S_is_set[key]) {
66552      value = S[key]
66553      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66554      len += length(value) + length(field[++i])
66555      substed = 1
66556    } else
66557      len += 1 + keylen
66558  }
66559
66560  print line
66561}
66562
66563_ACAWK
66564_ACEOF
66565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66566if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66567  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66568else
66569  cat
66570fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66571  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66572_ACEOF
66573
66574# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66575# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66576# trailing colons and then remove the whole line if VPATH becomes empty
66577# (actually we leave an empty line to preserve line numbers).
66578if test "x$srcdir" = x.; then
66579  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66580h
66581s///
66582s/^/:/
66583s/[	 ]*$/:/
66584s/:\$(srcdir):/:/g
66585s/:\${srcdir}:/:/g
66586s/:@srcdir@:/:/g
66587s/^:*//
66588s/:*$//
66589x
66590s/\(=[	 ]*\).*/\1/
66591G
66592s/\n//
66593s/^[^=]*=[	 ]*$//
66594}'
66595fi
66596
66597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66598fi # test -n "$CONFIG_FILES"
66599
66600
66601eval set X "  :F $CONFIG_FILES      "
66602shift
66603for ac_tag
66604do
66605  case $ac_tag in
66606  :[FHLC]) ac_mode=$ac_tag; continue;;
66607  esac
66608  case $ac_mode$ac_tag in
66609  :[FHL]*:*);;
66610  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66611  :[FH]-) ac_tag=-:-;;
66612  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66613  esac
66614  ac_save_IFS=$IFS
66615  IFS=:
66616  set x $ac_tag
66617  IFS=$ac_save_IFS
66618  shift
66619  ac_file=$1
66620  shift
66621
66622  case $ac_mode in
66623  :L) ac_source=$1;;
66624  :[FH])
66625    ac_file_inputs=
66626    for ac_f
66627    do
66628      case $ac_f in
66629      -) ac_f="$ac_tmp/stdin";;
66630      *) # Look for the file first in the build tree, then in the source tree
66631	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66632	 # because $ac_f cannot contain `:'.
66633	 test -f "$ac_f" ||
66634	   case $ac_f in
66635	   [\\/$]*) false;;
66636	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66637	   esac ||
66638	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66639      esac
66640      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66641      as_fn_append ac_file_inputs " '$ac_f'"
66642    done
66643
66644    # Let's still pretend it is `configure' which instantiates (i.e., don't
66645    # use $as_me), people would be surprised to read:
66646    #    /* config.h.  Generated by config.status.  */
66647    configure_input='Generated from '`
66648	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66649	`' by configure.'
66650    if test x"$ac_file" != x-; then
66651      configure_input="$ac_file.  $configure_input"
66652      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66653$as_echo "$as_me: creating $ac_file" >&6;}
66654    fi
66655    # Neutralize special characters interpreted by sed in replacement strings.
66656    case $configure_input in #(
66657    *\&* | *\|* | *\\* )
66658       ac_sed_conf_input=`$as_echo "$configure_input" |
66659       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66660    *) ac_sed_conf_input=$configure_input;;
66661    esac
66662
66663    case $ac_tag in
66664    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66665      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66666    esac
66667    ;;
66668  esac
66669
66670  ac_dir=`$as_dirname -- "$ac_file" ||
66671$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66672	 X"$ac_file" : 'X\(//\)[^/]' \| \
66673	 X"$ac_file" : 'X\(//\)$' \| \
66674	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66675$as_echo X"$ac_file" |
66676    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66677	    s//\1/
66678	    q
66679	  }
66680	  /^X\(\/\/\)[^/].*/{
66681	    s//\1/
66682	    q
66683	  }
66684	  /^X\(\/\/\)$/{
66685	    s//\1/
66686	    q
66687	  }
66688	  /^X\(\/\).*/{
66689	    s//\1/
66690	    q
66691	  }
66692	  s/.*/./; q'`
66693  as_dir="$ac_dir"; as_fn_mkdir_p
66694  ac_builddir=.
66695
66696case "$ac_dir" in
66697.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66698*)
66699  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66700  # A ".." for each directory in $ac_dir_suffix.
66701  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66702  case $ac_top_builddir_sub in
66703  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66704  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66705  esac ;;
66706esac
66707ac_abs_top_builddir=$ac_pwd
66708ac_abs_builddir=$ac_pwd$ac_dir_suffix
66709# for backward compatibility:
66710ac_top_builddir=$ac_top_build_prefix
66711
66712case $srcdir in
66713  .)  # We are building in place.
66714    ac_srcdir=.
66715    ac_top_srcdir=$ac_top_builddir_sub
66716    ac_abs_top_srcdir=$ac_pwd ;;
66717  [\\/]* | ?:[\\/]* )  # Absolute name.
66718    ac_srcdir=$srcdir$ac_dir_suffix;
66719    ac_top_srcdir=$srcdir
66720    ac_abs_top_srcdir=$srcdir ;;
66721  *) # Relative name.
66722    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66723    ac_top_srcdir=$ac_top_build_prefix$srcdir
66724    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66725esac
66726ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66727
66728
66729  case $ac_mode in
66730  :F)
66731  #
66732  # CONFIG_FILE
66733  #
66734
66735_ACEOF
66736
66737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66738# If the template does not know about datarootdir, expand it.
66739# FIXME: This hack should be removed a few years after 2.60.
66740ac_datarootdir_hack=; ac_datarootdir_seen=
66741ac_sed_dataroot='
66742/datarootdir/ {
66743  p
66744  q
66745}
66746/@datadir@/p
66747/@docdir@/p
66748/@infodir@/p
66749/@localedir@/p
66750/@mandir@/p'
66751case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66752*datarootdir*) ac_datarootdir_seen=yes;;
66753*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66754  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66755$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66756_ACEOF
66757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66758  ac_datarootdir_hack='
66759  s&@datadir@&$datadir&g
66760  s&@docdir@&$docdir&g
66761  s&@infodir@&$infodir&g
66762  s&@localedir@&$localedir&g
66763  s&@mandir@&$mandir&g
66764  s&\\\${datarootdir}&$datarootdir&g' ;;
66765esac
66766_ACEOF
66767
66768# Neutralize VPATH when `$srcdir' = `.'.
66769# Shell code in configure.ac might set extrasub.
66770# FIXME: do we really want to maintain this feature?
66771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66772ac_sed_extra="$ac_vpsub
66773$extrasub
66774_ACEOF
66775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66776:t
66777/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66778s|@configure_input@|$ac_sed_conf_input|;t t
66779s&@top_builddir@&$ac_top_builddir_sub&;t t
66780s&@top_build_prefix@&$ac_top_build_prefix&;t t
66781s&@srcdir@&$ac_srcdir&;t t
66782s&@abs_srcdir@&$ac_abs_srcdir&;t t
66783s&@top_srcdir@&$ac_top_srcdir&;t t
66784s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66785s&@builddir@&$ac_builddir&;t t
66786s&@abs_builddir@&$ac_abs_builddir&;t t
66787s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66788$ac_datarootdir_hack
66789"
66790eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66791  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66792
66793test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66794  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66795  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66796      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66797  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66798which seems to be undefined.  Please make sure it is defined" >&5
66799$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66800which seems to be undefined.  Please make sure it is defined" >&2;}
66801
66802  rm -f "$ac_tmp/stdin"
66803  case $ac_file in
66804  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66805  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66806  esac \
66807  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66808 ;;
66809
66810
66811
66812  esac
66813
66814done # for ac_tag
66815
66816
66817as_fn_exit 0
66818_ACEOF
66819ac_clean_files=$ac_clean_files_save
66820
66821test $ac_write_fail = 0 ||
66822  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66823
66824
66825# configure is writing to config.log, and then calls config.status.
66826# config.status does its own redirection, appending to config.log.
66827# Unfortunately, on DOS this fails, as config.log is still kept open
66828# by configure, so config.status won't be able to write to it; its
66829# output is simply discarded.  So we exec the FD to /dev/null,
66830# effectively closing config.log, so it can be properly (re)opened and
66831# appended to by config.status.  When coming back to configure, we
66832# need to make the FD available again.
66833if test "$no_create" != yes; then
66834  ac_cs_success=:
66835  ac_config_status_args=
66836  test "$silent" = yes &&
66837    ac_config_status_args="$ac_config_status_args --quiet"
66838  exec 5>/dev/null
66839  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66840  exec 5>>config.log
66841  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66842  # would make configure fail if this is the last instruction.
66843  $ac_cs_success || as_fn_exit 1
66844fi
66845if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66846  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66847$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66848fi
66849
66850
66851# After AC_OUTPUT, we need to do final work
66852
66853
66854  # Try to move config.log (generated by autoconf) to the configure-support directory.
66855  if test -e ./config.log; then
66856    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66857  fi
66858
66859  # Rotate our log file (configure.log)
66860  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66861    $RM -f "$OUTPUT_ROOT/configure.log.old"
66862  fi
66863  if test -e "$OUTPUT_ROOT/configure.log"; then
66864    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66865  fi
66866
66867  # Move configure.log from current directory to the build output root
66868  if test -e ./configure.log; then
66869    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66870  fi
66871
66872  # Make the compare script executable
66873  $CHMOD +x $OUTPUT_ROOT/compare.sh
66874
66875
66876# Finally output some useful information to the user
66877
66878  # Finally output some useful information to the user
66879
66880  printf "\n"
66881  printf "====================================================\n"
66882  if test "x$no_create" != "xyes"; then
66883    if test "x$IS_RECONFIGURE" != "xyes"; then
66884      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66885    else
66886      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66887    fi
66888  else
66889    if test "x$IS_RECONFIGURE" != "xyes"; then
66890      printf "A configuration has been successfully checked but not created\n"
66891    else
66892      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66893    fi
66894  fi
66895  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66896    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66897  else
66898    printf "using default settings.\n"
66899  fi
66900
66901  printf "\n"
66902  printf "Configuration summary:\n"
66903  printf "* Debug level:    $DEBUG_LEVEL\n"
66904  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66905  printf "* JDK variant:    $JDK_VARIANT\n"
66906  printf "* JVM variants:   $JVM_VARIANTS\n"
66907  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66908  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66909
66910  printf "\n"
66911  printf "Tools summary:\n"
66912  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66913    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66914  fi
66915  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66916  if test "x$TOOLCHAIN_VERSION" != "x"; then
66917    print_version=" $TOOLCHAIN_VERSION"
66918  fi
66919  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66920  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66921  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66922
66923  printf "\n"
66924  printf "Build performance summary:\n"
66925  printf "* Cores to use:   $JOBS\n"
66926  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66927  if test "x$CCACHE_STATUS" != "x"; then
66928    printf "* ccache status:  $CCACHE_STATUS\n"
66929  fi
66930  printf "\n"
66931
66932  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66933    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66934    printf "will result in longer build times.\n"
66935    printf "\n"
66936  fi
66937
66938  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66939    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66940    printf "These are not respected, and will be ignored. It is recommended\n"
66941    printf "that you clean your environment. The following variables are set:\n"
66942    printf "$FOUND_ALT_VARIABLES\n"
66943    printf "\n"
66944  fi
66945
66946  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66947    printf "WARNING: Your build output directory is not on a local disk.\n"
66948    printf "This will severely degrade build performance!\n"
66949    printf "It is recommended that you create an output directory on a local disk,\n"
66950    printf "and run the configure script again from that directory.\n"
66951    printf "\n"
66952  fi
66953
66954  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66955    printf "WARNING: The result of this configuration has overridden an older\n"
66956    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66957    printf "proper build. Failure to do so might result in strange build problems.\n"
66958    printf "\n"
66959  fi
66960
66961  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66962    printf "WARNING: The result of this configuration was not saved.\n"
66963    printf "You should run without '--no-create | -n' to create the configuration.\n"
66964    printf "\n"
66965  fi
66966
66967
66968
66969  # Locate config.log.
66970  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66971    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66972  elif test -e "./config.log"; then
66973    CONFIG_LOG_PATH="."
66974  fi
66975
66976  if test -e "$CONFIG_LOG_PATH/config.log"; then
66977    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66978    if test $? -eq 0; then
66979      printf "The following warnings were produced. Repeated here for convenience:\n"
66980      # We must quote sed expression (using []) to stop m4 from eating the [].
66981      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66982      printf "\n"
66983    fi
66984  fi
66985
66986