generated-configure.sh revision 2028:645c48292130
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
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654JVM_VARIANT_CORE
655JVM_VARIANT_ZEROSHARK
656JVM_VARIANT_ZERO
657JVM_VARIANT_HOTSPOT
658JVM_VARIANT_MINIMAL1
659JVM_VARIANT_CLIENT
660JVM_VARIANT_SERVER
661JVM_VARIANTS_COMMA
662TEST_IN_BUILD
663HOTSPOT_MAKE_ARGS
664MACOSX_UNIVERSAL
665DEBUG_CLASSFILES
666FASTDEBUG
667VARIANT
668USE_NEW_HOTSPOT_BUILD
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701STATIC_CXX_SETTING
702FIXPATH_DETACH_FLAG
703FIXPATH
704VALID_JVM_FEATURES
705JVM_FEATURES_custom
706JVM_FEATURES_zeroshark
707JVM_FEATURES_zero
708JVM_FEATURES_minimal
709JVM_FEATURES_core
710JVM_FEATURES_client
711JVM_FEATURES_server
712INCLUDE_DTRACE
713GCOV_ENABLED
714STRIP_POLICY
715DEBUG_BINARIES
716ZIP_EXTERNAL_DEBUG_SYMBOLS
717COPY_DEBUG_SYMBOLS
718COMPILE_WITH_DEBUG_SYMBOLS
719CFLAGS_WARNINGS_ARE_ERRORS
720BUILD_CC_DISABLE_WARNING_PREFIX
721DISABLE_WARNING_PREFIX
722HOTSPOT_SET_WARNINGS_AS_ERRORS
723WARNINGS_AS_ERRORS
724COMPILER_SUPPORTS_TARGET_BITS_FLAG
725ZERO_ARCHFLAG
726LDFLAGS_TESTEXE
727LDFLAGS_TESTLIB
728CXXFLAGS_TESTEXE
729CXXFLAGS_TESTLIB
730CFLAGS_TESTEXE
731CFLAGS_TESTLIB
732OPENJDK_BUILD_JVM_LIBS
733OPENJDK_BUILD_JVM_ASFLAGS
734OPENJDK_BUILD_JVM_LDFLAGS
735OPENJDK_BUILD_JVM_CFLAGS
736OPENJDK_BUILD_LDFLAGS_HASH_STYLE
737OPENJDK_BUILD_LDFLAGS_CXX_JDK
738OPENJDK_BUILD_JDKEXE_LIBS
739OPENJDK_BUILD_JDKLIB_LIBS
740OPENJDK_BUILD_LDFLAGS_JDKEXE
741OPENJDK_BUILD_LDFLAGS_JDKLIB
742OPENJDK_BUILD_CXXFLAGS_JDKEXE
743OPENJDK_BUILD_CXXFLAGS_JDKLIB
744OPENJDK_BUILD_CFLAGS_JDKEXE
745OPENJDK_BUILD_CFLAGS_JDKLIB
746OPENJDK_BUILD_CXXSTD_CXXFLAG
747JVM_LIBS
748JVM_ASFLAGS
749JVM_LDFLAGS
750JVM_CFLAGS
751LDFLAGS_HASH_STYLE
752LDFLAGS_CXX_JDK
753JDKEXE_LIBS
754JDKLIB_LIBS
755LDFLAGS_JDKEXE
756LDFLAGS_JDKLIB
757CXXFLAGS_JDKEXE
758CXXFLAGS_JDKLIB
759CFLAGS_JDKEXE
760CFLAGS_JDKLIB
761MACOSX_VERSION_MIN
762NO_LIFETIME_DSE_CFLAG
763NO_NULL_POINTER_CHECK_CFLAG
764CXXSTD_CXXFLAG
765CXX_O_FLAG_SIZE
766CXX_O_FLAG_NONE
767CXX_O_FLAG_DEBUG
768CXX_O_FLAG_NORM
769CXX_O_FLAG_HI
770CXX_O_FLAG_HIGHEST
771CXX_O_FLAG_HIGHEST_JVM
772C_O_FLAG_SIZE
773C_O_FLAG_NONE
774C_O_FLAG_DEBUG
775C_O_FLAG_NORM
776C_O_FLAG_HI
777C_O_FLAG_HIGHEST
778C_O_FLAG_HIGHEST_JVM
779JVM_CFLAGS_SYMBOLS
780CXXFLAGS_DEBUG_SYMBOLS
781CFLAGS_DEBUG_SYMBOLS
782CXX_FLAG_DEPS
783C_FLAG_DEPS
784SHARED_LIBRARY_FLAGS
785SET_SHARED_LIBRARY_MAPFILE
786SET_SHARED_LIBRARY_NAME
787SET_SHARED_LIBRARY_ORIGIN
788SET_EXECUTABLE_ORIGIN
789CXX_FLAG_REORDER
790C_FLAG_REORDER
791JVM_RCFLAGS
792RC_FLAGS
793AR_OUT_OPTION
794LD_OUT_OPTION
795EXE_OUT_OPTION
796CC_OUT_OPTION
797STRIPFLAGS
798ARFLAGS
799COMPILER_BINDCMD_FILE_FLAG
800COMPILER_COMMAND_FILE_FLAG
801COMPILER_TARGET_BITS_FLAG
802JT_HOME
803JTREGEXE
804HOTSPOT_TOOLCHAIN_TYPE
805USING_BROKEN_SUSE_LD
806PACKAGE_PATH
807USE_CLANG
808HOTSPOT_LD
809HOTSPOT_CXX
810HOTSPOT_RC
811HOTSPOT_MT
812BUILD_AS
813BUILD_LDCXX
814BUILD_LD
815BUILD_STRIP
816BUILD_OBJCOPY
817BUILD_AR
818BUILD_NM
819BUILD_CXX
820BUILD_CC
821BUILD_SYSROOT_LDFLAGS
822BUILD_SYSROOT_CFLAGS
823ac_ct_OBJDUMP
824OBJDUMP
825ac_ct_OBJCOPY
826OBJCOPY
827ac_ct_NM
828ac_ct_STRIP
829GNM
830NM
831STRIP
832MSBUILD
833DUMPBIN
834RC
835MT
836LIPO
837ac_ct_AR
838AR
839AS
840LDCXX
841LD
842CXXCPP
843CPP
844CXX_VERSION_NUMBER
845CC_VERSION_NUMBER
846ac_ct_CXX
847CXXFLAGS
848CXX
849TOOLCHAIN_PATH_CXX
850POTENTIAL_CXX
851OBJEXT
852EXEEXT
853ac_ct_CC
854CPPFLAGS
855LDFLAGS
856CFLAGS
857CC
858TOOLCHAIN_PATH_CC
859POTENTIAL_CC
860TOOLCHAIN_VERSION
861VS_LIB
862VS_INCLUDE
863VS_PATH
864CYGWIN_LINK
865SYSROOT_LDFLAGS
866SYSROOT_CFLAGS
867EXTRA_LDFLAGS
868EXTRA_CXXFLAGS
869EXTRA_CFLAGS
870LEGACY_EXTRA_LDFLAGS
871LEGACY_EXTRA_CXXFLAGS
872LEGACY_EXTRA_CFLAGS
873EXE_SUFFIX
874OBJ_SUFFIX
875STATIC_LIBRARY
876SHARED_LIBRARY
877STATIC_LIBRARY_SUFFIX
878SHARED_LIBRARY_SUFFIX
879LIBRARY_PREFIX
880TOOLCHAIN_TYPE
881STATIC_BUILD
882IMPORT_MODULES_MAKE
883IMPORT_MODULES_SRC
884IMPORT_MODULES_CONF
885IMPORT_MODULES_LIBS
886IMPORT_MODULES_CMDS
887IMPORT_MODULES_CLASSES
888BUILD_HOTSPOT
889HOTSPOT_DIST
890BUILD_OUTPUT
891JDK_TOPDIR
892NASHORN_TOPDIR
893HOTSPOT_TOPDIR
894JAXWS_TOPDIR
895JAXP_TOPDIR
896CORBA_TOPDIR
897LANGTOOLS_TOPDIR
898BUILD_JDK
899CREATE_BUILDJDK
900BOOT_JDK_BITS
901JAVAC_FLAGS
902BOOT_JDK_MODULAR
903BOOT_JDK_SOURCETARGET
904JARSIGNER
905JAR
906JAVAH
907JAVAC
908JAVA
909BOOT_JDK
910JAVA_CHECK
911JAVAC_CHECK
912VERSION_IS_GA
913VERSION_SHORT
914VERSION_STRING
915VERSION_NUMBER_FOUR_POSITIONS
916VERSION_NUMBER
917VERSION_OPT
918VERSION_BUILD
919VERSION_PRE
920VERSION_PATCH
921VERSION_SECURITY
922VERSION_MINOR
923VERSION_MAJOR
924MACOSX_BUNDLE_ID_BASE
925MACOSX_BUNDLE_NAME_BASE
926HOTSPOT_VM_DISTRO
927COMPANY_NAME
928JDK_RC_PLATFORM_NAME
929PRODUCT_SUFFIX
930PRODUCT_NAME
931LAUNCHER_NAME
932JLINK_KEEP_PACKAGED_MODULES
933COPYRIGHT_YEAR
934COMPRESS_JARS
935INCLUDE_SA
936UNLIMITED_CRYPTO
937CACERTS_FILE
938BUILD_HEADLESS
939SUPPORT_HEADFUL
940SUPPORT_HEADLESS
941DEFAULT_MAKE_TARGET
942OS_VERSION_MICRO
943OS_VERSION_MINOR
944OS_VERSION_MAJOR
945PKG_CONFIG
946BASH_ARGS
947SETFILE
948CODESIGN
949XATTR
950DSYMUTIL
951IS_GNU_TIME
952PATCH
953DTRACE
954TIME
955STAT
956HG
957READELF
958OTOOL
959LDD
960ZIP
961UNZIP
962FIND_DELETE
963OUTPUT_SYNC
964OUTPUT_SYNC_SUPPORTED
965CHECK_TOOLSDIR_MAKE
966CHECK_TOOLSDIR_GMAKE
967CHECK_MAKE
968CHECK_GMAKE
969MAKE
970PKGHANDLER
971CONFIGURESUPPORT_OUTPUTDIR
972OUTPUT_ROOT
973CONF_NAME
974SPEC
975SDKROOT
976XCODEBUILD
977VALID_JVM_VARIANTS
978JVM_VARIANTS
979DEBUG_LEVEL
980HOTSPOT_DEBUG_LEVEL
981JDK_VARIANT
982SET_OPENJDK
983USERNAME
984CANONICAL_TOPDIR
985ORIGINAL_TOPDIR
986TOPDIR
987PATH_SEP
988ZERO_ARCHDEF
989HOTSPOT_BUILD_CPU_DEFINE
990HOTSPOT_BUILD_CPU_ARCH
991HOTSPOT_BUILD_CPU
992HOTSPOT_BUILD_OS_TYPE
993HOTSPOT_BUILD_OS
994OPENJDK_BUILD_OS_EXPORT_DIR
995OPENJDK_BUILD_CPU_JLI_CFLAGS
996OPENJDK_BUILD_CPU_OSARCH
997OPENJDK_BUILD_CPU_ISADIR
998OPENJDK_BUILD_CPU_LIBDIR
999OPENJDK_BUILD_CPU_LEGACY_LIB
1000OPENJDK_BUILD_CPU_LEGACY
1001HOTSPOT_TARGET_CPU_DEFINE
1002HOTSPOT_TARGET_CPU_ARCH
1003HOTSPOT_TARGET_CPU
1004HOTSPOT_TARGET_OS_TYPE
1005HOTSPOT_TARGET_OS
1006DEFINE_CROSS_COMPILE_ARCH
1007LP64
1008OPENJDK_TARGET_OS_EXPORT_DIR
1009OPENJDK_TARGET_CPU_JLI_CFLAGS
1010OPENJDK_TARGET_CPU_OSARCH
1011OPENJDK_TARGET_CPU_ISADIR
1012OPENJDK_TARGET_CPU_LIBDIR
1013OPENJDK_TARGET_CPU_LEGACY_LIB
1014OPENJDK_TARGET_CPU_LEGACY
1015REQUIRED_OS_VERSION
1016REQUIRED_OS_NAME
1017COMPILE_TYPE
1018OPENJDK_TARGET_CPU_ENDIAN
1019OPENJDK_TARGET_CPU_BITS
1020OPENJDK_TARGET_CPU_ARCH
1021OPENJDK_TARGET_CPU
1022OPENJDK_TARGET_OS_ENV
1023OPENJDK_TARGET_OS_TYPE
1024OPENJDK_TARGET_OS
1025OPENJDK_BUILD_CPU_ENDIAN
1026OPENJDK_BUILD_CPU_BITS
1027OPENJDK_BUILD_CPU_ARCH
1028OPENJDK_BUILD_CPU
1029OPENJDK_BUILD_OS_ENV
1030OPENJDK_BUILD_OS_TYPE
1031OPENJDK_BUILD_OS
1032OPENJDK_BUILD_AUTOCONF_NAME
1033OPENJDK_TARGET_AUTOCONF_NAME
1034target_os
1035target_vendor
1036target_cpu
1037target
1038host_os
1039host_vendor
1040host_cpu
1041host
1042build_os
1043build_vendor
1044build_cpu
1045build
1046NICE
1047CPIO
1048DF
1049READLINK
1050CYGPATH
1051SED
1052FGREP
1053EGREP
1054GREP
1055AWK
1056XARGS
1057WHICH
1058WC
1059UNIQ
1060UNAME
1061TR
1062TOUCH
1063TEE
1064TAR
1065TAIL
1066SORT
1067SH
1068RMDIR
1069RM
1070PRINTF
1071NAWK
1072MV
1073MKTEMP
1074MKDIR
1075LS
1076LN
1077HEAD
1078FIND
1079FILE
1080EXPR
1081ECHO
1082DIRNAME
1083DIFF
1084DATE
1085CUT
1086CP
1087COMM
1088CMP
1089CHMOD
1090CAT
1091BASH
1092BASENAME
1093DATE_WHEN_CONFIGURED
1094ORIGINAL_PATH
1095CONFIGURE_COMMAND_LINE
1096target_alias
1097host_alias
1098build_alias
1099LIBS
1100ECHO_T
1101ECHO_N
1102ECHO_C
1103DEFS
1104mandir
1105localedir
1106libdir
1107psdir
1108pdfdir
1109dvidir
1110htmldir
1111infodir
1112docdir
1113oldincludedir
1114includedir
1115localstatedir
1116sharedstatedir
1117sysconfdir
1118datadir
1119datarootdir
1120libexecdir
1121sbindir
1122bindir
1123program_transform_name
1124prefix
1125exec_prefix
1126PACKAGE_URL
1127PACKAGE_BUGREPORT
1128PACKAGE_STRING
1129PACKAGE_VERSION
1130PACKAGE_TARNAME
1131PACKAGE_NAME
1132PATH_SEPARATOR
1133SHELL'
1134ac_subst_files=''
1135ac_user_opts='
1136enable_option_checking
1137with_target_bits
1138enable_openjdk_only
1139with_custom_make_dir
1140with_jdk_variant
1141enable_debug
1142with_debug_level
1143with_jvm_variants
1144with_devkit
1145with_sys_root
1146with_sysroot
1147with_tools_dir
1148with_toolchain_path
1149with_extra_path
1150with_sdk_name
1151with_conf_name
1152with_output_sync
1153with_default_make_target
1154enable_headful
1155with_cacerts_file
1156enable_unlimited_crypto
1157with_copyright_year
1158enable_keep_packaged_modules
1159with_milestone
1160with_update_version
1161with_user_release_suffix
1162with_build_number
1163with_version_string
1164with_version_pre
1165with_version_opt
1166with_version_build
1167with_version_major
1168with_version_minor
1169with_version_security
1170with_version_patch
1171with_boot_jdk
1172with_build_jdk
1173with_add_source_root
1174with_override_source_root
1175with_adds_and_overrides
1176with_override_langtools
1177with_override_corba
1178with_override_jaxp
1179with_override_jaxws
1180with_override_hotspot
1181with_override_nashorn
1182with_override_jdk
1183with_import_hotspot
1184with_import_modules
1185enable_static_build
1186with_toolchain_type
1187with_extra_cflags
1188with_extra_cxxflags
1189with_extra_ldflags
1190with_toolchain_version
1191with_build_devkit
1192with_jtreg
1193enable_warnings_as_errors
1194with_native_debug_symbols
1195enable_debug_symbols
1196enable_zip_debug_info
1197enable_native_coverage
1198enable_dtrace
1199with_jvm_features
1200with_jvm_interpreter
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_new_hotspot_build
1227enable_hotspot_test_in_build
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260LN
1261LS
1262MKDIR
1263MKTEMP
1264MV
1265NAWK
1266PRINTF
1267RM
1268RMDIR
1269SH
1270SORT
1271TAIL
1272TAR
1273TEE
1274TOUCH
1275TR
1276UNAME
1277UNIQ
1278WC
1279WHICH
1280XARGS
1281AWK
1282GREP
1283EGREP
1284FGREP
1285SED
1286CYGPATH
1287READLINK
1288DF
1289CPIO
1290NICE
1291MAKE
1292UNZIP
1293ZIP
1294LDD
1295OTOOL
1296READELF
1297HG
1298STAT
1299TIME
1300DTRACE
1301PATCH
1302DSYMUTIL
1303XATTR
1304CODESIGN
1305SETFILE
1306PKG_CONFIG
1307JAVA
1308JAVAC
1309JAVAH
1310JAR
1311JARSIGNER
1312CC
1313CFLAGS
1314LDFLAGS
1315LIBS
1316CPPFLAGS
1317CXX
1318CXXFLAGS
1319CCC
1320CPP
1321CXXCPP
1322AS
1323AR
1324LIPO
1325STRIP
1326NM
1327GNM
1328OBJCOPY
1329OBJDUMP
1330BUILD_CC
1331BUILD_CXX
1332BUILD_NM
1333BUILD_AR
1334BUILD_OBJCOPY
1335BUILD_STRIP
1336JTREGEXE
1337XMKMF
1338FREETYPE_CFLAGS
1339FREETYPE_LIBS
1340ALSA_CFLAGS
1341ALSA_LIBS
1342LIBFFI_CFLAGS
1343LIBFFI_LIBS
1344PNG_CFLAGS
1345PNG_LIBS
1346LCMS_CFLAGS
1347LCMS_LIBS
1348ICECC_CMD
1349ICECC_CREATE_ENV
1350ICECC_WRAPPER
1351CCACHE'
1352
1353
1354# Initialize some variables set by options.
1355ac_init_help=
1356ac_init_version=false
1357ac_unrecognized_opts=
1358ac_unrecognized_sep=
1359# The variables have the same names as the options, with
1360# dashes changed to underlines.
1361cache_file=/dev/null
1362exec_prefix=NONE
1363no_create=
1364no_recursion=
1365prefix=NONE
1366program_prefix=NONE
1367program_suffix=NONE
1368program_transform_name=s,x,x,
1369silent=
1370site=
1371srcdir=
1372verbose=
1373x_includes=NONE
1374x_libraries=NONE
1375
1376# Installation directory options.
1377# These are left unexpanded so users can "make install exec_prefix=/foo"
1378# and all the variables that are supposed to be based on exec_prefix
1379# by default will actually change.
1380# Use braces instead of parens because sh, perl, etc. also accept them.
1381# (The list follows the same order as the GNU Coding Standards.)
1382bindir='${exec_prefix}/bin'
1383sbindir='${exec_prefix}/sbin'
1384libexecdir='${exec_prefix}/libexec'
1385datarootdir='${prefix}/share'
1386datadir='${datarootdir}'
1387sysconfdir='${prefix}/etc'
1388sharedstatedir='${prefix}/com'
1389localstatedir='${prefix}/var'
1390includedir='${prefix}/include'
1391oldincludedir='/usr/include'
1392docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1393infodir='${datarootdir}/info'
1394htmldir='${docdir}'
1395dvidir='${docdir}'
1396pdfdir='${docdir}'
1397psdir='${docdir}'
1398libdir='${exec_prefix}/lib'
1399localedir='${datarootdir}/locale'
1400mandir='${datarootdir}/man'
1401
1402ac_prev=
1403ac_dashdash=
1404for ac_option
1405do
1406  # If the previous option needs an argument, assign it.
1407  if test -n "$ac_prev"; then
1408    eval $ac_prev=\$ac_option
1409    ac_prev=
1410    continue
1411  fi
1412
1413  case $ac_option in
1414  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1415  *=)   ac_optarg= ;;
1416  *)    ac_optarg=yes ;;
1417  esac
1418
1419  # Accept the important Cygnus configure options, so we can diagnose typos.
1420
1421  case $ac_dashdash$ac_option in
1422  --)
1423    ac_dashdash=yes ;;
1424
1425  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1426    ac_prev=bindir ;;
1427  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1428    bindir=$ac_optarg ;;
1429
1430  -build | --build | --buil | --bui | --bu)
1431    ac_prev=build_alias ;;
1432  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1433    build_alias=$ac_optarg ;;
1434
1435  -cache-file | --cache-file | --cache-fil | --cache-fi \
1436  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1437    ac_prev=cache_file ;;
1438  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1439  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1440    cache_file=$ac_optarg ;;
1441
1442  --config-cache | -C)
1443    cache_file=config.cache ;;
1444
1445  -datadir | --datadir | --datadi | --datad)
1446    ac_prev=datadir ;;
1447  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1448    datadir=$ac_optarg ;;
1449
1450  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1451  | --dataroo | --dataro | --datar)
1452    ac_prev=datarootdir ;;
1453  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1454  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1455    datarootdir=$ac_optarg ;;
1456
1457  -disable-* | --disable-*)
1458    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1459    # Reject names that are not valid shell variable names.
1460    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1461      as_fn_error $? "invalid feature name: $ac_useropt"
1462    ac_useropt_orig=$ac_useropt
1463    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1464    case $ac_user_opts in
1465      *"
1466"enable_$ac_useropt"
1467"*) ;;
1468      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1469	 ac_unrecognized_sep=', ';;
1470    esac
1471    eval enable_$ac_useropt=no ;;
1472
1473  -docdir | --docdir | --docdi | --doc | --do)
1474    ac_prev=docdir ;;
1475  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1476    docdir=$ac_optarg ;;
1477
1478  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1479    ac_prev=dvidir ;;
1480  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1481    dvidir=$ac_optarg ;;
1482
1483  -enable-* | --enable-*)
1484    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1485    # Reject names that are not valid shell variable names.
1486    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1487      as_fn_error $? "invalid feature name: $ac_useropt"
1488    ac_useropt_orig=$ac_useropt
1489    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1490    case $ac_user_opts in
1491      *"
1492"enable_$ac_useropt"
1493"*) ;;
1494      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1495	 ac_unrecognized_sep=', ';;
1496    esac
1497    eval enable_$ac_useropt=\$ac_optarg ;;
1498
1499  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1500  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1501  | --exec | --exe | --ex)
1502    ac_prev=exec_prefix ;;
1503  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1504  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1505  | --exec=* | --exe=* | --ex=*)
1506    exec_prefix=$ac_optarg ;;
1507
1508  -gas | --gas | --ga | --g)
1509    # Obsolete; use --with-gas.
1510    with_gas=yes ;;
1511
1512  -help | --help | --hel | --he | -h)
1513    ac_init_help=long ;;
1514  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1515    ac_init_help=recursive ;;
1516  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1517    ac_init_help=short ;;
1518
1519  -host | --host | --hos | --ho)
1520    ac_prev=host_alias ;;
1521  -host=* | --host=* | --hos=* | --ho=*)
1522    host_alias=$ac_optarg ;;
1523
1524  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1525    ac_prev=htmldir ;;
1526  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1527  | --ht=*)
1528    htmldir=$ac_optarg ;;
1529
1530  -includedir | --includedir | --includedi | --included | --include \
1531  | --includ | --inclu | --incl | --inc)
1532    ac_prev=includedir ;;
1533  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1534  | --includ=* | --inclu=* | --incl=* | --inc=*)
1535    includedir=$ac_optarg ;;
1536
1537  -infodir | --infodir | --infodi | --infod | --info | --inf)
1538    ac_prev=infodir ;;
1539  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1540    infodir=$ac_optarg ;;
1541
1542  -libdir | --libdir | --libdi | --libd)
1543    ac_prev=libdir ;;
1544  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1545    libdir=$ac_optarg ;;
1546
1547  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1548  | --libexe | --libex | --libe)
1549    ac_prev=libexecdir ;;
1550  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1551  | --libexe=* | --libex=* | --libe=*)
1552    libexecdir=$ac_optarg ;;
1553
1554  -localedir | --localedir | --localedi | --localed | --locale)
1555    ac_prev=localedir ;;
1556  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1557    localedir=$ac_optarg ;;
1558
1559  -localstatedir | --localstatedir | --localstatedi | --localstated \
1560  | --localstate | --localstat | --localsta | --localst | --locals)
1561    ac_prev=localstatedir ;;
1562  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1563  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1564    localstatedir=$ac_optarg ;;
1565
1566  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1567    ac_prev=mandir ;;
1568  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1569    mandir=$ac_optarg ;;
1570
1571  -nfp | --nfp | --nf)
1572    # Obsolete; use --without-fp.
1573    with_fp=no ;;
1574
1575  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1576  | --no-cr | --no-c | -n)
1577    no_create=yes ;;
1578
1579  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1580  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1581    no_recursion=yes ;;
1582
1583  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1584  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1585  | --oldin | --oldi | --old | --ol | --o)
1586    ac_prev=oldincludedir ;;
1587  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1588  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1589  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1590    oldincludedir=$ac_optarg ;;
1591
1592  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1593    ac_prev=prefix ;;
1594  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1595    prefix=$ac_optarg ;;
1596
1597  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1598  | --program-pre | --program-pr | --program-p)
1599    ac_prev=program_prefix ;;
1600  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1601  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1602    program_prefix=$ac_optarg ;;
1603
1604  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1605  | --program-suf | --program-su | --program-s)
1606    ac_prev=program_suffix ;;
1607  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1608  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1609    program_suffix=$ac_optarg ;;
1610
1611  -program-transform-name | --program-transform-name \
1612  | --program-transform-nam | --program-transform-na \
1613  | --program-transform-n | --program-transform- \
1614  | --program-transform | --program-transfor \
1615  | --program-transfo | --program-transf \
1616  | --program-trans | --program-tran \
1617  | --progr-tra | --program-tr | --program-t)
1618    ac_prev=program_transform_name ;;
1619  -program-transform-name=* | --program-transform-name=* \
1620  | --program-transform-nam=* | --program-transform-na=* \
1621  | --program-transform-n=* | --program-transform-=* \
1622  | --program-transform=* | --program-transfor=* \
1623  | --program-transfo=* | --program-transf=* \
1624  | --program-trans=* | --program-tran=* \
1625  | --progr-tra=* | --program-tr=* | --program-t=*)
1626    program_transform_name=$ac_optarg ;;
1627
1628  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1629    ac_prev=pdfdir ;;
1630  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1631    pdfdir=$ac_optarg ;;
1632
1633  -psdir | --psdir | --psdi | --psd | --ps)
1634    ac_prev=psdir ;;
1635  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1636    psdir=$ac_optarg ;;
1637
1638  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1639  | -silent | --silent | --silen | --sile | --sil)
1640    silent=yes ;;
1641
1642  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1643    ac_prev=sbindir ;;
1644  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1645  | --sbi=* | --sb=*)
1646    sbindir=$ac_optarg ;;
1647
1648  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1649  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1650  | --sharedst | --shareds | --shared | --share | --shar \
1651  | --sha | --sh)
1652    ac_prev=sharedstatedir ;;
1653  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1654  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1655  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1656  | --sha=* | --sh=*)
1657    sharedstatedir=$ac_optarg ;;
1658
1659  -site | --site | --sit)
1660    ac_prev=site ;;
1661  -site=* | --site=* | --sit=*)
1662    site=$ac_optarg ;;
1663
1664  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1665    ac_prev=srcdir ;;
1666  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1667    srcdir=$ac_optarg ;;
1668
1669  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1670  | --syscon | --sysco | --sysc | --sys | --sy)
1671    ac_prev=sysconfdir ;;
1672  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1673  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1674    sysconfdir=$ac_optarg ;;
1675
1676  -target | --target | --targe | --targ | --tar | --ta | --t)
1677    ac_prev=target_alias ;;
1678  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1679    target_alias=$ac_optarg ;;
1680
1681  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1682    verbose=yes ;;
1683
1684  -version | --version | --versio | --versi | --vers | -V)
1685    ac_init_version=: ;;
1686
1687  -with-* | --with-*)
1688    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1689    # Reject names that are not valid shell variable names.
1690    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1691      as_fn_error $? "invalid package name: $ac_useropt"
1692    ac_useropt_orig=$ac_useropt
1693    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1694    case $ac_user_opts in
1695      *"
1696"with_$ac_useropt"
1697"*) ;;
1698      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1699	 ac_unrecognized_sep=', ';;
1700    esac
1701    eval with_$ac_useropt=\$ac_optarg ;;
1702
1703  -without-* | --without-*)
1704    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1705    # Reject names that are not valid shell variable names.
1706    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1707      as_fn_error $? "invalid package name: $ac_useropt"
1708    ac_useropt_orig=$ac_useropt
1709    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1710    case $ac_user_opts in
1711      *"
1712"with_$ac_useropt"
1713"*) ;;
1714      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1715	 ac_unrecognized_sep=', ';;
1716    esac
1717    eval with_$ac_useropt=no ;;
1718
1719  --x)
1720    # Obsolete; use --with-x.
1721    with_x=yes ;;
1722
1723  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1724  | --x-incl | --x-inc | --x-in | --x-i)
1725    ac_prev=x_includes ;;
1726  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1727  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1728    x_includes=$ac_optarg ;;
1729
1730  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1731  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1732    ac_prev=x_libraries ;;
1733  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1734  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1735    x_libraries=$ac_optarg ;;
1736
1737  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1738Try \`$0 --help' for more information"
1739    ;;
1740
1741  *=*)
1742    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1743    # Reject names that are not valid shell variable names.
1744    case $ac_envvar in #(
1745      '' | [0-9]* | *[!_$as_cr_alnum]* )
1746      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1747    esac
1748    eval $ac_envvar=\$ac_optarg
1749    export $ac_envvar ;;
1750
1751  *)
1752    # FIXME: should be removed in autoconf 3.0.
1753    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1754    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1755      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1756    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1757    ;;
1758
1759  esac
1760done
1761
1762if test -n "$ac_prev"; then
1763  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1764  as_fn_error $? "missing argument to $ac_option"
1765fi
1766
1767if test -n "$ac_unrecognized_opts"; then
1768  case $enable_option_checking in
1769    no) ;;
1770    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1771    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1772  esac
1773fi
1774
1775# Check all directory arguments for consistency.
1776for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1777		datadir sysconfdir sharedstatedir localstatedir includedir \
1778		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1779		libdir localedir mandir
1780do
1781  eval ac_val=\$$ac_var
1782  # Remove trailing slashes.
1783  case $ac_val in
1784    */ )
1785      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1786      eval $ac_var=\$ac_val;;
1787  esac
1788  # Be sure to have absolute directory names.
1789  case $ac_val in
1790    [\\/$]* | ?:[\\/]* )  continue;;
1791    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1792  esac
1793  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1794done
1795
1796# There might be people who depend on the old broken behavior: `$host'
1797# used to hold the argument of --host etc.
1798# FIXME: To remove some day.
1799build=$build_alias
1800host=$host_alias
1801target=$target_alias
1802
1803# FIXME: To remove some day.
1804if test "x$host_alias" != x; then
1805  if test "x$build_alias" = x; then
1806    cross_compiling=maybe
1807  elif test "x$build_alias" != "x$host_alias"; then
1808    cross_compiling=yes
1809  fi
1810fi
1811
1812ac_tool_prefix=
1813test -n "$host_alias" && ac_tool_prefix=$host_alias-
1814
1815test "$silent" = yes && exec 6>/dev/null
1816
1817
1818ac_pwd=`pwd` && test -n "$ac_pwd" &&
1819ac_ls_di=`ls -di .` &&
1820ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1821  as_fn_error $? "working directory cannot be determined"
1822test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1823  as_fn_error $? "pwd does not report name of working directory"
1824
1825
1826# Find the source files, if location was not specified.
1827if test -z "$srcdir"; then
1828  ac_srcdir_defaulted=yes
1829  # Try the directory containing this script, then the parent directory.
1830  ac_confdir=`$as_dirname -- "$as_myself" ||
1831$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1832	 X"$as_myself" : 'X\(//\)[^/]' \| \
1833	 X"$as_myself" : 'X\(//\)$' \| \
1834	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1835$as_echo X"$as_myself" |
1836    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1837	    s//\1/
1838	    q
1839	  }
1840	  /^X\(\/\/\)[^/].*/{
1841	    s//\1/
1842	    q
1843	  }
1844	  /^X\(\/\/\)$/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\).*/{
1849	    s//\1/
1850	    q
1851	  }
1852	  s/.*/./; q'`
1853  srcdir=$ac_confdir
1854  if test ! -r "$srcdir/$ac_unique_file"; then
1855    srcdir=..
1856  fi
1857else
1858  ac_srcdir_defaulted=no
1859fi
1860if test ! -r "$srcdir/$ac_unique_file"; then
1861  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1862  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1863fi
1864ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1865ac_abs_confdir=`(
1866	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1867	pwd)`
1868# When building in place, set srcdir=.
1869if test "$ac_abs_confdir" = "$ac_pwd"; then
1870  srcdir=.
1871fi
1872# Remove unnecessary trailing slashes from srcdir.
1873# Double slashes in file names in object file debugging info
1874# mess up M-x gdb in Emacs.
1875case $srcdir in
1876*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1877esac
1878for ac_var in $ac_precious_vars; do
1879  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1880  eval ac_env_${ac_var}_value=\$${ac_var}
1881  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1883done
1884
1885#
1886# Report the --help message.
1887#
1888if test "$ac_init_help" = "long"; then
1889  # Omit some internal or obsolete options to make the list less imposing.
1890  # This message is too long to be a string in the A/UX 3.1 sh.
1891  cat <<_ACEOF
1892\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1893
1894Usage: $0 [OPTION]... [VAR=VALUE]...
1895
1896To assign environment variables (e.g., CC, CFLAGS...), specify them as
1897VAR=VALUE.  See below for descriptions of some of the useful variables.
1898
1899Defaults for the options are specified in brackets.
1900
1901Configuration:
1902  -h, --help              display this help and exit
1903      --help=short        display options specific to this package
1904      --help=recursive    display the short help of all the included packages
1905  -V, --version           display version information and exit
1906  -q, --quiet, --silent   do not print \`checking ...' messages
1907      --cache-file=FILE   cache test results in FILE [disabled]
1908  -C, --config-cache      alias for \`--cache-file=config.cache'
1909  -n, --no-create         do not create output files
1910      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1911
1912Installation directories:
1913  --prefix=PREFIX         install architecture-independent files in PREFIX
1914                          [$ac_default_prefix]
1915  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1916                          [PREFIX]
1917
1918By default, \`make install' will install all the files in
1919\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1920an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1921for instance \`--prefix=\$HOME'.
1922
1923For better control, use the options below.
1924
1925Fine tuning of the installation directories:
1926  --bindir=DIR            user executables [EPREFIX/bin]
1927  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1928  --libexecdir=DIR        program executables [EPREFIX/libexec]
1929  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1930  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1931  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1932  --libdir=DIR            object code libraries [EPREFIX/lib]
1933  --includedir=DIR        C header files [PREFIX/include]
1934  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1935  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1936  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1937  --infodir=DIR           info documentation [DATAROOTDIR/info]
1938  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1939  --mandir=DIR            man documentation [DATAROOTDIR/man]
1940  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1941  --htmldir=DIR           html documentation [DOCDIR]
1942  --dvidir=DIR            dvi documentation [DOCDIR]
1943  --pdfdir=DIR            pdf documentation [DOCDIR]
1944  --psdir=DIR             ps documentation [DOCDIR]
1945_ACEOF
1946
1947  cat <<\_ACEOF
1948
1949X features:
1950  --x-includes=DIR    X include files are in DIR
1951  --x-libraries=DIR   X library files are in DIR
1952
1953System types:
1954  --build=BUILD     configure for building on BUILD [guessed]
1955  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1956  --target=TARGET   configure for building compilers for TARGET [HOST]
1957_ACEOF
1958fi
1959
1960if test -n "$ac_init_help"; then
1961  case $ac_init_help in
1962     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1963   esac
1964  cat <<\_ACEOF
1965
1966Optional Features:
1967  --disable-option-checking  ignore unrecognized --enable/--with options
1968  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1969  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1970  --enable-openjdk-only   suppress building custom source even if present
1971                          [disabled]
1972  --enable-debug          set the debug level to fastdebug (shorthand for
1973                          --with-debug-level=fastdebug) [disabled]
1974  --disable-headful       disable building headful support (graphical UI
1975                          support) [enabled]
1976  --enable-unlimited-crypto
1977                          Enable unlimited crypto policy [disabled]
1978  --disable-keep-packaged-modules
1979                          Do not keep packaged modules in jdk image [enable]
1980  --enable-static-build   enable static library build [disabled]
1981  --disable-warnings-as-errors
1982                          do not consider native warnings to be an error
1983                          [enabled]
1984  --enable-debug-symbols  Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --enable-zip-debug-info Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-native-coverage
1989                          enable native compilation with code coverage
1990                          data[disabled]
1991  --enable-dtrace[=yes/no/auto]
1992                          enable dtrace. Default is auto, where dtrace is
1993                          enabled if all dependencies are present.
1994  --disable-freetype-bundling
1995                          disable bundling of the freetype library with the
1996                          build result [enabled on Windows or when using
1997                          --with-freetype, disabled otherwise]
1998  --disable-new-hotspot-build
1999                          disable the new hotspot build system (use the old)
2000                          [enabled]
2001  --enable-hotspot-test-in-build
2002                          run the Queens test after Hotspot build [disabled]
2003  --enable-sjavac         use sjavac to do fast incremental compiles
2004                          [disabled]
2005  --disable-javac-server  disable javac server [enabled]
2006  --enable-icecc          enable distribted compilation of native code using
2007                          icecc/icecream [disabled]
2008  --disable-precompiled-headers
2009                          disable using precompiled headers when compiling C++
2010                          [enabled]
2011  --enable-ccache         enable using ccache to speed up recompilations
2012                          [disabled]
2013
2014Optional Packages:
2015  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2016  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2017  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2018                          support it), e.g. --with-target-bits=32 [guessed]
2019  --with-custom-make-dir  Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-jdk-variant      JDK variant to build (normal) [normal]
2022  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2023                          optimized) [release]
2024  --with-jvm-variants     JVM variants (separated by commas) to build
2025                          (server,client,minimal,core,zero,zeroshark,custom)
2026                          [server]
2027  --with-devkit           use this devkit for compilers, tools and resources
2028  --with-sys-root         alias for --with-sysroot for backwards compatability
2029  --with-sysroot          use this directory as sysroot
2030  --with-tools-dir        alias for --with-toolchain-path for backwards
2031                          compatibility
2032  --with-toolchain-path   prepend these directories when searching for
2033                          toolchain binaries (compilers etc)
2034  --with-extra-path       prepend these directories to the default path
2035  --with-sdk-name         use the platform SDK of the given name. [macosx]
2036  --with-conf-name        use this as the name of the configuration [generated
2037                          from important configuration options]
2038  --with-output-sync      set make output sync type if supported by make.
2039                          [recurse]
2040  --with-default-make-target
2041                          set the default make target [exploded-image]
2042  --with-cacerts-file     specify alternative cacerts file
2043  --with-copyright-year   Set copyright year value for build [current year]
2044  --with-milestone        Deprecated. Option is kept for backwards
2045                          compatibility and is ignored
2046  --with-update-version   Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-user-release-suffix
2049                          Deprecated. Option is kept for backwards
2050                          compatibility and is ignored
2051  --with-build-number     Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-version-string   Set version string [calculated]
2054  --with-version-pre      Set the base part of the version 'PRE' field
2055                          (pre-release identifier) ['internal']
2056  --with-version-opt      Set version 'OPT' field (build metadata)
2057                          [<timestamp>.<user>.<dirname>]
2058  --with-version-build    Set version 'BUILD' field (build number) [not
2059                          specified]
2060  --with-version-major    Set version 'MAJOR' field (first number) [current
2061                          source value]
2062  --with-version-minor    Set version 'MINOR' field (second number) [current
2063                          source value]
2064  --with-version-security Set version 'SECURITY' field (third number) [current
2065                          source value]
2066  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2067                          specified]
2068  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2069  --with-build-jdk        path to JDK of same version as is being built[the
2070                          newly built JDK]
2071  --with-add-source-root  Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-override-source-root
2074                          Deprecated. Option is kept for backwards
2075                          compatibility and is ignored
2076  --with-adds-and-overrides
2077                          Deprecated. Option is kept for backwards
2078                          compatibility and is ignored
2079  --with-override-langtools
2080                          Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-corba   Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-jaxp    Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxws   Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-hotspot Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-nashorn Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jdk     Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-import-hotspot   import hotspot binaries from this jdk image or
2095                          hotspot build dist dir instead of building from
2096                          source
2097  --with-import-modules   import a set of prebuilt modules either as a zip
2098                          file or an exploded directory
2099  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2100                          to show possible values [platform dependent]
2101  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2102  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2103  --with-extra-ldflags    extra flags to be used when linking jdk
2104  --with-toolchain-version
2105                          the version of the toolchain to look for, use
2106                          '--help' to show possible values [platform
2107                          dependent]
2108  --with-build-devkit     Devkit to use for the build platform toolchain
2109  --with-jtreg            Regression Test Harness [probed]
2110  --with-native-debug-symbols
2111                          set the native debug symbol configuration (none,
2112                          internal, external, zipped) [varying]
2113  --with-jvm-features     additional JVM features to enable (separated by
2114                          comma), use '--help' to show possible values [none]
2115  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2116                          compatibility and is ignored
2117  --with-stdc++lib=<static>,<dynamic>,<default>
2118                          force linking of the C++ runtime on Linux to either
2119                          static or dynamic, default is static with dynamic as
2120                          fallback
2121  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2122                          (Windows only) [probed]
2123  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2124                          (Windows only) [probed]
2125  --with-x                use the X Window System
2126  --with-cups             specify prefix directory for the cups package
2127                          (expecting the headers under PATH/include)
2128  --with-cups-include     specify directory for the cups include files
2129  --with-freetype         specify prefix directory for the freetype package
2130                          (expecting the libraries under PATH/lib and the
2131                          headers under PATH/include)
2132  --with-freetype-include specify directory for the freetype include files
2133  --with-freetype-lib     specify directory for the freetype library
2134  --with-freetype-src     specify directory with freetype sources to
2135                          automatically build the library (experimental,
2136                          Windows-only)
2137  --with-alsa             specify prefix directory for the alsa package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-alsa-include     specify directory for the alsa include files
2141  --with-alsa-lib         specify directory for the alsa library
2142  --with-libffi           specify prefix directory for the libffi package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-libffi-include   specify directory for the libffi include files
2146  --with-libffi-lib       specify directory for the libffi library
2147  --with-libjpeg          use libjpeg from build system or OpenJDK source
2148                          (system, bundled) [bundled]
2149  --with-giflib           use giflib from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-libpng           use libpng from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-zlib             use zlib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-lcms             use lcms2 from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-dxsdk            Deprecated. Option is kept for backwards
2158                          compatibility and is ignored
2159  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-include    Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-num-cores        number of cores in the build system, e.g.
2164                          --with-num-cores=8 [probed]
2165  --with-memory-size      memory (in MB) available in the build system, e.g.
2166                          --with-memory-size=1024 [probed]
2167  --with-jobs             number of parallel jobs to let make run [calculated
2168                          based on cores and memory]
2169  --with-test-jobs        number of parallel tests jobs to run [based on build
2170                          jobs]
2171  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2172                          invocations of boot JDK, overriding the default
2173                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2174                          -enableassertions"
2175  --with-sjavac-server-java
2176                          use this java binary for running the sjavac
2177                          background server [Boot JDK java]
2178  --with-ccache-dir       where to store ccache files [~/.ccache]
2179
2180Some influential environment variables:
2181  BASENAME    Override default value for BASENAME
2182  BASH        Override default value for BASH
2183  CAT         Override default value for CAT
2184  CHMOD       Override default value for CHMOD
2185  CMP         Override default value for CMP
2186  COMM        Override default value for COMM
2187  CP          Override default value for CP
2188  CUT         Override default value for CUT
2189  DATE        Override default value for DATE
2190  DIFF        Override default value for DIFF
2191  DIRNAME     Override default value for DIRNAME
2192  ECHO        Override default value for ECHO
2193  EXPR        Override default value for EXPR
2194  FILE        Override default value for FILE
2195  FIND        Override default value for FIND
2196  HEAD        Override default value for HEAD
2197  LN          Override default value for LN
2198  LS          Override default value for LS
2199  MKDIR       Override default value for MKDIR
2200  MKTEMP      Override default value for MKTEMP
2201  MV          Override default value for MV
2202  NAWK        Override default value for NAWK
2203  PRINTF      Override default value for PRINTF
2204  RM          Override default value for RM
2205  RMDIR       Override default value for RMDIR
2206  SH          Override default value for SH
2207  SORT        Override default value for SORT
2208  TAIL        Override default value for TAIL
2209  TAR         Override default value for TAR
2210  TEE         Override default value for TEE
2211  TOUCH       Override default value for TOUCH
2212  TR          Override default value for TR
2213  UNAME       Override default value for UNAME
2214  UNIQ        Override default value for UNIQ
2215  WC          Override default value for WC
2216  WHICH       Override default value for WHICH
2217  XARGS       Override default value for XARGS
2218  AWK         Override default value for AWK
2219  GREP        Override default value for GREP
2220  EGREP       Override default value for EGREP
2221  FGREP       Override default value for FGREP
2222  SED         Override default value for SED
2223  CYGPATH     Override default value for CYGPATH
2224  READLINK    Override default value for READLINK
2225  DF          Override default value for DF
2226  CPIO        Override default value for CPIO
2227  NICE        Override default value for NICE
2228  MAKE        Override default value for MAKE
2229  UNZIP       Override default value for UNZIP
2230  ZIP         Override default value for ZIP
2231  LDD         Override default value for LDD
2232  OTOOL       Override default value for OTOOL
2233  READELF     Override default value for READELF
2234  HG          Override default value for HG
2235  STAT        Override default value for STAT
2236  TIME        Override default value for TIME
2237  DTRACE      Override default value for DTRACE
2238  PATCH       Override default value for PATCH
2239  DSYMUTIL    Override default value for DSYMUTIL
2240  XATTR       Override default value for XATTR
2241  CODESIGN    Override default value for CODESIGN
2242  SETFILE     Override default value for SETFILE
2243  PKG_CONFIG  path to pkg-config utility
2244  JAVA        Override default value for JAVA
2245  JAVAC       Override default value for JAVAC
2246  JAVAH       Override default value for JAVAH
2247  JAR         Override default value for JAR
2248  JARSIGNER   Override default value for JARSIGNER
2249  CC          C compiler command
2250  CFLAGS      C compiler flags
2251  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2252              nonstandard directory <lib dir>
2253  LIBS        libraries to pass to the linker, e.g. -l<library>
2254  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2255              you have headers in a nonstandard directory <include dir>
2256  CXX         C++ compiler command
2257  CXXFLAGS    C++ compiler flags
2258  CPP         C preprocessor
2259  CXXCPP      C++ preprocessor
2260  AS          Override default value for AS
2261  AR          Override default value for AR
2262  LIPO        Override default value for LIPO
2263  STRIP       Override default value for STRIP
2264  NM          Override default value for NM
2265  GNM         Override default value for GNM
2266  OBJCOPY     Override default value for OBJCOPY
2267  OBJDUMP     Override default value for OBJDUMP
2268  BUILD_CC    Override default value for BUILD_CC
2269  BUILD_CXX   Override default value for BUILD_CXX
2270  BUILD_NM    Override default value for BUILD_NM
2271  BUILD_AR    Override default value for BUILD_AR
2272  BUILD_OBJCOPY
2273              Override default value for BUILD_OBJCOPY
2274  BUILD_STRIP Override default value for BUILD_STRIP
2275  JTREGEXE    Override default value for JTREGEXE
2276  XMKMF       Path to xmkmf, Makefile generator for X Window System
2277  FREETYPE_CFLAGS
2278              C compiler flags for FREETYPE, overriding pkg-config
2279  FREETYPE_LIBS
2280              linker flags for FREETYPE, overriding pkg-config
2281  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2282  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2283  LIBFFI_CFLAGS
2284              C compiler flags for LIBFFI, overriding pkg-config
2285  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2286  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2287  PNG_LIBS    linker flags for PNG, overriding pkg-config
2288  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2289  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2290  ICECC_CMD   Override default value for ICECC_CMD
2291  ICECC_CREATE_ENV
2292              Override default value for ICECC_CREATE_ENV
2293  ICECC_WRAPPER
2294              Override default value for ICECC_WRAPPER
2295  CCACHE      Override default value for CCACHE
2296
2297Use these variables to override the choices made by `configure' or to help
2298it to find libraries and programs with nonstandard names/locations.
2299
2300Report bugs to <build-dev@openjdk.java.net>.
2301OpenJDK home page: <http://openjdk.java.net>.
2302_ACEOF
2303ac_status=$?
2304fi
2305
2306if test "$ac_init_help" = "recursive"; then
2307  # If there are subdirs, report their specific --help.
2308  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2309    test -d "$ac_dir" ||
2310      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2311      continue
2312    ac_builddir=.
2313
2314case "$ac_dir" in
2315.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2316*)
2317  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2318  # A ".." for each directory in $ac_dir_suffix.
2319  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2320  case $ac_top_builddir_sub in
2321  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2322  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2323  esac ;;
2324esac
2325ac_abs_top_builddir=$ac_pwd
2326ac_abs_builddir=$ac_pwd$ac_dir_suffix
2327# for backward compatibility:
2328ac_top_builddir=$ac_top_build_prefix
2329
2330case $srcdir in
2331  .)  # We are building in place.
2332    ac_srcdir=.
2333    ac_top_srcdir=$ac_top_builddir_sub
2334    ac_abs_top_srcdir=$ac_pwd ;;
2335  [\\/]* | ?:[\\/]* )  # Absolute name.
2336    ac_srcdir=$srcdir$ac_dir_suffix;
2337    ac_top_srcdir=$srcdir
2338    ac_abs_top_srcdir=$srcdir ;;
2339  *) # Relative name.
2340    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2341    ac_top_srcdir=$ac_top_build_prefix$srcdir
2342    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2343esac
2344ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2345
2346    cd "$ac_dir" || { ac_status=$?; continue; }
2347    # Check for guested configure.
2348    if test -f "$ac_srcdir/configure.gnu"; then
2349      echo &&
2350      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2351    elif test -f "$ac_srcdir/configure"; then
2352      echo &&
2353      $SHELL "$ac_srcdir/configure" --help=recursive
2354    else
2355      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2356    fi || ac_status=$?
2357    cd "$ac_pwd" || { ac_status=$?; break; }
2358  done
2359fi
2360
2361test -n "$ac_init_help" && exit $ac_status
2362if $ac_init_version; then
2363  cat <<\_ACEOF
2364OpenJDK configure jdk9
2365generated by GNU Autoconf 2.69
2366
2367Copyright (C) 2012 Free Software Foundation, Inc.
2368This configure script is free software; the Free Software Foundation
2369gives unlimited permission to copy, distribute and modify it.
2370_ACEOF
2371  exit
2372fi
2373
2374## ------------------------ ##
2375## Autoconf initialization. ##
2376## ------------------------ ##
2377
2378# ac_fn_c_try_compile LINENO
2379# --------------------------
2380# Try to compile conftest.$ac_ext, and return whether this succeeded.
2381ac_fn_c_try_compile ()
2382{
2383  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384  rm -f conftest.$ac_objext
2385  if { { ac_try="$ac_compile"
2386case "(($ac_try" in
2387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388  *) ac_try_echo=$ac_try;;
2389esac
2390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391$as_echo "$ac_try_echo"; } >&5
2392  (eval "$ac_compile") 2>conftest.err
2393  ac_status=$?
2394  if test -s conftest.err; then
2395    grep -v '^ *+' conftest.err >conftest.er1
2396    cat conftest.er1 >&5
2397    mv -f conftest.er1 conftest.err
2398  fi
2399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400  test $ac_status = 0; } && {
2401	 test -z "$ac_c_werror_flag" ||
2402	 test ! -s conftest.err
2403       } && test -s conftest.$ac_objext; then :
2404  ac_retval=0
2405else
2406  $as_echo "$as_me: failed program was:" >&5
2407sed 's/^/| /' conftest.$ac_ext >&5
2408
2409	ac_retval=1
2410fi
2411  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412  as_fn_set_status $ac_retval
2413
2414} # ac_fn_c_try_compile
2415
2416# ac_fn_cxx_try_compile LINENO
2417# ----------------------------
2418# Try to compile conftest.$ac_ext, and return whether this succeeded.
2419ac_fn_cxx_try_compile ()
2420{
2421  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422  rm -f conftest.$ac_objext
2423  if { { ac_try="$ac_compile"
2424case "(($ac_try" in
2425  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2426  *) ac_try_echo=$ac_try;;
2427esac
2428eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2429$as_echo "$ac_try_echo"; } >&5
2430  (eval "$ac_compile") 2>conftest.err
2431  ac_status=$?
2432  if test -s conftest.err; then
2433    grep -v '^ *+' conftest.err >conftest.er1
2434    cat conftest.er1 >&5
2435    mv -f conftest.er1 conftest.err
2436  fi
2437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2438  test $ac_status = 0; } && {
2439	 test -z "$ac_cxx_werror_flag" ||
2440	 test ! -s conftest.err
2441       } && test -s conftest.$ac_objext; then :
2442  ac_retval=0
2443else
2444  $as_echo "$as_me: failed program was:" >&5
2445sed 's/^/| /' conftest.$ac_ext >&5
2446
2447	ac_retval=1
2448fi
2449  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2450  as_fn_set_status $ac_retval
2451
2452} # ac_fn_cxx_try_compile
2453
2454# ac_fn_c_try_cpp LINENO
2455# ----------------------
2456# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2457ac_fn_c_try_cpp ()
2458{
2459  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460  if { { ac_try="$ac_cpp conftest.$ac_ext"
2461case "(($ac_try" in
2462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2463  *) ac_try_echo=$ac_try;;
2464esac
2465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2466$as_echo "$ac_try_echo"; } >&5
2467  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2468  ac_status=$?
2469  if test -s conftest.err; then
2470    grep -v '^ *+' conftest.err >conftest.er1
2471    cat conftest.er1 >&5
2472    mv -f conftest.er1 conftest.err
2473  fi
2474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2475  test $ac_status = 0; } > conftest.i && {
2476	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2477	 test ! -s conftest.err
2478       }; then :
2479  ac_retval=0
2480else
2481  $as_echo "$as_me: failed program was:" >&5
2482sed 's/^/| /' conftest.$ac_ext >&5
2483
2484    ac_retval=1
2485fi
2486  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2487  as_fn_set_status $ac_retval
2488
2489} # ac_fn_c_try_cpp
2490
2491# ac_fn_cxx_try_cpp LINENO
2492# ------------------------
2493# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2494ac_fn_cxx_try_cpp ()
2495{
2496  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497  if { { ac_try="$ac_cpp conftest.$ac_ext"
2498case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2505  ac_status=$?
2506  if test -s conftest.err; then
2507    grep -v '^ *+' conftest.err >conftest.er1
2508    cat conftest.er1 >&5
2509    mv -f conftest.er1 conftest.err
2510  fi
2511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2512  test $ac_status = 0; } > conftest.i && {
2513	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2514	 test ! -s conftest.err
2515       }; then :
2516  ac_retval=0
2517else
2518  $as_echo "$as_me: failed program was:" >&5
2519sed 's/^/| /' conftest.$ac_ext >&5
2520
2521    ac_retval=1
2522fi
2523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524  as_fn_set_status $ac_retval
2525
2526} # ac_fn_cxx_try_cpp
2527
2528# ac_fn_c_try_link LINENO
2529# -----------------------
2530# Try to link conftest.$ac_ext, and return whether this succeeded.
2531ac_fn_c_try_link ()
2532{
2533  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2534  rm -f conftest.$ac_objext conftest$ac_exeext
2535  if { { ac_try="$ac_link"
2536case "(($ac_try" in
2537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2538  *) ac_try_echo=$ac_try;;
2539esac
2540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2541$as_echo "$ac_try_echo"; } >&5
2542  (eval "$ac_link") 2>conftest.err
2543  ac_status=$?
2544  if test -s conftest.err; then
2545    grep -v '^ *+' conftest.err >conftest.er1
2546    cat conftest.er1 >&5
2547    mv -f conftest.er1 conftest.err
2548  fi
2549  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2550  test $ac_status = 0; } && {
2551	 test -z "$ac_c_werror_flag" ||
2552	 test ! -s conftest.err
2553       } && test -s conftest$ac_exeext && {
2554	 test "$cross_compiling" = yes ||
2555	 test -x conftest$ac_exeext
2556       }; then :
2557  ac_retval=0
2558else
2559  $as_echo "$as_me: failed program was:" >&5
2560sed 's/^/| /' conftest.$ac_ext >&5
2561
2562	ac_retval=1
2563fi
2564  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2565  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2566  # interfere with the next link command; also delete a directory that is
2567  # left behind by Apple's compiler.  We do this before executing the actions.
2568  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2569  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2570  as_fn_set_status $ac_retval
2571
2572} # ac_fn_c_try_link
2573
2574# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2575# ---------------------------------------------------------
2576# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2577# the include files in INCLUDES and setting the cache variable VAR
2578# accordingly.
2579ac_fn_cxx_check_header_mongrel ()
2580{
2581  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582  if eval \${$3+:} false; then :
2583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2584$as_echo_n "checking for $2... " >&6; }
2585if eval \${$3+:} false; then :
2586  $as_echo_n "(cached) " >&6
2587fi
2588eval ac_res=\$$3
2589	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590$as_echo "$ac_res" >&6; }
2591else
2592  # Is the header compilable?
2593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2594$as_echo_n "checking $2 usability... " >&6; }
2595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596/* end confdefs.h.  */
2597$4
2598#include <$2>
2599_ACEOF
2600if ac_fn_cxx_try_compile "$LINENO"; then :
2601  ac_header_compiler=yes
2602else
2603  ac_header_compiler=no
2604fi
2605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2607$as_echo "$ac_header_compiler" >&6; }
2608
2609# Is the header present?
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2611$as_echo_n "checking $2 presence... " >&6; }
2612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614#include <$2>
2615_ACEOF
2616if ac_fn_cxx_try_cpp "$LINENO"; then :
2617  ac_header_preproc=yes
2618else
2619  ac_header_preproc=no
2620fi
2621rm -f conftest.err conftest.i conftest.$ac_ext
2622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2623$as_echo "$ac_header_preproc" >&6; }
2624
2625# So?  What about this header?
2626case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2627  yes:no: )
2628    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2629$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2631$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2632    ;;
2633  no:yes:* )
2634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2635$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2637$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2639$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2641$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2643$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2644( $as_echo "## ----------------------------------------- ##
2645## Report this to build-dev@openjdk.java.net ##
2646## ----------------------------------------- ##"
2647     ) | sed "s/^/$as_me: WARNING:     /" >&2
2648    ;;
2649esac
2650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2651$as_echo_n "checking for $2... " >&6; }
2652if eval \${$3+:} false; then :
2653  $as_echo_n "(cached) " >&6
2654else
2655  eval "$3=\$ac_header_compiler"
2656fi
2657eval ac_res=\$$3
2658	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2659$as_echo "$ac_res" >&6; }
2660fi
2661  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2662
2663} # ac_fn_cxx_check_header_mongrel
2664
2665# ac_fn_cxx_try_run LINENO
2666# ------------------------
2667# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2668# that executables *can* be run.
2669ac_fn_cxx_try_run ()
2670{
2671  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2672  if { { ac_try="$ac_link"
2673case "(($ac_try" in
2674  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2675  *) ac_try_echo=$ac_try;;
2676esac
2677eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2678$as_echo "$ac_try_echo"; } >&5
2679  (eval "$ac_link") 2>&5
2680  ac_status=$?
2681  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2682  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2683  { { case "(($ac_try" in
2684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2685  *) ac_try_echo=$ac_try;;
2686esac
2687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2688$as_echo "$ac_try_echo"; } >&5
2689  (eval "$ac_try") 2>&5
2690  ac_status=$?
2691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2692  test $ac_status = 0; }; }; then :
2693  ac_retval=0
2694else
2695  $as_echo "$as_me: program exited with status $ac_status" >&5
2696       $as_echo "$as_me: failed program was:" >&5
2697sed 's/^/| /' conftest.$ac_ext >&5
2698
2699       ac_retval=$ac_status
2700fi
2701  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2702  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2703  as_fn_set_status $ac_retval
2704
2705} # ac_fn_cxx_try_run
2706
2707# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2708# ---------------------------------------------------------
2709# Tests whether HEADER exists and can be compiled using the include files in
2710# INCLUDES, setting the cache variable VAR accordingly.
2711ac_fn_cxx_check_header_compile ()
2712{
2713  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2715$as_echo_n "checking for $2... " >&6; }
2716if eval \${$3+:} false; then :
2717  $as_echo_n "(cached) " >&6
2718else
2719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720/* end confdefs.h.  */
2721$4
2722#include <$2>
2723_ACEOF
2724if ac_fn_cxx_try_compile "$LINENO"; then :
2725  eval "$3=yes"
2726else
2727  eval "$3=no"
2728fi
2729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2730fi
2731eval ac_res=\$$3
2732	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2733$as_echo "$ac_res" >&6; }
2734  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735
2736} # ac_fn_cxx_check_header_compile
2737
2738# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2739# ----------------------------------------------
2740# Tries to find the compile-time value of EXPR in a program that includes
2741# INCLUDES, setting VAR accordingly. Returns whether the value could be
2742# computed
2743ac_fn_cxx_compute_int ()
2744{
2745  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746  if test "$cross_compiling" = yes; then
2747    # Depending upon the size, compute the lo and hi bounds.
2748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2749/* end confdefs.h.  */
2750$4
2751int
2752main ()
2753{
2754static int test_array [1 - 2 * !(($2) >= 0)];
2755test_array [0] = 0;
2756return test_array [0];
2757
2758  ;
2759  return 0;
2760}
2761_ACEOF
2762if ac_fn_cxx_try_compile "$LINENO"; then :
2763  ac_lo=0 ac_mid=0
2764  while :; do
2765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2766/* end confdefs.h.  */
2767$4
2768int
2769main ()
2770{
2771static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2772test_array [0] = 0;
2773return test_array [0];
2774
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779if ac_fn_cxx_try_compile "$LINENO"; then :
2780  ac_hi=$ac_mid; break
2781else
2782  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2783			if test $ac_lo -le $ac_mid; then
2784			  ac_lo= ac_hi=
2785			  break
2786			fi
2787			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2788fi
2789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2790  done
2791else
2792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793/* end confdefs.h.  */
2794$4
2795int
2796main ()
2797{
2798static int test_array [1 - 2 * !(($2) < 0)];
2799test_array [0] = 0;
2800return test_array [0];
2801
2802  ;
2803  return 0;
2804}
2805_ACEOF
2806if ac_fn_cxx_try_compile "$LINENO"; then :
2807  ac_hi=-1 ac_mid=-1
2808  while :; do
2809    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2810/* end confdefs.h.  */
2811$4
2812int
2813main ()
2814{
2815static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2816test_array [0] = 0;
2817return test_array [0];
2818
2819  ;
2820  return 0;
2821}
2822_ACEOF
2823if ac_fn_cxx_try_compile "$LINENO"; then :
2824  ac_lo=$ac_mid; break
2825else
2826  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2827			if test $ac_mid -le $ac_hi; then
2828			  ac_lo= ac_hi=
2829			  break
2830			fi
2831			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2832fi
2833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2834  done
2835else
2836  ac_lo= ac_hi=
2837fi
2838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2839fi
2840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841# Binary search between lo and hi bounds.
2842while test "x$ac_lo" != "x$ac_hi"; do
2843  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2845/* end confdefs.h.  */
2846$4
2847int
2848main ()
2849{
2850static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2851test_array [0] = 0;
2852return test_array [0];
2853
2854  ;
2855  return 0;
2856}
2857_ACEOF
2858if ac_fn_cxx_try_compile "$LINENO"; then :
2859  ac_hi=$ac_mid
2860else
2861  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2862fi
2863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864done
2865case $ac_lo in #((
2866?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2867'') ac_retval=1 ;;
2868esac
2869  else
2870    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2871/* end confdefs.h.  */
2872$4
2873static long int longval () { return $2; }
2874static unsigned long int ulongval () { return $2; }
2875#include <stdio.h>
2876#include <stdlib.h>
2877int
2878main ()
2879{
2880
2881  FILE *f = fopen ("conftest.val", "w");
2882  if (! f)
2883    return 1;
2884  if (($2) < 0)
2885    {
2886      long int i = longval ();
2887      if (i != ($2))
2888	return 1;
2889      fprintf (f, "%ld", i);
2890    }
2891  else
2892    {
2893      unsigned long int i = ulongval ();
2894      if (i != ($2))
2895	return 1;
2896      fprintf (f, "%lu", i);
2897    }
2898  /* Do not output a trailing newline, as this causes \r\n confusion
2899     on some platforms.  */
2900  return ferror (f) || fclose (f) != 0;
2901
2902  ;
2903  return 0;
2904}
2905_ACEOF
2906if ac_fn_cxx_try_run "$LINENO"; then :
2907  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2908else
2909  ac_retval=1
2910fi
2911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2912  conftest.$ac_objext conftest.beam conftest.$ac_ext
2913rm -f conftest.val
2914
2915  fi
2916  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2917  as_fn_set_status $ac_retval
2918
2919} # ac_fn_cxx_compute_int
2920
2921# ac_fn_cxx_try_link LINENO
2922# -------------------------
2923# Try to link conftest.$ac_ext, and return whether this succeeded.
2924ac_fn_cxx_try_link ()
2925{
2926  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2927  rm -f conftest.$ac_objext conftest$ac_exeext
2928  if { { ac_try="$ac_link"
2929case "(($ac_try" in
2930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2931  *) ac_try_echo=$ac_try;;
2932esac
2933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2934$as_echo "$ac_try_echo"; } >&5
2935  (eval "$ac_link") 2>conftest.err
2936  ac_status=$?
2937  if test -s conftest.err; then
2938    grep -v '^ *+' conftest.err >conftest.er1
2939    cat conftest.er1 >&5
2940    mv -f conftest.er1 conftest.err
2941  fi
2942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2943  test $ac_status = 0; } && {
2944	 test -z "$ac_cxx_werror_flag" ||
2945	 test ! -s conftest.err
2946       } && test -s conftest$ac_exeext && {
2947	 test "$cross_compiling" = yes ||
2948	 test -x conftest$ac_exeext
2949       }; then :
2950  ac_retval=0
2951else
2952  $as_echo "$as_me: failed program was:" >&5
2953sed 's/^/| /' conftest.$ac_ext >&5
2954
2955	ac_retval=1
2956fi
2957  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2958  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2959  # interfere with the next link command; also delete a directory that is
2960  # left behind by Apple's compiler.  We do this before executing the actions.
2961  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2962  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2963  as_fn_set_status $ac_retval
2964
2965} # ac_fn_cxx_try_link
2966
2967# ac_fn_cxx_check_func LINENO FUNC VAR
2968# ------------------------------------
2969# Tests whether FUNC exists, setting the cache variable VAR accordingly
2970ac_fn_cxx_check_func ()
2971{
2972  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2974$as_echo_n "checking for $2... " >&6; }
2975if eval \${$3+:} false; then :
2976  $as_echo_n "(cached) " >&6
2977else
2978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2979/* end confdefs.h.  */
2980/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2981   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2982#define $2 innocuous_$2
2983
2984/* System header to define __stub macros and hopefully few prototypes,
2985    which can conflict with char $2 (); below.
2986    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2987    <limits.h> exists even on freestanding compilers.  */
2988
2989#ifdef __STDC__
2990# include <limits.h>
2991#else
2992# include <assert.h>
2993#endif
2994
2995#undef $2
2996
2997/* Override any GCC internal prototype to avoid an error.
2998   Use char because int might match the return type of a GCC
2999   builtin and then its argument prototype would still apply.  */
3000#ifdef __cplusplus
3001extern "C"
3002#endif
3003char $2 ();
3004/* The GNU C library defines this for functions which it implements
3005    to always fail with ENOSYS.  Some functions are actually named
3006    something starting with __ and the normal name is an alias.  */
3007#if defined __stub_$2 || defined __stub___$2
3008choke me
3009#endif
3010
3011int
3012main ()
3013{
3014return $2 ();
3015  ;
3016  return 0;
3017}
3018_ACEOF
3019if ac_fn_cxx_try_link "$LINENO"; then :
3020  eval "$3=yes"
3021else
3022  eval "$3=no"
3023fi
3024rm -f core conftest.err conftest.$ac_objext \
3025    conftest$ac_exeext conftest.$ac_ext
3026fi
3027eval ac_res=\$$3
3028	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3029$as_echo "$ac_res" >&6; }
3030  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3031
3032} # ac_fn_cxx_check_func
3033
3034# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3035# -------------------------------------------------------
3036# Tests whether HEADER exists and can be compiled using the include files in
3037# INCLUDES, setting the cache variable VAR accordingly.
3038ac_fn_c_check_header_compile ()
3039{
3040  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3042$as_echo_n "checking for $2... " >&6; }
3043if eval \${$3+:} false; then :
3044  $as_echo_n "(cached) " >&6
3045else
3046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3047/* end confdefs.h.  */
3048$4
3049#include <$2>
3050_ACEOF
3051if ac_fn_c_try_compile "$LINENO"; then :
3052  eval "$3=yes"
3053else
3054  eval "$3=no"
3055fi
3056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_c_check_header_compile
3064cat >config.log <<_ACEOF
3065This file contains any messages produced by compilers while
3066running configure, to aid debugging if configure makes a mistake.
3067
3068It was created by OpenJDK $as_me jdk9, which was
3069generated by GNU Autoconf 2.69.  Invocation command line was
3070
3071  $ $0 $@
3072
3073_ACEOF
3074exec 5>>config.log
3075{
3076cat <<_ASUNAME
3077## --------- ##
3078## Platform. ##
3079## --------- ##
3080
3081hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3082uname -m = `(uname -m) 2>/dev/null || echo unknown`
3083uname -r = `(uname -r) 2>/dev/null || echo unknown`
3084uname -s = `(uname -s) 2>/dev/null || echo unknown`
3085uname -v = `(uname -v) 2>/dev/null || echo unknown`
3086
3087/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3088/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3089
3090/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3091/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3092/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3093/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3094/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3095/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3096/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3097
3098_ASUNAME
3099
3100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101for as_dir in $PATH
3102do
3103  IFS=$as_save_IFS
3104  test -z "$as_dir" && as_dir=.
3105    $as_echo "PATH: $as_dir"
3106  done
3107IFS=$as_save_IFS
3108
3109} >&5
3110
3111cat >&5 <<_ACEOF
3112
3113
3114## ----------- ##
3115## Core tests. ##
3116## ----------- ##
3117
3118_ACEOF
3119
3120
3121# Keep a trace of the command line.
3122# Strip out --no-create and --no-recursion so they do not pile up.
3123# Strip out --silent because we don't want to record it for future runs.
3124# Also quote any args containing shell meta-characters.
3125# Make two passes to allow for proper duplicate-argument suppression.
3126ac_configure_args=
3127ac_configure_args0=
3128ac_configure_args1=
3129ac_must_keep_next=false
3130for ac_pass in 1 2
3131do
3132  for ac_arg
3133  do
3134    case $ac_arg in
3135    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3136    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3137    | -silent | --silent | --silen | --sile | --sil)
3138      continue ;;
3139    *\'*)
3140      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3141    esac
3142    case $ac_pass in
3143    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3144    2)
3145      as_fn_append ac_configure_args1 " '$ac_arg'"
3146      if test $ac_must_keep_next = true; then
3147	ac_must_keep_next=false # Got value, back to normal.
3148      else
3149	case $ac_arg in
3150	  *=* | --config-cache | -C | -disable-* | --disable-* \
3151	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3152	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3153	  | -with-* | --with-* | -without-* | --without-* | --x)
3154	    case "$ac_configure_args0 " in
3155	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3156	    esac
3157	    ;;
3158	  -* ) ac_must_keep_next=true ;;
3159	esac
3160      fi
3161      as_fn_append ac_configure_args " '$ac_arg'"
3162      ;;
3163    esac
3164  done
3165done
3166{ ac_configure_args0=; unset ac_configure_args0;}
3167{ ac_configure_args1=; unset ac_configure_args1;}
3168
3169# When interrupted or exit'd, cleanup temporary files, and complete
3170# config.log.  We remove comments because anyway the quotes in there
3171# would cause problems or look ugly.
3172# WARNING: Use '\'' to represent an apostrophe within the trap.
3173# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3174trap 'exit_status=$?
3175  # Save into config.log some information that might help in debugging.
3176  {
3177    echo
3178
3179    $as_echo "## ---------------- ##
3180## Cache variables. ##
3181## ---------------- ##"
3182    echo
3183    # The following way of writing the cache mishandles newlines in values,
3184(
3185  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3186    eval ac_val=\$$ac_var
3187    case $ac_val in #(
3188    *${as_nl}*)
3189      case $ac_var in #(
3190      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3191$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3192      esac
3193      case $ac_var in #(
3194      _ | IFS | as_nl) ;; #(
3195      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3196      *) { eval $ac_var=; unset $ac_var;} ;;
3197      esac ;;
3198    esac
3199  done
3200  (set) 2>&1 |
3201    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3202    *${as_nl}ac_space=\ *)
3203      sed -n \
3204	"s/'\''/'\''\\\\'\'''\''/g;
3205	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3206      ;; #(
3207    *)
3208      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3209      ;;
3210    esac |
3211    sort
3212)
3213    echo
3214
3215    $as_echo "## ----------------- ##
3216## Output variables. ##
3217## ----------------- ##"
3218    echo
3219    for ac_var in $ac_subst_vars
3220    do
3221      eval ac_val=\$$ac_var
3222      case $ac_val in
3223      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3224      esac
3225      $as_echo "$ac_var='\''$ac_val'\''"
3226    done | sort
3227    echo
3228
3229    if test -n "$ac_subst_files"; then
3230      $as_echo "## ------------------- ##
3231## File substitutions. ##
3232## ------------------- ##"
3233      echo
3234      for ac_var in $ac_subst_files
3235      do
3236	eval ac_val=\$$ac_var
3237	case $ac_val in
3238	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239	esac
3240	$as_echo "$ac_var='\''$ac_val'\''"
3241      done | sort
3242      echo
3243    fi
3244
3245    if test -s confdefs.h; then
3246      $as_echo "## ----------- ##
3247## confdefs.h. ##
3248## ----------- ##"
3249      echo
3250      cat confdefs.h
3251      echo
3252    fi
3253    test "$ac_signal" != 0 &&
3254      $as_echo "$as_me: caught signal $ac_signal"
3255    $as_echo "$as_me: exit $exit_status"
3256  } >&5
3257  rm -f core *.core core.conftest.* &&
3258    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3259    exit $exit_status
3260' 0
3261for ac_signal in 1 2 13 15; do
3262  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3263done
3264ac_signal=0
3265
3266# confdefs.h avoids OS command line length limits that DEFS can exceed.
3267rm -f -r conftest* confdefs.h
3268
3269$as_echo "/* confdefs.h */" > confdefs.h
3270
3271# Predefined preprocessor variables.
3272
3273cat >>confdefs.h <<_ACEOF
3274#define PACKAGE_NAME "$PACKAGE_NAME"
3275_ACEOF
3276
3277cat >>confdefs.h <<_ACEOF
3278#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3279_ACEOF
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_VERSION "$PACKAGE_VERSION"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_STRING "$PACKAGE_STRING"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_URL "$PACKAGE_URL"
3295_ACEOF
3296
3297
3298# Let the site file select an alternate cache file if it wants to.
3299# Prefer an explicitly selected file to automatically selected ones.
3300ac_site_file1=NONE
3301ac_site_file2=NONE
3302if test -n "$CONFIG_SITE"; then
3303  # We do not want a PATH search for config.site.
3304  case $CONFIG_SITE in #((
3305    -*)  ac_site_file1=./$CONFIG_SITE;;
3306    */*) ac_site_file1=$CONFIG_SITE;;
3307    *)   ac_site_file1=./$CONFIG_SITE;;
3308  esac
3309elif test "x$prefix" != xNONE; then
3310  ac_site_file1=$prefix/share/config.site
3311  ac_site_file2=$prefix/etc/config.site
3312else
3313  ac_site_file1=$ac_default_prefix/share/config.site
3314  ac_site_file2=$ac_default_prefix/etc/config.site
3315fi
3316for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3317do
3318  test "x$ac_site_file" = xNONE && continue
3319  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3320    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3321$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3322    sed 's/^/| /' "$ac_site_file" >&5
3323    . "$ac_site_file" \
3324      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326as_fn_error $? "failed to load site script $ac_site_file
3327See \`config.log' for more details" "$LINENO" 5; }
3328  fi
3329done
3330
3331if test -r "$cache_file"; then
3332  # Some versions of bash will fail to source /dev/null (special files
3333  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3334  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3335    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3336$as_echo "$as_me: loading cache $cache_file" >&6;}
3337    case $cache_file in
3338      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3339      *)                      . "./$cache_file";;
3340    esac
3341  fi
3342else
3343  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3344$as_echo "$as_me: creating cache $cache_file" >&6;}
3345  >$cache_file
3346fi
3347
3348# Check that the precious variables saved in the cache have kept the same
3349# value.
3350ac_cache_corrupted=false
3351for ac_var in $ac_precious_vars; do
3352  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3353  eval ac_new_set=\$ac_env_${ac_var}_set
3354  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3355  eval ac_new_val=\$ac_env_${ac_var}_value
3356  case $ac_old_set,$ac_new_set in
3357    set,)
3358      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3359$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3360      ac_cache_corrupted=: ;;
3361    ,set)
3362      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3363$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3364      ac_cache_corrupted=: ;;
3365    ,);;
3366    *)
3367      if test "x$ac_old_val" != "x$ac_new_val"; then
3368	# differences in whitespace do not lead to failure.
3369	ac_old_val_w=`echo x $ac_old_val`
3370	ac_new_val_w=`echo x $ac_new_val`
3371	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3372	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3373$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3374	  ac_cache_corrupted=:
3375	else
3376	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3377$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3378	  eval $ac_var=\$ac_old_val
3379	fi
3380	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3381$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3382	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3383$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3384      fi;;
3385  esac
3386  # Pass precious variables to config.status.
3387  if test "$ac_new_set" = set; then
3388    case $ac_new_val in
3389    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3390    *) ac_arg=$ac_var=$ac_new_val ;;
3391    esac
3392    case " $ac_configure_args " in
3393      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3394      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3395    esac
3396  fi
3397done
3398if $ac_cache_corrupted; then
3399  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3401  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3402$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3403  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3404fi
3405## -------------------- ##
3406## Main body of script. ##
3407## -------------------- ##
3408
3409ac_ext=c
3410ac_cpp='$CPP $CPPFLAGS'
3411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3413ac_compiler_gnu=$ac_cv_c_compiler_gnu
3414
3415
3416
3417ac_aux_dir=
3418for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3419  if test -f "$ac_dir/install-sh"; then
3420    ac_aux_dir=$ac_dir
3421    ac_install_sh="$ac_aux_dir/install-sh -c"
3422    break
3423  elif test -f "$ac_dir/install.sh"; then
3424    ac_aux_dir=$ac_dir
3425    ac_install_sh="$ac_aux_dir/install.sh -c"
3426    break
3427  elif test -f "$ac_dir/shtool"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/shtool install -c"
3430    break
3431  fi
3432done
3433if test -z "$ac_aux_dir"; then
3434  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
3435fi
3436
3437# These three variables are undocumented and unsupported,
3438# and are intended to be withdrawn in a future Autoconf release.
3439# They can cause serious problems if a builder's source tree is in a directory
3440# whose full name contains unusual characters.
3441ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3442ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3443ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3444
3445
3446# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3447
3448#
3449# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3451#
3452# This code is free software; you can redistribute it and/or modify it
3453# under the terms of the GNU General Public License version 2 only, as
3454# published by the Free Software Foundation.  Oracle designates this
3455# particular file as subject to the "Classpath" exception as provided
3456# by Oracle in the LICENSE file that accompanied this code.
3457#
3458# This code is distributed in the hope that it will be useful, but WITHOUT
3459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3461# version 2 for more details (a copy is included in the LICENSE file that
3462# accompanied this code).
3463#
3464# You should have received a copy of the GNU General Public License version
3465# 2 along with this work; if not, write to the Free Software Foundation,
3466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3467#
3468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3469# or visit www.oracle.com if you need additional information or have any
3470# questions.
3471#
3472
3473#
3474# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3475#
3476# This program is free software; you can redistribute it and/or modify
3477# it under the terms of the GNU General Public License as published by
3478# the Free Software Foundation; either version 2 of the License, or
3479# (at your option) any later version.
3480#
3481# This program is distributed in the hope that it will be useful, but
3482# WITHOUT ANY WARRANTY; without even the implied warranty of
3483# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3484# General Public License for more details.
3485#
3486# You should have received a copy of the GNU General Public License
3487# along with this program; if not, write to the Free Software
3488# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3489#
3490# As a special exception to the GNU General Public License, if you
3491# distribute this file as part of a program that contains a
3492# configuration script generated by Autoconf, you may include it under
3493# the same distribution terms that you use for the rest of that program.
3494
3495# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3496# ----------------------------------
3497# PKG_PROG_PKG_CONFIG
3498
3499# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3500#
3501# Check to see whether a particular set of modules exists.  Similar
3502# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3503#
3504#
3505# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3506# this or PKG_CHECK_MODULES is called, or make sure to call
3507# PKG_CHECK_EXISTS manually
3508# --------------------------------------------------------------
3509
3510
3511
3512# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3513# ---------------------------------------------
3514# _PKG_CONFIG
3515
3516# _PKG_SHORT_ERRORS_SUPPORTED
3517# -----------------------------
3518# _PKG_SHORT_ERRORS_SUPPORTED
3519
3520
3521# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3522# [ACTION-IF-NOT-FOUND])
3523#
3524#
3525# Note that if there is a possibility the first call to
3526# PKG_CHECK_MODULES might not happen, you should be sure to include an
3527# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3528#
3529#
3530# --------------------------------------------------------------
3531# PKG_CHECK_MODULES
3532
3533
3534# Include these first...
3535#
3536# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3537# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3538#
3539# This code is free software; you can redistribute it and/or modify it
3540# under the terms of the GNU General Public License version 2 only, as
3541# published by the Free Software Foundation.  Oracle designates this
3542# particular file as subject to the "Classpath" exception as provided
3543# by Oracle in the LICENSE file that accompanied this code.
3544#
3545# This code is distributed in the hope that it will be useful, but WITHOUT
3546# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3547# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3548# version 2 for more details (a copy is included in the LICENSE file that
3549# accompanied this code).
3550#
3551# You should have received a copy of the GNU General Public License version
3552# 2 along with this work; if not, write to the Free Software Foundation,
3553# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3554#
3555# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3556# or visit www.oracle.com if you need additional information or have any
3557# questions.
3558#
3559
3560# Create a function/macro that takes a series of named arguments. The call is
3561# similar to AC_DEFUN, but the setup of the function looks like this:
3562# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3563# ... do something
3564#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3565# ])
3566# A star (*) in front of a named argument means that it is required and it's
3567# presence will be verified. To pass e.g. the first value as a normal indexed
3568# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3569# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3570# "ARG_FOO".
3571#
3572# The generated function can be called like this:
3573# MYFUNC(FOO: [foo-val],
3574#     BAR: [
3575#         $ECHO hello world
3576#     ])
3577# Note that the argument value must start on the same line as the argument name.
3578#
3579# Argument 1: Name of the function to define
3580# Argument 2: List of legal named arguments, with a * prefix for required arguments
3581# Argument 3: Argument array to treat as named, typically $@
3582# Argument 4: The main function body
3583
3584
3585# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3586# If so, then append $1 to $2 \
3587# Also set JVM_ARG_OK to true/false depending on outcome.
3588
3589
3590# Appends a string to a path variable, only adding the : when needed.
3591
3592
3593# Prepends a string to a path variable, only adding the : when needed.
3594
3595
3596# This will make sure the given variable points to a full and proper
3597# path. This means:
3598# 1) There will be no spaces in the path. On unix platforms,
3599#    spaces in the path will result in an error. On Windows,
3600#    the path will be rewritten using short-style to be space-free.
3601# 2) The path will be absolute, and it will be in unix-style (on
3602#     cygwin).
3603# $1: The name of the variable to fix
3604
3605
3606# This will make sure the given variable points to a executable
3607# with a full and proper path. This means:
3608# 1) There will be no spaces in the path. On unix platforms,
3609#    spaces in the path will result in an error. On Windows,
3610#    the path will be rewritten using short-style to be space-free.
3611# 2) The path will be absolute, and it will be in unix-style (on
3612#     cygwin).
3613# Any arguments given to the executable is preserved.
3614# If the input variable does not have a directory specification, then
3615# it need to be in the PATH.
3616# $1: The name of the variable to fix
3617
3618
3619
3620
3621# Register a --with argument but mark it as deprecated
3622# $1: The name of the with argument to deprecate, not including --with-
3623
3624
3625# Register a --enable argument but mark it as deprecated
3626# $1: The name of the with argument to deprecate, not including --enable-
3627# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3628# $3: Messages to user.
3629
3630
3631
3632
3633# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3634# $1: variable to check
3635
3636
3637# Check that there are no unprocessed overridden variables left.
3638# If so, they are an incorrect argument and we will exit with an error.
3639
3640
3641# Setup a tool for the given variable. If correctly specified by the user,
3642# use that value, otherwise search for the tool using the supplied code snippet.
3643# $1: variable to set
3644# $2: code snippet to call to look for the tool
3645# $3: code snippet to call if variable was used to find tool
3646
3647
3648# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3649# $1: variable to set
3650# $2: executable name (or list of names) to look for
3651
3652
3653# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3654# $1: variable to set
3655# $2: executable name (or list of names) to look for
3656
3657
3658# Like BASIC_PATH_PROGS but fails if no tool was found.
3659# $1: variable to set
3660# $2: executable name (or list of names) to look for
3661
3662
3663# Like BASIC_SETUP_TOOL but fails if no tool was found.
3664# $1: variable to set
3665# $2: autoconf macro to call to look for the special tool
3666
3667
3668# Setup the most fundamental tools that relies on not much else to set up,
3669# but is used by much of the early bootstrap code.
3670
3671
3672# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3673
3674
3675# Evaluates platform specific overrides for devkit variables.
3676# $1: Name of variable
3677
3678
3679
3680
3681
3682
3683#%%% Simple tools %%%
3684
3685# Check if we have found a usable version of make
3686# $1: the path to a potential make binary (or empty)
3687# $2: the description on how we found this
3688
3689
3690
3691
3692# Goes looking for a usable version of GNU make.
3693
3694
3695
3696
3697
3698
3699# Check if build directory is on local disk. If not possible to determine,
3700# we prefer to claim it's local.
3701# Argument 1: directory to test
3702# Argument 2: what to do if it is on local disk
3703# Argument 3: what to do otherwise (remote disk or failure)
3704
3705
3706# Check that source files have basic read permissions set. This might
3707# not be the case in cygwin in certain conditions.
3708
3709
3710
3711
3712# Check for support for specific options in bash
3713
3714
3715################################################################################
3716#
3717# Default make target
3718#
3719
3720
3721# Code to run after AC_OUTPUT
3722
3723
3724#
3725# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753# Helper function which possibly converts a path using DOS-style short mode.
3754# If so, the updated path is stored in $new_path.
3755# $1: The path to check
3756
3757
3758# Helper function which possibly converts a path using DOS-style short mode.
3759# If so, the updated path is stored in $new_path.
3760# $1: The path to check
3761
3762
3763# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3764# and could probably be heavily simplified. However, all changes in this
3765# area tend to need lot of testing in different scenarios, and in lack of
3766# proper unit testing, cleaning this up has not been deemed worth the effort
3767# at the moment.
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3778
3779
3780
3781
3782# ... then the rest
3783#
3784# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3785# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3786#
3787# This code is free software; you can redistribute it and/or modify it
3788# under the terms of the GNU General Public License version 2 only, as
3789# published by the Free Software Foundation.  Oracle designates this
3790# particular file as subject to the "Classpath" exception as provided
3791# by Oracle in the LICENSE file that accompanied this code.
3792#
3793# This code is distributed in the hope that it will be useful, but WITHOUT
3794# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3795# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3796# version 2 for more details (a copy is included in the LICENSE file that
3797# accompanied this code).
3798#
3799# You should have received a copy of the GNU General Public License version
3800# 2 along with this work; if not, write to the Free Software Foundation,
3801# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3802#
3803# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3804# or visit www.oracle.com if you need additional information or have any
3805# questions.
3806#
3807
3808########################################################################
3809# This file handles detection of the Boot JDK. The Boot JDK detection
3810# process has been developed as a response to solve a complex real-world
3811# problem. Initially, it was simple, but it has grown as platform after
3812# platform, idiosyncracy after idiosyncracy has been supported.
3813#
3814# The basic idea is this:
3815# 1) You need an acceptable *) JDK to use as a Boot JDK
3816# 2) There are several ways to locate a JDK, that are mostly platform
3817#    dependent **)
3818# 3) You can have multiple JDKs installed
3819# 4) If possible, configure should try to dig out an acceptable JDK
3820#    automatically, without having to resort to command-line options
3821#
3822# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3823#     javac) and not a JRE, etc.
3824#
3825# **) On Windows we typically use a well-known path.
3826#     On MacOSX we typically use the tool java_home.
3827#     On Linux we typically find javac in the $PATH, and then follow a
3828#     chain of symlinks that often ends up in a real JDK.
3829#
3830# This leads to the code where we check in different ways to locate a
3831# JDK, and if one is found, check if it is acceptable. If not, we print
3832# our reasons for rejecting it (useful when debugging non-working
3833# configure situations) and continue checking the next one.
3834########################################################################
3835
3836# Execute the check given as argument, and verify the result
3837# If the Boot JDK was previously found, do nothing
3838# $1 A command line (typically autoconf macro) to execute
3839
3840
3841# Test: Is bootjdk explicitely set by command line arguments?
3842
3843
3844# Test: Is $JAVA_HOME set?
3845
3846
3847# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3848
3849
3850# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3851# $1: Argument to the java_home binary (optional)
3852
3853
3854# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3855
3856
3857# Look for a jdk in the given path. If there are multiple, try to select the newest.
3858# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3859# $1 = Path to directory containing jdk installations.
3860# $2 = String to append to the found JDK directory to get the proper JDK home
3861
3862
3863# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3864# environmental variable as base for where to look.
3865# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3866
3867
3868# Test: Is there a JDK installed in default, well-known locations?
3869
3870
3871# Check that a command-line tool in the Boot JDK is correct
3872# $1 = name of variable to assign
3873# $2 = name of binary
3874
3875
3876###############################################################################
3877#
3878# We need a Boot JDK to bootstrap the build.
3879#
3880
3881
3882
3883
3884
3885# BUILD_JDK: the location of the latest JDK that can run
3886#   on the host system and supports the target class file version
3887#   generated in this JDK build.  This variable should only be
3888#   used after the launchers are built.
3889#
3890
3891# Execute the check given as argument, and verify the result.
3892# If the JDK was previously found, do nothing.
3893# $1 A command line (typically autoconf macro) to execute
3894
3895
3896# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3897# is different than the host system doing the build (e.g. cross-compilation),
3898# a special BUILD_JDK is built as part of the build process.  An external
3899# prebuilt BUILD_JDK can also be supplied.
3900
3901
3902#
3903# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3904# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3905#
3906# This code is free software; you can redistribute it and/or modify it
3907# under the terms of the GNU General Public License version 2 only, as
3908# published by the Free Software Foundation.  Oracle designates this
3909# particular file as subject to the "Classpath" exception as provided
3910# by Oracle in the LICENSE file that accompanied this code.
3911#
3912# This code is distributed in the hope that it will be useful, but WITHOUT
3913# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3914# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3915# version 2 for more details (a copy is included in the LICENSE file that
3916# accompanied this code).
3917#
3918# You should have received a copy of the GNU General Public License version
3919# 2 along with this work; if not, write to the Free Software Foundation,
3920# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3921#
3922# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3923# or visit www.oracle.com if you need additional information or have any
3924# questions.
3925#
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943################################################################################
3944#
3945# Runs icecc-create-env once and prints the error if it fails
3946#
3947# $1: arguments to icecc-create-env
3948# $2: log file
3949#
3950
3951
3952################################################################################
3953#
3954# Optionally enable distributed compilation of native code using icecc/icecream
3955#
3956
3957
3958
3959
3960
3961
3962
3963#
3964# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3965# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3966#
3967# This code is free software; you can redistribute it and/or modify it
3968# under the terms of the GNU General Public License version 2 only, as
3969# published by the Free Software Foundation.  Oracle designates this
3970# particular file as subject to the "Classpath" exception as provided
3971# by Oracle in the LICENSE file that accompanied this code.
3972#
3973# This code is distributed in the hope that it will be useful, but WITHOUT
3974# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3975# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3976# version 2 for more details (a copy is included in the LICENSE file that
3977# accompanied this code).
3978#
3979# You should have received a copy of the GNU General Public License version
3980# 2 along with this work; if not, write to the Free Software Foundation,
3981# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3982#
3983# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3984# or visit www.oracle.com if you need additional information or have any
3985# questions.
3986#
3987
3988# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3989# corresponding configure arguments instead
3990
3991
3992# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3993# that configure can use them while detecting compilers.
3994# TOOLCHAIN_TYPE is available here.
3995# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3996
3997
3998
3999
4000
4001
4002# Documentation on common flags used for solstudio in HIGHEST.
4003#
4004# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4005#          done with care, there are some assumptions below that need to
4006#          be understood about the use of pointers, and IEEE behavior.
4007#
4008# -fns: Use non-standard floating point mode (not IEEE 754)
4009# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4010# -fsingle: Use single precision floating point with 'float'
4011# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4012#   (Source with excessing pointer casting and data access with mixed
4013#    pointer types are not recommended)
4014# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4015#   (If you expect perfect errno behavior, do not use this)
4016# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4017# -xrestrict: Pointer parameters to functions do not overlap
4018#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4019#    If you pass in multiple pointers to the same data, do not use this)
4020# -xlibmil: Inline some library routines
4021#   (If you expect perfect errno behavior, do not use this)
4022# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4023#   (If you expect perfect errno behavior, do not use this)
4024#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4025
4026    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4027    # Bug?
4028    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4029    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4030    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4031    #fi
4032
4033
4034
4035
4036
4037
4038################################################################################
4039# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4040#      conditionals against.
4041# $2 - Optional prefix for each variable defined.
4042
4043
4044# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4045#                                  IF_FALSE: [RUN-IF-FALSE])
4046# ------------------------------------------------------------
4047# Check that the C compiler supports an argument
4048
4049
4050
4051
4052# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053#                                    IF_FALSE: [RUN-IF-FALSE])
4054# ------------------------------------------------------------
4055# Check that the C++ compiler supports an argument
4056
4057
4058
4059
4060# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061#                                IF_FALSE: [RUN-IF-FALSE])
4062# ------------------------------------------------------------
4063# Check that the C and C++ compilers support an argument
4064
4065
4066
4067
4068# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069#                                   IF_FALSE: [RUN-IF-FALSE])
4070# ------------------------------------------------------------
4071# Check that the linker support an argument
4072
4073
4074
4075
4076
4077
4078
4079
4080#
4081# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4082# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4083#
4084# This code is free software; you can redistribute it and/or modify it
4085# under the terms of the GNU General Public License version 2 only, as
4086# published by the Free Software Foundation.  Oracle designates this
4087# particular file as subject to the "Classpath" exception as provided
4088# by Oracle in the LICENSE file that accompanied this code.
4089#
4090# This code is distributed in the hope that it will be useful, but WITHOUT
4091# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4092# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4093# version 2 for more details (a copy is included in the LICENSE file that
4094# accompanied this code).
4095#
4096# You should have received a copy of the GNU General Public License version
4097# 2 along with this work; if not, write to the Free Software Foundation,
4098# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4099#
4100# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4101# or visit www.oracle.com if you need additional information or have any
4102# questions.
4103#
4104
4105
4106
4107
4108
4109cygwin_help() {
4110  case $1 in
4111    unzip)
4112      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4113      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4114      ;;
4115    zip)
4116      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4117      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4118      ;;
4119    make)
4120      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4122      ;;
4123    freetype)
4124      HELP_MSG="
4125The freetype library can now be build during the configure process.
4126Download the freetype sources and unpack them into an arbitrary directory:
4127
4128wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4129tar -xzf freetype-2.5.3.tar.gz
4130
4131Then run configure with '--with-freetype-src=<freetype_src>'. This will
4132automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4133builds or into '<freetype_src>/lib32' for 32-bit builds.
4134Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4135and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4136
4137Alternatively you can unpack the sources like this to use the default directory:
4138
4139tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4140      ;;
4141  esac
4142}
4143
4144msys_help() {
4145  PKGHANDLER_COMMAND=""
4146}
4147
4148apt_help() {
4149  case $1 in
4150    reduced)
4151      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4152    devkit)
4153      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4154    openjdk)
4155      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4156    alsa)
4157      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4158    cups)
4159      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4160    freetype)
4161      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4162    ffi)
4163      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4164    x11)
4165      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4166    ccache)
4167      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4168    dtrace)
4169      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4170  esac
4171}
4172
4173yum_help() {
4174  case $1 in
4175    devkit)
4176      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4177    openjdk)
4178      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4179    alsa)
4180      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4181    cups)
4182      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4183    freetype)
4184      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4185    x11)
4186      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4187    ccache)
4188      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4189  esac
4190}
4191
4192port_help() {
4193  PKGHANDLER_COMMAND=""
4194}
4195
4196pkgutil_help() {
4197  PKGHANDLER_COMMAND=""
4198}
4199
4200pkgadd_help() {
4201  PKGHANDLER_COMMAND=""
4202}
4203
4204# This function will check if we're called from the "configure" wrapper while
4205# printing --help. If so, we will print out additional information that can
4206# only be extracted within the autoconf script, and then exit. This must be
4207# called at the very beginning in configure.ac.
4208
4209
4210
4211
4212
4213
4214#
4215# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4216# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4217#
4218# This code is free software; you can redistribute it and/or modify it
4219# under the terms of the GNU General Public License version 2 only, as
4220# published by the Free Software Foundation.  Oracle designates this
4221# particular file as subject to the "Classpath" exception as provided
4222# by Oracle in the LICENSE file that accompanied this code.
4223#
4224# This code is distributed in the hope that it will be useful, but WITHOUT
4225# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4226# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4227# version 2 for more details (a copy is included in the LICENSE file that
4228# accompanied this code).
4229#
4230# You should have received a copy of the GNU General Public License version
4231# 2 along with this work; if not, write to the Free Software Foundation,
4232# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4233#
4234# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4235# or visit www.oracle.com if you need additional information or have any
4236# questions.
4237#
4238
4239# All valid JVM features, regardless of platform
4240VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4241    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4242
4243# All valid JVM variants
4244VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4245
4246###############################################################################
4247# Check if the specified JVM variant should be built. To be used in shell if
4248# constructs, like this:
4249# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4250#
4251# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4252
4253# Definition kept in one line to allow inlining in if statements.
4254# Additional [] needed to keep m4 from mangling shell constructs.
4255
4256
4257###############################################################################
4258# Check if the specified JVM features are explicitly enabled. To be used in
4259# shell if constructs, like this:
4260# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4261#
4262# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4263
4264# Definition kept in one line to allow inlining in if statements.
4265# Additional [] needed to keep m4 from mangling shell constructs.
4266
4267
4268###############################################################################
4269# Check which variants of the JVM that we want to build. Available variants are:
4270#   server: normal interpreter, and a tiered C1/C2 compiler
4271#   client: normal interpreter, and C1 (no C2 compiler)
4272#   minimal: reduced form of client with optional features stripped out
4273#   core: normal interpreter only, no compiler
4274#   zero: C++ based interpreter only, no compiler
4275#   zeroshark: C++ based interpreter, and a llvm-based compiler
4276#   custom: baseline JVM with no default features
4277#
4278
4279
4280###############################################################################
4281# Check if dtrace should be enabled and has all prerequisites present.
4282#
4283
4284
4285###############################################################################
4286# Set up all JVM features for each JVM variant.
4287#
4288
4289
4290###############################################################################
4291# Validate JVM features once all setup is complete, including custom setup.
4292#
4293
4294
4295###############################################################################
4296# Support for old hotspot build. Remove once new hotspot build has proven
4297# to work satisfactory.
4298#
4299
4300
4301#
4302# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4304#
4305# This code is free software; you can redistribute it and/or modify it
4306# under the terms of the GNU General Public License version 2 only, as
4307# published by the Free Software Foundation.  Oracle designates this
4308# particular file as subject to the "Classpath" exception as provided
4309# by Oracle in the LICENSE file that accompanied this code.
4310#
4311# This code is distributed in the hope that it will be useful, but WITHOUT
4312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4314# version 2 for more details (a copy is included in the LICENSE file that
4315# accompanied this code).
4316#
4317# You should have received a copy of the GNU General Public License version
4318# 2 along with this work; if not, write to the Free Software Foundation,
4319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4320#
4321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4322# or visit www.oracle.com if you need additional information or have any
4323# questions.
4324#
4325
4326###############################################################################
4327# Check which variant of the JDK that we want to build.
4328# Currently we have:
4329#    normal:   standard edition
4330# but the custom make system may add other variants
4331#
4332# Effectively the JDK variant gives a name to a specific set of
4333# modules to compile into the JDK.
4334
4335
4336###############################################################################
4337# Set the debug level
4338#    release: no debug information, all optimizations, no asserts.
4339#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4340#    fastdebug: debug information (-g), all optimizations, all asserts
4341#    slowdebug: debug information (-g), no optimizations, all asserts
4342
4343
4344###############################################################################
4345#
4346# Should we build only OpenJDK even if closed sources are present?
4347#
4348
4349
4350
4351
4352###############################################################################
4353#
4354# Enable or disable the elliptic curve crypto implementation
4355#
4356
4357
4358
4359
4360################################################################################
4361#
4362# Gcov coverage data for hotspot
4363#
4364
4365
4366################################################################################
4367#
4368# Static build support.  When enabled will generate static
4369# libraries instead of shared libraries for all JDK libs.
4370#
4371
4372
4373################################################################################
4374#
4375# jlink options.
4376# We always keep packaged modules in JDK image.
4377#
4378
4379
4380#
4381# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4383#
4384# This code is free software; you can redistribute it and/or modify it
4385# under the terms of the GNU General Public License version 2 only, as
4386# published by the Free Software Foundation.  Oracle designates this
4387# particular file as subject to the "Classpath" exception as provided
4388# by Oracle in the LICENSE file that accompanied this code.
4389#
4390# This code is distributed in the hope that it will be useful, but WITHOUT
4391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4393# version 2 for more details (a copy is included in the LICENSE file that
4394# accompanied this code).
4395#
4396# You should have received a copy of the GNU General Public License version
4397# 2 along with this work; if not, write to the Free Software Foundation,
4398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4399#
4400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4401# or visit www.oracle.com if you need additional information or have any
4402# questions.
4403#
4404
4405###############################################################################
4406#
4407# Setup version numbers
4408#
4409
4410# Verify that a given string represents a valid version number, and assign it
4411# to a variable.
4412
4413# Argument 1: the variable to assign to
4414# Argument 2: the value given by the user
4415
4416
4417
4418
4419#
4420# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4421# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4422#
4423# This code is free software; you can redistribute it and/or modify it
4424# under the terms of the GNU General Public License version 2 only, as
4425# published by the Free Software Foundation.  Oracle designates this
4426# particular file as subject to the "Classpath" exception as provided
4427# by Oracle in the LICENSE file that accompanied this code.
4428#
4429# This code is distributed in the hope that it will be useful, but WITHOUT
4430# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4431# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4432# version 2 for more details (a copy is included in the LICENSE file that
4433# accompanied this code).
4434#
4435# You should have received a copy of the GNU General Public License version
4436# 2 along with this work; if not, write to the Free Software Foundation,
4437# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4438#
4439# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4440# or visit www.oracle.com if you need additional information or have any
4441# questions.
4442#
4443
4444# Major library component reside in separate files.
4445#
4446# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4447# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448#
4449# This code is free software; you can redistribute it and/or modify it
4450# under the terms of the GNU General Public License version 2 only, as
4451# published by the Free Software Foundation.  Oracle designates this
4452# particular file as subject to the "Classpath" exception as provided
4453# by Oracle in the LICENSE file that accompanied this code.
4454#
4455# This code is distributed in the hope that it will be useful, but WITHOUT
4456# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458# version 2 for more details (a copy is included in the LICENSE file that
4459# accompanied this code).
4460#
4461# You should have received a copy of the GNU General Public License version
4462# 2 along with this work; if not, write to the Free Software Foundation,
4463# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464#
4465# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466# or visit www.oracle.com if you need additional information or have any
4467# questions.
4468#
4469
4470################################################################################
4471# Setup alsa (Advanced Linux Sound Architecture)
4472################################################################################
4473
4474
4475#
4476# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4477# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4478#
4479# This code is free software; you can redistribute it and/or modify it
4480# under the terms of the GNU General Public License version 2 only, as
4481# published by the Free Software Foundation.  Oracle designates this
4482# particular file as subject to the "Classpath" exception as provided
4483# by Oracle in the LICENSE file that accompanied this code.
4484#
4485# This code is distributed in the hope that it will be useful, but WITHOUT
4486# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4487# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4488# version 2 for more details (a copy is included in the LICENSE file that
4489# accompanied this code).
4490#
4491# You should have received a copy of the GNU General Public License version
4492# 2 along with this work; if not, write to the Free Software Foundation,
4493# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4494#
4495# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496# or visit www.oracle.com if you need additional information or have any
4497# questions.
4498#
4499
4500################################################################################
4501# Setup bundled libraries.
4502#
4503# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4504# OpenJDK repository. Default is to use these libraries as bundled, but they
4505# might be replaced by en external version by the user.
4506################################################################################
4507
4508
4509################################################################################
4510# Setup libjpeg
4511################################################################################
4512
4513
4514################################################################################
4515# Setup giflib
4516################################################################################
4517
4518
4519################################################################################
4520# Setup libpng
4521################################################################################
4522
4523
4524################################################################################
4525# Setup zlib
4526################################################################################
4527
4528
4529################################################################################
4530# Setup lcms (Little CMS)
4531################################################################################
4532
4533
4534#
4535# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4537#
4538# This code is free software; you can redistribute it and/or modify it
4539# under the terms of the GNU General Public License version 2 only, as
4540# published by the Free Software Foundation.  Oracle designates this
4541# particular file as subject to the "Classpath" exception as provided
4542# by Oracle in the LICENSE file that accompanied this code.
4543#
4544# This code is distributed in the hope that it will be useful, but WITHOUT
4545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4547# version 2 for more details (a copy is included in the LICENSE file that
4548# accompanied this code).
4549#
4550# You should have received a copy of the GNU General Public License version
4551# 2 along with this work; if not, write to the Free Software Foundation,
4552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4553#
4554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4555# or visit www.oracle.com if you need additional information or have any
4556# questions.
4557#
4558
4559################################################################################
4560# Setup cups (Common Unix Printing System)
4561################################################################################
4562
4563
4564#
4565# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4567#
4568# This code is free software; you can redistribute it and/or modify it
4569# under the terms of the GNU General Public License version 2 only, as
4570# published by the Free Software Foundation.  Oracle designates this
4571# particular file as subject to the "Classpath" exception as provided
4572# by Oracle in the LICENSE file that accompanied this code.
4573#
4574# This code is distributed in the hope that it will be useful, but WITHOUT
4575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4577# version 2 for more details (a copy is included in the LICENSE file that
4578# accompanied this code).
4579#
4580# You should have received a copy of the GNU General Public License version
4581# 2 along with this work; if not, write to the Free Software Foundation,
4582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4583#
4584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4585# or visit www.oracle.com if you need additional information or have any
4586# questions.
4587#
4588
4589################################################################################
4590# Setup libffi (Foreign Function Interface)
4591################################################################################
4592
4593
4594#
4595# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4596# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4597#
4598# This code is free software; you can redistribute it and/or modify it
4599# under the terms of the GNU General Public License version 2 only, as
4600# published by the Free Software Foundation.  Oracle designates this
4601# particular file as subject to the "Classpath" exception as provided
4602# by Oracle in the LICENSE file that accompanied this code.
4603#
4604# This code is distributed in the hope that it will be useful, but WITHOUT
4605# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4606# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4607# version 2 for more details (a copy is included in the LICENSE file that
4608# accompanied this code).
4609#
4610# You should have received a copy of the GNU General Public License version
4611# 2 along with this work; if not, write to the Free Software Foundation,
4612# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4613#
4614# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4615# or visit www.oracle.com if you need additional information or have any
4616# questions.
4617#
4618
4619################################################################################
4620# Build the freetype lib from source
4621################################################################################
4622
4623
4624################################################################################
4625# Check if a potential freeype library match is correct and usable
4626################################################################################
4627
4628
4629################################################################################
4630# Setup freetype (The FreeType2 font rendering library)
4631################################################################################
4632
4633
4634#
4635# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4637#
4638# This code is free software; you can redistribute it and/or modify it
4639# under the terms of the GNU General Public License version 2 only, as
4640# published by the Free Software Foundation.  Oracle designates this
4641# particular file as subject to the "Classpath" exception as provided
4642# by Oracle in the LICENSE file that accompanied this code.
4643#
4644# This code is distributed in the hope that it will be useful, but WITHOUT
4645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4647# version 2 for more details (a copy is included in the LICENSE file that
4648# accompanied this code).
4649#
4650# You should have received a copy of the GNU General Public License version
4651# 2 along with this work; if not, write to the Free Software Foundation,
4652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4653#
4654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4655# or visit www.oracle.com if you need additional information or have any
4656# questions.
4657#
4658
4659################################################################################
4660# Setup the standard C/C++ runtime libraries.
4661#
4662# Most importantly, determine if stdc++ should be linked statically or
4663# dynamically.
4664################################################################################
4665
4666
4667#
4668# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4669# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4670#
4671# This code is free software; you can redistribute it and/or modify it
4672# under the terms of the GNU General Public License version 2 only, as
4673# published by the Free Software Foundation.  Oracle designates this
4674# particular file as subject to the "Classpath" exception as provided
4675# by Oracle in the LICENSE file that accompanied this code.
4676#
4677# This code is distributed in the hope that it will be useful, but WITHOUT
4678# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4679# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4680# version 2 for more details (a copy is included in the LICENSE file that
4681# accompanied this code).
4682#
4683# You should have received a copy of the GNU General Public License version
4684# 2 along with this work; if not, write to the Free Software Foundation,
4685# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4686#
4687# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4688# or visit www.oracle.com if you need additional information or have any
4689# questions.
4690#
4691
4692################################################################################
4693# Setup X11 Windows system
4694################################################################################
4695
4696
4697
4698################################################################################
4699# Determine which libraries are needed for this configuration
4700################################################################################
4701
4702
4703################################################################################
4704# Parse library options, and setup needed libraries
4705################################################################################
4706
4707
4708################################################################################
4709# Setup llvm (Low-Level VM)
4710################################################################################
4711
4712
4713################################################################################
4714# Setup various libraries, typically small system libraries
4715################################################################################
4716
4717
4718#
4719# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4720# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721#
4722# This code is free software; you can redistribute it and/or modify it
4723# under the terms of the GNU General Public License version 2 only, as
4724# published by the Free Software Foundation.  Oracle designates this
4725# particular file as subject to the "Classpath" exception as provided
4726# by Oracle in the LICENSE file that accompanied this code.
4727#
4728# This code is distributed in the hope that it will be useful, but WITHOUT
4729# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731# version 2 for more details (a copy is included in the LICENSE file that
4732# accompanied this code).
4733#
4734# You should have received a copy of the GNU General Public License version
4735# 2 along with this work; if not, write to the Free Software Foundation,
4736# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737#
4738# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739# or visit www.oracle.com if you need additional information or have any
4740# questions.
4741#
4742
4743# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4744# Converts autoconf style CPU name to OpenJDK style, into
4745# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4746
4747
4748# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4749# Converts autoconf style OS name to OpenJDK style, into
4750# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4751
4752
4753# Expects $host_os $host_cpu $build_os and $build_cpu
4754# and $with_target_bits to have been setup!
4755#
4756# Translate the standard triplet(quadruplet) definition
4757# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4758# OPENJDK_BUILD_OS, etc.
4759
4760
4761# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4762# accordingly. Must be done after setting up build and target system, but before
4763# doing anything else with these values.
4764
4765
4766# Setup the legacy variables, for controlling the old makefiles.
4767#
4768
4769
4770# $1 - Either TARGET or BUILD to setup the variables for.
4771
4772
4773
4774
4775#%%% Build and target systems %%%
4776
4777
4778
4779
4780# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4781# Add -mX to various FLAGS variables.
4782
4783
4784
4785
4786
4787
4788#
4789# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4790# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4791#
4792# This code is free software; you can redistribute it and/or modify it
4793# under the terms of the GNU General Public License version 2 only, as
4794# published by the Free Software Foundation.  Oracle designates this
4795# particular file as subject to the "Classpath" exception as provided
4796# by Oracle in the LICENSE file that accompanied this code.
4797#
4798# This code is distributed in the hope that it will be useful, but WITHOUT
4799# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4800# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4801# version 2 for more details (a copy is included in the LICENSE file that
4802# accompanied this code).
4803#
4804# You should have received a copy of the GNU General Public License version
4805# 2 along with this work; if not, write to the Free Software Foundation,
4806# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4807#
4808# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4809# or visit www.oracle.com if you need additional information or have any
4810# questions.
4811#
4812
4813
4814
4815
4816
4817
4818
4819################################################################################
4820# Define a mechanism for importing extra prebuilt modules
4821#
4822
4823
4824
4825#
4826# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4827# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4828#
4829# This code is free software; you can redistribute it and/or modify it
4830# under the terms of the GNU General Public License version 2 only, as
4831# published by the Free Software Foundation.  Oracle designates this
4832# particular file as subject to the "Classpath" exception as provided
4833# by Oracle in the LICENSE file that accompanied this code.
4834#
4835# This code is distributed in the hope that it will be useful, but WITHOUT
4836# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4837# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4838# version 2 for more details (a copy is included in the LICENSE file that
4839# accompanied this code).
4840#
4841# You should have received a copy of the GNU General Public License version
4842# 2 along with this work; if not, write to the Free Software Foundation,
4843# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4844#
4845# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4846# or visit www.oracle.com if you need additional information or have any
4847# questions.
4848#
4849
4850########################################################################
4851# This file is responsible for detecting, verifying and setting up the
4852# toolchain, i.e. the compiler, linker and related utilities. It will setup
4853# proper paths to the binaries, but it will not setup any flags.
4854#
4855# The binaries used is determined by the toolchain type, which is the family of
4856# compilers and related tools that are used.
4857########################################################################
4858
4859
4860# All valid toolchains, regardless of platform (used by help.m4)
4861VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4862
4863# These toolchains are valid on different platforms
4864VALID_TOOLCHAINS_linux="gcc clang"
4865VALID_TOOLCHAINS_solaris="solstudio"
4866VALID_TOOLCHAINS_macosx="gcc clang"
4867VALID_TOOLCHAINS_aix="xlc"
4868VALID_TOOLCHAINS_windows="microsoft"
4869
4870# Toolchain descriptions
4871TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4872TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4873TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4874TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4875TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4876
4877# Minimum supported versions, empty means unspecified
4878TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4879TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4880TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4881TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4882TOOLCHAIN_MINIMUM_VERSION_xlc=""
4883
4884# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4885# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4886
4887
4888# Check if the configured compiler (C and C++) is of a specific version or
4889# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4890#
4891# Arguments:
4892#   VERSION:   The version string to check against the found version
4893#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4894#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4895
4896
4897
4898
4899# Setup a number of variables describing how native output files are
4900# named on this platform/toolchain.
4901
4902
4903# Determine which toolchain type to use, and make sure it is valid for this
4904# platform. Setup various information about the selected toolchain.
4905
4906
4907# Before we start detecting the toolchain executables, we might need some
4908# special setup, e.g. additional paths etc.
4909
4910
4911# Restore path, etc
4912
4913
4914# Check if a compiler is of the toolchain type we expect, and save the version
4915# information from it. If the compiler does not match the expected type,
4916# this function will abort using AC_MSG_ERROR. If it matches, the version will
4917# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4918# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4919#
4920# $1 = compiler to test (CC or CXX)
4921# $2 = human readable name of compiler (C or C++)
4922
4923
4924# Try to locate the given C or C++ compiler in the path, or otherwise.
4925#
4926# $1 = compiler to test (CC or CXX)
4927# $2 = human readable name of compiler (C or C++)
4928# $3 = list of compiler names to search for
4929
4930
4931# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4932# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4933# archiver (AR). Verify that the compilers are correct according to the
4934# toolchain type.
4935
4936
4937# Setup additional tools that is considered a part of the toolchain, but not the
4938# core part. Many of these are highly platform-specific and do not exist,
4939# and/or are not needed on all platforms.
4940
4941
4942# Setup the build tools (i.e, the compiler and linker used to build programs
4943# that should be run on the build platform, not the target platform, as a build
4944# helper). Since the non-cross-compile case uses the normal, target compilers
4945# for this, we can only do this after these have been setup.
4946
4947
4948# Setup legacy variables that are still needed as alternative ways to refer to
4949# parts of the toolchain.
4950
4951
4952# Do some additional checks on the detected tools.
4953
4954
4955# Setup the JTReg Regression Test Harness.
4956
4957
4958#
4959# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4960# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4961#
4962# This code is free software; you can redistribute it and/or modify it
4963# under the terms of the GNU General Public License version 2 only, as
4964# published by the Free Software Foundation.  Oracle designates this
4965# particular file as subject to the "Classpath" exception as provided
4966# by Oracle in the LICENSE file that accompanied this code.
4967#
4968# This code is distributed in the hope that it will be useful, but WITHOUT
4969# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4970# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4971# version 2 for more details (a copy is included in the LICENSE file that
4972# accompanied this code).
4973#
4974# You should have received a copy of the GNU General Public License version
4975# 2 along with this work; if not, write to the Free Software Foundation,
4976# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4977#
4978# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4979# or visit www.oracle.com if you need additional information or have any
4980# questions.
4981#
4982
4983################################################################################
4984# The order of these defines the priority by which we try to find them.
4985VALID_VS_VERSIONS="2013 2012 2010"
4986
4987VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4988VS_VERSION_INTERNAL_2010=100
4989VS_MSVCR_2010=msvcr100.dll
4990# We don't use msvcp on Visual Studio 2010
4991#VS_MSVCP_2010=msvcp100.dll
4992VS_ENVVAR_2010="VS100COMNTOOLS"
4993VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4994VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4995VS_VS_PLATFORM_NAME_2010="v100"
4996VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4997
4998VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4999VS_VERSION_INTERNAL_2012=110
5000VS_MSVCR_2012=msvcr110.dll
5001VS_MSVCP_2012=msvcp110.dll
5002VS_ENVVAR_2012="VS110COMNTOOLS"
5003VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5004VS_SDK_INSTALLDIR_2012=
5005VS_VS_PLATFORM_NAME_2012="v110"
5006VS_SDK_PLATFORM_NAME_2012=
5007
5008VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5009VS_VERSION_INTERNAL_2013=120
5010VS_MSVCR_2013=msvcr120.dll
5011VS_MSVCP_2013=msvcp120.dll
5012VS_ENVVAR_2013="VS120COMNTOOLS"
5013VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5014VS_SDK_INSTALLDIR_2013=
5015VS_VS_PLATFORM_NAME_2013="v120"
5016VS_SDK_PLATFORM_NAME_2013=
5017
5018################################################################################
5019
5020
5021
5022################################################################################
5023
5024
5025
5026################################################################################
5027# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5028# build environment and assigns it to VS_ENV_CMD
5029
5030
5031################################################################################
5032
5033
5034
5035################################################################################
5036# Check if the VS env variables were setup prior to running configure.
5037# If not, then find vcvarsall.bat and run it automatically, and integrate
5038# the set env variables into the spec file.
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053# This line needs to be here, verbatim, after all includes and the dummy hook
5054# definitions. It is replaced with custom functionality when building
5055# custom sources.
5056#CUSTOM_AUTOCONF_INCLUDE
5057
5058# Do not change or remove the following line, it is needed for consistency checks:
5059DATE_WHEN_GENERATED=1460538705
5060
5061###############################################################################
5062#
5063# Initialization / Boot-strapping
5064#
5065# The bootstrapping process needs to solve the "chicken or the egg" problem,
5066# thus it jumps back and forth, each time gaining something needed later on.
5067#
5068###############################################################################
5069
5070# If we are requested to print additional help, do that and then exit.
5071# This must be the very first call.
5072
5073  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5074
5075    # Print available toolchains
5076    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5077    $PRINTF "Which are valid to use depends on the build platform.\n"
5078    for toolchain in $VALID_TOOLCHAINS_all; do
5079      # Use indirect variable referencing
5080      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5081      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5082      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5083    done
5084    $PRINTF "\n"
5085
5086    # Print available jvm features
5087    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5088    $PRINTF "Which are valid to use depends on the target platform.\n  "
5089    $PRINTF "%s " $VALID_JVM_FEATURES
5090    $PRINTF "\n"
5091
5092    # And now exit directly
5093    exit 0
5094  fi
5095
5096
5097# Basic initialization that must happen first of all in the normal process.
5098
5099  # Save the original command line. This is passed to us by the wrapper configure script.
5100
5101  # Save the path variable before it gets changed
5102  ORIGINAL_PATH="$PATH"
5103
5104  DATE_WHEN_CONFIGURED=`LANG=C date`
5105
5106  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5107$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5109$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5110
5111
5112  # Start with tools that do not need have cross compilation support
5113  # and can be expected to be found in the default PATH. These tools are
5114  # used by configure.
5115
5116  # First are all the simple required tools.
5117
5118
5119
5120  # Publish this variable in the help.
5121
5122
5123  if [ -z "${BASENAME+x}" ]; then
5124    # The variable is not set by user, try to locate tool using the code snippet
5125    for ac_prog in basename
5126do
5127  # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_path_BASENAME+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $BASENAME in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5146    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157BASENAME=$ac_cv_path_BASENAME
5158if test -n "$BASENAME"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5160$as_echo "$BASENAME" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167  test -n "$BASENAME" && break
5168done
5169
5170  else
5171    # The variable is set, but is it from the command line or the environment?
5172
5173    # Try to remove the string !BASENAME! from our list.
5174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5176      # If it failed, the variable was not from the command line. Ignore it,
5177      # but warn the user (except for BASH, which is always set by the calling BASH).
5178      if test "xBASENAME" != xBASH; then
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5180$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5181      fi
5182      # Try to locate tool using the code snippet
5183      for ac_prog in basename
5184do
5185  # Extract the first word of "$ac_prog", so it can be a program name with args.
5186set dummy $ac_prog; ac_word=$2
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188$as_echo_n "checking for $ac_word... " >&6; }
5189if ${ac_cv_path_BASENAME+:} false; then :
5190  $as_echo_n "(cached) " >&6
5191else
5192  case $BASENAME in
5193  [\\/]* | ?:[\\/]*)
5194  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5195  ;;
5196  *)
5197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5198for as_dir in $PATH
5199do
5200  IFS=$as_save_IFS
5201  test -z "$as_dir" && as_dir=.
5202    for ac_exec_ext in '' $ac_executable_extensions; do
5203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5204    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5206    break 2
5207  fi
5208done
5209  done
5210IFS=$as_save_IFS
5211
5212  ;;
5213esac
5214fi
5215BASENAME=$ac_cv_path_BASENAME
5216if test -n "$BASENAME"; then
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5218$as_echo "$BASENAME" >&6; }
5219else
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
5222fi
5223
5224
5225  test -n "$BASENAME" && break
5226done
5227
5228    else
5229      # If it succeeded, then it was overridden by the user. We will use it
5230      # for the tool.
5231
5232      # First remove it from the list of overridden variables, so we can test
5233      # for unknown variables in the end.
5234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5235
5236      # Check if we try to supply an empty value
5237      if test "x$BASENAME" = x; then
5238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5239$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5241$as_echo_n "checking for BASENAME... " >&6; }
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5243$as_echo "disabled" >&6; }
5244      else
5245        # Check if the provided tool contains a complete path.
5246        tool_specified="$BASENAME"
5247        tool_basename="${tool_specified##*/}"
5248        if test "x$tool_basename" = "x$tool_specified"; then
5249          # A command without a complete path is provided, search $PATH.
5250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5251$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5252          # Extract the first word of "$tool_basename", so it can be a program name with args.
5253set dummy $tool_basename; ac_word=$2
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5255$as_echo_n "checking for $ac_word... " >&6; }
5256if ${ac_cv_path_BASENAME+:} false; then :
5257  $as_echo_n "(cached) " >&6
5258else
5259  case $BASENAME in
5260  [\\/]* | ?:[\\/]*)
5261  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5262  ;;
5263  *)
5264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5265for as_dir in $PATH
5266do
5267  IFS=$as_save_IFS
5268  test -z "$as_dir" && as_dir=.
5269    for ac_exec_ext in '' $ac_executable_extensions; do
5270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5271    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5273    break 2
5274  fi
5275done
5276  done
5277IFS=$as_save_IFS
5278
5279  ;;
5280esac
5281fi
5282BASENAME=$ac_cv_path_BASENAME
5283if test -n "$BASENAME"; then
5284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5285$as_echo "$BASENAME" >&6; }
5286else
5287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288$as_echo "no" >&6; }
5289fi
5290
5291
5292          if test "x$BASENAME" = x; then
5293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5294          fi
5295        else
5296          # Otherwise we believe it is a complete path. Use it as it is.
5297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5298$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5300$as_echo_n "checking for BASENAME... " >&6; }
5301          if test ! -x "$tool_specified"; then
5302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5303$as_echo "not found" >&6; }
5304            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5305          fi
5306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5307$as_echo "$tool_specified" >&6; }
5308        fi
5309      fi
5310    fi
5311
5312  fi
5313
5314
5315
5316  if test "x$BASENAME" = x; then
5317    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5318  fi
5319
5320
5321
5322
5323
5324  # Publish this variable in the help.
5325
5326
5327  if [ -z "${BASH+x}" ]; then
5328    # The variable is not set by user, try to locate tool using the code snippet
5329    for ac_prog in bash
5330do
5331  # Extract the first word of "$ac_prog", so it can be a program name with args.
5332set dummy $ac_prog; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_BASH+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $BASH in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361BASH=$ac_cv_path_BASH
5362if test -n "$BASH"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5364$as_echo "$BASH" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371  test -n "$BASH" && break
5372done
5373
5374  else
5375    # The variable is set, but is it from the command line or the environment?
5376
5377    # Try to remove the string !BASH! from our list.
5378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5380      # If it failed, the variable was not from the command line. Ignore it,
5381      # but warn the user (except for BASH, which is always set by the calling BASH).
5382      if test "xBASH" != xBASH; then
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5384$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5385      fi
5386      # Try to locate tool using the code snippet
5387      for ac_prog in bash
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_BASH+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $BASH in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419BASH=$ac_cv_path_BASH
5420if test -n "$BASH"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5422$as_echo "$BASH" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$BASH" && break
5430done
5431
5432    else
5433      # If it succeeded, then it was overridden by the user. We will use it
5434      # for the tool.
5435
5436      # First remove it from the list of overridden variables, so we can test
5437      # for unknown variables in the end.
5438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5439
5440      # Check if we try to supply an empty value
5441      if test "x$BASH" = x; then
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5443$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5445$as_echo_n "checking for BASH... " >&6; }
5446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5447$as_echo "disabled" >&6; }
5448      else
5449        # Check if the provided tool contains a complete path.
5450        tool_specified="$BASH"
5451        tool_basename="${tool_specified##*/}"
5452        if test "x$tool_basename" = "x$tool_specified"; then
5453          # A command without a complete path is provided, search $PATH.
5454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5455$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5456          # Extract the first word of "$tool_basename", so it can be a program name with args.
5457set dummy $tool_basename; ac_word=$2
5458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5459$as_echo_n "checking for $ac_word... " >&6; }
5460if ${ac_cv_path_BASH+:} false; then :
5461  $as_echo_n "(cached) " >&6
5462else
5463  case $BASH in
5464  [\\/]* | ?:[\\/]*)
5465  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5466  ;;
5467  *)
5468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH
5470do
5471  IFS=$as_save_IFS
5472  test -z "$as_dir" && as_dir=.
5473    for ac_exec_ext in '' $ac_executable_extensions; do
5474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5475    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5477    break 2
5478  fi
5479done
5480  done
5481IFS=$as_save_IFS
5482
5483  ;;
5484esac
5485fi
5486BASH=$ac_cv_path_BASH
5487if test -n "$BASH"; then
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5489$as_echo "$BASH" >&6; }
5490else
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5492$as_echo "no" >&6; }
5493fi
5494
5495
5496          if test "x$BASH" = x; then
5497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5498          fi
5499        else
5500          # Otherwise we believe it is a complete path. Use it as it is.
5501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5502$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5504$as_echo_n "checking for BASH... " >&6; }
5505          if test ! -x "$tool_specified"; then
5506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5507$as_echo "not found" >&6; }
5508            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5509          fi
5510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5511$as_echo "$tool_specified" >&6; }
5512        fi
5513      fi
5514    fi
5515
5516  fi
5517
5518
5519
5520  if test "x$BASH" = x; then
5521    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5522  fi
5523
5524
5525
5526
5527
5528  # Publish this variable in the help.
5529
5530
5531  if [ -z "${CAT+x}" ]; then
5532    # The variable is not set by user, try to locate tool using the code snippet
5533    for ac_prog in cat
5534do
5535  # Extract the first word of "$ac_prog", so it can be a program name with args.
5536set dummy $ac_prog; ac_word=$2
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538$as_echo_n "checking for $ac_word... " >&6; }
5539if ${ac_cv_path_CAT+:} false; then :
5540  $as_echo_n "(cached) " >&6
5541else
5542  case $CAT in
5543  [\\/]* | ?:[\\/]*)
5544  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5545  ;;
5546  *)
5547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5548for as_dir in $PATH
5549do
5550  IFS=$as_save_IFS
5551  test -z "$as_dir" && as_dir=.
5552    for ac_exec_ext in '' $ac_executable_extensions; do
5553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5554    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556    break 2
5557  fi
5558done
5559  done
5560IFS=$as_save_IFS
5561
5562  ;;
5563esac
5564fi
5565CAT=$ac_cv_path_CAT
5566if test -n "$CAT"; then
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5568$as_echo "$CAT" >&6; }
5569else
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
5572fi
5573
5574
5575  test -n "$CAT" && break
5576done
5577
5578  else
5579    # The variable is set, but is it from the command line or the environment?
5580
5581    # Try to remove the string !CAT! from our list.
5582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5584      # If it failed, the variable was not from the command line. Ignore it,
5585      # but warn the user (except for BASH, which is always set by the calling BASH).
5586      if test "xCAT" != xBASH; then
5587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5588$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5589      fi
5590      # Try to locate tool using the code snippet
5591      for ac_prog in cat
5592do
5593  # Extract the first word of "$ac_prog", so it can be a program name with args.
5594set dummy $ac_prog; ac_word=$2
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
5597if ${ac_cv_path_CAT+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  case $CAT in
5601  [\\/]* | ?:[\\/]*)
5602  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5603  ;;
5604  *)
5605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608  IFS=$as_save_IFS
5609  test -z "$as_dir" && as_dir=.
5610    for ac_exec_ext in '' $ac_executable_extensions; do
5611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5612    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614    break 2
5615  fi
5616done
5617  done
5618IFS=$as_save_IFS
5619
5620  ;;
5621esac
5622fi
5623CAT=$ac_cv_path_CAT
5624if test -n "$CAT"; then
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5626$as_echo "$CAT" >&6; }
5627else
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629$as_echo "no" >&6; }
5630fi
5631
5632
5633  test -n "$CAT" && break
5634done
5635
5636    else
5637      # If it succeeded, then it was overridden by the user. We will use it
5638      # for the tool.
5639
5640      # First remove it from the list of overridden variables, so we can test
5641      # for unknown variables in the end.
5642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5643
5644      # Check if we try to supply an empty value
5645      if test "x$CAT" = x; then
5646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5647$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5649$as_echo_n "checking for CAT... " >&6; }
5650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5651$as_echo "disabled" >&6; }
5652      else
5653        # Check if the provided tool contains a complete path.
5654        tool_specified="$CAT"
5655        tool_basename="${tool_specified##*/}"
5656        if test "x$tool_basename" = "x$tool_specified"; then
5657          # A command without a complete path is provided, search $PATH.
5658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5659$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5660          # Extract the first word of "$tool_basename", so it can be a program name with args.
5661set dummy $tool_basename; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_CAT+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $CAT in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690CAT=$ac_cv_path_CAT
5691if test -n "$CAT"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5693$as_echo "$CAT" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700          if test "x$CAT" = x; then
5701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5702          fi
5703        else
5704          # Otherwise we believe it is a complete path. Use it as it is.
5705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5706$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5708$as_echo_n "checking for CAT... " >&6; }
5709          if test ! -x "$tool_specified"; then
5710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5711$as_echo "not found" >&6; }
5712            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5713          fi
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5715$as_echo "$tool_specified" >&6; }
5716        fi
5717      fi
5718    fi
5719
5720  fi
5721
5722
5723
5724  if test "x$CAT" = x; then
5725    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5726  fi
5727
5728
5729
5730
5731
5732  # Publish this variable in the help.
5733
5734
5735  if [ -z "${CHMOD+x}" ]; then
5736    # The variable is not set by user, try to locate tool using the code snippet
5737    for ac_prog in chmod
5738do
5739  # Extract the first word of "$ac_prog", so it can be a program name with args.
5740set dummy $ac_prog; ac_word=$2
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
5743if ${ac_cv_path_CHMOD+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  case $CHMOD in
5747  [\\/]* | ?:[\\/]*)
5748  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5749  ;;
5750  *)
5751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752for as_dir in $PATH
5753do
5754  IFS=$as_save_IFS
5755  test -z "$as_dir" && as_dir=.
5756    for ac_exec_ext in '' $ac_executable_extensions; do
5757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760    break 2
5761  fi
5762done
5763  done
5764IFS=$as_save_IFS
5765
5766  ;;
5767esac
5768fi
5769CHMOD=$ac_cv_path_CHMOD
5770if test -n "$CHMOD"; then
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5772$as_echo "$CHMOD" >&6; }
5773else
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
5776fi
5777
5778
5779  test -n "$CHMOD" && break
5780done
5781
5782  else
5783    # The variable is set, but is it from the command line or the environment?
5784
5785    # Try to remove the string !CHMOD! from our list.
5786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5788      # If it failed, the variable was not from the command line. Ignore it,
5789      # but warn the user (except for BASH, which is always set by the calling BASH).
5790      if test "xCHMOD" != xBASH; then
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5792$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5793      fi
5794      # Try to locate tool using the code snippet
5795      for ac_prog in chmod
5796do
5797  # Extract the first word of "$ac_prog", so it can be a program name with args.
5798set dummy $ac_prog; ac_word=$2
5799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800$as_echo_n "checking for $ac_word... " >&6; }
5801if ${ac_cv_path_CHMOD+:} false; then :
5802  $as_echo_n "(cached) " >&6
5803else
5804  case $CHMOD in
5805  [\\/]* | ?:[\\/]*)
5806  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5807  ;;
5808  *)
5809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810for as_dir in $PATH
5811do
5812  IFS=$as_save_IFS
5813  test -z "$as_dir" && as_dir=.
5814    for ac_exec_ext in '' $ac_executable_extensions; do
5815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818    break 2
5819  fi
5820done
5821  done
5822IFS=$as_save_IFS
5823
5824  ;;
5825esac
5826fi
5827CHMOD=$ac_cv_path_CHMOD
5828if test -n "$CHMOD"; then
5829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5830$as_echo "$CHMOD" >&6; }
5831else
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
5834fi
5835
5836
5837  test -n "$CHMOD" && break
5838done
5839
5840    else
5841      # If it succeeded, then it was overridden by the user. We will use it
5842      # for the tool.
5843
5844      # First remove it from the list of overridden variables, so we can test
5845      # for unknown variables in the end.
5846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5847
5848      # Check if we try to supply an empty value
5849      if test "x$CHMOD" = x; then
5850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5851$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5853$as_echo_n "checking for CHMOD... " >&6; }
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5855$as_echo "disabled" >&6; }
5856      else
5857        # Check if the provided tool contains a complete path.
5858        tool_specified="$CHMOD"
5859        tool_basename="${tool_specified##*/}"
5860        if test "x$tool_basename" = "x$tool_specified"; then
5861          # A command without a complete path is provided, search $PATH.
5862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5863$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5864          # Extract the first word of "$tool_basename", so it can be a program name with args.
5865set dummy $tool_basename; ac_word=$2
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5867$as_echo_n "checking for $ac_word... " >&6; }
5868if ${ac_cv_path_CHMOD+:} false; then :
5869  $as_echo_n "(cached) " >&6
5870else
5871  case $CHMOD in
5872  [\\/]* | ?:[\\/]*)
5873  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5874  ;;
5875  *)
5876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877for as_dir in $PATH
5878do
5879  IFS=$as_save_IFS
5880  test -z "$as_dir" && as_dir=.
5881    for ac_exec_ext in '' $ac_executable_extensions; do
5882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5883    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885    break 2
5886  fi
5887done
5888  done
5889IFS=$as_save_IFS
5890
5891  ;;
5892esac
5893fi
5894CHMOD=$ac_cv_path_CHMOD
5895if test -n "$CHMOD"; then
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5897$as_echo "$CHMOD" >&6; }
5898else
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904          if test "x$CHMOD" = x; then
5905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5906          fi
5907        else
5908          # Otherwise we believe it is a complete path. Use it as it is.
5909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5910$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5912$as_echo_n "checking for CHMOD... " >&6; }
5913          if test ! -x "$tool_specified"; then
5914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5915$as_echo "not found" >&6; }
5916            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5917          fi
5918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5919$as_echo "$tool_specified" >&6; }
5920        fi
5921      fi
5922    fi
5923
5924  fi
5925
5926
5927
5928  if test "x$CHMOD" = x; then
5929    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5930  fi
5931
5932
5933
5934
5935
5936  # Publish this variable in the help.
5937
5938
5939  if [ -z "${CMP+x}" ]; then
5940    # The variable is not set by user, try to locate tool using the code snippet
5941    for ac_prog in cmp
5942do
5943  # Extract the first word of "$ac_prog", so it can be a program name with args.
5944set dummy $ac_prog; ac_word=$2
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
5947if ${ac_cv_path_CMP+:} false; then :
5948  $as_echo_n "(cached) " >&6
5949else
5950  case $CMP in
5951  [\\/]* | ?:[\\/]*)
5952  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5953  ;;
5954  *)
5955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958  IFS=$as_save_IFS
5959  test -z "$as_dir" && as_dir=.
5960    for ac_exec_ext in '' $ac_executable_extensions; do
5961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5962    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964    break 2
5965  fi
5966done
5967  done
5968IFS=$as_save_IFS
5969
5970  ;;
5971esac
5972fi
5973CMP=$ac_cv_path_CMP
5974if test -n "$CMP"; then
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5976$as_echo "$CMP" >&6; }
5977else
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983  test -n "$CMP" && break
5984done
5985
5986  else
5987    # The variable is set, but is it from the command line or the environment?
5988
5989    # Try to remove the string !CMP! from our list.
5990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5992      # If it failed, the variable was not from the command line. Ignore it,
5993      # but warn the user (except for BASH, which is always set by the calling BASH).
5994      if test "xCMP" != xBASH; then
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5996$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5997      fi
5998      # Try to locate tool using the code snippet
5999      for ac_prog in cmp
6000do
6001  # Extract the first word of "$ac_prog", so it can be a program name with args.
6002set dummy $ac_prog; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if ${ac_cv_path_CMP+:} false; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  case $CMP in
6009  [\\/]* | ?:[\\/]*)
6010  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6011  ;;
6012  *)
6013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016  IFS=$as_save_IFS
6017  test -z "$as_dir" && as_dir=.
6018    for ac_exec_ext in '' $ac_executable_extensions; do
6019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022    break 2
6023  fi
6024done
6025  done
6026IFS=$as_save_IFS
6027
6028  ;;
6029esac
6030fi
6031CMP=$ac_cv_path_CMP
6032if test -n "$CMP"; then
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6034$as_echo "$CMP" >&6; }
6035else
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
6041  test -n "$CMP" && break
6042done
6043
6044    else
6045      # If it succeeded, then it was overridden by the user. We will use it
6046      # for the tool.
6047
6048      # First remove it from the list of overridden variables, so we can test
6049      # for unknown variables in the end.
6050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6051
6052      # Check if we try to supply an empty value
6053      if test "x$CMP" = x; then
6054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6055$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6057$as_echo_n "checking for CMP... " >&6; }
6058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6059$as_echo "disabled" >&6; }
6060      else
6061        # Check if the provided tool contains a complete path.
6062        tool_specified="$CMP"
6063        tool_basename="${tool_specified##*/}"
6064        if test "x$tool_basename" = "x$tool_specified"; then
6065          # A command without a complete path is provided, search $PATH.
6066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6067$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6068          # Extract the first word of "$tool_basename", so it can be a program name with args.
6069set dummy $tool_basename; ac_word=$2
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
6072if ${ac_cv_path_CMP+:} false; then :
6073  $as_echo_n "(cached) " >&6
6074else
6075  case $CMP in
6076  [\\/]* | ?:[\\/]*)
6077  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6078  ;;
6079  *)
6080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083  IFS=$as_save_IFS
6084  test -z "$as_dir" && as_dir=.
6085    for ac_exec_ext in '' $ac_executable_extensions; do
6086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089    break 2
6090  fi
6091done
6092  done
6093IFS=$as_save_IFS
6094
6095  ;;
6096esac
6097fi
6098CMP=$ac_cv_path_CMP
6099if test -n "$CMP"; then
6100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6101$as_echo "$CMP" >&6; }
6102else
6103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
6105fi
6106
6107
6108          if test "x$CMP" = x; then
6109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6110          fi
6111        else
6112          # Otherwise we believe it is a complete path. Use it as it is.
6113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6114$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6116$as_echo_n "checking for CMP... " >&6; }
6117          if test ! -x "$tool_specified"; then
6118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6119$as_echo "not found" >&6; }
6120            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6121          fi
6122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6123$as_echo "$tool_specified" >&6; }
6124        fi
6125      fi
6126    fi
6127
6128  fi
6129
6130
6131
6132  if test "x$CMP" = x; then
6133    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6134  fi
6135
6136
6137
6138
6139
6140  # Publish this variable in the help.
6141
6142
6143  if [ -z "${COMM+x}" ]; then
6144    # The variable is not set by user, try to locate tool using the code snippet
6145    for ac_prog in comm
6146do
6147  # Extract the first word of "$ac_prog", so it can be a program name with args.
6148set dummy $ac_prog; ac_word=$2
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150$as_echo_n "checking for $ac_word... " >&6; }
6151if ${ac_cv_path_COMM+:} false; then :
6152  $as_echo_n "(cached) " >&6
6153else
6154  case $COMM in
6155  [\\/]* | ?:[\\/]*)
6156  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6157  ;;
6158  *)
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_exec_ext in '' $ac_executable_extensions; do
6165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168    break 2
6169  fi
6170done
6171  done
6172IFS=$as_save_IFS
6173
6174  ;;
6175esac
6176fi
6177COMM=$ac_cv_path_COMM
6178if test -n "$COMM"; then
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6180$as_echo "$COMM" >&6; }
6181else
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
6184fi
6185
6186
6187  test -n "$COMM" && break
6188done
6189
6190  else
6191    # The variable is set, but is it from the command line or the environment?
6192
6193    # Try to remove the string !COMM! from our list.
6194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6196      # If it failed, the variable was not from the command line. Ignore it,
6197      # but warn the user (except for BASH, which is always set by the calling BASH).
6198      if test "xCOMM" != xBASH; then
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6200$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6201      fi
6202      # Try to locate tool using the code snippet
6203      for ac_prog in comm
6204do
6205  # Extract the first word of "$ac_prog", so it can be a program name with args.
6206set dummy $ac_prog; ac_word=$2
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6208$as_echo_n "checking for $ac_word... " >&6; }
6209if ${ac_cv_path_COMM+:} false; then :
6210  $as_echo_n "(cached) " >&6
6211else
6212  case $COMM in
6213  [\\/]* | ?:[\\/]*)
6214  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6215  ;;
6216  *)
6217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH
6219do
6220  IFS=$as_save_IFS
6221  test -z "$as_dir" && as_dir=.
6222    for ac_exec_ext in '' $ac_executable_extensions; do
6223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6224    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6226    break 2
6227  fi
6228done
6229  done
6230IFS=$as_save_IFS
6231
6232  ;;
6233esac
6234fi
6235COMM=$ac_cv_path_COMM
6236if test -n "$COMM"; then
6237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6238$as_echo "$COMM" >&6; }
6239else
6240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241$as_echo "no" >&6; }
6242fi
6243
6244
6245  test -n "$COMM" && break
6246done
6247
6248    else
6249      # If it succeeded, then it was overridden by the user. We will use it
6250      # for the tool.
6251
6252      # First remove it from the list of overridden variables, so we can test
6253      # for unknown variables in the end.
6254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6255
6256      # Check if we try to supply an empty value
6257      if test "x$COMM" = x; then
6258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6259$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6261$as_echo_n "checking for COMM... " >&6; }
6262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6263$as_echo "disabled" >&6; }
6264      else
6265        # Check if the provided tool contains a complete path.
6266        tool_specified="$COMM"
6267        tool_basename="${tool_specified##*/}"
6268        if test "x$tool_basename" = "x$tool_specified"; then
6269          # A command without a complete path is provided, search $PATH.
6270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6271$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6272          # Extract the first word of "$tool_basename", so it can be a program name with args.
6273set dummy $tool_basename; ac_word=$2
6274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6275$as_echo_n "checking for $ac_word... " >&6; }
6276if ${ac_cv_path_COMM+:} false; then :
6277  $as_echo_n "(cached) " >&6
6278else
6279  case $COMM in
6280  [\\/]* | ?:[\\/]*)
6281  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6282  ;;
6283  *)
6284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285for as_dir in $PATH
6286do
6287  IFS=$as_save_IFS
6288  test -z "$as_dir" && as_dir=.
6289    for ac_exec_ext in '' $ac_executable_extensions; do
6290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6291    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6293    break 2
6294  fi
6295done
6296  done
6297IFS=$as_save_IFS
6298
6299  ;;
6300esac
6301fi
6302COMM=$ac_cv_path_COMM
6303if test -n "$COMM"; then
6304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6305$as_echo "$COMM" >&6; }
6306else
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308$as_echo "no" >&6; }
6309fi
6310
6311
6312          if test "x$COMM" = x; then
6313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6314          fi
6315        else
6316          # Otherwise we believe it is a complete path. Use it as it is.
6317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6318$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6320$as_echo_n "checking for COMM... " >&6; }
6321          if test ! -x "$tool_specified"; then
6322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6323$as_echo "not found" >&6; }
6324            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6325          fi
6326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6327$as_echo "$tool_specified" >&6; }
6328        fi
6329      fi
6330    fi
6331
6332  fi
6333
6334
6335
6336  if test "x$COMM" = x; then
6337    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6338  fi
6339
6340
6341
6342
6343
6344  # Publish this variable in the help.
6345
6346
6347  if [ -z "${CP+x}" ]; then
6348    # The variable is not set by user, try to locate tool using the code snippet
6349    for ac_prog in cp
6350do
6351  # Extract the first word of "$ac_prog", so it can be a program name with args.
6352set dummy $ac_prog; ac_word=$2
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354$as_echo_n "checking for $ac_word... " >&6; }
6355if ${ac_cv_path_CP+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  case $CP in
6359  [\\/]* | ?:[\\/]*)
6360  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6361  ;;
6362  *)
6363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364for as_dir in $PATH
6365do
6366  IFS=$as_save_IFS
6367  test -z "$as_dir" && as_dir=.
6368    for ac_exec_ext in '' $ac_executable_extensions; do
6369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372    break 2
6373  fi
6374done
6375  done
6376IFS=$as_save_IFS
6377
6378  ;;
6379esac
6380fi
6381CP=$ac_cv_path_CP
6382if test -n "$CP"; then
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6384$as_echo "$CP" >&6; }
6385else
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390
6391  test -n "$CP" && break
6392done
6393
6394  else
6395    # The variable is set, but is it from the command line or the environment?
6396
6397    # Try to remove the string !CP! from our list.
6398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6400      # If it failed, the variable was not from the command line. Ignore it,
6401      # but warn the user (except for BASH, which is always set by the calling BASH).
6402      if test "xCP" != xBASH; then
6403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6404$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6405      fi
6406      # Try to locate tool using the code snippet
6407      for ac_prog in cp
6408do
6409  # Extract the first word of "$ac_prog", so it can be a program name with args.
6410set dummy $ac_prog; ac_word=$2
6411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412$as_echo_n "checking for $ac_word... " >&6; }
6413if ${ac_cv_path_CP+:} false; then :
6414  $as_echo_n "(cached) " >&6
6415else
6416  case $CP in
6417  [\\/]* | ?:[\\/]*)
6418  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6419  ;;
6420  *)
6421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6422for as_dir in $PATH
6423do
6424  IFS=$as_save_IFS
6425  test -z "$as_dir" && as_dir=.
6426    for ac_exec_ext in '' $ac_executable_extensions; do
6427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6428    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6430    break 2
6431  fi
6432done
6433  done
6434IFS=$as_save_IFS
6435
6436  ;;
6437esac
6438fi
6439CP=$ac_cv_path_CP
6440if test -n "$CP"; then
6441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6442$as_echo "$CP" >&6; }
6443else
6444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
6446fi
6447
6448
6449  test -n "$CP" && break
6450done
6451
6452    else
6453      # If it succeeded, then it was overridden by the user. We will use it
6454      # for the tool.
6455
6456      # First remove it from the list of overridden variables, so we can test
6457      # for unknown variables in the end.
6458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6459
6460      # Check if we try to supply an empty value
6461      if test "x$CP" = x; then
6462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6463$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6465$as_echo_n "checking for CP... " >&6; }
6466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6467$as_echo "disabled" >&6; }
6468      else
6469        # Check if the provided tool contains a complete path.
6470        tool_specified="$CP"
6471        tool_basename="${tool_specified##*/}"
6472        if test "x$tool_basename" = "x$tool_specified"; then
6473          # A command without a complete path is provided, search $PATH.
6474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6475$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6476          # Extract the first word of "$tool_basename", so it can be a program name with args.
6477set dummy $tool_basename; ac_word=$2
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479$as_echo_n "checking for $ac_word... " >&6; }
6480if ${ac_cv_path_CP+:} false; then :
6481  $as_echo_n "(cached) " >&6
6482else
6483  case $CP in
6484  [\\/]* | ?:[\\/]*)
6485  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6486  ;;
6487  *)
6488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489for as_dir in $PATH
6490do
6491  IFS=$as_save_IFS
6492  test -z "$as_dir" && as_dir=.
6493    for ac_exec_ext in '' $ac_executable_extensions; do
6494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6495    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6497    break 2
6498  fi
6499done
6500  done
6501IFS=$as_save_IFS
6502
6503  ;;
6504esac
6505fi
6506CP=$ac_cv_path_CP
6507if test -n "$CP"; then
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6509$as_echo "$CP" >&6; }
6510else
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
6513fi
6514
6515
6516          if test "x$CP" = x; then
6517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6518          fi
6519        else
6520          # Otherwise we believe it is a complete path. Use it as it is.
6521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6522$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6524$as_echo_n "checking for CP... " >&6; }
6525          if test ! -x "$tool_specified"; then
6526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6527$as_echo "not found" >&6; }
6528            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6529          fi
6530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6531$as_echo "$tool_specified" >&6; }
6532        fi
6533      fi
6534    fi
6535
6536  fi
6537
6538
6539
6540  if test "x$CP" = x; then
6541    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6542  fi
6543
6544
6545
6546
6547
6548  # Publish this variable in the help.
6549
6550
6551  if [ -z "${CUT+x}" ]; then
6552    # The variable is not set by user, try to locate tool using the code snippet
6553    for ac_prog in cut
6554do
6555  # Extract the first word of "$ac_prog", so it can be a program name with args.
6556set dummy $ac_prog; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_CUT+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  case $CUT in
6563  [\\/]* | ?:[\\/]*)
6564  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6565  ;;
6566  *)
6567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in $PATH
6569do
6570  IFS=$as_save_IFS
6571  test -z "$as_dir" && as_dir=.
6572    for ac_exec_ext in '' $ac_executable_extensions; do
6573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576    break 2
6577  fi
6578done
6579  done
6580IFS=$as_save_IFS
6581
6582  ;;
6583esac
6584fi
6585CUT=$ac_cv_path_CUT
6586if test -n "$CUT"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6588$as_echo "$CUT" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595  test -n "$CUT" && break
6596done
6597
6598  else
6599    # The variable is set, but is it from the command line or the environment?
6600
6601    # Try to remove the string !CUT! from our list.
6602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6604      # If it failed, the variable was not from the command line. Ignore it,
6605      # but warn the user (except for BASH, which is always set by the calling BASH).
6606      if test "xCUT" != xBASH; then
6607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6608$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6609      fi
6610      # Try to locate tool using the code snippet
6611      for ac_prog in cut
6612do
6613  # Extract the first word of "$ac_prog", so it can be a program name with args.
6614set dummy $ac_prog; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_path_CUT+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  case $CUT in
6621  [\\/]* | ?:[\\/]*)
6622  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6623  ;;
6624  *)
6625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in $PATH
6627do
6628  IFS=$as_save_IFS
6629  test -z "$as_dir" && as_dir=.
6630    for ac_exec_ext in '' $ac_executable_extensions; do
6631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634    break 2
6635  fi
6636done
6637  done
6638IFS=$as_save_IFS
6639
6640  ;;
6641esac
6642fi
6643CUT=$ac_cv_path_CUT
6644if test -n "$CUT"; then
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6646$as_echo "$CUT" >&6; }
6647else
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652
6653  test -n "$CUT" && break
6654done
6655
6656    else
6657      # If it succeeded, then it was overridden by the user. We will use it
6658      # for the tool.
6659
6660      # First remove it from the list of overridden variables, so we can test
6661      # for unknown variables in the end.
6662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6663
6664      # Check if we try to supply an empty value
6665      if test "x$CUT" = x; then
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6667$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6669$as_echo_n "checking for CUT... " >&6; }
6670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6671$as_echo "disabled" >&6; }
6672      else
6673        # Check if the provided tool contains a complete path.
6674        tool_specified="$CUT"
6675        tool_basename="${tool_specified##*/}"
6676        if test "x$tool_basename" = "x$tool_specified"; then
6677          # A command without a complete path is provided, search $PATH.
6678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6679$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6680          # Extract the first word of "$tool_basename", so it can be a program name with args.
6681set dummy $tool_basename; ac_word=$2
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683$as_echo_n "checking for $ac_word... " >&6; }
6684if ${ac_cv_path_CUT+:} false; then :
6685  $as_echo_n "(cached) " >&6
6686else
6687  case $CUT in
6688  [\\/]* | ?:[\\/]*)
6689  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6690  ;;
6691  *)
6692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693for as_dir in $PATH
6694do
6695  IFS=$as_save_IFS
6696  test -z "$as_dir" && as_dir=.
6697    for ac_exec_ext in '' $ac_executable_extensions; do
6698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6699    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6701    break 2
6702  fi
6703done
6704  done
6705IFS=$as_save_IFS
6706
6707  ;;
6708esac
6709fi
6710CUT=$ac_cv_path_CUT
6711if test -n "$CUT"; then
6712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6713$as_echo "$CUT" >&6; }
6714else
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716$as_echo "no" >&6; }
6717fi
6718
6719
6720          if test "x$CUT" = x; then
6721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6722          fi
6723        else
6724          # Otherwise we believe it is a complete path. Use it as it is.
6725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6726$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6728$as_echo_n "checking for CUT... " >&6; }
6729          if test ! -x "$tool_specified"; then
6730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6731$as_echo "not found" >&6; }
6732            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6733          fi
6734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6735$as_echo "$tool_specified" >&6; }
6736        fi
6737      fi
6738    fi
6739
6740  fi
6741
6742
6743
6744  if test "x$CUT" = x; then
6745    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6746  fi
6747
6748
6749
6750
6751
6752  # Publish this variable in the help.
6753
6754
6755  if [ -z "${DATE+x}" ]; then
6756    # The variable is not set by user, try to locate tool using the code snippet
6757    for ac_prog in date
6758do
6759  # Extract the first word of "$ac_prog", so it can be a program name with args.
6760set dummy $ac_prog; ac_word=$2
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762$as_echo_n "checking for $ac_word... " >&6; }
6763if ${ac_cv_path_DATE+:} false; then :
6764  $as_echo_n "(cached) " >&6
6765else
6766  case $DATE in
6767  [\\/]* | ?:[\\/]*)
6768  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6769  ;;
6770  *)
6771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774  IFS=$as_save_IFS
6775  test -z "$as_dir" && as_dir=.
6776    for ac_exec_ext in '' $ac_executable_extensions; do
6777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6778    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6780    break 2
6781  fi
6782done
6783  done
6784IFS=$as_save_IFS
6785
6786  ;;
6787esac
6788fi
6789DATE=$ac_cv_path_DATE
6790if test -n "$DATE"; then
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6792$as_echo "$DATE" >&6; }
6793else
6794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6795$as_echo "no" >&6; }
6796fi
6797
6798
6799  test -n "$DATE" && break
6800done
6801
6802  else
6803    # The variable is set, but is it from the command line or the environment?
6804
6805    # Try to remove the string !DATE! from our list.
6806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6808      # If it failed, the variable was not from the command line. Ignore it,
6809      # but warn the user (except for BASH, which is always set by the calling BASH).
6810      if test "xDATE" != xBASH; then
6811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6812$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6813      fi
6814      # Try to locate tool using the code snippet
6815      for ac_prog in date
6816do
6817  # Extract the first word of "$ac_prog", so it can be a program name with args.
6818set dummy $ac_prog; ac_word=$2
6819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6820$as_echo_n "checking for $ac_word... " >&6; }
6821if ${ac_cv_path_DATE+:} false; then :
6822  $as_echo_n "(cached) " >&6
6823else
6824  case $DATE in
6825  [\\/]* | ?:[\\/]*)
6826  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6827  ;;
6828  *)
6829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830for as_dir in $PATH
6831do
6832  IFS=$as_save_IFS
6833  test -z "$as_dir" && as_dir=.
6834    for ac_exec_ext in '' $ac_executable_extensions; do
6835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6836    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6838    break 2
6839  fi
6840done
6841  done
6842IFS=$as_save_IFS
6843
6844  ;;
6845esac
6846fi
6847DATE=$ac_cv_path_DATE
6848if test -n "$DATE"; then
6849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6850$as_echo "$DATE" >&6; }
6851else
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6853$as_echo "no" >&6; }
6854fi
6855
6856
6857  test -n "$DATE" && break
6858done
6859
6860    else
6861      # If it succeeded, then it was overridden by the user. We will use it
6862      # for the tool.
6863
6864      # First remove it from the list of overridden variables, so we can test
6865      # for unknown variables in the end.
6866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6867
6868      # Check if we try to supply an empty value
6869      if test "x$DATE" = x; then
6870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6871$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6873$as_echo_n "checking for DATE... " >&6; }
6874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6875$as_echo "disabled" >&6; }
6876      else
6877        # Check if the provided tool contains a complete path.
6878        tool_specified="$DATE"
6879        tool_basename="${tool_specified##*/}"
6880        if test "x$tool_basename" = "x$tool_specified"; then
6881          # A command without a complete path is provided, search $PATH.
6882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6883$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6884          # Extract the first word of "$tool_basename", so it can be a program name with args.
6885set dummy $tool_basename; ac_word=$2
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887$as_echo_n "checking for $ac_word... " >&6; }
6888if ${ac_cv_path_DATE+:} false; then :
6889  $as_echo_n "(cached) " >&6
6890else
6891  case $DATE in
6892  [\\/]* | ?:[\\/]*)
6893  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6894  ;;
6895  *)
6896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6897for as_dir in $PATH
6898do
6899  IFS=$as_save_IFS
6900  test -z "$as_dir" && as_dir=.
6901    for ac_exec_ext in '' $ac_executable_extensions; do
6902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6903    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6905    break 2
6906  fi
6907done
6908  done
6909IFS=$as_save_IFS
6910
6911  ;;
6912esac
6913fi
6914DATE=$ac_cv_path_DATE
6915if test -n "$DATE"; then
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6917$as_echo "$DATE" >&6; }
6918else
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6920$as_echo "no" >&6; }
6921fi
6922
6923
6924          if test "x$DATE" = x; then
6925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6926          fi
6927        else
6928          # Otherwise we believe it is a complete path. Use it as it is.
6929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6930$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6932$as_echo_n "checking for DATE... " >&6; }
6933          if test ! -x "$tool_specified"; then
6934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6935$as_echo "not found" >&6; }
6936            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6937          fi
6938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6939$as_echo "$tool_specified" >&6; }
6940        fi
6941      fi
6942    fi
6943
6944  fi
6945
6946
6947
6948  if test "x$DATE" = x; then
6949    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6950  fi
6951
6952
6953
6954
6955
6956  # Publish this variable in the help.
6957
6958
6959  if [ -z "${DIFF+x}" ]; then
6960    # The variable is not set by user, try to locate tool using the code snippet
6961    for ac_prog in gdiff diff
6962do
6963  # Extract the first word of "$ac_prog", so it can be a program name with args.
6964set dummy $ac_prog; ac_word=$2
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6966$as_echo_n "checking for $ac_word... " >&6; }
6967if ${ac_cv_path_DIFF+:} false; then :
6968  $as_echo_n "(cached) " >&6
6969else
6970  case $DIFF in
6971  [\\/]* | ?:[\\/]*)
6972  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6973  ;;
6974  *)
6975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6976for as_dir in $PATH
6977do
6978  IFS=$as_save_IFS
6979  test -z "$as_dir" && as_dir=.
6980    for ac_exec_ext in '' $ac_executable_extensions; do
6981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6982    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6984    break 2
6985  fi
6986done
6987  done
6988IFS=$as_save_IFS
6989
6990  ;;
6991esac
6992fi
6993DIFF=$ac_cv_path_DIFF
6994if test -n "$DIFF"; then
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6996$as_echo "$DIFF" >&6; }
6997else
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6999$as_echo "no" >&6; }
7000fi
7001
7002
7003  test -n "$DIFF" && break
7004done
7005
7006  else
7007    # The variable is set, but is it from the command line or the environment?
7008
7009    # Try to remove the string !DIFF! from our list.
7010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7012      # If it failed, the variable was not from the command line. Ignore it,
7013      # but warn the user (except for BASH, which is always set by the calling BASH).
7014      if test "xDIFF" != xBASH; then
7015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7016$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7017      fi
7018      # Try to locate tool using the code snippet
7019      for ac_prog in gdiff diff
7020do
7021  # Extract the first word of "$ac_prog", so it can be a program name with args.
7022set dummy $ac_prog; ac_word=$2
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7024$as_echo_n "checking for $ac_word... " >&6; }
7025if ${ac_cv_path_DIFF+:} false; then :
7026  $as_echo_n "(cached) " >&6
7027else
7028  case $DIFF in
7029  [\\/]* | ?:[\\/]*)
7030  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7031  ;;
7032  *)
7033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034for as_dir in $PATH
7035do
7036  IFS=$as_save_IFS
7037  test -z "$as_dir" && as_dir=.
7038    for ac_exec_ext in '' $ac_executable_extensions; do
7039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7040    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7042    break 2
7043  fi
7044done
7045  done
7046IFS=$as_save_IFS
7047
7048  ;;
7049esac
7050fi
7051DIFF=$ac_cv_path_DIFF
7052if test -n "$DIFF"; then
7053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7054$as_echo "$DIFF" >&6; }
7055else
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7057$as_echo "no" >&6; }
7058fi
7059
7060
7061  test -n "$DIFF" && break
7062done
7063
7064    else
7065      # If it succeeded, then it was overridden by the user. We will use it
7066      # for the tool.
7067
7068      # First remove it from the list of overridden variables, so we can test
7069      # for unknown variables in the end.
7070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7071
7072      # Check if we try to supply an empty value
7073      if test "x$DIFF" = x; then
7074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7075$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7077$as_echo_n "checking for DIFF... " >&6; }
7078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7079$as_echo "disabled" >&6; }
7080      else
7081        # Check if the provided tool contains a complete path.
7082        tool_specified="$DIFF"
7083        tool_basename="${tool_specified##*/}"
7084        if test "x$tool_basename" = "x$tool_specified"; then
7085          # A command without a complete path is provided, search $PATH.
7086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7087$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7088          # Extract the first word of "$tool_basename", so it can be a program name with args.
7089set dummy $tool_basename; ac_word=$2
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7091$as_echo_n "checking for $ac_word... " >&6; }
7092if ${ac_cv_path_DIFF+:} false; then :
7093  $as_echo_n "(cached) " >&6
7094else
7095  case $DIFF in
7096  [\\/]* | ?:[\\/]*)
7097  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7098  ;;
7099  *)
7100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101for as_dir in $PATH
7102do
7103  IFS=$as_save_IFS
7104  test -z "$as_dir" && as_dir=.
7105    for ac_exec_ext in '' $ac_executable_extensions; do
7106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7107    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7109    break 2
7110  fi
7111done
7112  done
7113IFS=$as_save_IFS
7114
7115  ;;
7116esac
7117fi
7118DIFF=$ac_cv_path_DIFF
7119if test -n "$DIFF"; then
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7121$as_echo "$DIFF" >&6; }
7122else
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124$as_echo "no" >&6; }
7125fi
7126
7127
7128          if test "x$DIFF" = x; then
7129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7130          fi
7131        else
7132          # Otherwise we believe it is a complete path. Use it as it is.
7133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7134$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7136$as_echo_n "checking for DIFF... " >&6; }
7137          if test ! -x "$tool_specified"; then
7138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7139$as_echo "not found" >&6; }
7140            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7141          fi
7142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7143$as_echo "$tool_specified" >&6; }
7144        fi
7145      fi
7146    fi
7147
7148  fi
7149
7150
7151
7152  if test "x$DIFF" = x; then
7153    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7154  fi
7155
7156
7157
7158
7159
7160  # Publish this variable in the help.
7161
7162
7163  if [ -z "${DIRNAME+x}" ]; then
7164    # The variable is not set by user, try to locate tool using the code snippet
7165    for ac_prog in dirname
7166do
7167  # Extract the first word of "$ac_prog", so it can be a program name with args.
7168set dummy $ac_prog; ac_word=$2
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170$as_echo_n "checking for $ac_word... " >&6; }
7171if ${ac_cv_path_DIRNAME+:} false; then :
7172  $as_echo_n "(cached) " >&6
7173else
7174  case $DIRNAME in
7175  [\\/]* | ?:[\\/]*)
7176  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7177  ;;
7178  *)
7179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7180for as_dir in $PATH
7181do
7182  IFS=$as_save_IFS
7183  test -z "$as_dir" && as_dir=.
7184    for ac_exec_ext in '' $ac_executable_extensions; do
7185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7186    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7188    break 2
7189  fi
7190done
7191  done
7192IFS=$as_save_IFS
7193
7194  ;;
7195esac
7196fi
7197DIRNAME=$ac_cv_path_DIRNAME
7198if test -n "$DIRNAME"; then
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7200$as_echo "$DIRNAME" >&6; }
7201else
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
7204fi
7205
7206
7207  test -n "$DIRNAME" && break
7208done
7209
7210  else
7211    # The variable is set, but is it from the command line or the environment?
7212
7213    # Try to remove the string !DIRNAME! from our list.
7214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7216      # If it failed, the variable was not from the command line. Ignore it,
7217      # but warn the user (except for BASH, which is always set by the calling BASH).
7218      if test "xDIRNAME" != xBASH; then
7219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7220$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7221      fi
7222      # Try to locate tool using the code snippet
7223      for ac_prog in dirname
7224do
7225  # Extract the first word of "$ac_prog", so it can be a program name with args.
7226set dummy $ac_prog; ac_word=$2
7227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7228$as_echo_n "checking for $ac_word... " >&6; }
7229if ${ac_cv_path_DIRNAME+:} false; then :
7230  $as_echo_n "(cached) " >&6
7231else
7232  case $DIRNAME in
7233  [\\/]* | ?:[\\/]*)
7234  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7235  ;;
7236  *)
7237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7238for as_dir in $PATH
7239do
7240  IFS=$as_save_IFS
7241  test -z "$as_dir" && as_dir=.
7242    for ac_exec_ext in '' $ac_executable_extensions; do
7243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7244    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7246    break 2
7247  fi
7248done
7249  done
7250IFS=$as_save_IFS
7251
7252  ;;
7253esac
7254fi
7255DIRNAME=$ac_cv_path_DIRNAME
7256if test -n "$DIRNAME"; then
7257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7258$as_echo "$DIRNAME" >&6; }
7259else
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263
7264
7265  test -n "$DIRNAME" && break
7266done
7267
7268    else
7269      # If it succeeded, then it was overridden by the user. We will use it
7270      # for the tool.
7271
7272      # First remove it from the list of overridden variables, so we can test
7273      # for unknown variables in the end.
7274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7275
7276      # Check if we try to supply an empty value
7277      if test "x$DIRNAME" = x; then
7278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7279$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7281$as_echo_n "checking for DIRNAME... " >&6; }
7282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7283$as_echo "disabled" >&6; }
7284      else
7285        # Check if the provided tool contains a complete path.
7286        tool_specified="$DIRNAME"
7287        tool_basename="${tool_specified##*/}"
7288        if test "x$tool_basename" = "x$tool_specified"; then
7289          # A command without a complete path is provided, search $PATH.
7290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7291$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7292          # Extract the first word of "$tool_basename", so it can be a program name with args.
7293set dummy $tool_basename; ac_word=$2
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295$as_echo_n "checking for $ac_word... " >&6; }
7296if ${ac_cv_path_DIRNAME+:} false; then :
7297  $as_echo_n "(cached) " >&6
7298else
7299  case $DIRNAME in
7300  [\\/]* | ?:[\\/]*)
7301  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7302  ;;
7303  *)
7304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305for as_dir in $PATH
7306do
7307  IFS=$as_save_IFS
7308  test -z "$as_dir" && as_dir=.
7309    for ac_exec_ext in '' $ac_executable_extensions; do
7310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313    break 2
7314  fi
7315done
7316  done
7317IFS=$as_save_IFS
7318
7319  ;;
7320esac
7321fi
7322DIRNAME=$ac_cv_path_DIRNAME
7323if test -n "$DIRNAME"; then
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7325$as_echo "$DIRNAME" >&6; }
7326else
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7328$as_echo "no" >&6; }
7329fi
7330
7331
7332          if test "x$DIRNAME" = x; then
7333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7334          fi
7335        else
7336          # Otherwise we believe it is a complete path. Use it as it is.
7337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7338$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7340$as_echo_n "checking for DIRNAME... " >&6; }
7341          if test ! -x "$tool_specified"; then
7342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7343$as_echo "not found" >&6; }
7344            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7345          fi
7346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7347$as_echo "$tool_specified" >&6; }
7348        fi
7349      fi
7350    fi
7351
7352  fi
7353
7354
7355
7356  if test "x$DIRNAME" = x; then
7357    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7358  fi
7359
7360
7361
7362
7363
7364  # Publish this variable in the help.
7365
7366
7367  if [ -z "${ECHO+x}" ]; then
7368    # The variable is not set by user, try to locate tool using the code snippet
7369    for ac_prog in echo
7370do
7371  # Extract the first word of "$ac_prog", so it can be a program name with args.
7372set dummy $ac_prog; ac_word=$2
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374$as_echo_n "checking for $ac_word... " >&6; }
7375if ${ac_cv_path_ECHO+:} false; then :
7376  $as_echo_n "(cached) " >&6
7377else
7378  case $ECHO in
7379  [\\/]* | ?:[\\/]*)
7380  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7381  ;;
7382  *)
7383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384for as_dir in $PATH
7385do
7386  IFS=$as_save_IFS
7387  test -z "$as_dir" && as_dir=.
7388    for ac_exec_ext in '' $ac_executable_extensions; do
7389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392    break 2
7393  fi
7394done
7395  done
7396IFS=$as_save_IFS
7397
7398  ;;
7399esac
7400fi
7401ECHO=$ac_cv_path_ECHO
7402if test -n "$ECHO"; then
7403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7404$as_echo "$ECHO" >&6; }
7405else
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407$as_echo "no" >&6; }
7408fi
7409
7410
7411  test -n "$ECHO" && break
7412done
7413
7414  else
7415    # The variable is set, but is it from the command line or the environment?
7416
7417    # Try to remove the string !ECHO! from our list.
7418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7420      # If it failed, the variable was not from the command line. Ignore it,
7421      # but warn the user (except for BASH, which is always set by the calling BASH).
7422      if test "xECHO" != xBASH; then
7423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7424$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7425      fi
7426      # Try to locate tool using the code snippet
7427      for ac_prog in echo
7428do
7429  # Extract the first word of "$ac_prog", so it can be a program name with args.
7430set dummy $ac_prog; ac_word=$2
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
7433if ${ac_cv_path_ECHO+:} false; then :
7434  $as_echo_n "(cached) " >&6
7435else
7436  case $ECHO in
7437  [\\/]* | ?:[\\/]*)
7438  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7439  ;;
7440  *)
7441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442for as_dir in $PATH
7443do
7444  IFS=$as_save_IFS
7445  test -z "$as_dir" && as_dir=.
7446    for ac_exec_ext in '' $ac_executable_extensions; do
7447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7448    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450    break 2
7451  fi
7452done
7453  done
7454IFS=$as_save_IFS
7455
7456  ;;
7457esac
7458fi
7459ECHO=$ac_cv_path_ECHO
7460if test -n "$ECHO"; then
7461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7462$as_echo "$ECHO" >&6; }
7463else
7464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
7466fi
7467
7468
7469  test -n "$ECHO" && break
7470done
7471
7472    else
7473      # If it succeeded, then it was overridden by the user. We will use it
7474      # for the tool.
7475
7476      # First remove it from the list of overridden variables, so we can test
7477      # for unknown variables in the end.
7478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7479
7480      # Check if we try to supply an empty value
7481      if test "x$ECHO" = x; then
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7483$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7485$as_echo_n "checking for ECHO... " >&6; }
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7487$as_echo "disabled" >&6; }
7488      else
7489        # Check if the provided tool contains a complete path.
7490        tool_specified="$ECHO"
7491        tool_basename="${tool_specified##*/}"
7492        if test "x$tool_basename" = "x$tool_specified"; then
7493          # A command without a complete path is provided, search $PATH.
7494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7495$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7496          # Extract the first word of "$tool_basename", so it can be a program name with args.
7497set dummy $tool_basename; ac_word=$2
7498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499$as_echo_n "checking for $ac_word... " >&6; }
7500if ${ac_cv_path_ECHO+:} false; then :
7501  $as_echo_n "(cached) " >&6
7502else
7503  case $ECHO in
7504  [\\/]* | ?:[\\/]*)
7505  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7506  ;;
7507  *)
7508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7509for as_dir in $PATH
7510do
7511  IFS=$as_save_IFS
7512  test -z "$as_dir" && as_dir=.
7513    for ac_exec_ext in '' $ac_executable_extensions; do
7514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7515    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7517    break 2
7518  fi
7519done
7520  done
7521IFS=$as_save_IFS
7522
7523  ;;
7524esac
7525fi
7526ECHO=$ac_cv_path_ECHO
7527if test -n "$ECHO"; then
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7529$as_echo "$ECHO" >&6; }
7530else
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532$as_echo "no" >&6; }
7533fi
7534
7535
7536          if test "x$ECHO" = x; then
7537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7538          fi
7539        else
7540          # Otherwise we believe it is a complete path. Use it as it is.
7541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7542$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7544$as_echo_n "checking for ECHO... " >&6; }
7545          if test ! -x "$tool_specified"; then
7546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7547$as_echo "not found" >&6; }
7548            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7549          fi
7550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7551$as_echo "$tool_specified" >&6; }
7552        fi
7553      fi
7554    fi
7555
7556  fi
7557
7558
7559
7560  if test "x$ECHO" = x; then
7561    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7562  fi
7563
7564
7565
7566
7567
7568  # Publish this variable in the help.
7569
7570
7571  if [ -z "${EXPR+x}" ]; then
7572    # The variable is not set by user, try to locate tool using the code snippet
7573    for ac_prog in expr
7574do
7575  # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_EXPR+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $EXPR in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605EXPR=$ac_cv_path_EXPR
7606if test -n "$EXPR"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7608$as_echo "$EXPR" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615  test -n "$EXPR" && break
7616done
7617
7618  else
7619    # The variable is set, but is it from the command line or the environment?
7620
7621    # Try to remove the string !EXPR! from our list.
7622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7624      # If it failed, the variable was not from the command line. Ignore it,
7625      # but warn the user (except for BASH, which is always set by the calling BASH).
7626      if test "xEXPR" != xBASH; then
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7628$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7629      fi
7630      # Try to locate tool using the code snippet
7631      for ac_prog in expr
7632do
7633  # Extract the first word of "$ac_prog", so it can be a program name with args.
7634set dummy $ac_prog; ac_word=$2
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636$as_echo_n "checking for $ac_word... " >&6; }
7637if ${ac_cv_path_EXPR+:} false; then :
7638  $as_echo_n "(cached) " >&6
7639else
7640  case $EXPR in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  test -z "$as_dir" && as_dir=.
7650    for ac_exec_ext in '' $ac_executable_extensions; do
7651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654    break 2
7655  fi
7656done
7657  done
7658IFS=$as_save_IFS
7659
7660  ;;
7661esac
7662fi
7663EXPR=$ac_cv_path_EXPR
7664if test -n "$EXPR"; then
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7666$as_echo "$EXPR" >&6; }
7667else
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
7670fi
7671
7672
7673  test -n "$EXPR" && break
7674done
7675
7676    else
7677      # If it succeeded, then it was overridden by the user. We will use it
7678      # for the tool.
7679
7680      # First remove it from the list of overridden variables, so we can test
7681      # for unknown variables in the end.
7682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7683
7684      # Check if we try to supply an empty value
7685      if test "x$EXPR" = x; then
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7687$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7689$as_echo_n "checking for EXPR... " >&6; }
7690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7691$as_echo "disabled" >&6; }
7692      else
7693        # Check if the provided tool contains a complete path.
7694        tool_specified="$EXPR"
7695        tool_basename="${tool_specified##*/}"
7696        if test "x$tool_basename" = "x$tool_specified"; then
7697          # A command without a complete path is provided, search $PATH.
7698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7699$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7700          # Extract the first word of "$tool_basename", so it can be a program name with args.
7701set dummy $tool_basename; ac_word=$2
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703$as_echo_n "checking for $ac_word... " >&6; }
7704if ${ac_cv_path_EXPR+:} false; then :
7705  $as_echo_n "(cached) " >&6
7706else
7707  case $EXPR in
7708  [\\/]* | ?:[\\/]*)
7709  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7710  ;;
7711  *)
7712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7713for as_dir in $PATH
7714do
7715  IFS=$as_save_IFS
7716  test -z "$as_dir" && as_dir=.
7717    for ac_exec_ext in '' $ac_executable_extensions; do
7718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7719    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7721    break 2
7722  fi
7723done
7724  done
7725IFS=$as_save_IFS
7726
7727  ;;
7728esac
7729fi
7730EXPR=$ac_cv_path_EXPR
7731if test -n "$EXPR"; then
7732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7733$as_echo "$EXPR" >&6; }
7734else
7735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7736$as_echo "no" >&6; }
7737fi
7738
7739
7740          if test "x$EXPR" = x; then
7741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7742          fi
7743        else
7744          # Otherwise we believe it is a complete path. Use it as it is.
7745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7746$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7748$as_echo_n "checking for EXPR... " >&6; }
7749          if test ! -x "$tool_specified"; then
7750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7751$as_echo "not found" >&6; }
7752            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7753          fi
7754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7755$as_echo "$tool_specified" >&6; }
7756        fi
7757      fi
7758    fi
7759
7760  fi
7761
7762
7763
7764  if test "x$EXPR" = x; then
7765    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7766  fi
7767
7768
7769
7770
7771
7772  # Publish this variable in the help.
7773
7774
7775  if [ -z "${FILE+x}" ]; then
7776    # The variable is not set by user, try to locate tool using the code snippet
7777    for ac_prog in file
7778do
7779  # Extract the first word of "$ac_prog", so it can be a program name with args.
7780set dummy $ac_prog; ac_word=$2
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782$as_echo_n "checking for $ac_word... " >&6; }
7783if ${ac_cv_path_FILE+:} false; then :
7784  $as_echo_n "(cached) " >&6
7785else
7786  case $FILE in
7787  [\\/]* | ?:[\\/]*)
7788  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7789  ;;
7790  *)
7791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794  IFS=$as_save_IFS
7795  test -z "$as_dir" && as_dir=.
7796    for ac_exec_ext in '' $ac_executable_extensions; do
7797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800    break 2
7801  fi
7802done
7803  done
7804IFS=$as_save_IFS
7805
7806  ;;
7807esac
7808fi
7809FILE=$ac_cv_path_FILE
7810if test -n "$FILE"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7812$as_echo "$FILE" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819  test -n "$FILE" && break
7820done
7821
7822  else
7823    # The variable is set, but is it from the command line or the environment?
7824
7825    # Try to remove the string !FILE! from our list.
7826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7828      # If it failed, the variable was not from the command line. Ignore it,
7829      # but warn the user (except for BASH, which is always set by the calling BASH).
7830      if test "xFILE" != xBASH; then
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7832$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7833      fi
7834      # Try to locate tool using the code snippet
7835      for ac_prog in file
7836do
7837  # Extract the first word of "$ac_prog", so it can be a program name with args.
7838set dummy $ac_prog; ac_word=$2
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7840$as_echo_n "checking for $ac_word... " >&6; }
7841if ${ac_cv_path_FILE+:} false; then :
7842  $as_echo_n "(cached) " >&6
7843else
7844  case $FILE in
7845  [\\/]* | ?:[\\/]*)
7846  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7847  ;;
7848  *)
7849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850for as_dir in $PATH
7851do
7852  IFS=$as_save_IFS
7853  test -z "$as_dir" && as_dir=.
7854    for ac_exec_ext in '' $ac_executable_extensions; do
7855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7856    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7858    break 2
7859  fi
7860done
7861  done
7862IFS=$as_save_IFS
7863
7864  ;;
7865esac
7866fi
7867FILE=$ac_cv_path_FILE
7868if test -n "$FILE"; then
7869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7870$as_echo "$FILE" >&6; }
7871else
7872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7873$as_echo "no" >&6; }
7874fi
7875
7876
7877  test -n "$FILE" && break
7878done
7879
7880    else
7881      # If it succeeded, then it was overridden by the user. We will use it
7882      # for the tool.
7883
7884      # First remove it from the list of overridden variables, so we can test
7885      # for unknown variables in the end.
7886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7887
7888      # Check if we try to supply an empty value
7889      if test "x$FILE" = x; then
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7891$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7893$as_echo_n "checking for FILE... " >&6; }
7894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7895$as_echo "disabled" >&6; }
7896      else
7897        # Check if the provided tool contains a complete path.
7898        tool_specified="$FILE"
7899        tool_basename="${tool_specified##*/}"
7900        if test "x$tool_basename" = "x$tool_specified"; then
7901          # A command without a complete path is provided, search $PATH.
7902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7903$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7904          # Extract the first word of "$tool_basename", so it can be a program name with args.
7905set dummy $tool_basename; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_FILE+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $FILE in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934FILE=$ac_cv_path_FILE
7935if test -n "$FILE"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7937$as_echo "$FILE" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944          if test "x$FILE" = x; then
7945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7946          fi
7947        else
7948          # Otherwise we believe it is a complete path. Use it as it is.
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7950$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7952$as_echo_n "checking for FILE... " >&6; }
7953          if test ! -x "$tool_specified"; then
7954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7955$as_echo "not found" >&6; }
7956            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7957          fi
7958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7959$as_echo "$tool_specified" >&6; }
7960        fi
7961      fi
7962    fi
7963
7964  fi
7965
7966
7967
7968  if test "x$FILE" = x; then
7969    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7970  fi
7971
7972
7973
7974
7975
7976  # Publish this variable in the help.
7977
7978
7979  if [ -z "${FIND+x}" ]; then
7980    # The variable is not set by user, try to locate tool using the code snippet
7981    for ac_prog in find
7982do
7983  # Extract the first word of "$ac_prog", so it can be a program name with args.
7984set dummy $ac_prog; ac_word=$2
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986$as_echo_n "checking for $ac_word... " >&6; }
7987if ${ac_cv_path_FIND+:} false; then :
7988  $as_echo_n "(cached) " >&6
7989else
7990  case $FIND in
7991  [\\/]* | ?:[\\/]*)
7992  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7993  ;;
7994  *)
7995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996for as_dir in $PATH
7997do
7998  IFS=$as_save_IFS
7999  test -z "$as_dir" && as_dir=.
8000    for ac_exec_ext in '' $ac_executable_extensions; do
8001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8002    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004    break 2
8005  fi
8006done
8007  done
8008IFS=$as_save_IFS
8009
8010  ;;
8011esac
8012fi
8013FIND=$ac_cv_path_FIND
8014if test -n "$FIND"; then
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8016$as_echo "$FIND" >&6; }
8017else
8018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8019$as_echo "no" >&6; }
8020fi
8021
8022
8023  test -n "$FIND" && break
8024done
8025
8026  else
8027    # The variable is set, but is it from the command line or the environment?
8028
8029    # Try to remove the string !FIND! from our list.
8030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8032      # If it failed, the variable was not from the command line. Ignore it,
8033      # but warn the user (except for BASH, which is always set by the calling BASH).
8034      if test "xFIND" != xBASH; then
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8036$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8037      fi
8038      # Try to locate tool using the code snippet
8039      for ac_prog in find
8040do
8041  # Extract the first word of "$ac_prog", so it can be a program name with args.
8042set dummy $ac_prog; ac_word=$2
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044$as_echo_n "checking for $ac_word... " >&6; }
8045if ${ac_cv_path_FIND+:} false; then :
8046  $as_echo_n "(cached) " >&6
8047else
8048  case $FIND in
8049  [\\/]* | ?:[\\/]*)
8050  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8051  ;;
8052  *)
8053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054for as_dir in $PATH
8055do
8056  IFS=$as_save_IFS
8057  test -z "$as_dir" && as_dir=.
8058    for ac_exec_ext in '' $ac_executable_extensions; do
8059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8060    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062    break 2
8063  fi
8064done
8065  done
8066IFS=$as_save_IFS
8067
8068  ;;
8069esac
8070fi
8071FIND=$ac_cv_path_FIND
8072if test -n "$FIND"; then
8073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8074$as_echo "$FIND" >&6; }
8075else
8076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }
8078fi
8079
8080
8081  test -n "$FIND" && break
8082done
8083
8084    else
8085      # If it succeeded, then it was overridden by the user. We will use it
8086      # for the tool.
8087
8088      # First remove it from the list of overridden variables, so we can test
8089      # for unknown variables in the end.
8090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8091
8092      # Check if we try to supply an empty value
8093      if test "x$FIND" = x; then
8094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8095$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8097$as_echo_n "checking for FIND... " >&6; }
8098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8099$as_echo "disabled" >&6; }
8100      else
8101        # Check if the provided tool contains a complete path.
8102        tool_specified="$FIND"
8103        tool_basename="${tool_specified##*/}"
8104        if test "x$tool_basename" = "x$tool_specified"; then
8105          # A command without a complete path is provided, search $PATH.
8106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8107$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8108          # Extract the first word of "$tool_basename", so it can be a program name with args.
8109set dummy $tool_basename; ac_word=$2
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111$as_echo_n "checking for $ac_word... " >&6; }
8112if ${ac_cv_path_FIND+:} false; then :
8113  $as_echo_n "(cached) " >&6
8114else
8115  case $FIND in
8116  [\\/]* | ?:[\\/]*)
8117  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8118  ;;
8119  *)
8120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121for as_dir in $PATH
8122do
8123  IFS=$as_save_IFS
8124  test -z "$as_dir" && as_dir=.
8125    for ac_exec_ext in '' $ac_executable_extensions; do
8126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8127    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8129    break 2
8130  fi
8131done
8132  done
8133IFS=$as_save_IFS
8134
8135  ;;
8136esac
8137fi
8138FIND=$ac_cv_path_FIND
8139if test -n "$FIND"; then
8140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8141$as_echo "$FIND" >&6; }
8142else
8143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8144$as_echo "no" >&6; }
8145fi
8146
8147
8148          if test "x$FIND" = x; then
8149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8150          fi
8151        else
8152          # Otherwise we believe it is a complete path. Use it as it is.
8153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8154$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8156$as_echo_n "checking for FIND... " >&6; }
8157          if test ! -x "$tool_specified"; then
8158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8159$as_echo "not found" >&6; }
8160            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8161          fi
8162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8163$as_echo "$tool_specified" >&6; }
8164        fi
8165      fi
8166    fi
8167
8168  fi
8169
8170
8171
8172  if test "x$FIND" = x; then
8173    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8174  fi
8175
8176
8177
8178
8179
8180  # Publish this variable in the help.
8181
8182
8183  if [ -z "${HEAD+x}" ]; then
8184    # The variable is not set by user, try to locate tool using the code snippet
8185    for ac_prog in head
8186do
8187  # Extract the first word of "$ac_prog", so it can be a program name with args.
8188set dummy $ac_prog; ac_word=$2
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8190$as_echo_n "checking for $ac_word... " >&6; }
8191if ${ac_cv_path_HEAD+:} false; then :
8192  $as_echo_n "(cached) " >&6
8193else
8194  case $HEAD in
8195  [\\/]* | ?:[\\/]*)
8196  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8197  ;;
8198  *)
8199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8200for as_dir in $PATH
8201do
8202  IFS=$as_save_IFS
8203  test -z "$as_dir" && as_dir=.
8204    for ac_exec_ext in '' $ac_executable_extensions; do
8205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8206    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8208    break 2
8209  fi
8210done
8211  done
8212IFS=$as_save_IFS
8213
8214  ;;
8215esac
8216fi
8217HEAD=$ac_cv_path_HEAD
8218if test -n "$HEAD"; then
8219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8220$as_echo "$HEAD" >&6; }
8221else
8222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223$as_echo "no" >&6; }
8224fi
8225
8226
8227  test -n "$HEAD" && break
8228done
8229
8230  else
8231    # The variable is set, but is it from the command line or the environment?
8232
8233    # Try to remove the string !HEAD! from our list.
8234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8236      # If it failed, the variable was not from the command line. Ignore it,
8237      # but warn the user (except for BASH, which is always set by the calling BASH).
8238      if test "xHEAD" != xBASH; then
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8240$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8241      fi
8242      # Try to locate tool using the code snippet
8243      for ac_prog in head
8244do
8245  # Extract the first word of "$ac_prog", so it can be a program name with args.
8246set dummy $ac_prog; ac_word=$2
8247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8248$as_echo_n "checking for $ac_word... " >&6; }
8249if ${ac_cv_path_HEAD+:} false; then :
8250  $as_echo_n "(cached) " >&6
8251else
8252  case $HEAD in
8253  [\\/]* | ?:[\\/]*)
8254  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8255  ;;
8256  *)
8257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8258for as_dir in $PATH
8259do
8260  IFS=$as_save_IFS
8261  test -z "$as_dir" && as_dir=.
8262    for ac_exec_ext in '' $ac_executable_extensions; do
8263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8264    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8266    break 2
8267  fi
8268done
8269  done
8270IFS=$as_save_IFS
8271
8272  ;;
8273esac
8274fi
8275HEAD=$ac_cv_path_HEAD
8276if test -n "$HEAD"; then
8277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8278$as_echo "$HEAD" >&6; }
8279else
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281$as_echo "no" >&6; }
8282fi
8283
8284
8285  test -n "$HEAD" && break
8286done
8287
8288    else
8289      # If it succeeded, then it was overridden by the user. We will use it
8290      # for the tool.
8291
8292      # First remove it from the list of overridden variables, so we can test
8293      # for unknown variables in the end.
8294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8295
8296      # Check if we try to supply an empty value
8297      if test "x$HEAD" = x; then
8298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8299$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8301$as_echo_n "checking for HEAD... " >&6; }
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8303$as_echo "disabled" >&6; }
8304      else
8305        # Check if the provided tool contains a complete path.
8306        tool_specified="$HEAD"
8307        tool_basename="${tool_specified##*/}"
8308        if test "x$tool_basename" = "x$tool_specified"; then
8309          # A command without a complete path is provided, search $PATH.
8310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8311$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8312          # Extract the first word of "$tool_basename", so it can be a program name with args.
8313set dummy $tool_basename; ac_word=$2
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8315$as_echo_n "checking for $ac_word... " >&6; }
8316if ${ac_cv_path_HEAD+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319  case $HEAD in
8320  [\\/]* | ?:[\\/]*)
8321  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8322  ;;
8323  *)
8324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8325for as_dir in $PATH
8326do
8327  IFS=$as_save_IFS
8328  test -z "$as_dir" && as_dir=.
8329    for ac_exec_ext in '' $ac_executable_extensions; do
8330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8331    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8333    break 2
8334  fi
8335done
8336  done
8337IFS=$as_save_IFS
8338
8339  ;;
8340esac
8341fi
8342HEAD=$ac_cv_path_HEAD
8343if test -n "$HEAD"; then
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8345$as_echo "$HEAD" >&6; }
8346else
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348$as_echo "no" >&6; }
8349fi
8350
8351
8352          if test "x$HEAD" = x; then
8353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8354          fi
8355        else
8356          # Otherwise we believe it is a complete path. Use it as it is.
8357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8358$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8360$as_echo_n "checking for HEAD... " >&6; }
8361          if test ! -x "$tool_specified"; then
8362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8363$as_echo "not found" >&6; }
8364            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8365          fi
8366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8367$as_echo "$tool_specified" >&6; }
8368        fi
8369      fi
8370    fi
8371
8372  fi
8373
8374
8375
8376  if test "x$HEAD" = x; then
8377    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8378  fi
8379
8380
8381
8382
8383
8384  # Publish this variable in the help.
8385
8386
8387  if [ -z "${LN+x}" ]; then
8388    # The variable is not set by user, try to locate tool using the code snippet
8389    for ac_prog in ln
8390do
8391  # Extract the first word of "$ac_prog", so it can be a program name with args.
8392set dummy $ac_prog; ac_word=$2
8393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
8395if ${ac_cv_path_LN+:} false; then :
8396  $as_echo_n "(cached) " >&6
8397else
8398  case $LN in
8399  [\\/]* | ?:[\\/]*)
8400  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8401  ;;
8402  *)
8403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418  ;;
8419esac
8420fi
8421LN=$ac_cv_path_LN
8422if test -n "$LN"; then
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8424$as_echo "$LN" >&6; }
8425else
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
8428fi
8429
8430
8431  test -n "$LN" && break
8432done
8433
8434  else
8435    # The variable is set, but is it from the command line or the environment?
8436
8437    # Try to remove the string !LN! from our list.
8438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8440      # If it failed, the variable was not from the command line. Ignore it,
8441      # but warn the user (except for BASH, which is always set by the calling BASH).
8442      if test "xLN" != xBASH; then
8443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8444$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8445      fi
8446      # Try to locate tool using the code snippet
8447      for ac_prog in ln
8448do
8449  # Extract the first word of "$ac_prog", so it can be a program name with args.
8450set dummy $ac_prog; ac_word=$2
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8452$as_echo_n "checking for $ac_word... " >&6; }
8453if ${ac_cv_path_LN+:} false; then :
8454  $as_echo_n "(cached) " >&6
8455else
8456  case $LN in
8457  [\\/]* | ?:[\\/]*)
8458  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8459  ;;
8460  *)
8461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462for as_dir in $PATH
8463do
8464  IFS=$as_save_IFS
8465  test -z "$as_dir" && as_dir=.
8466    for ac_exec_ext in '' $ac_executable_extensions; do
8467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8468    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8470    break 2
8471  fi
8472done
8473  done
8474IFS=$as_save_IFS
8475
8476  ;;
8477esac
8478fi
8479LN=$ac_cv_path_LN
8480if test -n "$LN"; then
8481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8482$as_echo "$LN" >&6; }
8483else
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485$as_echo "no" >&6; }
8486fi
8487
8488
8489  test -n "$LN" && break
8490done
8491
8492    else
8493      # If it succeeded, then it was overridden by the user. We will use it
8494      # for the tool.
8495
8496      # First remove it from the list of overridden variables, so we can test
8497      # for unknown variables in the end.
8498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8499
8500      # Check if we try to supply an empty value
8501      if test "x$LN" = x; then
8502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8503$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8505$as_echo_n "checking for LN... " >&6; }
8506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8507$as_echo "disabled" >&6; }
8508      else
8509        # Check if the provided tool contains a complete path.
8510        tool_specified="$LN"
8511        tool_basename="${tool_specified##*/}"
8512        if test "x$tool_basename" = "x$tool_specified"; then
8513          # A command without a complete path is provided, search $PATH.
8514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8515$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8516          # Extract the first word of "$tool_basename", so it can be a program name with args.
8517set dummy $tool_basename; ac_word=$2
8518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8519$as_echo_n "checking for $ac_word... " >&6; }
8520if ${ac_cv_path_LN+:} false; then :
8521  $as_echo_n "(cached) " >&6
8522else
8523  case $LN in
8524  [\\/]* | ?:[\\/]*)
8525  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8526  ;;
8527  *)
8528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8529for as_dir in $PATH
8530do
8531  IFS=$as_save_IFS
8532  test -z "$as_dir" && as_dir=.
8533    for ac_exec_ext in '' $ac_executable_extensions; do
8534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8535    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8537    break 2
8538  fi
8539done
8540  done
8541IFS=$as_save_IFS
8542
8543  ;;
8544esac
8545fi
8546LN=$ac_cv_path_LN
8547if test -n "$LN"; then
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8549$as_echo "$LN" >&6; }
8550else
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552$as_echo "no" >&6; }
8553fi
8554
8555
8556          if test "x$LN" = x; then
8557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8558          fi
8559        else
8560          # Otherwise we believe it is a complete path. Use it as it is.
8561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8562$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8564$as_echo_n "checking for LN... " >&6; }
8565          if test ! -x "$tool_specified"; then
8566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8567$as_echo "not found" >&6; }
8568            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8569          fi
8570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8571$as_echo "$tool_specified" >&6; }
8572        fi
8573      fi
8574    fi
8575
8576  fi
8577
8578
8579
8580  if test "x$LN" = x; then
8581    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8582  fi
8583
8584
8585
8586
8587
8588  # Publish this variable in the help.
8589
8590
8591  if [ -z "${LS+x}" ]; then
8592    # The variable is not set by user, try to locate tool using the code snippet
8593    for ac_prog in ls
8594do
8595  # Extract the first word of "$ac_prog", so it can be a program name with args.
8596set dummy $ac_prog; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_LS+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $LS in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625LS=$ac_cv_path_LS
8626if test -n "$LS"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8628$as_echo "$LS" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635  test -n "$LS" && break
8636done
8637
8638  else
8639    # The variable is set, but is it from the command line or the environment?
8640
8641    # Try to remove the string !LS! from our list.
8642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8644      # If it failed, the variable was not from the command line. Ignore it,
8645      # but warn the user (except for BASH, which is always set by the calling BASH).
8646      if test "xLS" != xBASH; then
8647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8648$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8649      fi
8650      # Try to locate tool using the code snippet
8651      for ac_prog in ls
8652do
8653  # Extract the first word of "$ac_prog", so it can be a program name with args.
8654set dummy $ac_prog; ac_word=$2
8655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656$as_echo_n "checking for $ac_word... " >&6; }
8657if ${ac_cv_path_LS+:} false; then :
8658  $as_echo_n "(cached) " >&6
8659else
8660  case $LS in
8661  [\\/]* | ?:[\\/]*)
8662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8663  ;;
8664  *)
8665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666for as_dir in $PATH
8667do
8668  IFS=$as_save_IFS
8669  test -z "$as_dir" && as_dir=.
8670    for ac_exec_ext in '' $ac_executable_extensions; do
8671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8674    break 2
8675  fi
8676done
8677  done
8678IFS=$as_save_IFS
8679
8680  ;;
8681esac
8682fi
8683LS=$ac_cv_path_LS
8684if test -n "$LS"; then
8685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8686$as_echo "$LS" >&6; }
8687else
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8689$as_echo "no" >&6; }
8690fi
8691
8692
8693  test -n "$LS" && break
8694done
8695
8696    else
8697      # If it succeeded, then it was overridden by the user. We will use it
8698      # for the tool.
8699
8700      # First remove it from the list of overridden variables, so we can test
8701      # for unknown variables in the end.
8702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8703
8704      # Check if we try to supply an empty value
8705      if test "x$LS" = x; then
8706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8707$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8709$as_echo_n "checking for LS... " >&6; }
8710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8711$as_echo "disabled" >&6; }
8712      else
8713        # Check if the provided tool contains a complete path.
8714        tool_specified="$LS"
8715        tool_basename="${tool_specified##*/}"
8716        if test "x$tool_basename" = "x$tool_specified"; then
8717          # A command without a complete path is provided, search $PATH.
8718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8719$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8720          # Extract the first word of "$tool_basename", so it can be a program name with args.
8721set dummy $tool_basename; ac_word=$2
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8723$as_echo_n "checking for $ac_word... " >&6; }
8724if ${ac_cv_path_LS+:} false; then :
8725  $as_echo_n "(cached) " >&6
8726else
8727  case $LS in
8728  [\\/]* | ?:[\\/]*)
8729  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8730  ;;
8731  *)
8732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8733for as_dir in $PATH
8734do
8735  IFS=$as_save_IFS
8736  test -z "$as_dir" && as_dir=.
8737    for ac_exec_ext in '' $ac_executable_extensions; do
8738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8739    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8741    break 2
8742  fi
8743done
8744  done
8745IFS=$as_save_IFS
8746
8747  ;;
8748esac
8749fi
8750LS=$ac_cv_path_LS
8751if test -n "$LS"; then
8752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8753$as_echo "$LS" >&6; }
8754else
8755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8756$as_echo "no" >&6; }
8757fi
8758
8759
8760          if test "x$LS" = x; then
8761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8762          fi
8763        else
8764          # Otherwise we believe it is a complete path. Use it as it is.
8765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8766$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8768$as_echo_n "checking for LS... " >&6; }
8769          if test ! -x "$tool_specified"; then
8770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8771$as_echo "not found" >&6; }
8772            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8773          fi
8774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8775$as_echo "$tool_specified" >&6; }
8776        fi
8777      fi
8778    fi
8779
8780  fi
8781
8782
8783
8784  if test "x$LS" = x; then
8785    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8786  fi
8787
8788
8789
8790
8791
8792  # Publish this variable in the help.
8793
8794
8795  if [ -z "${MKDIR+x}" ]; then
8796    # The variable is not set by user, try to locate tool using the code snippet
8797    for ac_prog in mkdir
8798do
8799  # Extract the first word of "$ac_prog", so it can be a program name with args.
8800set dummy $ac_prog; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_path_MKDIR+:} false; then :
8804  $as_echo_n "(cached) " >&6
8805else
8806  case $MKDIR in
8807  [\\/]* | ?:[\\/]*)
8808  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8809  ;;
8810  *)
8811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812for as_dir in $PATH
8813do
8814  IFS=$as_save_IFS
8815  test -z "$as_dir" && as_dir=.
8816    for ac_exec_ext in '' $ac_executable_extensions; do
8817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8818    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8820    break 2
8821  fi
8822done
8823  done
8824IFS=$as_save_IFS
8825
8826  ;;
8827esac
8828fi
8829MKDIR=$ac_cv_path_MKDIR
8830if test -n "$MKDIR"; then
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8832$as_echo "$MKDIR" >&6; }
8833else
8834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
8836fi
8837
8838
8839  test -n "$MKDIR" && break
8840done
8841
8842  else
8843    # The variable is set, but is it from the command line or the environment?
8844
8845    # Try to remove the string !MKDIR! from our list.
8846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8848      # If it failed, the variable was not from the command line. Ignore it,
8849      # but warn the user (except for BASH, which is always set by the calling BASH).
8850      if test "xMKDIR" != xBASH; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8852$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8853      fi
8854      # Try to locate tool using the code snippet
8855      for ac_prog in mkdir
8856do
8857  # Extract the first word of "$ac_prog", so it can be a program name with args.
8858set dummy $ac_prog; ac_word=$2
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8860$as_echo_n "checking for $ac_word... " >&6; }
8861if ${ac_cv_path_MKDIR+:} false; then :
8862  $as_echo_n "(cached) " >&6
8863else
8864  case $MKDIR in
8865  [\\/]* | ?:[\\/]*)
8866  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8867  ;;
8868  *)
8869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872  IFS=$as_save_IFS
8873  test -z "$as_dir" && as_dir=.
8874    for ac_exec_ext in '' $ac_executable_extensions; do
8875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8876    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8878    break 2
8879  fi
8880done
8881  done
8882IFS=$as_save_IFS
8883
8884  ;;
8885esac
8886fi
8887MKDIR=$ac_cv_path_MKDIR
8888if test -n "$MKDIR"; then
8889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8890$as_echo "$MKDIR" >&6; }
8891else
8892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8893$as_echo "no" >&6; }
8894fi
8895
8896
8897  test -n "$MKDIR" && break
8898done
8899
8900    else
8901      # If it succeeded, then it was overridden by the user. We will use it
8902      # for the tool.
8903
8904      # First remove it from the list of overridden variables, so we can test
8905      # for unknown variables in the end.
8906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8907
8908      # Check if we try to supply an empty value
8909      if test "x$MKDIR" = x; then
8910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8911$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8913$as_echo_n "checking for MKDIR... " >&6; }
8914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8915$as_echo "disabled" >&6; }
8916      else
8917        # Check if the provided tool contains a complete path.
8918        tool_specified="$MKDIR"
8919        tool_basename="${tool_specified##*/}"
8920        if test "x$tool_basename" = "x$tool_specified"; then
8921          # A command without a complete path is provided, search $PATH.
8922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8923$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8924          # Extract the first word of "$tool_basename", so it can be a program name with args.
8925set dummy $tool_basename; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_MKDIR+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $MKDIR in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954MKDIR=$ac_cv_path_MKDIR
8955if test -n "$MKDIR"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8957$as_echo "$MKDIR" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964          if test "x$MKDIR" = x; then
8965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8966          fi
8967        else
8968          # Otherwise we believe it is a complete path. Use it as it is.
8969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8970$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8972$as_echo_n "checking for MKDIR... " >&6; }
8973          if test ! -x "$tool_specified"; then
8974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8975$as_echo "not found" >&6; }
8976            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8977          fi
8978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8979$as_echo "$tool_specified" >&6; }
8980        fi
8981      fi
8982    fi
8983
8984  fi
8985
8986
8987
8988  if test "x$MKDIR" = x; then
8989    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8990  fi
8991
8992
8993
8994
8995
8996  # Publish this variable in the help.
8997
8998
8999  if [ -z "${MKTEMP+x}" ]; then
9000    # The variable is not set by user, try to locate tool using the code snippet
9001    for ac_prog in mktemp
9002do
9003  # Extract the first word of "$ac_prog", so it can be a program name with args.
9004set dummy $ac_prog; ac_word=$2
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006$as_echo_n "checking for $ac_word... " >&6; }
9007if ${ac_cv_path_MKTEMP+:} false; then :
9008  $as_echo_n "(cached) " >&6
9009else
9010  case $MKTEMP in
9011  [\\/]* | ?:[\\/]*)
9012  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9013  ;;
9014  *)
9015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016for as_dir in $PATH
9017do
9018  IFS=$as_save_IFS
9019  test -z "$as_dir" && as_dir=.
9020    for ac_exec_ext in '' $ac_executable_extensions; do
9021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024    break 2
9025  fi
9026done
9027  done
9028IFS=$as_save_IFS
9029
9030  ;;
9031esac
9032fi
9033MKTEMP=$ac_cv_path_MKTEMP
9034if test -n "$MKTEMP"; then
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9036$as_echo "$MKTEMP" >&6; }
9037else
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
9040fi
9041
9042
9043  test -n "$MKTEMP" && break
9044done
9045
9046  else
9047    # The variable is set, but is it from the command line or the environment?
9048
9049    # Try to remove the string !MKTEMP! from our list.
9050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9052      # If it failed, the variable was not from the command line. Ignore it,
9053      # but warn the user (except for BASH, which is always set by the calling BASH).
9054      if test "xMKTEMP" != xBASH; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9056$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9057      fi
9058      # Try to locate tool using the code snippet
9059      for ac_prog in mktemp
9060do
9061  # Extract the first word of "$ac_prog", so it can be a program name with args.
9062set dummy $ac_prog; ac_word=$2
9063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064$as_echo_n "checking for $ac_word... " >&6; }
9065if ${ac_cv_path_MKTEMP+:} false; then :
9066  $as_echo_n "(cached) " >&6
9067else
9068  case $MKTEMP in
9069  [\\/]* | ?:[\\/]*)
9070  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9071  ;;
9072  *)
9073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074for as_dir in $PATH
9075do
9076  IFS=$as_save_IFS
9077  test -z "$as_dir" && as_dir=.
9078    for ac_exec_ext in '' $ac_executable_extensions; do
9079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9080    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9082    break 2
9083  fi
9084done
9085  done
9086IFS=$as_save_IFS
9087
9088  ;;
9089esac
9090fi
9091MKTEMP=$ac_cv_path_MKTEMP
9092if test -n "$MKTEMP"; then
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9094$as_echo "$MKTEMP" >&6; }
9095else
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
9098fi
9099
9100
9101  test -n "$MKTEMP" && break
9102done
9103
9104    else
9105      # If it succeeded, then it was overridden by the user. We will use it
9106      # for the tool.
9107
9108      # First remove it from the list of overridden variables, so we can test
9109      # for unknown variables in the end.
9110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9111
9112      # Check if we try to supply an empty value
9113      if test "x$MKTEMP" = x; then
9114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9115$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9117$as_echo_n "checking for MKTEMP... " >&6; }
9118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9119$as_echo "disabled" >&6; }
9120      else
9121        # Check if the provided tool contains a complete path.
9122        tool_specified="$MKTEMP"
9123        tool_basename="${tool_specified##*/}"
9124        if test "x$tool_basename" = "x$tool_specified"; then
9125          # A command without a complete path is provided, search $PATH.
9126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9127$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9128          # Extract the first word of "$tool_basename", so it can be a program name with args.
9129set dummy $tool_basename; ac_word=$2
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9131$as_echo_n "checking for $ac_word... " >&6; }
9132if ${ac_cv_path_MKTEMP+:} false; then :
9133  $as_echo_n "(cached) " >&6
9134else
9135  case $MKTEMP in
9136  [\\/]* | ?:[\\/]*)
9137  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9138  ;;
9139  *)
9140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9141for as_dir in $PATH
9142do
9143  IFS=$as_save_IFS
9144  test -z "$as_dir" && as_dir=.
9145    for ac_exec_ext in '' $ac_executable_extensions; do
9146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9147    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9149    break 2
9150  fi
9151done
9152  done
9153IFS=$as_save_IFS
9154
9155  ;;
9156esac
9157fi
9158MKTEMP=$ac_cv_path_MKTEMP
9159if test -n "$MKTEMP"; then
9160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9161$as_echo "$MKTEMP" >&6; }
9162else
9163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
9165fi
9166
9167
9168          if test "x$MKTEMP" = x; then
9169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9170          fi
9171        else
9172          # Otherwise we believe it is a complete path. Use it as it is.
9173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9174$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9176$as_echo_n "checking for MKTEMP... " >&6; }
9177          if test ! -x "$tool_specified"; then
9178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9179$as_echo "not found" >&6; }
9180            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9181          fi
9182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9183$as_echo "$tool_specified" >&6; }
9184        fi
9185      fi
9186    fi
9187
9188  fi
9189
9190
9191
9192  if test "x$MKTEMP" = x; then
9193    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9194  fi
9195
9196
9197
9198
9199
9200  # Publish this variable in the help.
9201
9202
9203  if [ -z "${MV+x}" ]; then
9204    # The variable is not set by user, try to locate tool using the code snippet
9205    for ac_prog in mv
9206do
9207  # Extract the first word of "$ac_prog", so it can be a program name with args.
9208set dummy $ac_prog; ac_word=$2
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210$as_echo_n "checking for $ac_word... " >&6; }
9211if ${ac_cv_path_MV+:} false; then :
9212  $as_echo_n "(cached) " >&6
9213else
9214  case $MV in
9215  [\\/]* | ?:[\\/]*)
9216  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9217  ;;
9218  *)
9219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220for as_dir in $PATH
9221do
9222  IFS=$as_save_IFS
9223  test -z "$as_dir" && as_dir=.
9224    for ac_exec_ext in '' $ac_executable_extensions; do
9225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228    break 2
9229  fi
9230done
9231  done
9232IFS=$as_save_IFS
9233
9234  ;;
9235esac
9236fi
9237MV=$ac_cv_path_MV
9238if test -n "$MV"; then
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9240$as_echo "$MV" >&6; }
9241else
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
9244fi
9245
9246
9247  test -n "$MV" && break
9248done
9249
9250  else
9251    # The variable is set, but is it from the command line or the environment?
9252
9253    # Try to remove the string !MV! from our list.
9254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9256      # If it failed, the variable was not from the command line. Ignore it,
9257      # but warn the user (except for BASH, which is always set by the calling BASH).
9258      if test "xMV" != xBASH; then
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9260$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9261      fi
9262      # Try to locate tool using the code snippet
9263      for ac_prog in mv
9264do
9265  # Extract the first word of "$ac_prog", so it can be a program name with args.
9266set dummy $ac_prog; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_path_MV+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  case $MV in
9273  [\\/]* | ?:[\\/]*)
9274  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9275  ;;
9276  *)
9277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280  IFS=$as_save_IFS
9281  test -z "$as_dir" && as_dir=.
9282    for ac_exec_ext in '' $ac_executable_extensions; do
9283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286    break 2
9287  fi
9288done
9289  done
9290IFS=$as_save_IFS
9291
9292  ;;
9293esac
9294fi
9295MV=$ac_cv_path_MV
9296if test -n "$MV"; then
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9298$as_echo "$MV" >&6; }
9299else
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
9302fi
9303
9304
9305  test -n "$MV" && break
9306done
9307
9308    else
9309      # If it succeeded, then it was overridden by the user. We will use it
9310      # for the tool.
9311
9312      # First remove it from the list of overridden variables, so we can test
9313      # for unknown variables in the end.
9314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9315
9316      # Check if we try to supply an empty value
9317      if test "x$MV" = x; then
9318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9319$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9321$as_echo_n "checking for MV... " >&6; }
9322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9323$as_echo "disabled" >&6; }
9324      else
9325        # Check if the provided tool contains a complete path.
9326        tool_specified="$MV"
9327        tool_basename="${tool_specified##*/}"
9328        if test "x$tool_basename" = "x$tool_specified"; then
9329          # A command without a complete path is provided, search $PATH.
9330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9331$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9332          # Extract the first word of "$tool_basename", so it can be a program name with args.
9333set dummy $tool_basename; ac_word=$2
9334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335$as_echo_n "checking for $ac_word... " >&6; }
9336if ${ac_cv_path_MV+:} false; then :
9337  $as_echo_n "(cached) " >&6
9338else
9339  case $MV in
9340  [\\/]* | ?:[\\/]*)
9341  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9342  ;;
9343  *)
9344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345for as_dir in $PATH
9346do
9347  IFS=$as_save_IFS
9348  test -z "$as_dir" && as_dir=.
9349    for ac_exec_ext in '' $ac_executable_extensions; do
9350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9351    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9353    break 2
9354  fi
9355done
9356  done
9357IFS=$as_save_IFS
9358
9359  ;;
9360esac
9361fi
9362MV=$ac_cv_path_MV
9363if test -n "$MV"; then
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9365$as_echo "$MV" >&6; }
9366else
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
9369fi
9370
9371
9372          if test "x$MV" = x; then
9373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9374          fi
9375        else
9376          # Otherwise we believe it is a complete path. Use it as it is.
9377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9378$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9380$as_echo_n "checking for MV... " >&6; }
9381          if test ! -x "$tool_specified"; then
9382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9383$as_echo "not found" >&6; }
9384            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9385          fi
9386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9387$as_echo "$tool_specified" >&6; }
9388        fi
9389      fi
9390    fi
9391
9392  fi
9393
9394
9395
9396  if test "x$MV" = x; then
9397    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9398  fi
9399
9400
9401
9402
9403
9404  # Publish this variable in the help.
9405
9406
9407  if [ -z "${NAWK+x}" ]; then
9408    # The variable is not set by user, try to locate tool using the code snippet
9409    for ac_prog in nawk gawk awk
9410do
9411  # Extract the first word of "$ac_prog", so it can be a program name with args.
9412set dummy $ac_prog; ac_word=$2
9413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9414$as_echo_n "checking for $ac_word... " >&6; }
9415if ${ac_cv_path_NAWK+:} false; then :
9416  $as_echo_n "(cached) " >&6
9417else
9418  case $NAWK in
9419  [\\/]* | ?:[\\/]*)
9420  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9421  ;;
9422  *)
9423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9424for as_dir in $PATH
9425do
9426  IFS=$as_save_IFS
9427  test -z "$as_dir" && as_dir=.
9428    for ac_exec_ext in '' $ac_executable_extensions; do
9429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9430    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9432    break 2
9433  fi
9434done
9435  done
9436IFS=$as_save_IFS
9437
9438  ;;
9439esac
9440fi
9441NAWK=$ac_cv_path_NAWK
9442if test -n "$NAWK"; then
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9444$as_echo "$NAWK" >&6; }
9445else
9446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
9448fi
9449
9450
9451  test -n "$NAWK" && break
9452done
9453
9454  else
9455    # The variable is set, but is it from the command line or the environment?
9456
9457    # Try to remove the string !NAWK! from our list.
9458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9460      # If it failed, the variable was not from the command line. Ignore it,
9461      # but warn the user (except for BASH, which is always set by the calling BASH).
9462      if test "xNAWK" != xBASH; then
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9464$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9465      fi
9466      # Try to locate tool using the code snippet
9467      for ac_prog in nawk gawk awk
9468do
9469  # Extract the first word of "$ac_prog", so it can be a program name with args.
9470set dummy $ac_prog; ac_word=$2
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9472$as_echo_n "checking for $ac_word... " >&6; }
9473if ${ac_cv_path_NAWK+:} false; then :
9474  $as_echo_n "(cached) " >&6
9475else
9476  case $NAWK in
9477  [\\/]* | ?:[\\/]*)
9478  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9479  ;;
9480  *)
9481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9482for as_dir in $PATH
9483do
9484  IFS=$as_save_IFS
9485  test -z "$as_dir" && as_dir=.
9486    for ac_exec_ext in '' $ac_executable_extensions; do
9487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9488    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9490    break 2
9491  fi
9492done
9493  done
9494IFS=$as_save_IFS
9495
9496  ;;
9497esac
9498fi
9499NAWK=$ac_cv_path_NAWK
9500if test -n "$NAWK"; then
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9502$as_echo "$NAWK" >&6; }
9503else
9504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9505$as_echo "no" >&6; }
9506fi
9507
9508
9509  test -n "$NAWK" && break
9510done
9511
9512    else
9513      # If it succeeded, then it was overridden by the user. We will use it
9514      # for the tool.
9515
9516      # First remove it from the list of overridden variables, so we can test
9517      # for unknown variables in the end.
9518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9519
9520      # Check if we try to supply an empty value
9521      if test "x$NAWK" = x; then
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9523$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9525$as_echo_n "checking for NAWK... " >&6; }
9526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9527$as_echo "disabled" >&6; }
9528      else
9529        # Check if the provided tool contains a complete path.
9530        tool_specified="$NAWK"
9531        tool_basename="${tool_specified##*/}"
9532        if test "x$tool_basename" = "x$tool_specified"; then
9533          # A command without a complete path is provided, search $PATH.
9534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9535$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9536          # Extract the first word of "$tool_basename", so it can be a program name with args.
9537set dummy $tool_basename; ac_word=$2
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9539$as_echo_n "checking for $ac_word... " >&6; }
9540if ${ac_cv_path_NAWK+:} false; then :
9541  $as_echo_n "(cached) " >&6
9542else
9543  case $NAWK in
9544  [\\/]* | ?:[\\/]*)
9545  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9546  ;;
9547  *)
9548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9549for as_dir in $PATH
9550do
9551  IFS=$as_save_IFS
9552  test -z "$as_dir" && as_dir=.
9553    for ac_exec_ext in '' $ac_executable_extensions; do
9554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9555    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9557    break 2
9558  fi
9559done
9560  done
9561IFS=$as_save_IFS
9562
9563  ;;
9564esac
9565fi
9566NAWK=$ac_cv_path_NAWK
9567if test -n "$NAWK"; then
9568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9569$as_echo "$NAWK" >&6; }
9570else
9571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
9573fi
9574
9575
9576          if test "x$NAWK" = x; then
9577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9578          fi
9579        else
9580          # Otherwise we believe it is a complete path. Use it as it is.
9581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9582$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9584$as_echo_n "checking for NAWK... " >&6; }
9585          if test ! -x "$tool_specified"; then
9586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9587$as_echo "not found" >&6; }
9588            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9589          fi
9590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9591$as_echo "$tool_specified" >&6; }
9592        fi
9593      fi
9594    fi
9595
9596  fi
9597
9598
9599
9600  if test "x$NAWK" = x; then
9601    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9602  fi
9603
9604
9605
9606
9607
9608  # Publish this variable in the help.
9609
9610
9611  if [ -z "${PRINTF+x}" ]; then
9612    # The variable is not set by user, try to locate tool using the code snippet
9613    for ac_prog in printf
9614do
9615  # Extract the first word of "$ac_prog", so it can be a program name with args.
9616set dummy $ac_prog; ac_word=$2
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9618$as_echo_n "checking for $ac_word... " >&6; }
9619if ${ac_cv_path_PRINTF+:} false; then :
9620  $as_echo_n "(cached) " >&6
9621else
9622  case $PRINTF in
9623  [\\/]* | ?:[\\/]*)
9624  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9625  ;;
9626  *)
9627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9628for as_dir in $PATH
9629do
9630  IFS=$as_save_IFS
9631  test -z "$as_dir" && as_dir=.
9632    for ac_exec_ext in '' $ac_executable_extensions; do
9633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9634    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9636    break 2
9637  fi
9638done
9639  done
9640IFS=$as_save_IFS
9641
9642  ;;
9643esac
9644fi
9645PRINTF=$ac_cv_path_PRINTF
9646if test -n "$PRINTF"; then
9647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9648$as_echo "$PRINTF" >&6; }
9649else
9650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
9652fi
9653
9654
9655  test -n "$PRINTF" && break
9656done
9657
9658  else
9659    # The variable is set, but is it from the command line or the environment?
9660
9661    # Try to remove the string !PRINTF! from our list.
9662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9664      # If it failed, the variable was not from the command line. Ignore it,
9665      # but warn the user (except for BASH, which is always set by the calling BASH).
9666      if test "xPRINTF" != xBASH; then
9667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9668$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9669      fi
9670      # Try to locate tool using the code snippet
9671      for ac_prog in printf
9672do
9673  # Extract the first word of "$ac_prog", so it can be a program name with args.
9674set dummy $ac_prog; ac_word=$2
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9676$as_echo_n "checking for $ac_word... " >&6; }
9677if ${ac_cv_path_PRINTF+:} false; then :
9678  $as_echo_n "(cached) " >&6
9679else
9680  case $PRINTF in
9681  [\\/]* | ?:[\\/]*)
9682  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9683  ;;
9684  *)
9685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9686for as_dir in $PATH
9687do
9688  IFS=$as_save_IFS
9689  test -z "$as_dir" && as_dir=.
9690    for ac_exec_ext in '' $ac_executable_extensions; do
9691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9692    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9694    break 2
9695  fi
9696done
9697  done
9698IFS=$as_save_IFS
9699
9700  ;;
9701esac
9702fi
9703PRINTF=$ac_cv_path_PRINTF
9704if test -n "$PRINTF"; then
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9706$as_echo "$PRINTF" >&6; }
9707else
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
9710fi
9711
9712
9713  test -n "$PRINTF" && break
9714done
9715
9716    else
9717      # If it succeeded, then it was overridden by the user. We will use it
9718      # for the tool.
9719
9720      # First remove it from the list of overridden variables, so we can test
9721      # for unknown variables in the end.
9722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9723
9724      # Check if we try to supply an empty value
9725      if test "x$PRINTF" = x; then
9726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9727$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9729$as_echo_n "checking for PRINTF... " >&6; }
9730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9731$as_echo "disabled" >&6; }
9732      else
9733        # Check if the provided tool contains a complete path.
9734        tool_specified="$PRINTF"
9735        tool_basename="${tool_specified##*/}"
9736        if test "x$tool_basename" = "x$tool_specified"; then
9737          # A command without a complete path is provided, search $PATH.
9738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9739$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9740          # Extract the first word of "$tool_basename", so it can be a program name with args.
9741set dummy $tool_basename; ac_word=$2
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9743$as_echo_n "checking for $ac_word... " >&6; }
9744if ${ac_cv_path_PRINTF+:} false; then :
9745  $as_echo_n "(cached) " >&6
9746else
9747  case $PRINTF in
9748  [\\/]* | ?:[\\/]*)
9749  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9750  ;;
9751  *)
9752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9753for as_dir in $PATH
9754do
9755  IFS=$as_save_IFS
9756  test -z "$as_dir" && as_dir=.
9757    for ac_exec_ext in '' $ac_executable_extensions; do
9758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9759    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9761    break 2
9762  fi
9763done
9764  done
9765IFS=$as_save_IFS
9766
9767  ;;
9768esac
9769fi
9770PRINTF=$ac_cv_path_PRINTF
9771if test -n "$PRINTF"; then
9772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9773$as_echo "$PRINTF" >&6; }
9774else
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777fi
9778
9779
9780          if test "x$PRINTF" = x; then
9781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9782          fi
9783        else
9784          # Otherwise we believe it is a complete path. Use it as it is.
9785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9786$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9788$as_echo_n "checking for PRINTF... " >&6; }
9789          if test ! -x "$tool_specified"; then
9790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9791$as_echo "not found" >&6; }
9792            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9793          fi
9794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9795$as_echo "$tool_specified" >&6; }
9796        fi
9797      fi
9798    fi
9799
9800  fi
9801
9802
9803
9804  if test "x$PRINTF" = x; then
9805    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9806  fi
9807
9808
9809
9810
9811
9812  # Publish this variable in the help.
9813
9814
9815  if [ -z "${RM+x}" ]; then
9816    # The variable is not set by user, try to locate tool using the code snippet
9817    for ac_prog in rm
9818do
9819  # Extract the first word of "$ac_prog", so it can be a program name with args.
9820set dummy $ac_prog; ac_word=$2
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9822$as_echo_n "checking for $ac_word... " >&6; }
9823if ${ac_cv_path_RM+:} false; then :
9824  $as_echo_n "(cached) " >&6
9825else
9826  case $RM in
9827  [\\/]* | ?:[\\/]*)
9828  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9829  ;;
9830  *)
9831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832for as_dir in $PATH
9833do
9834  IFS=$as_save_IFS
9835  test -z "$as_dir" && as_dir=.
9836    for ac_exec_ext in '' $ac_executable_extensions; do
9837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840    break 2
9841  fi
9842done
9843  done
9844IFS=$as_save_IFS
9845
9846  ;;
9847esac
9848fi
9849RM=$ac_cv_path_RM
9850if test -n "$RM"; then
9851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9852$as_echo "$RM" >&6; }
9853else
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855$as_echo "no" >&6; }
9856fi
9857
9858
9859  test -n "$RM" && break
9860done
9861
9862  else
9863    # The variable is set, but is it from the command line or the environment?
9864
9865    # Try to remove the string !RM! from our list.
9866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9868      # If it failed, the variable was not from the command line. Ignore it,
9869      # but warn the user (except for BASH, which is always set by the calling BASH).
9870      if test "xRM" != xBASH; then
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9872$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9873      fi
9874      # Try to locate tool using the code snippet
9875      for ac_prog in rm
9876do
9877  # Extract the first word of "$ac_prog", so it can be a program name with args.
9878set dummy $ac_prog; ac_word=$2
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880$as_echo_n "checking for $ac_word... " >&6; }
9881if ${ac_cv_path_RM+:} false; then :
9882  $as_echo_n "(cached) " >&6
9883else
9884  case $RM in
9885  [\\/]* | ?:[\\/]*)
9886  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9887  ;;
9888  *)
9889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890for as_dir in $PATH
9891do
9892  IFS=$as_save_IFS
9893  test -z "$as_dir" && as_dir=.
9894    for ac_exec_ext in '' $ac_executable_extensions; do
9895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898    break 2
9899  fi
9900done
9901  done
9902IFS=$as_save_IFS
9903
9904  ;;
9905esac
9906fi
9907RM=$ac_cv_path_RM
9908if test -n "$RM"; then
9909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9910$as_echo "$RM" >&6; }
9911else
9912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914fi
9915
9916
9917  test -n "$RM" && break
9918done
9919
9920    else
9921      # If it succeeded, then it was overridden by the user. We will use it
9922      # for the tool.
9923
9924      # First remove it from the list of overridden variables, so we can test
9925      # for unknown variables in the end.
9926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9927
9928      # Check if we try to supply an empty value
9929      if test "x$RM" = x; then
9930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9931$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9933$as_echo_n "checking for RM... " >&6; }
9934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9935$as_echo "disabled" >&6; }
9936      else
9937        # Check if the provided tool contains a complete path.
9938        tool_specified="$RM"
9939        tool_basename="${tool_specified##*/}"
9940        if test "x$tool_basename" = "x$tool_specified"; then
9941          # A command without a complete path is provided, search $PATH.
9942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9943$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9944          # Extract the first word of "$tool_basename", so it can be a program name with args.
9945set dummy $tool_basename; ac_word=$2
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947$as_echo_n "checking for $ac_word... " >&6; }
9948if ${ac_cv_path_RM+:} false; then :
9949  $as_echo_n "(cached) " >&6
9950else
9951  case $RM in
9952  [\\/]* | ?:[\\/]*)
9953  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9954  ;;
9955  *)
9956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957for as_dir in $PATH
9958do
9959  IFS=$as_save_IFS
9960  test -z "$as_dir" && as_dir=.
9961    for ac_exec_ext in '' $ac_executable_extensions; do
9962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9963    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965    break 2
9966  fi
9967done
9968  done
9969IFS=$as_save_IFS
9970
9971  ;;
9972esac
9973fi
9974RM=$ac_cv_path_RM
9975if test -n "$RM"; then
9976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9977$as_echo "$RM" >&6; }
9978else
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
9981fi
9982
9983
9984          if test "x$RM" = x; then
9985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9986          fi
9987        else
9988          # Otherwise we believe it is a complete path. Use it as it is.
9989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9990$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9992$as_echo_n "checking for RM... " >&6; }
9993          if test ! -x "$tool_specified"; then
9994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9995$as_echo "not found" >&6; }
9996            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9997          fi
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9999$as_echo "$tool_specified" >&6; }
10000        fi
10001      fi
10002    fi
10003
10004  fi
10005
10006
10007
10008  if test "x$RM" = x; then
10009    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10010  fi
10011
10012
10013
10014
10015
10016  # Publish this variable in the help.
10017
10018
10019  if [ -z "${RMDIR+x}" ]; then
10020    # The variable is not set by user, try to locate tool using the code snippet
10021    for ac_prog in rmdir
10022do
10023  # Extract the first word of "$ac_prog", so it can be a program name with args.
10024set dummy $ac_prog; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_RMDIR+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $RMDIR in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053RMDIR=$ac_cv_path_RMDIR
10054if test -n "$RMDIR"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10056$as_echo "$RMDIR" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063  test -n "$RMDIR" && break
10064done
10065
10066  else
10067    # The variable is set, but is it from the command line or the environment?
10068
10069    # Try to remove the string !RMDIR! from our list.
10070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072      # If it failed, the variable was not from the command line. Ignore it,
10073      # but warn the user (except for BASH, which is always set by the calling BASH).
10074      if test "xRMDIR" != xBASH; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10076$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10077      fi
10078      # Try to locate tool using the code snippet
10079      for ac_prog in rmdir
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_RMDIR+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $RMDIR in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111RMDIR=$ac_cv_path_RMDIR
10112if test -n "$RMDIR"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10114$as_echo "$RMDIR" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$RMDIR" && break
10122done
10123
10124    else
10125      # If it succeeded, then it was overridden by the user. We will use it
10126      # for the tool.
10127
10128      # First remove it from the list of overridden variables, so we can test
10129      # for unknown variables in the end.
10130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131
10132      # Check if we try to supply an empty value
10133      if test "x$RMDIR" = x; then
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10135$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10137$as_echo_n "checking for RMDIR... " >&6; }
10138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10139$as_echo "disabled" >&6; }
10140      else
10141        # Check if the provided tool contains a complete path.
10142        tool_specified="$RMDIR"
10143        tool_basename="${tool_specified##*/}"
10144        if test "x$tool_basename" = "x$tool_specified"; then
10145          # A command without a complete path is provided, search $PATH.
10146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10147$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10148          # Extract the first word of "$tool_basename", so it can be a program name with args.
10149set dummy $tool_basename; ac_word=$2
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151$as_echo_n "checking for $ac_word... " >&6; }
10152if ${ac_cv_path_RMDIR+:} false; then :
10153  $as_echo_n "(cached) " >&6
10154else
10155  case $RMDIR in
10156  [\\/]* | ?:[\\/]*)
10157  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10158  ;;
10159  *)
10160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161for as_dir in $PATH
10162do
10163  IFS=$as_save_IFS
10164  test -z "$as_dir" && as_dir=.
10165    for ac_exec_ext in '' $ac_executable_extensions; do
10166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10167    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10169    break 2
10170  fi
10171done
10172  done
10173IFS=$as_save_IFS
10174
10175  ;;
10176esac
10177fi
10178RMDIR=$ac_cv_path_RMDIR
10179if test -n "$RMDIR"; then
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10181$as_echo "$RMDIR" >&6; }
10182else
10183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10184$as_echo "no" >&6; }
10185fi
10186
10187
10188          if test "x$RMDIR" = x; then
10189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10190          fi
10191        else
10192          # Otherwise we believe it is a complete path. Use it as it is.
10193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10194$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10196$as_echo_n "checking for RMDIR... " >&6; }
10197          if test ! -x "$tool_specified"; then
10198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10199$as_echo "not found" >&6; }
10200            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10201          fi
10202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10203$as_echo "$tool_specified" >&6; }
10204        fi
10205      fi
10206    fi
10207
10208  fi
10209
10210
10211
10212  if test "x$RMDIR" = x; then
10213    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10214  fi
10215
10216
10217
10218
10219
10220  # Publish this variable in the help.
10221
10222
10223  if [ -z "${SH+x}" ]; then
10224    # The variable is not set by user, try to locate tool using the code snippet
10225    for ac_prog in sh
10226do
10227  # Extract the first word of "$ac_prog", so it can be a program name with args.
10228set dummy $ac_prog; ac_word=$2
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10230$as_echo_n "checking for $ac_word... " >&6; }
10231if ${ac_cv_path_SH+:} false; then :
10232  $as_echo_n "(cached) " >&6
10233else
10234  case $SH in
10235  [\\/]* | ?:[\\/]*)
10236  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10237  ;;
10238  *)
10239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10240for as_dir in $PATH
10241do
10242  IFS=$as_save_IFS
10243  test -z "$as_dir" && as_dir=.
10244    for ac_exec_ext in '' $ac_executable_extensions; do
10245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10246    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10248    break 2
10249  fi
10250done
10251  done
10252IFS=$as_save_IFS
10253
10254  ;;
10255esac
10256fi
10257SH=$ac_cv_path_SH
10258if test -n "$SH"; then
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10260$as_echo "$SH" >&6; }
10261else
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263$as_echo "no" >&6; }
10264fi
10265
10266
10267  test -n "$SH" && break
10268done
10269
10270  else
10271    # The variable is set, but is it from the command line or the environment?
10272
10273    # Try to remove the string !SH! from our list.
10274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10276      # If it failed, the variable was not from the command line. Ignore it,
10277      # but warn the user (except for BASH, which is always set by the calling BASH).
10278      if test "xSH" != xBASH; then
10279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10280$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10281      fi
10282      # Try to locate tool using the code snippet
10283      for ac_prog in sh
10284do
10285  # Extract the first word of "$ac_prog", so it can be a program name with args.
10286set dummy $ac_prog; ac_word=$2
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10288$as_echo_n "checking for $ac_word... " >&6; }
10289if ${ac_cv_path_SH+:} false; then :
10290  $as_echo_n "(cached) " >&6
10291else
10292  case $SH in
10293  [\\/]* | ?:[\\/]*)
10294  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10295  ;;
10296  *)
10297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298for as_dir in $PATH
10299do
10300  IFS=$as_save_IFS
10301  test -z "$as_dir" && as_dir=.
10302    for ac_exec_ext in '' $ac_executable_extensions; do
10303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10304    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306    break 2
10307  fi
10308done
10309  done
10310IFS=$as_save_IFS
10311
10312  ;;
10313esac
10314fi
10315SH=$ac_cv_path_SH
10316if test -n "$SH"; then
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10318$as_echo "$SH" >&6; }
10319else
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
10322fi
10323
10324
10325  test -n "$SH" && break
10326done
10327
10328    else
10329      # If it succeeded, then it was overridden by the user. We will use it
10330      # for the tool.
10331
10332      # First remove it from the list of overridden variables, so we can test
10333      # for unknown variables in the end.
10334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10335
10336      # Check if we try to supply an empty value
10337      if test "x$SH" = x; then
10338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10339$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10341$as_echo_n "checking for SH... " >&6; }
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10343$as_echo "disabled" >&6; }
10344      else
10345        # Check if the provided tool contains a complete path.
10346        tool_specified="$SH"
10347        tool_basename="${tool_specified##*/}"
10348        if test "x$tool_basename" = "x$tool_specified"; then
10349          # A command without a complete path is provided, search $PATH.
10350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10351$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10352          # Extract the first word of "$tool_basename", so it can be a program name with args.
10353set dummy $tool_basename; ac_word=$2
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355$as_echo_n "checking for $ac_word... " >&6; }
10356if ${ac_cv_path_SH+:} false; then :
10357  $as_echo_n "(cached) " >&6
10358else
10359  case $SH in
10360  [\\/]* | ?:[\\/]*)
10361  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10362  ;;
10363  *)
10364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365for as_dir in $PATH
10366do
10367  IFS=$as_save_IFS
10368  test -z "$as_dir" && as_dir=.
10369    for ac_exec_ext in '' $ac_executable_extensions; do
10370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10371    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373    break 2
10374  fi
10375done
10376  done
10377IFS=$as_save_IFS
10378
10379  ;;
10380esac
10381fi
10382SH=$ac_cv_path_SH
10383if test -n "$SH"; then
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10385$as_echo "$SH" >&6; }
10386else
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
10389fi
10390
10391
10392          if test "x$SH" = x; then
10393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10394          fi
10395        else
10396          # Otherwise we believe it is a complete path. Use it as it is.
10397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10398$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10400$as_echo_n "checking for SH... " >&6; }
10401          if test ! -x "$tool_specified"; then
10402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10403$as_echo "not found" >&6; }
10404            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10405          fi
10406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10407$as_echo "$tool_specified" >&6; }
10408        fi
10409      fi
10410    fi
10411
10412  fi
10413
10414
10415
10416  if test "x$SH" = x; then
10417    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10418  fi
10419
10420
10421
10422
10423
10424  # Publish this variable in the help.
10425
10426
10427  if [ -z "${SORT+x}" ]; then
10428    # The variable is not set by user, try to locate tool using the code snippet
10429    for ac_prog in sort
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_SORT+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $SORT in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461SORT=$ac_cv_path_SORT
10462if test -n "$SORT"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10464$as_echo "$SORT" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$SORT" && break
10472done
10473
10474  else
10475    # The variable is set, but is it from the command line or the environment?
10476
10477    # Try to remove the string !SORT! from our list.
10478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10480      # If it failed, the variable was not from the command line. Ignore it,
10481      # but warn the user (except for BASH, which is always set by the calling BASH).
10482      if test "xSORT" != xBASH; then
10483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10484$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10485      fi
10486      # Try to locate tool using the code snippet
10487      for ac_prog in sort
10488do
10489  # Extract the first word of "$ac_prog", so it can be a program name with args.
10490set dummy $ac_prog; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_SORT+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $SORT in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519SORT=$ac_cv_path_SORT
10520if test -n "$SORT"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10522$as_echo "$SORT" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529  test -n "$SORT" && break
10530done
10531
10532    else
10533      # If it succeeded, then it was overridden by the user. We will use it
10534      # for the tool.
10535
10536      # First remove it from the list of overridden variables, so we can test
10537      # for unknown variables in the end.
10538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10539
10540      # Check if we try to supply an empty value
10541      if test "x$SORT" = x; then
10542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10543$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10545$as_echo_n "checking for SORT... " >&6; }
10546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10547$as_echo "disabled" >&6; }
10548      else
10549        # Check if the provided tool contains a complete path.
10550        tool_specified="$SORT"
10551        tool_basename="${tool_specified##*/}"
10552        if test "x$tool_basename" = "x$tool_specified"; then
10553          # A command without a complete path is provided, search $PATH.
10554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10555$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10556          # Extract the first word of "$tool_basename", so it can be a program name with args.
10557set dummy $tool_basename; ac_word=$2
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559$as_echo_n "checking for $ac_word... " >&6; }
10560if ${ac_cv_path_SORT+:} false; then :
10561  $as_echo_n "(cached) " >&6
10562else
10563  case $SORT in
10564  [\\/]* | ?:[\\/]*)
10565  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10566  ;;
10567  *)
10568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571  IFS=$as_save_IFS
10572  test -z "$as_dir" && as_dir=.
10573    for ac_exec_ext in '' $ac_executable_extensions; do
10574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577    break 2
10578  fi
10579done
10580  done
10581IFS=$as_save_IFS
10582
10583  ;;
10584esac
10585fi
10586SORT=$ac_cv_path_SORT
10587if test -n "$SORT"; then
10588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10589$as_echo "$SORT" >&6; }
10590else
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593fi
10594
10595
10596          if test "x$SORT" = x; then
10597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10598          fi
10599        else
10600          # Otherwise we believe it is a complete path. Use it as it is.
10601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10602$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10604$as_echo_n "checking for SORT... " >&6; }
10605          if test ! -x "$tool_specified"; then
10606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10607$as_echo "not found" >&6; }
10608            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10609          fi
10610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10611$as_echo "$tool_specified" >&6; }
10612        fi
10613      fi
10614    fi
10615
10616  fi
10617
10618
10619
10620  if test "x$SORT" = x; then
10621    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10622  fi
10623
10624
10625
10626
10627
10628  # Publish this variable in the help.
10629
10630
10631  if [ -z "${TAIL+x}" ]; then
10632    # The variable is not set by user, try to locate tool using the code snippet
10633    for ac_prog in tail
10634do
10635  # Extract the first word of "$ac_prog", so it can be a program name with args.
10636set dummy $ac_prog; ac_word=$2
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638$as_echo_n "checking for $ac_word... " >&6; }
10639if ${ac_cv_path_TAIL+:} false; then :
10640  $as_echo_n "(cached) " >&6
10641else
10642  case $TAIL in
10643  [\\/]* | ?:[\\/]*)
10644  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10645  ;;
10646  *)
10647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662  ;;
10663esac
10664fi
10665TAIL=$ac_cv_path_TAIL
10666if test -n "$TAIL"; then
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10668$as_echo "$TAIL" >&6; }
10669else
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672fi
10673
10674
10675  test -n "$TAIL" && break
10676done
10677
10678  else
10679    # The variable is set, but is it from the command line or the environment?
10680
10681    # Try to remove the string !TAIL! from our list.
10682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10684      # If it failed, the variable was not from the command line. Ignore it,
10685      # but warn the user (except for BASH, which is always set by the calling BASH).
10686      if test "xTAIL" != xBASH; then
10687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10688$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10689      fi
10690      # Try to locate tool using the code snippet
10691      for ac_prog in tail
10692do
10693  # Extract the first word of "$ac_prog", so it can be a program name with args.
10694set dummy $ac_prog; ac_word=$2
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696$as_echo_n "checking for $ac_word... " >&6; }
10697if ${ac_cv_path_TAIL+:} false; then :
10698  $as_echo_n "(cached) " >&6
10699else
10700  case $TAIL in
10701  [\\/]* | ?:[\\/]*)
10702  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10703  ;;
10704  *)
10705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706for as_dir in $PATH
10707do
10708  IFS=$as_save_IFS
10709  test -z "$as_dir" && as_dir=.
10710    for ac_exec_ext in '' $ac_executable_extensions; do
10711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714    break 2
10715  fi
10716done
10717  done
10718IFS=$as_save_IFS
10719
10720  ;;
10721esac
10722fi
10723TAIL=$ac_cv_path_TAIL
10724if test -n "$TAIL"; then
10725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10726$as_echo "$TAIL" >&6; }
10727else
10728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
10730fi
10731
10732
10733  test -n "$TAIL" && break
10734done
10735
10736    else
10737      # If it succeeded, then it was overridden by the user. We will use it
10738      # for the tool.
10739
10740      # First remove it from the list of overridden variables, so we can test
10741      # for unknown variables in the end.
10742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10743
10744      # Check if we try to supply an empty value
10745      if test "x$TAIL" = x; then
10746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10747$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10749$as_echo_n "checking for TAIL... " >&6; }
10750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10751$as_echo "disabled" >&6; }
10752      else
10753        # Check if the provided tool contains a complete path.
10754        tool_specified="$TAIL"
10755        tool_basename="${tool_specified##*/}"
10756        if test "x$tool_basename" = "x$tool_specified"; then
10757          # A command without a complete path is provided, search $PATH.
10758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10759$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10760          # Extract the first word of "$tool_basename", so it can be a program name with args.
10761set dummy $tool_basename; ac_word=$2
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10763$as_echo_n "checking for $ac_word... " >&6; }
10764if ${ac_cv_path_TAIL+:} false; then :
10765  $as_echo_n "(cached) " >&6
10766else
10767  case $TAIL in
10768  [\\/]* | ?:[\\/]*)
10769  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10770  ;;
10771  *)
10772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10773for as_dir in $PATH
10774do
10775  IFS=$as_save_IFS
10776  test -z "$as_dir" && as_dir=.
10777    for ac_exec_ext in '' $ac_executable_extensions; do
10778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10779    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10781    break 2
10782  fi
10783done
10784  done
10785IFS=$as_save_IFS
10786
10787  ;;
10788esac
10789fi
10790TAIL=$ac_cv_path_TAIL
10791if test -n "$TAIL"; then
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10793$as_echo "$TAIL" >&6; }
10794else
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796$as_echo "no" >&6; }
10797fi
10798
10799
10800          if test "x$TAIL" = x; then
10801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10802          fi
10803        else
10804          # Otherwise we believe it is a complete path. Use it as it is.
10805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10806$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10808$as_echo_n "checking for TAIL... " >&6; }
10809          if test ! -x "$tool_specified"; then
10810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10811$as_echo "not found" >&6; }
10812            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10813          fi
10814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10815$as_echo "$tool_specified" >&6; }
10816        fi
10817      fi
10818    fi
10819
10820  fi
10821
10822
10823
10824  if test "x$TAIL" = x; then
10825    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10826  fi
10827
10828
10829
10830
10831
10832  # Publish this variable in the help.
10833
10834
10835  if [ -z "${TAR+x}" ]; then
10836    # The variable is not set by user, try to locate tool using the code snippet
10837    for ac_prog in tar
10838do
10839  # Extract the first word of "$ac_prog", so it can be a program name with args.
10840set dummy $ac_prog; ac_word=$2
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10842$as_echo_n "checking for $ac_word... " >&6; }
10843if ${ac_cv_path_TAR+:} false; then :
10844  $as_echo_n "(cached) " >&6
10845else
10846  case $TAR in
10847  [\\/]* | ?:[\\/]*)
10848  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10849  ;;
10850  *)
10851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10852for as_dir in $PATH
10853do
10854  IFS=$as_save_IFS
10855  test -z "$as_dir" && as_dir=.
10856    for ac_exec_ext in '' $ac_executable_extensions; do
10857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10858    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10860    break 2
10861  fi
10862done
10863  done
10864IFS=$as_save_IFS
10865
10866  ;;
10867esac
10868fi
10869TAR=$ac_cv_path_TAR
10870if test -n "$TAR"; then
10871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10872$as_echo "$TAR" >&6; }
10873else
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875$as_echo "no" >&6; }
10876fi
10877
10878
10879  test -n "$TAR" && break
10880done
10881
10882  else
10883    # The variable is set, but is it from the command line or the environment?
10884
10885    # Try to remove the string !TAR! from our list.
10886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10888      # If it failed, the variable was not from the command line. Ignore it,
10889      # but warn the user (except for BASH, which is always set by the calling BASH).
10890      if test "xTAR" != xBASH; then
10891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10892$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10893      fi
10894      # Try to locate tool using the code snippet
10895      for ac_prog in tar
10896do
10897  # Extract the first word of "$ac_prog", so it can be a program name with args.
10898set dummy $ac_prog; ac_word=$2
10899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10900$as_echo_n "checking for $ac_word... " >&6; }
10901if ${ac_cv_path_TAR+:} false; then :
10902  $as_echo_n "(cached) " >&6
10903else
10904  case $TAR in
10905  [\\/]* | ?:[\\/]*)
10906  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10907  ;;
10908  *)
10909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10910for as_dir in $PATH
10911do
10912  IFS=$as_save_IFS
10913  test -z "$as_dir" && as_dir=.
10914    for ac_exec_ext in '' $ac_executable_extensions; do
10915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10916    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10918    break 2
10919  fi
10920done
10921  done
10922IFS=$as_save_IFS
10923
10924  ;;
10925esac
10926fi
10927TAR=$ac_cv_path_TAR
10928if test -n "$TAR"; then
10929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10930$as_echo "$TAR" >&6; }
10931else
10932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933$as_echo "no" >&6; }
10934fi
10935
10936
10937  test -n "$TAR" && break
10938done
10939
10940    else
10941      # If it succeeded, then it was overridden by the user. We will use it
10942      # for the tool.
10943
10944      # First remove it from the list of overridden variables, so we can test
10945      # for unknown variables in the end.
10946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10947
10948      # Check if we try to supply an empty value
10949      if test "x$TAR" = x; then
10950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10951$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10953$as_echo_n "checking for TAR... " >&6; }
10954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10955$as_echo "disabled" >&6; }
10956      else
10957        # Check if the provided tool contains a complete path.
10958        tool_specified="$TAR"
10959        tool_basename="${tool_specified##*/}"
10960        if test "x$tool_basename" = "x$tool_specified"; then
10961          # A command without a complete path is provided, search $PATH.
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10963$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10964          # Extract the first word of "$tool_basename", so it can be a program name with args.
10965set dummy $tool_basename; ac_word=$2
10966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10967$as_echo_n "checking for $ac_word... " >&6; }
10968if ${ac_cv_path_TAR+:} false; then :
10969  $as_echo_n "(cached) " >&6
10970else
10971  case $TAR in
10972  [\\/]* | ?:[\\/]*)
10973  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10974  ;;
10975  *)
10976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10977for as_dir in $PATH
10978do
10979  IFS=$as_save_IFS
10980  test -z "$as_dir" && as_dir=.
10981    for ac_exec_ext in '' $ac_executable_extensions; do
10982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10983    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10985    break 2
10986  fi
10987done
10988  done
10989IFS=$as_save_IFS
10990
10991  ;;
10992esac
10993fi
10994TAR=$ac_cv_path_TAR
10995if test -n "$TAR"; then
10996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10997$as_echo "$TAR" >&6; }
10998else
10999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
11001fi
11002
11003
11004          if test "x$TAR" = x; then
11005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11006          fi
11007        else
11008          # Otherwise we believe it is a complete path. Use it as it is.
11009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11010$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11012$as_echo_n "checking for TAR... " >&6; }
11013          if test ! -x "$tool_specified"; then
11014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11015$as_echo "not found" >&6; }
11016            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11017          fi
11018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11019$as_echo "$tool_specified" >&6; }
11020        fi
11021      fi
11022    fi
11023
11024  fi
11025
11026
11027
11028  if test "x$TAR" = x; then
11029    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11030  fi
11031
11032
11033
11034
11035
11036  # Publish this variable in the help.
11037
11038
11039  if [ -z "${TEE+x}" ]; then
11040    # The variable is not set by user, try to locate tool using the code snippet
11041    for ac_prog in tee
11042do
11043  # Extract the first word of "$ac_prog", so it can be a program name with args.
11044set dummy $ac_prog; ac_word=$2
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046$as_echo_n "checking for $ac_word... " >&6; }
11047if ${ac_cv_path_TEE+:} false; then :
11048  $as_echo_n "(cached) " >&6
11049else
11050  case $TEE in
11051  [\\/]* | ?:[\\/]*)
11052  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11053  ;;
11054  *)
11055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056for as_dir in $PATH
11057do
11058  IFS=$as_save_IFS
11059  test -z "$as_dir" && as_dir=.
11060    for ac_exec_ext in '' $ac_executable_extensions; do
11061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064    break 2
11065  fi
11066done
11067  done
11068IFS=$as_save_IFS
11069
11070  ;;
11071esac
11072fi
11073TEE=$ac_cv_path_TEE
11074if test -n "$TEE"; then
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11076$as_echo "$TEE" >&6; }
11077else
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083  test -n "$TEE" && break
11084done
11085
11086  else
11087    # The variable is set, but is it from the command line or the environment?
11088
11089    # Try to remove the string !TEE! from our list.
11090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11092      # If it failed, the variable was not from the command line. Ignore it,
11093      # but warn the user (except for BASH, which is always set by the calling BASH).
11094      if test "xTEE" != xBASH; then
11095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11096$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11097      fi
11098      # Try to locate tool using the code snippet
11099      for ac_prog in tee
11100do
11101  # Extract the first word of "$ac_prog", so it can be a program name with args.
11102set dummy $ac_prog; ac_word=$2
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104$as_echo_n "checking for $ac_word... " >&6; }
11105if ${ac_cv_path_TEE+:} false; then :
11106  $as_echo_n "(cached) " >&6
11107else
11108  case $TEE in
11109  [\\/]* | ?:[\\/]*)
11110  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11111  ;;
11112  *)
11113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114for as_dir in $PATH
11115do
11116  IFS=$as_save_IFS
11117  test -z "$as_dir" && as_dir=.
11118    for ac_exec_ext in '' $ac_executable_extensions; do
11119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122    break 2
11123  fi
11124done
11125  done
11126IFS=$as_save_IFS
11127
11128  ;;
11129esac
11130fi
11131TEE=$ac_cv_path_TEE
11132if test -n "$TEE"; then
11133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11134$as_echo "$TEE" >&6; }
11135else
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137$as_echo "no" >&6; }
11138fi
11139
11140
11141  test -n "$TEE" && break
11142done
11143
11144    else
11145      # If it succeeded, then it was overridden by the user. We will use it
11146      # for the tool.
11147
11148      # First remove it from the list of overridden variables, so we can test
11149      # for unknown variables in the end.
11150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11151
11152      # Check if we try to supply an empty value
11153      if test "x$TEE" = x; then
11154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11155$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11157$as_echo_n "checking for TEE... " >&6; }
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11159$as_echo "disabled" >&6; }
11160      else
11161        # Check if the provided tool contains a complete path.
11162        tool_specified="$TEE"
11163        tool_basename="${tool_specified##*/}"
11164        if test "x$tool_basename" = "x$tool_specified"; then
11165          # A command without a complete path is provided, search $PATH.
11166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11167$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11168          # Extract the first word of "$tool_basename", so it can be a program name with args.
11169set dummy $tool_basename; ac_word=$2
11170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11171$as_echo_n "checking for $ac_word... " >&6; }
11172if ${ac_cv_path_TEE+:} false; then :
11173  $as_echo_n "(cached) " >&6
11174else
11175  case $TEE in
11176  [\\/]* | ?:[\\/]*)
11177  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11178  ;;
11179  *)
11180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11181for as_dir in $PATH
11182do
11183  IFS=$as_save_IFS
11184  test -z "$as_dir" && as_dir=.
11185    for ac_exec_ext in '' $ac_executable_extensions; do
11186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11187    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11189    break 2
11190  fi
11191done
11192  done
11193IFS=$as_save_IFS
11194
11195  ;;
11196esac
11197fi
11198TEE=$ac_cv_path_TEE
11199if test -n "$TEE"; then
11200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11201$as_echo "$TEE" >&6; }
11202else
11203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
11205fi
11206
11207
11208          if test "x$TEE" = x; then
11209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11210          fi
11211        else
11212          # Otherwise we believe it is a complete path. Use it as it is.
11213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11214$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11216$as_echo_n "checking for TEE... " >&6; }
11217          if test ! -x "$tool_specified"; then
11218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11219$as_echo "not found" >&6; }
11220            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11221          fi
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11223$as_echo "$tool_specified" >&6; }
11224        fi
11225      fi
11226    fi
11227
11228  fi
11229
11230
11231
11232  if test "x$TEE" = x; then
11233    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11234  fi
11235
11236
11237
11238
11239
11240  # Publish this variable in the help.
11241
11242
11243  if [ -z "${TOUCH+x}" ]; then
11244    # The variable is not set by user, try to locate tool using the code snippet
11245    for ac_prog in touch
11246do
11247  # Extract the first word of "$ac_prog", so it can be a program name with args.
11248set dummy $ac_prog; ac_word=$2
11249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11250$as_echo_n "checking for $ac_word... " >&6; }
11251if ${ac_cv_path_TOUCH+:} false; then :
11252  $as_echo_n "(cached) " >&6
11253else
11254  case $TOUCH in
11255  [\\/]* | ?:[\\/]*)
11256  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11257  ;;
11258  *)
11259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11260for as_dir in $PATH
11261do
11262  IFS=$as_save_IFS
11263  test -z "$as_dir" && as_dir=.
11264    for ac_exec_ext in '' $ac_executable_extensions; do
11265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11266    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11268    break 2
11269  fi
11270done
11271  done
11272IFS=$as_save_IFS
11273
11274  ;;
11275esac
11276fi
11277TOUCH=$ac_cv_path_TOUCH
11278if test -n "$TOUCH"; then
11279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11280$as_echo "$TOUCH" >&6; }
11281else
11282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
11284fi
11285
11286
11287  test -n "$TOUCH" && break
11288done
11289
11290  else
11291    # The variable is set, but is it from the command line or the environment?
11292
11293    # Try to remove the string !TOUCH! from our list.
11294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11296      # If it failed, the variable was not from the command line. Ignore it,
11297      # but warn the user (except for BASH, which is always set by the calling BASH).
11298      if test "xTOUCH" != xBASH; then
11299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11300$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11301      fi
11302      # Try to locate tool using the code snippet
11303      for ac_prog in touch
11304do
11305  # Extract the first word of "$ac_prog", so it can be a program name with args.
11306set dummy $ac_prog; ac_word=$2
11307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11308$as_echo_n "checking for $ac_word... " >&6; }
11309if ${ac_cv_path_TOUCH+:} false; then :
11310  $as_echo_n "(cached) " >&6
11311else
11312  case $TOUCH in
11313  [\\/]* | ?:[\\/]*)
11314  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11315  ;;
11316  *)
11317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11318for as_dir in $PATH
11319do
11320  IFS=$as_save_IFS
11321  test -z "$as_dir" && as_dir=.
11322    for ac_exec_ext in '' $ac_executable_extensions; do
11323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11324    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11326    break 2
11327  fi
11328done
11329  done
11330IFS=$as_save_IFS
11331
11332  ;;
11333esac
11334fi
11335TOUCH=$ac_cv_path_TOUCH
11336if test -n "$TOUCH"; then
11337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11338$as_echo "$TOUCH" >&6; }
11339else
11340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
11342fi
11343
11344
11345  test -n "$TOUCH" && break
11346done
11347
11348    else
11349      # If it succeeded, then it was overridden by the user. We will use it
11350      # for the tool.
11351
11352      # First remove it from the list of overridden variables, so we can test
11353      # for unknown variables in the end.
11354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11355
11356      # Check if we try to supply an empty value
11357      if test "x$TOUCH" = x; then
11358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11359$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11361$as_echo_n "checking for TOUCH... " >&6; }
11362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11363$as_echo "disabled" >&6; }
11364      else
11365        # Check if the provided tool contains a complete path.
11366        tool_specified="$TOUCH"
11367        tool_basename="${tool_specified##*/}"
11368        if test "x$tool_basename" = "x$tool_specified"; then
11369          # A command without a complete path is provided, search $PATH.
11370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11371$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11372          # Extract the first word of "$tool_basename", so it can be a program name with args.
11373set dummy $tool_basename; ac_word=$2
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375$as_echo_n "checking for $ac_word... " >&6; }
11376if ${ac_cv_path_TOUCH+:} false; then :
11377  $as_echo_n "(cached) " >&6
11378else
11379  case $TOUCH in
11380  [\\/]* | ?:[\\/]*)
11381  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11382  ;;
11383  *)
11384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11385for as_dir in $PATH
11386do
11387  IFS=$as_save_IFS
11388  test -z "$as_dir" && as_dir=.
11389    for ac_exec_ext in '' $ac_executable_extensions; do
11390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11391    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11393    break 2
11394  fi
11395done
11396  done
11397IFS=$as_save_IFS
11398
11399  ;;
11400esac
11401fi
11402TOUCH=$ac_cv_path_TOUCH
11403if test -n "$TOUCH"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11405$as_echo "$TOUCH" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412          if test "x$TOUCH" = x; then
11413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11414          fi
11415        else
11416          # Otherwise we believe it is a complete path. Use it as it is.
11417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11418$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11420$as_echo_n "checking for TOUCH... " >&6; }
11421          if test ! -x "$tool_specified"; then
11422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11423$as_echo "not found" >&6; }
11424            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11425          fi
11426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11427$as_echo "$tool_specified" >&6; }
11428        fi
11429      fi
11430    fi
11431
11432  fi
11433
11434
11435
11436  if test "x$TOUCH" = x; then
11437    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11438  fi
11439
11440
11441
11442
11443
11444  # Publish this variable in the help.
11445
11446
11447  if [ -z "${TR+x}" ]; then
11448    # The variable is not set by user, try to locate tool using the code snippet
11449    for ac_prog in tr
11450do
11451  # Extract the first word of "$ac_prog", so it can be a program name with args.
11452set dummy $ac_prog; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_path_TR+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  case $TR in
11459  [\\/]* | ?:[\\/]*)
11460  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11461  ;;
11462  *)
11463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464for as_dir in $PATH
11465do
11466  IFS=$as_save_IFS
11467  test -z "$as_dir" && as_dir=.
11468    for ac_exec_ext in '' $ac_executable_extensions; do
11469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472    break 2
11473  fi
11474done
11475  done
11476IFS=$as_save_IFS
11477
11478  ;;
11479esac
11480fi
11481TR=$ac_cv_path_TR
11482if test -n "$TR"; then
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11484$as_echo "$TR" >&6; }
11485else
11486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
11488fi
11489
11490
11491  test -n "$TR" && break
11492done
11493
11494  else
11495    # The variable is set, but is it from the command line or the environment?
11496
11497    # Try to remove the string !TR! from our list.
11498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11500      # If it failed, the variable was not from the command line. Ignore it,
11501      # but warn the user (except for BASH, which is always set by the calling BASH).
11502      if test "xTR" != xBASH; then
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11504$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11505      fi
11506      # Try to locate tool using the code snippet
11507      for ac_prog in tr
11508do
11509  # Extract the first word of "$ac_prog", so it can be a program name with args.
11510set dummy $ac_prog; ac_word=$2
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11512$as_echo_n "checking for $ac_word... " >&6; }
11513if ${ac_cv_path_TR+:} false; then :
11514  $as_echo_n "(cached) " >&6
11515else
11516  case $TR in
11517  [\\/]* | ?:[\\/]*)
11518  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11519  ;;
11520  *)
11521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522for as_dir in $PATH
11523do
11524  IFS=$as_save_IFS
11525  test -z "$as_dir" && as_dir=.
11526    for ac_exec_ext in '' $ac_executable_extensions; do
11527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530    break 2
11531  fi
11532done
11533  done
11534IFS=$as_save_IFS
11535
11536  ;;
11537esac
11538fi
11539TR=$ac_cv_path_TR
11540if test -n "$TR"; then
11541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11542$as_echo "$TR" >&6; }
11543else
11544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
11546fi
11547
11548
11549  test -n "$TR" && break
11550done
11551
11552    else
11553      # If it succeeded, then it was overridden by the user. We will use it
11554      # for the tool.
11555
11556      # First remove it from the list of overridden variables, so we can test
11557      # for unknown variables in the end.
11558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11559
11560      # Check if we try to supply an empty value
11561      if test "x$TR" = x; then
11562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11563$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11565$as_echo_n "checking for TR... " >&6; }
11566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11567$as_echo "disabled" >&6; }
11568      else
11569        # Check if the provided tool contains a complete path.
11570        tool_specified="$TR"
11571        tool_basename="${tool_specified##*/}"
11572        if test "x$tool_basename" = "x$tool_specified"; then
11573          # A command without a complete path is provided, search $PATH.
11574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11575$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11576          # Extract the first word of "$tool_basename", so it can be a program name with args.
11577set dummy $tool_basename; ac_word=$2
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11579$as_echo_n "checking for $ac_word... " >&6; }
11580if ${ac_cv_path_TR+:} false; then :
11581  $as_echo_n "(cached) " >&6
11582else
11583  case $TR in
11584  [\\/]* | ?:[\\/]*)
11585  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11586  ;;
11587  *)
11588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589for as_dir in $PATH
11590do
11591  IFS=$as_save_IFS
11592  test -z "$as_dir" && as_dir=.
11593    for ac_exec_ext in '' $ac_executable_extensions; do
11594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11595    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11597    break 2
11598  fi
11599done
11600  done
11601IFS=$as_save_IFS
11602
11603  ;;
11604esac
11605fi
11606TR=$ac_cv_path_TR
11607if test -n "$TR"; then
11608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11609$as_echo "$TR" >&6; }
11610else
11611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
11613fi
11614
11615
11616          if test "x$TR" = x; then
11617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11618          fi
11619        else
11620          # Otherwise we believe it is a complete path. Use it as it is.
11621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11622$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11624$as_echo_n "checking for TR... " >&6; }
11625          if test ! -x "$tool_specified"; then
11626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11627$as_echo "not found" >&6; }
11628            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11629          fi
11630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11631$as_echo "$tool_specified" >&6; }
11632        fi
11633      fi
11634    fi
11635
11636  fi
11637
11638
11639
11640  if test "x$TR" = x; then
11641    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11642  fi
11643
11644
11645
11646
11647
11648  # Publish this variable in the help.
11649
11650
11651  if [ -z "${UNAME+x}" ]; then
11652    # The variable is not set by user, try to locate tool using the code snippet
11653    for ac_prog in uname
11654do
11655  # Extract the first word of "$ac_prog", so it can be a program name with args.
11656set dummy $ac_prog; ac_word=$2
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11658$as_echo_n "checking for $ac_word... " >&6; }
11659if ${ac_cv_path_UNAME+:} false; then :
11660  $as_echo_n "(cached) " >&6
11661else
11662  case $UNAME in
11663  [\\/]* | ?:[\\/]*)
11664  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11665  ;;
11666  *)
11667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11668for as_dir in $PATH
11669do
11670  IFS=$as_save_IFS
11671  test -z "$as_dir" && as_dir=.
11672    for ac_exec_ext in '' $ac_executable_extensions; do
11673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11674    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11676    break 2
11677  fi
11678done
11679  done
11680IFS=$as_save_IFS
11681
11682  ;;
11683esac
11684fi
11685UNAME=$ac_cv_path_UNAME
11686if test -n "$UNAME"; then
11687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11688$as_echo "$UNAME" >&6; }
11689else
11690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691$as_echo "no" >&6; }
11692fi
11693
11694
11695  test -n "$UNAME" && break
11696done
11697
11698  else
11699    # The variable is set, but is it from the command line or the environment?
11700
11701    # Try to remove the string !UNAME! from our list.
11702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11704      # If it failed, the variable was not from the command line. Ignore it,
11705      # but warn the user (except for BASH, which is always set by the calling BASH).
11706      if test "xUNAME" != xBASH; then
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11708$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11709      fi
11710      # Try to locate tool using the code snippet
11711      for ac_prog in uname
11712do
11713  # Extract the first word of "$ac_prog", so it can be a program name with args.
11714set dummy $ac_prog; ac_word=$2
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716$as_echo_n "checking for $ac_word... " >&6; }
11717if ${ac_cv_path_UNAME+:} false; then :
11718  $as_echo_n "(cached) " >&6
11719else
11720  case $UNAME in
11721  [\\/]* | ?:[\\/]*)
11722  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11723  ;;
11724  *)
11725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11726for as_dir in $PATH
11727do
11728  IFS=$as_save_IFS
11729  test -z "$as_dir" && as_dir=.
11730    for ac_exec_ext in '' $ac_executable_extensions; do
11731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11732    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11734    break 2
11735  fi
11736done
11737  done
11738IFS=$as_save_IFS
11739
11740  ;;
11741esac
11742fi
11743UNAME=$ac_cv_path_UNAME
11744if test -n "$UNAME"; then
11745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11746$as_echo "$UNAME" >&6; }
11747else
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750fi
11751
11752
11753  test -n "$UNAME" && break
11754done
11755
11756    else
11757      # If it succeeded, then it was overridden by the user. We will use it
11758      # for the tool.
11759
11760      # First remove it from the list of overridden variables, so we can test
11761      # for unknown variables in the end.
11762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11763
11764      # Check if we try to supply an empty value
11765      if test "x$UNAME" = x; then
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11767$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11769$as_echo_n "checking for UNAME... " >&6; }
11770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11771$as_echo "disabled" >&6; }
11772      else
11773        # Check if the provided tool contains a complete path.
11774        tool_specified="$UNAME"
11775        tool_basename="${tool_specified##*/}"
11776        if test "x$tool_basename" = "x$tool_specified"; then
11777          # A command without a complete path is provided, search $PATH.
11778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11779$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11780          # Extract the first word of "$tool_basename", so it can be a program name with args.
11781set dummy $tool_basename; ac_word=$2
11782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11783$as_echo_n "checking for $ac_word... " >&6; }
11784if ${ac_cv_path_UNAME+:} false; then :
11785  $as_echo_n "(cached) " >&6
11786else
11787  case $UNAME in
11788  [\\/]* | ?:[\\/]*)
11789  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11790  ;;
11791  *)
11792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11793for as_dir in $PATH
11794do
11795  IFS=$as_save_IFS
11796  test -z "$as_dir" && as_dir=.
11797    for ac_exec_ext in '' $ac_executable_extensions; do
11798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11799    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11801    break 2
11802  fi
11803done
11804  done
11805IFS=$as_save_IFS
11806
11807  ;;
11808esac
11809fi
11810UNAME=$ac_cv_path_UNAME
11811if test -n "$UNAME"; then
11812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11813$as_echo "$UNAME" >&6; }
11814else
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816$as_echo "no" >&6; }
11817fi
11818
11819
11820          if test "x$UNAME" = x; then
11821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11822          fi
11823        else
11824          # Otherwise we believe it is a complete path. Use it as it is.
11825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11826$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11828$as_echo_n "checking for UNAME... " >&6; }
11829          if test ! -x "$tool_specified"; then
11830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11831$as_echo "not found" >&6; }
11832            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11833          fi
11834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11835$as_echo "$tool_specified" >&6; }
11836        fi
11837      fi
11838    fi
11839
11840  fi
11841
11842
11843
11844  if test "x$UNAME" = x; then
11845    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11846  fi
11847
11848
11849
11850
11851
11852  # Publish this variable in the help.
11853
11854
11855  if [ -z "${UNIQ+x}" ]; then
11856    # The variable is not set by user, try to locate tool using the code snippet
11857    for ac_prog in uniq
11858do
11859  # Extract the first word of "$ac_prog", so it can be a program name with args.
11860set dummy $ac_prog; ac_word=$2
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862$as_echo_n "checking for $ac_word... " >&6; }
11863if ${ac_cv_path_UNIQ+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  case $UNIQ in
11867  [\\/]* | ?:[\\/]*)
11868  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11869  ;;
11870  *)
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11878    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880    break 2
11881  fi
11882done
11883  done
11884IFS=$as_save_IFS
11885
11886  ;;
11887esac
11888fi
11889UNIQ=$ac_cv_path_UNIQ
11890if test -n "$UNIQ"; then
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11892$as_echo "$UNIQ" >&6; }
11893else
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896fi
11897
11898
11899  test -n "$UNIQ" && break
11900done
11901
11902  else
11903    # The variable is set, but is it from the command line or the environment?
11904
11905    # Try to remove the string !UNIQ! from our list.
11906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11908      # If it failed, the variable was not from the command line. Ignore it,
11909      # but warn the user (except for BASH, which is always set by the calling BASH).
11910      if test "xUNIQ" != xBASH; then
11911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11912$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11913      fi
11914      # Try to locate tool using the code snippet
11915      for ac_prog in uniq
11916do
11917  # Extract the first word of "$ac_prog", so it can be a program name with args.
11918set dummy $ac_prog; ac_word=$2
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11920$as_echo_n "checking for $ac_word... " >&6; }
11921if ${ac_cv_path_UNIQ+:} false; then :
11922  $as_echo_n "(cached) " >&6
11923else
11924  case $UNIQ in
11925  [\\/]* | ?:[\\/]*)
11926  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11927  ;;
11928  *)
11929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11930for as_dir in $PATH
11931do
11932  IFS=$as_save_IFS
11933  test -z "$as_dir" && as_dir=.
11934    for ac_exec_ext in '' $ac_executable_extensions; do
11935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11936    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11938    break 2
11939  fi
11940done
11941  done
11942IFS=$as_save_IFS
11943
11944  ;;
11945esac
11946fi
11947UNIQ=$ac_cv_path_UNIQ
11948if test -n "$UNIQ"; then
11949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11950$as_echo "$UNIQ" >&6; }
11951else
11952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953$as_echo "no" >&6; }
11954fi
11955
11956
11957  test -n "$UNIQ" && break
11958done
11959
11960    else
11961      # If it succeeded, then it was overridden by the user. We will use it
11962      # for the tool.
11963
11964      # First remove it from the list of overridden variables, so we can test
11965      # for unknown variables in the end.
11966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11967
11968      # Check if we try to supply an empty value
11969      if test "x$UNIQ" = x; then
11970        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11971$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11973$as_echo_n "checking for UNIQ... " >&6; }
11974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11975$as_echo "disabled" >&6; }
11976      else
11977        # Check if the provided tool contains a complete path.
11978        tool_specified="$UNIQ"
11979        tool_basename="${tool_specified##*/}"
11980        if test "x$tool_basename" = "x$tool_specified"; then
11981          # A command without a complete path is provided, search $PATH.
11982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11983$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11984          # Extract the first word of "$tool_basename", so it can be a program name with args.
11985set dummy $tool_basename; ac_word=$2
11986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11987$as_echo_n "checking for $ac_word... " >&6; }
11988if ${ac_cv_path_UNIQ+:} false; then :
11989  $as_echo_n "(cached) " >&6
11990else
11991  case $UNIQ in
11992  [\\/]* | ?:[\\/]*)
11993  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11994  ;;
11995  *)
11996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11997for as_dir in $PATH
11998do
11999  IFS=$as_save_IFS
12000  test -z "$as_dir" && as_dir=.
12001    for ac_exec_ext in '' $ac_executable_extensions; do
12002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12003    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12005    break 2
12006  fi
12007done
12008  done
12009IFS=$as_save_IFS
12010
12011  ;;
12012esac
12013fi
12014UNIQ=$ac_cv_path_UNIQ
12015if test -n "$UNIQ"; then
12016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12017$as_echo "$UNIQ" >&6; }
12018else
12019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12020$as_echo "no" >&6; }
12021fi
12022
12023
12024          if test "x$UNIQ" = x; then
12025            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12026          fi
12027        else
12028          # Otherwise we believe it is a complete path. Use it as it is.
12029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12030$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12031          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12032$as_echo_n "checking for UNIQ... " >&6; }
12033          if test ! -x "$tool_specified"; then
12034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12035$as_echo "not found" >&6; }
12036            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12037          fi
12038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12039$as_echo "$tool_specified" >&6; }
12040        fi
12041      fi
12042    fi
12043
12044  fi
12045
12046
12047
12048  if test "x$UNIQ" = x; then
12049    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12050  fi
12051
12052
12053
12054
12055
12056  # Publish this variable in the help.
12057
12058
12059  if [ -z "${WC+x}" ]; then
12060    # The variable is not set by user, try to locate tool using the code snippet
12061    for ac_prog in wc
12062do
12063  # Extract the first word of "$ac_prog", so it can be a program name with args.
12064set dummy $ac_prog; ac_word=$2
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066$as_echo_n "checking for $ac_word... " >&6; }
12067if ${ac_cv_path_WC+:} false; then :
12068  $as_echo_n "(cached) " >&6
12069else
12070  case $WC in
12071  [\\/]* | ?:[\\/]*)
12072  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12073  ;;
12074  *)
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_exec_ext in '' $ac_executable_extensions; do
12081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12082    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084    break 2
12085  fi
12086done
12087  done
12088IFS=$as_save_IFS
12089
12090  ;;
12091esac
12092fi
12093WC=$ac_cv_path_WC
12094if test -n "$WC"; then
12095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12096$as_echo "$WC" >&6; }
12097else
12098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
12100fi
12101
12102
12103  test -n "$WC" && break
12104done
12105
12106  else
12107    # The variable is set, but is it from the command line or the environment?
12108
12109    # Try to remove the string !WC! from our list.
12110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12112      # If it failed, the variable was not from the command line. Ignore it,
12113      # but warn the user (except for BASH, which is always set by the calling BASH).
12114      if test "xWC" != xBASH; then
12115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12116$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12117      fi
12118      # Try to locate tool using the code snippet
12119      for ac_prog in wc
12120do
12121  # Extract the first word of "$ac_prog", so it can be a program name with args.
12122set dummy $ac_prog; ac_word=$2
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12124$as_echo_n "checking for $ac_word... " >&6; }
12125if ${ac_cv_path_WC+:} false; then :
12126  $as_echo_n "(cached) " >&6
12127else
12128  case $WC in
12129  [\\/]* | ?:[\\/]*)
12130  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12131  ;;
12132  *)
12133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12134for as_dir in $PATH
12135do
12136  IFS=$as_save_IFS
12137  test -z "$as_dir" && as_dir=.
12138    for ac_exec_ext in '' $ac_executable_extensions; do
12139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12140    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12142    break 2
12143  fi
12144done
12145  done
12146IFS=$as_save_IFS
12147
12148  ;;
12149esac
12150fi
12151WC=$ac_cv_path_WC
12152if test -n "$WC"; then
12153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12154$as_echo "$WC" >&6; }
12155else
12156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12157$as_echo "no" >&6; }
12158fi
12159
12160
12161  test -n "$WC" && break
12162done
12163
12164    else
12165      # If it succeeded, then it was overridden by the user. We will use it
12166      # for the tool.
12167
12168      # First remove it from the list of overridden variables, so we can test
12169      # for unknown variables in the end.
12170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12171
12172      # Check if we try to supply an empty value
12173      if test "x$WC" = x; then
12174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12175$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12177$as_echo_n "checking for WC... " >&6; }
12178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12179$as_echo "disabled" >&6; }
12180      else
12181        # Check if the provided tool contains a complete path.
12182        tool_specified="$WC"
12183        tool_basename="${tool_specified##*/}"
12184        if test "x$tool_basename" = "x$tool_specified"; then
12185          # A command without a complete path is provided, search $PATH.
12186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12187$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12188          # Extract the first word of "$tool_basename", so it can be a program name with args.
12189set dummy $tool_basename; ac_word=$2
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12191$as_echo_n "checking for $ac_word... " >&6; }
12192if ${ac_cv_path_WC+:} false; then :
12193  $as_echo_n "(cached) " >&6
12194else
12195  case $WC in
12196  [\\/]* | ?:[\\/]*)
12197  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12198  ;;
12199  *)
12200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12201for as_dir in $PATH
12202do
12203  IFS=$as_save_IFS
12204  test -z "$as_dir" && as_dir=.
12205    for ac_exec_ext in '' $ac_executable_extensions; do
12206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12207    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12209    break 2
12210  fi
12211done
12212  done
12213IFS=$as_save_IFS
12214
12215  ;;
12216esac
12217fi
12218WC=$ac_cv_path_WC
12219if test -n "$WC"; then
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12221$as_echo "$WC" >&6; }
12222else
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
12225fi
12226
12227
12228          if test "x$WC" = x; then
12229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12230          fi
12231        else
12232          # Otherwise we believe it is a complete path. Use it as it is.
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12234$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12236$as_echo_n "checking for WC... " >&6; }
12237          if test ! -x "$tool_specified"; then
12238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12239$as_echo "not found" >&6; }
12240            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12241          fi
12242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12243$as_echo "$tool_specified" >&6; }
12244        fi
12245      fi
12246    fi
12247
12248  fi
12249
12250
12251
12252  if test "x$WC" = x; then
12253    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12254  fi
12255
12256
12257
12258
12259
12260  # Publish this variable in the help.
12261
12262
12263  if [ -z "${WHICH+x}" ]; then
12264    # The variable is not set by user, try to locate tool using the code snippet
12265    for ac_prog in which
12266do
12267  # Extract the first word of "$ac_prog", so it can be a program name with args.
12268set dummy $ac_prog; ac_word=$2
12269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12270$as_echo_n "checking for $ac_word... " >&6; }
12271if ${ac_cv_path_WHICH+:} false; then :
12272  $as_echo_n "(cached) " >&6
12273else
12274  case $WHICH in
12275  [\\/]* | ?:[\\/]*)
12276  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12277  ;;
12278  *)
12279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12280for as_dir in $PATH
12281do
12282  IFS=$as_save_IFS
12283  test -z "$as_dir" && as_dir=.
12284    for ac_exec_ext in '' $ac_executable_extensions; do
12285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12286    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12288    break 2
12289  fi
12290done
12291  done
12292IFS=$as_save_IFS
12293
12294  ;;
12295esac
12296fi
12297WHICH=$ac_cv_path_WHICH
12298if test -n "$WHICH"; then
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12300$as_echo "$WHICH" >&6; }
12301else
12302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
12304fi
12305
12306
12307  test -n "$WHICH" && break
12308done
12309
12310  else
12311    # The variable is set, but is it from the command line or the environment?
12312
12313    # Try to remove the string !WHICH! from our list.
12314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12316      # If it failed, the variable was not from the command line. Ignore it,
12317      # but warn the user (except for BASH, which is always set by the calling BASH).
12318      if test "xWHICH" != xBASH; then
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12320$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12321      fi
12322      # Try to locate tool using the code snippet
12323      for ac_prog in which
12324do
12325  # Extract the first word of "$ac_prog", so it can be a program name with args.
12326set dummy $ac_prog; ac_word=$2
12327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12328$as_echo_n "checking for $ac_word... " >&6; }
12329if ${ac_cv_path_WHICH+:} false; then :
12330  $as_echo_n "(cached) " >&6
12331else
12332  case $WHICH in
12333  [\\/]* | ?:[\\/]*)
12334  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12335  ;;
12336  *)
12337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338for as_dir in $PATH
12339do
12340  IFS=$as_save_IFS
12341  test -z "$as_dir" && as_dir=.
12342    for ac_exec_ext in '' $ac_executable_extensions; do
12343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12344    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12346    break 2
12347  fi
12348done
12349  done
12350IFS=$as_save_IFS
12351
12352  ;;
12353esac
12354fi
12355WHICH=$ac_cv_path_WHICH
12356if test -n "$WHICH"; then
12357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12358$as_echo "$WHICH" >&6; }
12359else
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
12362fi
12363
12364
12365  test -n "$WHICH" && break
12366done
12367
12368    else
12369      # If it succeeded, then it was overridden by the user. We will use it
12370      # for the tool.
12371
12372      # First remove it from the list of overridden variables, so we can test
12373      # for unknown variables in the end.
12374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12375
12376      # Check if we try to supply an empty value
12377      if test "x$WHICH" = x; then
12378        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12379$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12381$as_echo_n "checking for WHICH... " >&6; }
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12383$as_echo "disabled" >&6; }
12384      else
12385        # Check if the provided tool contains a complete path.
12386        tool_specified="$WHICH"
12387        tool_basename="${tool_specified##*/}"
12388        if test "x$tool_basename" = "x$tool_specified"; then
12389          # A command without a complete path is provided, search $PATH.
12390          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12391$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12392          # Extract the first word of "$tool_basename", so it can be a program name with args.
12393set dummy $tool_basename; ac_word=$2
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12395$as_echo_n "checking for $ac_word... " >&6; }
12396if ${ac_cv_path_WHICH+:} false; then :
12397  $as_echo_n "(cached) " >&6
12398else
12399  case $WHICH in
12400  [\\/]* | ?:[\\/]*)
12401  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12402  ;;
12403  *)
12404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12405for as_dir in $PATH
12406do
12407  IFS=$as_save_IFS
12408  test -z "$as_dir" && as_dir=.
12409    for ac_exec_ext in '' $ac_executable_extensions; do
12410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12411    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12413    break 2
12414  fi
12415done
12416  done
12417IFS=$as_save_IFS
12418
12419  ;;
12420esac
12421fi
12422WHICH=$ac_cv_path_WHICH
12423if test -n "$WHICH"; then
12424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12425$as_echo "$WHICH" >&6; }
12426else
12427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12428$as_echo "no" >&6; }
12429fi
12430
12431
12432          if test "x$WHICH" = x; then
12433            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12434          fi
12435        else
12436          # Otherwise we believe it is a complete path. Use it as it is.
12437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12438$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12439          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12440$as_echo_n "checking for WHICH... " >&6; }
12441          if test ! -x "$tool_specified"; then
12442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12443$as_echo "not found" >&6; }
12444            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12445          fi
12446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12447$as_echo "$tool_specified" >&6; }
12448        fi
12449      fi
12450    fi
12451
12452  fi
12453
12454
12455
12456  if test "x$WHICH" = x; then
12457    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12458  fi
12459
12460
12461
12462
12463
12464  # Publish this variable in the help.
12465
12466
12467  if [ -z "${XARGS+x}" ]; then
12468    # The variable is not set by user, try to locate tool using the code snippet
12469    for ac_prog in xargs
12470do
12471  # Extract the first word of "$ac_prog", so it can be a program name with args.
12472set dummy $ac_prog; ac_word=$2
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12474$as_echo_n "checking for $ac_word... " >&6; }
12475if ${ac_cv_path_XARGS+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478  case $XARGS in
12479  [\\/]* | ?:[\\/]*)
12480  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12481  ;;
12482  *)
12483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484for as_dir in $PATH
12485do
12486  IFS=$as_save_IFS
12487  test -z "$as_dir" && as_dir=.
12488    for ac_exec_ext in '' $ac_executable_extensions; do
12489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492    break 2
12493  fi
12494done
12495  done
12496IFS=$as_save_IFS
12497
12498  ;;
12499esac
12500fi
12501XARGS=$ac_cv_path_XARGS
12502if test -n "$XARGS"; then
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12504$as_echo "$XARGS" >&6; }
12505else
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507$as_echo "no" >&6; }
12508fi
12509
12510
12511  test -n "$XARGS" && break
12512done
12513
12514  else
12515    # The variable is set, but is it from the command line or the environment?
12516
12517    # Try to remove the string !XARGS! from our list.
12518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12520      # If it failed, the variable was not from the command line. Ignore it,
12521      # but warn the user (except for BASH, which is always set by the calling BASH).
12522      if test "xXARGS" != xBASH; then
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12524$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12525      fi
12526      # Try to locate tool using the code snippet
12527      for ac_prog in xargs
12528do
12529  # Extract the first word of "$ac_prog", so it can be a program name with args.
12530set dummy $ac_prog; ac_word=$2
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12532$as_echo_n "checking for $ac_word... " >&6; }
12533if ${ac_cv_path_XARGS+:} false; then :
12534  $as_echo_n "(cached) " >&6
12535else
12536  case $XARGS in
12537  [\\/]* | ?:[\\/]*)
12538  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12539  ;;
12540  *)
12541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12542for as_dir in $PATH
12543do
12544  IFS=$as_save_IFS
12545  test -z "$as_dir" && as_dir=.
12546    for ac_exec_ext in '' $ac_executable_extensions; do
12547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12548    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12550    break 2
12551  fi
12552done
12553  done
12554IFS=$as_save_IFS
12555
12556  ;;
12557esac
12558fi
12559XARGS=$ac_cv_path_XARGS
12560if test -n "$XARGS"; then
12561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12562$as_echo "$XARGS" >&6; }
12563else
12564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12565$as_echo "no" >&6; }
12566fi
12567
12568
12569  test -n "$XARGS" && break
12570done
12571
12572    else
12573      # If it succeeded, then it was overridden by the user. We will use it
12574      # for the tool.
12575
12576      # First remove it from the list of overridden variables, so we can test
12577      # for unknown variables in the end.
12578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12579
12580      # Check if we try to supply an empty value
12581      if test "x$XARGS" = x; then
12582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12583$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12585$as_echo_n "checking for XARGS... " >&6; }
12586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12587$as_echo "disabled" >&6; }
12588      else
12589        # Check if the provided tool contains a complete path.
12590        tool_specified="$XARGS"
12591        tool_basename="${tool_specified##*/}"
12592        if test "x$tool_basename" = "x$tool_specified"; then
12593          # A command without a complete path is provided, search $PATH.
12594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12595$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12596          # Extract the first word of "$tool_basename", so it can be a program name with args.
12597set dummy $tool_basename; ac_word=$2
12598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12599$as_echo_n "checking for $ac_word... " >&6; }
12600if ${ac_cv_path_XARGS+:} false; then :
12601  $as_echo_n "(cached) " >&6
12602else
12603  case $XARGS in
12604  [\\/]* | ?:[\\/]*)
12605  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12606  ;;
12607  *)
12608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609for as_dir in $PATH
12610do
12611  IFS=$as_save_IFS
12612  test -z "$as_dir" && as_dir=.
12613    for ac_exec_ext in '' $ac_executable_extensions; do
12614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12615    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12617    break 2
12618  fi
12619done
12620  done
12621IFS=$as_save_IFS
12622
12623  ;;
12624esac
12625fi
12626XARGS=$ac_cv_path_XARGS
12627if test -n "$XARGS"; then
12628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12629$as_echo "$XARGS" >&6; }
12630else
12631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12632$as_echo "no" >&6; }
12633fi
12634
12635
12636          if test "x$XARGS" = x; then
12637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12638          fi
12639        else
12640          # Otherwise we believe it is a complete path. Use it as it is.
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12642$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12644$as_echo_n "checking for XARGS... " >&6; }
12645          if test ! -x "$tool_specified"; then
12646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12647$as_echo "not found" >&6; }
12648            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12649          fi
12650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12651$as_echo "$tool_specified" >&6; }
12652        fi
12653      fi
12654    fi
12655
12656  fi
12657
12658
12659
12660  if test "x$XARGS" = x; then
12661    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12662  fi
12663
12664
12665
12666  # Then required tools that require some special treatment.
12667
12668
12669  # Publish this variable in the help.
12670
12671
12672  if [ -z "${AWK+x}" ]; then
12673    # The variable is not set by user, try to locate tool using the code snippet
12674    for ac_prog in gawk mawk nawk awk
12675do
12676  # Extract the first word of "$ac_prog", so it can be a program name with args.
12677set dummy $ac_prog; ac_word=$2
12678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12679$as_echo_n "checking for $ac_word... " >&6; }
12680if ${ac_cv_prog_AWK+:} false; then :
12681  $as_echo_n "(cached) " >&6
12682else
12683  if test -n "$AWK"; then
12684  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12685else
12686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12687for as_dir in $PATH
12688do
12689  IFS=$as_save_IFS
12690  test -z "$as_dir" && as_dir=.
12691    for ac_exec_ext in '' $ac_executable_extensions; do
12692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12693    ac_cv_prog_AWK="$ac_prog"
12694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12695    break 2
12696  fi
12697done
12698  done
12699IFS=$as_save_IFS
12700
12701fi
12702fi
12703AWK=$ac_cv_prog_AWK
12704if test -n "$AWK"; then
12705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12706$as_echo "$AWK" >&6; }
12707else
12708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12709$as_echo "no" >&6; }
12710fi
12711
12712
12713  test -n "$AWK" && break
12714done
12715
12716  else
12717    # The variable is set, but is it from the command line or the environment?
12718
12719    # Try to remove the string !AWK! from our list.
12720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12722      # If it failed, the variable was not from the command line. Ignore it,
12723      # but warn the user (except for BASH, which is always set by the calling BASH).
12724      if test "xAWK" != xBASH; then
12725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12726$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12727      fi
12728      # Try to locate tool using the code snippet
12729      for ac_prog in gawk mawk nawk awk
12730do
12731  # Extract the first word of "$ac_prog", so it can be a program name with args.
12732set dummy $ac_prog; ac_word=$2
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12734$as_echo_n "checking for $ac_word... " >&6; }
12735if ${ac_cv_prog_AWK+:} false; then :
12736  $as_echo_n "(cached) " >&6
12737else
12738  if test -n "$AWK"; then
12739  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12740else
12741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12742for as_dir in $PATH
12743do
12744  IFS=$as_save_IFS
12745  test -z "$as_dir" && as_dir=.
12746    for ac_exec_ext in '' $ac_executable_extensions; do
12747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12748    ac_cv_prog_AWK="$ac_prog"
12749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12750    break 2
12751  fi
12752done
12753  done
12754IFS=$as_save_IFS
12755
12756fi
12757fi
12758AWK=$ac_cv_prog_AWK
12759if test -n "$AWK"; then
12760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12761$as_echo "$AWK" >&6; }
12762else
12763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12764$as_echo "no" >&6; }
12765fi
12766
12767
12768  test -n "$AWK" && break
12769done
12770
12771    else
12772      # If it succeeded, then it was overridden by the user. We will use it
12773      # for the tool.
12774
12775      # First remove it from the list of overridden variables, so we can test
12776      # for unknown variables in the end.
12777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12778
12779      # Check if we try to supply an empty value
12780      if test "x$AWK" = x; then
12781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12782$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12784$as_echo_n "checking for AWK... " >&6; }
12785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12786$as_echo "disabled" >&6; }
12787      else
12788        # Check if the provided tool contains a complete path.
12789        tool_specified="$AWK"
12790        tool_basename="${tool_specified##*/}"
12791        if test "x$tool_basename" = "x$tool_specified"; then
12792          # A command without a complete path is provided, search $PATH.
12793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12794$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12795          # Extract the first word of "$tool_basename", so it can be a program name with args.
12796set dummy $tool_basename; ac_word=$2
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12798$as_echo_n "checking for $ac_word... " >&6; }
12799if ${ac_cv_path_AWK+:} false; then :
12800  $as_echo_n "(cached) " >&6
12801else
12802  case $AWK in
12803  [\\/]* | ?:[\\/]*)
12804  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12805  ;;
12806  *)
12807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12808for as_dir in $PATH
12809do
12810  IFS=$as_save_IFS
12811  test -z "$as_dir" && as_dir=.
12812    for ac_exec_ext in '' $ac_executable_extensions; do
12813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12814    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12816    break 2
12817  fi
12818done
12819  done
12820IFS=$as_save_IFS
12821
12822  ;;
12823esac
12824fi
12825AWK=$ac_cv_path_AWK
12826if test -n "$AWK"; then
12827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12828$as_echo "$AWK" >&6; }
12829else
12830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831$as_echo "no" >&6; }
12832fi
12833
12834
12835          if test "x$AWK" = x; then
12836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12837          fi
12838        else
12839          # Otherwise we believe it is a complete path. Use it as it is.
12840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12841$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12843$as_echo_n "checking for AWK... " >&6; }
12844          if test ! -x "$tool_specified"; then
12845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12846$as_echo "not found" >&6; }
12847            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12848          fi
12849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12850$as_echo "$tool_specified" >&6; }
12851        fi
12852      fi
12853    fi
12854
12855  fi
12856
12857
12858  if test "x$AWK" = x; then
12859    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12860  fi
12861
12862
12863
12864
12865  # Publish this variable in the help.
12866
12867
12868  if [ -z "${GREP+x}" ]; then
12869    # The variable is not set by user, try to locate tool using the code snippet
12870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12871$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12872if ${ac_cv_path_GREP+:} false; then :
12873  $as_echo_n "(cached) " >&6
12874else
12875  if test -z "$GREP"; then
12876  ac_path_GREP_found=false
12877  # Loop through the user's path and test for each of PROGNAME-LIST
12878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12880do
12881  IFS=$as_save_IFS
12882  test -z "$as_dir" && as_dir=.
12883    for ac_prog in grep ggrep; do
12884    for ac_exec_ext in '' $ac_executable_extensions; do
12885      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12886      as_fn_executable_p "$ac_path_GREP" || continue
12887# Check for GNU ac_path_GREP and select it if it is found.
12888  # Check for GNU $ac_path_GREP
12889case `"$ac_path_GREP" --version 2>&1` in
12890*GNU*)
12891  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12892*)
12893  ac_count=0
12894  $as_echo_n 0123456789 >"conftest.in"
12895  while :
12896  do
12897    cat "conftest.in" "conftest.in" >"conftest.tmp"
12898    mv "conftest.tmp" "conftest.in"
12899    cp "conftest.in" "conftest.nl"
12900    $as_echo 'GREP' >> "conftest.nl"
12901    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12903    as_fn_arith $ac_count + 1 && ac_count=$as_val
12904    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12905      # Best one so far, save it but keep looking for a better one
12906      ac_cv_path_GREP="$ac_path_GREP"
12907      ac_path_GREP_max=$ac_count
12908    fi
12909    # 10*(2^10) chars as input seems more than enough
12910    test $ac_count -gt 10 && break
12911  done
12912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12913esac
12914
12915      $ac_path_GREP_found && break 3
12916    done
12917  done
12918  done
12919IFS=$as_save_IFS
12920  if test -z "$ac_cv_path_GREP"; then
12921    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12922  fi
12923else
12924  ac_cv_path_GREP=$GREP
12925fi
12926
12927fi
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12929$as_echo "$ac_cv_path_GREP" >&6; }
12930 GREP="$ac_cv_path_GREP"
12931
12932
12933  else
12934    # The variable is set, but is it from the command line or the environment?
12935
12936    # Try to remove the string !GREP! from our list.
12937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12939      # If it failed, the variable was not from the command line. Ignore it,
12940      # but warn the user (except for BASH, which is always set by the calling BASH).
12941      if test "xGREP" != xBASH; then
12942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12943$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12944      fi
12945      # Try to locate tool using the code snippet
12946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12948if ${ac_cv_path_GREP+:} false; then :
12949  $as_echo_n "(cached) " >&6
12950else
12951  if test -z "$GREP"; then
12952  ac_path_GREP_found=false
12953  # Loop through the user's path and test for each of PROGNAME-LIST
12954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12956do
12957  IFS=$as_save_IFS
12958  test -z "$as_dir" && as_dir=.
12959    for ac_prog in grep ggrep; do
12960    for ac_exec_ext in '' $ac_executable_extensions; do
12961      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12962      as_fn_executable_p "$ac_path_GREP" || continue
12963# Check for GNU ac_path_GREP and select it if it is found.
12964  # Check for GNU $ac_path_GREP
12965case `"$ac_path_GREP" --version 2>&1` in
12966*GNU*)
12967  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12968*)
12969  ac_count=0
12970  $as_echo_n 0123456789 >"conftest.in"
12971  while :
12972  do
12973    cat "conftest.in" "conftest.in" >"conftest.tmp"
12974    mv "conftest.tmp" "conftest.in"
12975    cp "conftest.in" "conftest.nl"
12976    $as_echo 'GREP' >> "conftest.nl"
12977    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12978    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12979    as_fn_arith $ac_count + 1 && ac_count=$as_val
12980    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12981      # Best one so far, save it but keep looking for a better one
12982      ac_cv_path_GREP="$ac_path_GREP"
12983      ac_path_GREP_max=$ac_count
12984    fi
12985    # 10*(2^10) chars as input seems more than enough
12986    test $ac_count -gt 10 && break
12987  done
12988  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12989esac
12990
12991      $ac_path_GREP_found && break 3
12992    done
12993  done
12994  done
12995IFS=$as_save_IFS
12996  if test -z "$ac_cv_path_GREP"; then
12997    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12998  fi
12999else
13000  ac_cv_path_GREP=$GREP
13001fi
13002
13003fi
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13005$as_echo "$ac_cv_path_GREP" >&6; }
13006 GREP="$ac_cv_path_GREP"
13007
13008
13009    else
13010      # If it succeeded, then it was overridden by the user. We will use it
13011      # for the tool.
13012
13013      # First remove it from the list of overridden variables, so we can test
13014      # for unknown variables in the end.
13015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13016
13017      # Check if we try to supply an empty value
13018      if test "x$GREP" = x; then
13019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13020$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13022$as_echo_n "checking for GREP... " >&6; }
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13024$as_echo "disabled" >&6; }
13025      else
13026        # Check if the provided tool contains a complete path.
13027        tool_specified="$GREP"
13028        tool_basename="${tool_specified##*/}"
13029        if test "x$tool_basename" = "x$tool_specified"; then
13030          # A command without a complete path is provided, search $PATH.
13031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13032$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13033          # Extract the first word of "$tool_basename", so it can be a program name with args.
13034set dummy $tool_basename; ac_word=$2
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13036$as_echo_n "checking for $ac_word... " >&6; }
13037if ${ac_cv_path_GREP+:} false; then :
13038  $as_echo_n "(cached) " >&6
13039else
13040  case $GREP in
13041  [\\/]* | ?:[\\/]*)
13042  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13043  ;;
13044  *)
13045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13046for as_dir in $PATH
13047do
13048  IFS=$as_save_IFS
13049  test -z "$as_dir" && as_dir=.
13050    for ac_exec_ext in '' $ac_executable_extensions; do
13051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13052    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13054    break 2
13055  fi
13056done
13057  done
13058IFS=$as_save_IFS
13059
13060  ;;
13061esac
13062fi
13063GREP=$ac_cv_path_GREP
13064if test -n "$GREP"; then
13065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13066$as_echo "$GREP" >&6; }
13067else
13068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13069$as_echo "no" >&6; }
13070fi
13071
13072
13073          if test "x$GREP" = x; then
13074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13075          fi
13076        else
13077          # Otherwise we believe it is a complete path. Use it as it is.
13078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13079$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13081$as_echo_n "checking for GREP... " >&6; }
13082          if test ! -x "$tool_specified"; then
13083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13084$as_echo "not found" >&6; }
13085            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13086          fi
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13088$as_echo "$tool_specified" >&6; }
13089        fi
13090      fi
13091    fi
13092
13093  fi
13094
13095
13096  if test "x$GREP" = x; then
13097    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13098  fi
13099
13100
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if [ -z "${EGREP+x}" ]; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13109$as_echo_n "checking for egrep... " >&6; }
13110if ${ac_cv_path_EGREP+:} false; then :
13111  $as_echo_n "(cached) " >&6
13112else
13113  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13114   then ac_cv_path_EGREP="$GREP -E"
13115   else
13116     if test -z "$EGREP"; then
13117  ac_path_EGREP_found=false
13118  # Loop through the user's path and test for each of PROGNAME-LIST
13119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13120for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13121do
13122  IFS=$as_save_IFS
13123  test -z "$as_dir" && as_dir=.
13124    for ac_prog in egrep; do
13125    for ac_exec_ext in '' $ac_executable_extensions; do
13126      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13127      as_fn_executable_p "$ac_path_EGREP" || continue
13128# Check for GNU ac_path_EGREP and select it if it is found.
13129  # Check for GNU $ac_path_EGREP
13130case `"$ac_path_EGREP" --version 2>&1` in
13131*GNU*)
13132  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13133*)
13134  ac_count=0
13135  $as_echo_n 0123456789 >"conftest.in"
13136  while :
13137  do
13138    cat "conftest.in" "conftest.in" >"conftest.tmp"
13139    mv "conftest.tmp" "conftest.in"
13140    cp "conftest.in" "conftest.nl"
13141    $as_echo 'EGREP' >> "conftest.nl"
13142    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13143    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13144    as_fn_arith $ac_count + 1 && ac_count=$as_val
13145    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13146      # Best one so far, save it but keep looking for a better one
13147      ac_cv_path_EGREP="$ac_path_EGREP"
13148      ac_path_EGREP_max=$ac_count
13149    fi
13150    # 10*(2^10) chars as input seems more than enough
13151    test $ac_count -gt 10 && break
13152  done
13153  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13154esac
13155
13156      $ac_path_EGREP_found && break 3
13157    done
13158  done
13159  done
13160IFS=$as_save_IFS
13161  if test -z "$ac_cv_path_EGREP"; then
13162    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13163  fi
13164else
13165  ac_cv_path_EGREP=$EGREP
13166fi
13167
13168   fi
13169fi
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13171$as_echo "$ac_cv_path_EGREP" >&6; }
13172 EGREP="$ac_cv_path_EGREP"
13173
13174
13175  else
13176    # The variable is set, but is it from the command line or the environment?
13177
13178    # Try to remove the string !EGREP! from our list.
13179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13181      # If it failed, the variable was not from the command line. Ignore it,
13182      # but warn the user (except for BASH, which is always set by the calling BASH).
13183      if test "xEGREP" != xBASH; then
13184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13185$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13186      fi
13187      # Try to locate tool using the code snippet
13188      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13189$as_echo_n "checking for egrep... " >&6; }
13190if ${ac_cv_path_EGREP+:} false; then :
13191  $as_echo_n "(cached) " >&6
13192else
13193  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13194   then ac_cv_path_EGREP="$GREP -E"
13195   else
13196     if test -z "$EGREP"; then
13197  ac_path_EGREP_found=false
13198  # Loop through the user's path and test for each of PROGNAME-LIST
13199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13200for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13201do
13202  IFS=$as_save_IFS
13203  test -z "$as_dir" && as_dir=.
13204    for ac_prog in egrep; do
13205    for ac_exec_ext in '' $ac_executable_extensions; do
13206      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13207      as_fn_executable_p "$ac_path_EGREP" || continue
13208# Check for GNU ac_path_EGREP and select it if it is found.
13209  # Check for GNU $ac_path_EGREP
13210case `"$ac_path_EGREP" --version 2>&1` in
13211*GNU*)
13212  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13213*)
13214  ac_count=0
13215  $as_echo_n 0123456789 >"conftest.in"
13216  while :
13217  do
13218    cat "conftest.in" "conftest.in" >"conftest.tmp"
13219    mv "conftest.tmp" "conftest.in"
13220    cp "conftest.in" "conftest.nl"
13221    $as_echo 'EGREP' >> "conftest.nl"
13222    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13224    as_fn_arith $ac_count + 1 && ac_count=$as_val
13225    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13226      # Best one so far, save it but keep looking for a better one
13227      ac_cv_path_EGREP="$ac_path_EGREP"
13228      ac_path_EGREP_max=$ac_count
13229    fi
13230    # 10*(2^10) chars as input seems more than enough
13231    test $ac_count -gt 10 && break
13232  done
13233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13234esac
13235
13236      $ac_path_EGREP_found && break 3
13237    done
13238  done
13239  done
13240IFS=$as_save_IFS
13241  if test -z "$ac_cv_path_EGREP"; then
13242    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13243  fi
13244else
13245  ac_cv_path_EGREP=$EGREP
13246fi
13247
13248   fi
13249fi
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13251$as_echo "$ac_cv_path_EGREP" >&6; }
13252 EGREP="$ac_cv_path_EGREP"
13253
13254
13255    else
13256      # If it succeeded, then it was overridden by the user. We will use it
13257      # for the tool.
13258
13259      # First remove it from the list of overridden variables, so we can test
13260      # for unknown variables in the end.
13261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13262
13263      # Check if we try to supply an empty value
13264      if test "x$EGREP" = x; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13266$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13268$as_echo_n "checking for EGREP... " >&6; }
13269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13270$as_echo "disabled" >&6; }
13271      else
13272        # Check if the provided tool contains a complete path.
13273        tool_specified="$EGREP"
13274        tool_basename="${tool_specified##*/}"
13275        if test "x$tool_basename" = "x$tool_specified"; then
13276          # A command without a complete path is provided, search $PATH.
13277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13278$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13279          # Extract the first word of "$tool_basename", so it can be a program name with args.
13280set dummy $tool_basename; ac_word=$2
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282$as_echo_n "checking for $ac_word... " >&6; }
13283if ${ac_cv_path_EGREP+:} false; then :
13284  $as_echo_n "(cached) " >&6
13285else
13286  case $EGREP in
13287  [\\/]* | ?:[\\/]*)
13288  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13289  ;;
13290  *)
13291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292for as_dir in $PATH
13293do
13294  IFS=$as_save_IFS
13295  test -z "$as_dir" && as_dir=.
13296    for ac_exec_ext in '' $ac_executable_extensions; do
13297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300    break 2
13301  fi
13302done
13303  done
13304IFS=$as_save_IFS
13305
13306  ;;
13307esac
13308fi
13309EGREP=$ac_cv_path_EGREP
13310if test -n "$EGREP"; then
13311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13312$as_echo "$EGREP" >&6; }
13313else
13314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315$as_echo "no" >&6; }
13316fi
13317
13318
13319          if test "x$EGREP" = x; then
13320            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13321          fi
13322        else
13323          # Otherwise we believe it is a complete path. Use it as it is.
13324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13325$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13326          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13327$as_echo_n "checking for EGREP... " >&6; }
13328          if test ! -x "$tool_specified"; then
13329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13330$as_echo "not found" >&6; }
13331            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13332          fi
13333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13334$as_echo "$tool_specified" >&6; }
13335        fi
13336      fi
13337    fi
13338
13339  fi
13340
13341
13342  if test "x$EGREP" = x; then
13343    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13344  fi
13345
13346
13347
13348
13349  # Publish this variable in the help.
13350
13351
13352  if [ -z "${FGREP+x}" ]; then
13353    # The variable is not set by user, try to locate tool using the code snippet
13354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13355$as_echo_n "checking for fgrep... " >&6; }
13356if ${ac_cv_path_FGREP+:} false; then :
13357  $as_echo_n "(cached) " >&6
13358else
13359  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13360   then ac_cv_path_FGREP="$GREP -F"
13361   else
13362     if test -z "$FGREP"; then
13363  ac_path_FGREP_found=false
13364  # Loop through the user's path and test for each of PROGNAME-LIST
13365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13367do
13368  IFS=$as_save_IFS
13369  test -z "$as_dir" && as_dir=.
13370    for ac_prog in fgrep; do
13371    for ac_exec_ext in '' $ac_executable_extensions; do
13372      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13373      as_fn_executable_p "$ac_path_FGREP" || continue
13374# Check for GNU ac_path_FGREP and select it if it is found.
13375  # Check for GNU $ac_path_FGREP
13376case `"$ac_path_FGREP" --version 2>&1` in
13377*GNU*)
13378  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13379*)
13380  ac_count=0
13381  $as_echo_n 0123456789 >"conftest.in"
13382  while :
13383  do
13384    cat "conftest.in" "conftest.in" >"conftest.tmp"
13385    mv "conftest.tmp" "conftest.in"
13386    cp "conftest.in" "conftest.nl"
13387    $as_echo 'FGREP' >> "conftest.nl"
13388    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13389    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13390    as_fn_arith $ac_count + 1 && ac_count=$as_val
13391    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13392      # Best one so far, save it but keep looking for a better one
13393      ac_cv_path_FGREP="$ac_path_FGREP"
13394      ac_path_FGREP_max=$ac_count
13395    fi
13396    # 10*(2^10) chars as input seems more than enough
13397    test $ac_count -gt 10 && break
13398  done
13399  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13400esac
13401
13402      $ac_path_FGREP_found && break 3
13403    done
13404  done
13405  done
13406IFS=$as_save_IFS
13407  if test -z "$ac_cv_path_FGREP"; then
13408    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13409  fi
13410else
13411  ac_cv_path_FGREP=$FGREP
13412fi
13413
13414   fi
13415fi
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13417$as_echo "$ac_cv_path_FGREP" >&6; }
13418 FGREP="$ac_cv_path_FGREP"
13419
13420
13421  else
13422    # The variable is set, but is it from the command line or the environment?
13423
13424    # Try to remove the string !FGREP! from our list.
13425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13427      # If it failed, the variable was not from the command line. Ignore it,
13428      # but warn the user (except for BASH, which is always set by the calling BASH).
13429      if test "xFGREP" != xBASH; then
13430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13431$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13432      fi
13433      # Try to locate tool using the code snippet
13434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13435$as_echo_n "checking for fgrep... " >&6; }
13436if ${ac_cv_path_FGREP+:} false; then :
13437  $as_echo_n "(cached) " >&6
13438else
13439  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13440   then ac_cv_path_FGREP="$GREP -F"
13441   else
13442     if test -z "$FGREP"; then
13443  ac_path_FGREP_found=false
13444  # Loop through the user's path and test for each of PROGNAME-LIST
13445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13447do
13448  IFS=$as_save_IFS
13449  test -z "$as_dir" && as_dir=.
13450    for ac_prog in fgrep; do
13451    for ac_exec_ext in '' $ac_executable_extensions; do
13452      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13453      as_fn_executable_p "$ac_path_FGREP" || continue
13454# Check for GNU ac_path_FGREP and select it if it is found.
13455  # Check for GNU $ac_path_FGREP
13456case `"$ac_path_FGREP" --version 2>&1` in
13457*GNU*)
13458  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13459*)
13460  ac_count=0
13461  $as_echo_n 0123456789 >"conftest.in"
13462  while :
13463  do
13464    cat "conftest.in" "conftest.in" >"conftest.tmp"
13465    mv "conftest.tmp" "conftest.in"
13466    cp "conftest.in" "conftest.nl"
13467    $as_echo 'FGREP' >> "conftest.nl"
13468    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13470    as_fn_arith $ac_count + 1 && ac_count=$as_val
13471    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13472      # Best one so far, save it but keep looking for a better one
13473      ac_cv_path_FGREP="$ac_path_FGREP"
13474      ac_path_FGREP_max=$ac_count
13475    fi
13476    # 10*(2^10) chars as input seems more than enough
13477    test $ac_count -gt 10 && break
13478  done
13479  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13480esac
13481
13482      $ac_path_FGREP_found && break 3
13483    done
13484  done
13485  done
13486IFS=$as_save_IFS
13487  if test -z "$ac_cv_path_FGREP"; then
13488    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13489  fi
13490else
13491  ac_cv_path_FGREP=$FGREP
13492fi
13493
13494   fi
13495fi
13496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13497$as_echo "$ac_cv_path_FGREP" >&6; }
13498 FGREP="$ac_cv_path_FGREP"
13499
13500
13501    else
13502      # If it succeeded, then it was overridden by the user. We will use it
13503      # for the tool.
13504
13505      # First remove it from the list of overridden variables, so we can test
13506      # for unknown variables in the end.
13507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13508
13509      # Check if we try to supply an empty value
13510      if test "x$FGREP" = x; then
13511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13512$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13514$as_echo_n "checking for FGREP... " >&6; }
13515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13516$as_echo "disabled" >&6; }
13517      else
13518        # Check if the provided tool contains a complete path.
13519        tool_specified="$FGREP"
13520        tool_basename="${tool_specified##*/}"
13521        if test "x$tool_basename" = "x$tool_specified"; then
13522          # A command without a complete path is provided, search $PATH.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13524$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13525          # Extract the first word of "$tool_basename", so it can be a program name with args.
13526set dummy $tool_basename; ac_word=$2
13527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13528$as_echo_n "checking for $ac_word... " >&6; }
13529if ${ac_cv_path_FGREP+:} false; then :
13530  $as_echo_n "(cached) " >&6
13531else
13532  case $FGREP in
13533  [\\/]* | ?:[\\/]*)
13534  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13535  ;;
13536  *)
13537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13538for as_dir in $PATH
13539do
13540  IFS=$as_save_IFS
13541  test -z "$as_dir" && as_dir=.
13542    for ac_exec_ext in '' $ac_executable_extensions; do
13543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13544    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13546    break 2
13547  fi
13548done
13549  done
13550IFS=$as_save_IFS
13551
13552  ;;
13553esac
13554fi
13555FGREP=$ac_cv_path_FGREP
13556if test -n "$FGREP"; then
13557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13558$as_echo "$FGREP" >&6; }
13559else
13560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13561$as_echo "no" >&6; }
13562fi
13563
13564
13565          if test "x$FGREP" = x; then
13566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13567          fi
13568        else
13569          # Otherwise we believe it is a complete path. Use it as it is.
13570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13571$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13573$as_echo_n "checking for FGREP... " >&6; }
13574          if test ! -x "$tool_specified"; then
13575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13576$as_echo "not found" >&6; }
13577            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13578          fi
13579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13580$as_echo "$tool_specified" >&6; }
13581        fi
13582      fi
13583    fi
13584
13585  fi
13586
13587
13588  if test "x$FGREP" = x; then
13589    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13590  fi
13591
13592
13593
13594
13595  # Publish this variable in the help.
13596
13597
13598  if [ -z "${SED+x}" ]; then
13599    # The variable is not set by user, try to locate tool using the code snippet
13600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13601$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13602if ${ac_cv_path_SED+:} false; then :
13603  $as_echo_n "(cached) " >&6
13604else
13605            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13606     for ac_i in 1 2 3 4 5 6 7; do
13607       ac_script="$ac_script$as_nl$ac_script"
13608     done
13609     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13610     { ac_script=; unset ac_script;}
13611     if test -z "$SED"; then
13612  ac_path_SED_found=false
13613  # Loop through the user's path and test for each of PROGNAME-LIST
13614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615for as_dir in $PATH
13616do
13617  IFS=$as_save_IFS
13618  test -z "$as_dir" && as_dir=.
13619    for ac_prog in sed gsed; do
13620    for ac_exec_ext in '' $ac_executable_extensions; do
13621      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13622      as_fn_executable_p "$ac_path_SED" || continue
13623# Check for GNU ac_path_SED and select it if it is found.
13624  # Check for GNU $ac_path_SED
13625case `"$ac_path_SED" --version 2>&1` in
13626*GNU*)
13627  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13628*)
13629  ac_count=0
13630  $as_echo_n 0123456789 >"conftest.in"
13631  while :
13632  do
13633    cat "conftest.in" "conftest.in" >"conftest.tmp"
13634    mv "conftest.tmp" "conftest.in"
13635    cp "conftest.in" "conftest.nl"
13636    $as_echo '' >> "conftest.nl"
13637    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13639    as_fn_arith $ac_count + 1 && ac_count=$as_val
13640    if test $ac_count -gt ${ac_path_SED_max-0}; then
13641      # Best one so far, save it but keep looking for a better one
13642      ac_cv_path_SED="$ac_path_SED"
13643      ac_path_SED_max=$ac_count
13644    fi
13645    # 10*(2^10) chars as input seems more than enough
13646    test $ac_count -gt 10 && break
13647  done
13648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13649esac
13650
13651      $ac_path_SED_found && break 3
13652    done
13653  done
13654  done
13655IFS=$as_save_IFS
13656  if test -z "$ac_cv_path_SED"; then
13657    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13658  fi
13659else
13660  ac_cv_path_SED=$SED
13661fi
13662
13663fi
13664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13665$as_echo "$ac_cv_path_SED" >&6; }
13666 SED="$ac_cv_path_SED"
13667  rm -f conftest.sed
13668
13669  else
13670    # The variable is set, but is it from the command line or the environment?
13671
13672    # Try to remove the string !SED! from our list.
13673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13675      # If it failed, the variable was not from the command line. Ignore it,
13676      # but warn the user (except for BASH, which is always set by the calling BASH).
13677      if test "xSED" != xBASH; then
13678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13679$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13680      fi
13681      # Try to locate tool using the code snippet
13682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13683$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13684if ${ac_cv_path_SED+:} false; then :
13685  $as_echo_n "(cached) " >&6
13686else
13687            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13688     for ac_i in 1 2 3 4 5 6 7; do
13689       ac_script="$ac_script$as_nl$ac_script"
13690     done
13691     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13692     { ac_script=; unset ac_script;}
13693     if test -z "$SED"; then
13694  ac_path_SED_found=false
13695  # Loop through the user's path and test for each of PROGNAME-LIST
13696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13697for as_dir in $PATH
13698do
13699  IFS=$as_save_IFS
13700  test -z "$as_dir" && as_dir=.
13701    for ac_prog in sed gsed; do
13702    for ac_exec_ext in '' $ac_executable_extensions; do
13703      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13704      as_fn_executable_p "$ac_path_SED" || continue
13705# Check for GNU ac_path_SED and select it if it is found.
13706  # Check for GNU $ac_path_SED
13707case `"$ac_path_SED" --version 2>&1` in
13708*GNU*)
13709  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13710*)
13711  ac_count=0
13712  $as_echo_n 0123456789 >"conftest.in"
13713  while :
13714  do
13715    cat "conftest.in" "conftest.in" >"conftest.tmp"
13716    mv "conftest.tmp" "conftest.in"
13717    cp "conftest.in" "conftest.nl"
13718    $as_echo '' >> "conftest.nl"
13719    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13720    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13721    as_fn_arith $ac_count + 1 && ac_count=$as_val
13722    if test $ac_count -gt ${ac_path_SED_max-0}; then
13723      # Best one so far, save it but keep looking for a better one
13724      ac_cv_path_SED="$ac_path_SED"
13725      ac_path_SED_max=$ac_count
13726    fi
13727    # 10*(2^10) chars as input seems more than enough
13728    test $ac_count -gt 10 && break
13729  done
13730  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13731esac
13732
13733      $ac_path_SED_found && break 3
13734    done
13735  done
13736  done
13737IFS=$as_save_IFS
13738  if test -z "$ac_cv_path_SED"; then
13739    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13740  fi
13741else
13742  ac_cv_path_SED=$SED
13743fi
13744
13745fi
13746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13747$as_echo "$ac_cv_path_SED" >&6; }
13748 SED="$ac_cv_path_SED"
13749  rm -f conftest.sed
13750
13751    else
13752      # If it succeeded, then it was overridden by the user. We will use it
13753      # for the tool.
13754
13755      # First remove it from the list of overridden variables, so we can test
13756      # for unknown variables in the end.
13757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13758
13759      # Check if we try to supply an empty value
13760      if test "x$SED" = x; then
13761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13762$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13764$as_echo_n "checking for SED... " >&6; }
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13766$as_echo "disabled" >&6; }
13767      else
13768        # Check if the provided tool contains a complete path.
13769        tool_specified="$SED"
13770        tool_basename="${tool_specified##*/}"
13771        if test "x$tool_basename" = "x$tool_specified"; then
13772          # A command without a complete path is provided, search $PATH.
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13774$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13775          # Extract the first word of "$tool_basename", so it can be a program name with args.
13776set dummy $tool_basename; ac_word=$2
13777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13778$as_echo_n "checking for $ac_word... " >&6; }
13779if ${ac_cv_path_SED+:} false; then :
13780  $as_echo_n "(cached) " >&6
13781else
13782  case $SED in
13783  [\\/]* | ?:[\\/]*)
13784  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13785  ;;
13786  *)
13787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13788for as_dir in $PATH
13789do
13790  IFS=$as_save_IFS
13791  test -z "$as_dir" && as_dir=.
13792    for ac_exec_ext in '' $ac_executable_extensions; do
13793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13794    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13796    break 2
13797  fi
13798done
13799  done
13800IFS=$as_save_IFS
13801
13802  ;;
13803esac
13804fi
13805SED=$ac_cv_path_SED
13806if test -n "$SED"; then
13807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13808$as_echo "$SED" >&6; }
13809else
13810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13811$as_echo "no" >&6; }
13812fi
13813
13814
13815          if test "x$SED" = x; then
13816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13817          fi
13818        else
13819          # Otherwise we believe it is a complete path. Use it as it is.
13820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13821$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13823$as_echo_n "checking for SED... " >&6; }
13824          if test ! -x "$tool_specified"; then
13825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13826$as_echo "not found" >&6; }
13827            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13828          fi
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13830$as_echo "$tool_specified" >&6; }
13831        fi
13832      fi
13833    fi
13834
13835  fi
13836
13837
13838  if test "x$SED" = x; then
13839    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13840  fi
13841
13842
13843
13844  # Always force rm.
13845  RM="$RM -f"
13846
13847  # pwd behaves differently on various platforms and some don't support the -L flag.
13848  # Always use the bash builtin pwd to get uniform behavior.
13849  THEPWDCMD=pwd
13850
13851  # These are not required on all platforms
13852
13853
13854  # Publish this variable in the help.
13855
13856
13857  if [ -z "${CYGPATH+x}" ]; then
13858    # The variable is not set by user, try to locate tool using the code snippet
13859    for ac_prog in cygpath
13860do
13861  # Extract the first word of "$ac_prog", so it can be a program name with args.
13862set dummy $ac_prog; ac_word=$2
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13864$as_echo_n "checking for $ac_word... " >&6; }
13865if ${ac_cv_path_CYGPATH+:} false; then :
13866  $as_echo_n "(cached) " >&6
13867else
13868  case $CYGPATH in
13869  [\\/]* | ?:[\\/]*)
13870  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13871  ;;
13872  *)
13873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13874for as_dir in $PATH
13875do
13876  IFS=$as_save_IFS
13877  test -z "$as_dir" && as_dir=.
13878    for ac_exec_ext in '' $ac_executable_extensions; do
13879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13880    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13882    break 2
13883  fi
13884done
13885  done
13886IFS=$as_save_IFS
13887
13888  ;;
13889esac
13890fi
13891CYGPATH=$ac_cv_path_CYGPATH
13892if test -n "$CYGPATH"; then
13893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13894$as_echo "$CYGPATH" >&6; }
13895else
13896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13897$as_echo "no" >&6; }
13898fi
13899
13900
13901  test -n "$CYGPATH" && break
13902done
13903
13904  else
13905    # The variable is set, but is it from the command line or the environment?
13906
13907    # Try to remove the string !CYGPATH! from our list.
13908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13910      # If it failed, the variable was not from the command line. Ignore it,
13911      # but warn the user (except for BASH, which is always set by the calling BASH).
13912      if test "xCYGPATH" != xBASH; then
13913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13914$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13915      fi
13916      # Try to locate tool using the code snippet
13917      for ac_prog in cygpath
13918do
13919  # Extract the first word of "$ac_prog", so it can be a program name with args.
13920set dummy $ac_prog; ac_word=$2
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13922$as_echo_n "checking for $ac_word... " >&6; }
13923if ${ac_cv_path_CYGPATH+:} false; then :
13924  $as_echo_n "(cached) " >&6
13925else
13926  case $CYGPATH in
13927  [\\/]* | ?:[\\/]*)
13928  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13929  ;;
13930  *)
13931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13932for as_dir in $PATH
13933do
13934  IFS=$as_save_IFS
13935  test -z "$as_dir" && as_dir=.
13936    for ac_exec_ext in '' $ac_executable_extensions; do
13937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13938    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13940    break 2
13941  fi
13942done
13943  done
13944IFS=$as_save_IFS
13945
13946  ;;
13947esac
13948fi
13949CYGPATH=$ac_cv_path_CYGPATH
13950if test -n "$CYGPATH"; then
13951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13952$as_echo "$CYGPATH" >&6; }
13953else
13954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955$as_echo "no" >&6; }
13956fi
13957
13958
13959  test -n "$CYGPATH" && break
13960done
13961
13962    else
13963      # If it succeeded, then it was overridden by the user. We will use it
13964      # for the tool.
13965
13966      # First remove it from the list of overridden variables, so we can test
13967      # for unknown variables in the end.
13968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13969
13970      # Check if we try to supply an empty value
13971      if test "x$CYGPATH" = x; then
13972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13973$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13975$as_echo_n "checking for CYGPATH... " >&6; }
13976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13977$as_echo "disabled" >&6; }
13978      else
13979        # Check if the provided tool contains a complete path.
13980        tool_specified="$CYGPATH"
13981        tool_basename="${tool_specified##*/}"
13982        if test "x$tool_basename" = "x$tool_specified"; then
13983          # A command without a complete path is provided, search $PATH.
13984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13985$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13986          # Extract the first word of "$tool_basename", so it can be a program name with args.
13987set dummy $tool_basename; ac_word=$2
13988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13989$as_echo_n "checking for $ac_word... " >&6; }
13990if ${ac_cv_path_CYGPATH+:} false; then :
13991  $as_echo_n "(cached) " >&6
13992else
13993  case $CYGPATH in
13994  [\\/]* | ?:[\\/]*)
13995  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13996  ;;
13997  *)
13998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13999for as_dir in $PATH
14000do
14001  IFS=$as_save_IFS
14002  test -z "$as_dir" && as_dir=.
14003    for ac_exec_ext in '' $ac_executable_extensions; do
14004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14005    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14007    break 2
14008  fi
14009done
14010  done
14011IFS=$as_save_IFS
14012
14013  ;;
14014esac
14015fi
14016CYGPATH=$ac_cv_path_CYGPATH
14017if test -n "$CYGPATH"; then
14018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14019$as_echo "$CYGPATH" >&6; }
14020else
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022$as_echo "no" >&6; }
14023fi
14024
14025
14026          if test "x$CYGPATH" = x; then
14027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14028          fi
14029        else
14030          # Otherwise we believe it is a complete path. Use it as it is.
14031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14032$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14034$as_echo_n "checking for CYGPATH... " >&6; }
14035          if test ! -x "$tool_specified"; then
14036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14037$as_echo "not found" >&6; }
14038            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14039          fi
14040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14041$as_echo "$tool_specified" >&6; }
14042        fi
14043      fi
14044    fi
14045
14046  fi
14047
14048
14049
14050
14051  # Publish this variable in the help.
14052
14053
14054  if [ -z "${READLINK+x}" ]; then
14055    # The variable is not set by user, try to locate tool using the code snippet
14056    for ac_prog in greadlink readlink
14057do
14058  # Extract the first word of "$ac_prog", so it can be a program name with args.
14059set dummy $ac_prog; ac_word=$2
14060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14061$as_echo_n "checking for $ac_word... " >&6; }
14062if ${ac_cv_path_READLINK+:} false; then :
14063  $as_echo_n "(cached) " >&6
14064else
14065  case $READLINK in
14066  [\\/]* | ?:[\\/]*)
14067  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14068  ;;
14069  *)
14070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14071for as_dir in $PATH
14072do
14073  IFS=$as_save_IFS
14074  test -z "$as_dir" && as_dir=.
14075    for ac_exec_ext in '' $ac_executable_extensions; do
14076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14077    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14079    break 2
14080  fi
14081done
14082  done
14083IFS=$as_save_IFS
14084
14085  ;;
14086esac
14087fi
14088READLINK=$ac_cv_path_READLINK
14089if test -n "$READLINK"; then
14090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14091$as_echo "$READLINK" >&6; }
14092else
14093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14094$as_echo "no" >&6; }
14095fi
14096
14097
14098  test -n "$READLINK" && break
14099done
14100
14101  else
14102    # The variable is set, but is it from the command line or the environment?
14103
14104    # Try to remove the string !READLINK! from our list.
14105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14107      # If it failed, the variable was not from the command line. Ignore it,
14108      # but warn the user (except for BASH, which is always set by the calling BASH).
14109      if test "xREADLINK" != xBASH; then
14110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14111$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14112      fi
14113      # Try to locate tool using the code snippet
14114      for ac_prog in greadlink readlink
14115do
14116  # Extract the first word of "$ac_prog", so it can be a program name with args.
14117set dummy $ac_prog; ac_word=$2
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14119$as_echo_n "checking for $ac_word... " >&6; }
14120if ${ac_cv_path_READLINK+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123  case $READLINK in
14124  [\\/]* | ?:[\\/]*)
14125  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14126  ;;
14127  *)
14128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129for as_dir in $PATH
14130do
14131  IFS=$as_save_IFS
14132  test -z "$as_dir" && as_dir=.
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14135    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14137    break 2
14138  fi
14139done
14140  done
14141IFS=$as_save_IFS
14142
14143  ;;
14144esac
14145fi
14146READLINK=$ac_cv_path_READLINK
14147if test -n "$READLINK"; then
14148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14149$as_echo "$READLINK" >&6; }
14150else
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14152$as_echo "no" >&6; }
14153fi
14154
14155
14156  test -n "$READLINK" && break
14157done
14158
14159    else
14160      # If it succeeded, then it was overridden by the user. We will use it
14161      # for the tool.
14162
14163      # First remove it from the list of overridden variables, so we can test
14164      # for unknown variables in the end.
14165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14166
14167      # Check if we try to supply an empty value
14168      if test "x$READLINK" = x; then
14169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14170$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14172$as_echo_n "checking for READLINK... " >&6; }
14173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14174$as_echo "disabled" >&6; }
14175      else
14176        # Check if the provided tool contains a complete path.
14177        tool_specified="$READLINK"
14178        tool_basename="${tool_specified##*/}"
14179        if test "x$tool_basename" = "x$tool_specified"; then
14180          # A command without a complete path is provided, search $PATH.
14181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14182$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14183          # Extract the first word of "$tool_basename", so it can be a program name with args.
14184set dummy $tool_basename; ac_word=$2
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14186$as_echo_n "checking for $ac_word... " >&6; }
14187if ${ac_cv_path_READLINK+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190  case $READLINK in
14191  [\\/]* | ?:[\\/]*)
14192  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14193  ;;
14194  *)
14195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14196for as_dir in $PATH
14197do
14198  IFS=$as_save_IFS
14199  test -z "$as_dir" && as_dir=.
14200    for ac_exec_ext in '' $ac_executable_extensions; do
14201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14202    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14204    break 2
14205  fi
14206done
14207  done
14208IFS=$as_save_IFS
14209
14210  ;;
14211esac
14212fi
14213READLINK=$ac_cv_path_READLINK
14214if test -n "$READLINK"; then
14215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14216$as_echo "$READLINK" >&6; }
14217else
14218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14219$as_echo "no" >&6; }
14220fi
14221
14222
14223          if test "x$READLINK" = x; then
14224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14225          fi
14226        else
14227          # Otherwise we believe it is a complete path. Use it as it is.
14228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14229$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14231$as_echo_n "checking for READLINK... " >&6; }
14232          if test ! -x "$tool_specified"; then
14233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14234$as_echo "not found" >&6; }
14235            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14236          fi
14237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14238$as_echo "$tool_specified" >&6; }
14239        fi
14240      fi
14241    fi
14242
14243  fi
14244
14245
14246
14247
14248  # Publish this variable in the help.
14249
14250
14251  if [ -z "${DF+x}" ]; then
14252    # The variable is not set by user, try to locate tool using the code snippet
14253    for ac_prog in df
14254do
14255  # Extract the first word of "$ac_prog", so it can be a program name with args.
14256set dummy $ac_prog; ac_word=$2
14257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14258$as_echo_n "checking for $ac_word... " >&6; }
14259if ${ac_cv_path_DF+:} false; then :
14260  $as_echo_n "(cached) " >&6
14261else
14262  case $DF in
14263  [\\/]* | ?:[\\/]*)
14264  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14265  ;;
14266  *)
14267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14268for as_dir in $PATH
14269do
14270  IFS=$as_save_IFS
14271  test -z "$as_dir" && as_dir=.
14272    for ac_exec_ext in '' $ac_executable_extensions; do
14273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14274    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14276    break 2
14277  fi
14278done
14279  done
14280IFS=$as_save_IFS
14281
14282  ;;
14283esac
14284fi
14285DF=$ac_cv_path_DF
14286if test -n "$DF"; then
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14288$as_echo "$DF" >&6; }
14289else
14290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14291$as_echo "no" >&6; }
14292fi
14293
14294
14295  test -n "$DF" && break
14296done
14297
14298  else
14299    # The variable is set, but is it from the command line or the environment?
14300
14301    # Try to remove the string !DF! from our list.
14302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14304      # If it failed, the variable was not from the command line. Ignore it,
14305      # but warn the user (except for BASH, which is always set by the calling BASH).
14306      if test "xDF" != xBASH; then
14307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14308$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14309      fi
14310      # Try to locate tool using the code snippet
14311      for ac_prog in df
14312do
14313  # Extract the first word of "$ac_prog", so it can be a program name with args.
14314set dummy $ac_prog; ac_word=$2
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316$as_echo_n "checking for $ac_word... " >&6; }
14317if ${ac_cv_path_DF+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $DF in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14323  ;;
14324  *)
14325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326for as_dir in $PATH
14327do
14328  IFS=$as_save_IFS
14329  test -z "$as_dir" && as_dir=.
14330    for ac_exec_ext in '' $ac_executable_extensions; do
14331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334    break 2
14335  fi
14336done
14337  done
14338IFS=$as_save_IFS
14339
14340  ;;
14341esac
14342fi
14343DF=$ac_cv_path_DF
14344if test -n "$DF"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14346$as_echo "$DF" >&6; }
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351
14352
14353  test -n "$DF" && break
14354done
14355
14356    else
14357      # If it succeeded, then it was overridden by the user. We will use it
14358      # for the tool.
14359
14360      # First remove it from the list of overridden variables, so we can test
14361      # for unknown variables in the end.
14362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14363
14364      # Check if we try to supply an empty value
14365      if test "x$DF" = x; then
14366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14367$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14369$as_echo_n "checking for DF... " >&6; }
14370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14371$as_echo "disabled" >&6; }
14372      else
14373        # Check if the provided tool contains a complete path.
14374        tool_specified="$DF"
14375        tool_basename="${tool_specified##*/}"
14376        if test "x$tool_basename" = "x$tool_specified"; then
14377          # A command without a complete path is provided, search $PATH.
14378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14379$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14380          # Extract the first word of "$tool_basename", so it can be a program name with args.
14381set dummy $tool_basename; ac_word=$2
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14383$as_echo_n "checking for $ac_word... " >&6; }
14384if ${ac_cv_path_DF+:} false; then :
14385  $as_echo_n "(cached) " >&6
14386else
14387  case $DF in
14388  [\\/]* | ?:[\\/]*)
14389  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14390  ;;
14391  *)
14392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14393for as_dir in $PATH
14394do
14395  IFS=$as_save_IFS
14396  test -z "$as_dir" && as_dir=.
14397    for ac_exec_ext in '' $ac_executable_extensions; do
14398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14399    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14401    break 2
14402  fi
14403done
14404  done
14405IFS=$as_save_IFS
14406
14407  ;;
14408esac
14409fi
14410DF=$ac_cv_path_DF
14411if test -n "$DF"; then
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14413$as_echo "$DF" >&6; }
14414else
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416$as_echo "no" >&6; }
14417fi
14418
14419
14420          if test "x$DF" = x; then
14421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14422          fi
14423        else
14424          # Otherwise we believe it is a complete path. Use it as it is.
14425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14426$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14428$as_echo_n "checking for DF... " >&6; }
14429          if test ! -x "$tool_specified"; then
14430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14431$as_echo "not found" >&6; }
14432            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14433          fi
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14435$as_echo "$tool_specified" >&6; }
14436        fi
14437      fi
14438    fi
14439
14440  fi
14441
14442
14443
14444
14445  # Publish this variable in the help.
14446
14447
14448  if [ -z "${CPIO+x}" ]; then
14449    # The variable is not set by user, try to locate tool using the code snippet
14450    for ac_prog in cpio bsdcpio
14451do
14452  # Extract the first word of "$ac_prog", so it can be a program name with args.
14453set dummy $ac_prog; ac_word=$2
14454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14455$as_echo_n "checking for $ac_word... " >&6; }
14456if ${ac_cv_path_CPIO+:} false; then :
14457  $as_echo_n "(cached) " >&6
14458else
14459  case $CPIO in
14460  [\\/]* | ?:[\\/]*)
14461  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14462  ;;
14463  *)
14464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14465for as_dir in $PATH
14466do
14467  IFS=$as_save_IFS
14468  test -z "$as_dir" && as_dir=.
14469    for ac_exec_ext in '' $ac_executable_extensions; do
14470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14471    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14473    break 2
14474  fi
14475done
14476  done
14477IFS=$as_save_IFS
14478
14479  ;;
14480esac
14481fi
14482CPIO=$ac_cv_path_CPIO
14483if test -n "$CPIO"; then
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14485$as_echo "$CPIO" >&6; }
14486else
14487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488$as_echo "no" >&6; }
14489fi
14490
14491
14492  test -n "$CPIO" && break
14493done
14494
14495  else
14496    # The variable is set, but is it from the command line or the environment?
14497
14498    # Try to remove the string !CPIO! from our list.
14499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14501      # If it failed, the variable was not from the command line. Ignore it,
14502      # but warn the user (except for BASH, which is always set by the calling BASH).
14503      if test "xCPIO" != xBASH; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14505$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14506      fi
14507      # Try to locate tool using the code snippet
14508      for ac_prog in cpio bsdcpio
14509do
14510  # Extract the first word of "$ac_prog", so it can be a program name with args.
14511set dummy $ac_prog; ac_word=$2
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14513$as_echo_n "checking for $ac_word... " >&6; }
14514if ${ac_cv_path_CPIO+:} false; then :
14515  $as_echo_n "(cached) " >&6
14516else
14517  case $CPIO in
14518  [\\/]* | ?:[\\/]*)
14519  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14520  ;;
14521  *)
14522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14523for as_dir in $PATH
14524do
14525  IFS=$as_save_IFS
14526  test -z "$as_dir" && as_dir=.
14527    for ac_exec_ext in '' $ac_executable_extensions; do
14528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14529    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14531    break 2
14532  fi
14533done
14534  done
14535IFS=$as_save_IFS
14536
14537  ;;
14538esac
14539fi
14540CPIO=$ac_cv_path_CPIO
14541if test -n "$CPIO"; then
14542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14543$as_echo "$CPIO" >&6; }
14544else
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546$as_echo "no" >&6; }
14547fi
14548
14549
14550  test -n "$CPIO" && break
14551done
14552
14553    else
14554      # If it succeeded, then it was overridden by the user. We will use it
14555      # for the tool.
14556
14557      # First remove it from the list of overridden variables, so we can test
14558      # for unknown variables in the end.
14559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14560
14561      # Check if we try to supply an empty value
14562      if test "x$CPIO" = x; then
14563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14564$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14566$as_echo_n "checking for CPIO... " >&6; }
14567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14568$as_echo "disabled" >&6; }
14569      else
14570        # Check if the provided tool contains a complete path.
14571        tool_specified="$CPIO"
14572        tool_basename="${tool_specified##*/}"
14573        if test "x$tool_basename" = "x$tool_specified"; then
14574          # A command without a complete path is provided, search $PATH.
14575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14576$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14577          # Extract the first word of "$tool_basename", so it can be a program name with args.
14578set dummy $tool_basename; ac_word=$2
14579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14580$as_echo_n "checking for $ac_word... " >&6; }
14581if ${ac_cv_path_CPIO+:} false; then :
14582  $as_echo_n "(cached) " >&6
14583else
14584  case $CPIO in
14585  [\\/]* | ?:[\\/]*)
14586  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14587  ;;
14588  *)
14589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14590for as_dir in $PATH
14591do
14592  IFS=$as_save_IFS
14593  test -z "$as_dir" && as_dir=.
14594    for ac_exec_ext in '' $ac_executable_extensions; do
14595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14596    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14598    break 2
14599  fi
14600done
14601  done
14602IFS=$as_save_IFS
14603
14604  ;;
14605esac
14606fi
14607CPIO=$ac_cv_path_CPIO
14608if test -n "$CPIO"; then
14609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14610$as_echo "$CPIO" >&6; }
14611else
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14613$as_echo "no" >&6; }
14614fi
14615
14616
14617          if test "x$CPIO" = x; then
14618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14619          fi
14620        else
14621          # Otherwise we believe it is a complete path. Use it as it is.
14622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14623$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14625$as_echo_n "checking for CPIO... " >&6; }
14626          if test ! -x "$tool_specified"; then
14627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14628$as_echo "not found" >&6; }
14629            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14630          fi
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14632$as_echo "$tool_specified" >&6; }
14633        fi
14634      fi
14635    fi
14636
14637  fi
14638
14639
14640
14641
14642  # Publish this variable in the help.
14643
14644
14645  if [ -z "${NICE+x}" ]; then
14646    # The variable is not set by user, try to locate tool using the code snippet
14647    for ac_prog in nice
14648do
14649  # Extract the first word of "$ac_prog", so it can be a program name with args.
14650set dummy $ac_prog; ac_word=$2
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14652$as_echo_n "checking for $ac_word... " >&6; }
14653if ${ac_cv_path_NICE+:} false; then :
14654  $as_echo_n "(cached) " >&6
14655else
14656  case $NICE in
14657  [\\/]* | ?:[\\/]*)
14658  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14659  ;;
14660  *)
14661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14662for as_dir in $PATH
14663do
14664  IFS=$as_save_IFS
14665  test -z "$as_dir" && as_dir=.
14666    for ac_exec_ext in '' $ac_executable_extensions; do
14667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14668    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14670    break 2
14671  fi
14672done
14673  done
14674IFS=$as_save_IFS
14675
14676  ;;
14677esac
14678fi
14679NICE=$ac_cv_path_NICE
14680if test -n "$NICE"; then
14681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14682$as_echo "$NICE" >&6; }
14683else
14684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14685$as_echo "no" >&6; }
14686fi
14687
14688
14689  test -n "$NICE" && break
14690done
14691
14692  else
14693    # The variable is set, but is it from the command line or the environment?
14694
14695    # Try to remove the string !NICE! from our list.
14696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14698      # If it failed, the variable was not from the command line. Ignore it,
14699      # but warn the user (except for BASH, which is always set by the calling BASH).
14700      if test "xNICE" != xBASH; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14702$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14703      fi
14704      # Try to locate tool using the code snippet
14705      for ac_prog in nice
14706do
14707  # Extract the first word of "$ac_prog", so it can be a program name with args.
14708set dummy $ac_prog; ac_word=$2
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14710$as_echo_n "checking for $ac_word... " >&6; }
14711if ${ac_cv_path_NICE+:} false; then :
14712  $as_echo_n "(cached) " >&6
14713else
14714  case $NICE in
14715  [\\/]* | ?:[\\/]*)
14716  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14717  ;;
14718  *)
14719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14720for as_dir in $PATH
14721do
14722  IFS=$as_save_IFS
14723  test -z "$as_dir" && as_dir=.
14724    for ac_exec_ext in '' $ac_executable_extensions; do
14725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14726    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14728    break 2
14729  fi
14730done
14731  done
14732IFS=$as_save_IFS
14733
14734  ;;
14735esac
14736fi
14737NICE=$ac_cv_path_NICE
14738if test -n "$NICE"; then
14739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14740$as_echo "$NICE" >&6; }
14741else
14742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14743$as_echo "no" >&6; }
14744fi
14745
14746
14747  test -n "$NICE" && break
14748done
14749
14750    else
14751      # If it succeeded, then it was overridden by the user. We will use it
14752      # for the tool.
14753
14754      # First remove it from the list of overridden variables, so we can test
14755      # for unknown variables in the end.
14756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14757
14758      # Check if we try to supply an empty value
14759      if test "x$NICE" = x; then
14760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14761$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14763$as_echo_n "checking for NICE... " >&6; }
14764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14765$as_echo "disabled" >&6; }
14766      else
14767        # Check if the provided tool contains a complete path.
14768        tool_specified="$NICE"
14769        tool_basename="${tool_specified##*/}"
14770        if test "x$tool_basename" = "x$tool_specified"; then
14771          # A command without a complete path is provided, search $PATH.
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14773$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14774          # Extract the first word of "$tool_basename", so it can be a program name with args.
14775set dummy $tool_basename; ac_word=$2
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14777$as_echo_n "checking for $ac_word... " >&6; }
14778if ${ac_cv_path_NICE+:} false; then :
14779  $as_echo_n "(cached) " >&6
14780else
14781  case $NICE in
14782  [\\/]* | ?:[\\/]*)
14783  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14784  ;;
14785  *)
14786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14787for as_dir in $PATH
14788do
14789  IFS=$as_save_IFS
14790  test -z "$as_dir" && as_dir=.
14791    for ac_exec_ext in '' $ac_executable_extensions; do
14792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14793    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14795    break 2
14796  fi
14797done
14798  done
14799IFS=$as_save_IFS
14800
14801  ;;
14802esac
14803fi
14804NICE=$ac_cv_path_NICE
14805if test -n "$NICE"; then
14806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14807$as_echo "$NICE" >&6; }
14808else
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14810$as_echo "no" >&6; }
14811fi
14812
14813
14814          if test "x$NICE" = x; then
14815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14816          fi
14817        else
14818          # Otherwise we believe it is a complete path. Use it as it is.
14819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14820$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14822$as_echo_n "checking for NICE... " >&6; }
14823          if test ! -x "$tool_specified"; then
14824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14825$as_echo "not found" >&6; }
14826            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14827          fi
14828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14829$as_echo "$tool_specified" >&6; }
14830        fi
14831      fi
14832    fi
14833
14834  fi
14835
14836
14837
14838
14839# Now we can determine OpenJDK build and target platforms. This is required to
14840# have early on.
14841# Make sure we can run config.sub.
14842$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14843  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14844
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14846$as_echo_n "checking build system type... " >&6; }
14847if ${ac_cv_build+:} false; then :
14848  $as_echo_n "(cached) " >&6
14849else
14850  ac_build_alias=$build_alias
14851test "x$ac_build_alias" = x &&
14852  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14853test "x$ac_build_alias" = x &&
14854  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14855ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14856  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14857
14858fi
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14860$as_echo "$ac_cv_build" >&6; }
14861case $ac_cv_build in
14862*-*-*) ;;
14863*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14864esac
14865build=$ac_cv_build
14866ac_save_IFS=$IFS; IFS='-'
14867set x $ac_cv_build
14868shift
14869build_cpu=$1
14870build_vendor=$2
14871shift; shift
14872# Remember, the first character of IFS is used to create $*,
14873# except with old shells:
14874build_os=$*
14875IFS=$ac_save_IFS
14876case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14877
14878
14879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14880$as_echo_n "checking host system type... " >&6; }
14881if ${ac_cv_host+:} false; then :
14882  $as_echo_n "(cached) " >&6
14883else
14884  if test "x$host_alias" = x; then
14885  ac_cv_host=$ac_cv_build
14886else
14887  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14888    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14889fi
14890
14891fi
14892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14893$as_echo "$ac_cv_host" >&6; }
14894case $ac_cv_host in
14895*-*-*) ;;
14896*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14897esac
14898host=$ac_cv_host
14899ac_save_IFS=$IFS; IFS='-'
14900set x $ac_cv_host
14901shift
14902host_cpu=$1
14903host_vendor=$2
14904shift; shift
14905# Remember, the first character of IFS is used to create $*,
14906# except with old shells:
14907host_os=$*
14908IFS=$ac_save_IFS
14909case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14910
14911
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14913$as_echo_n "checking target system type... " >&6; }
14914if ${ac_cv_target+:} false; then :
14915  $as_echo_n "(cached) " >&6
14916else
14917  if test "x$target_alias" = x; then
14918  ac_cv_target=$ac_cv_host
14919else
14920  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14921    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14922fi
14923
14924fi
14925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14926$as_echo "$ac_cv_target" >&6; }
14927case $ac_cv_target in
14928*-*-*) ;;
14929*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14930esac
14931target=$ac_cv_target
14932ac_save_IFS=$IFS; IFS='-'
14933set x $ac_cv_target
14934shift
14935target_cpu=$1
14936target_vendor=$2
14937shift; shift
14938# Remember, the first character of IFS is used to create $*,
14939# except with old shells:
14940target_os=$*
14941IFS=$ac_save_IFS
14942case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14943
14944
14945# The aliases save the names the user supplied, while $host etc.
14946# will get canonicalized.
14947test -n "$target_alias" &&
14948  test "$program_prefix$program_suffix$program_transform_name" = \
14949    NONENONEs,x,x, &&
14950  program_prefix=${target_alias}-
14951
14952  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14953  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14954  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14955  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14956  # to use the configure naming style.
14957
14958
14959
14960
14961
14962  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14963  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14964  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14965  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14966  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14967  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14968
14969
14970
14971  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14972
14973  case "$build_os" in
14974    *linux*)
14975      VAR_OS=linux
14976      VAR_OS_TYPE=unix
14977      ;;
14978    *solaris*)
14979      VAR_OS=solaris
14980      VAR_OS_TYPE=unix
14981      ;;
14982    *darwin*)
14983      VAR_OS=macosx
14984      VAR_OS_TYPE=unix
14985      ;;
14986    *bsd*)
14987      VAR_OS=bsd
14988      VAR_OS_TYPE=unix
14989      ;;
14990    *cygwin*)
14991      VAR_OS=windows
14992      VAR_OS_ENV=windows.cygwin
14993      ;;
14994    *mingw*)
14995      VAR_OS=windows
14996      VAR_OS_ENV=windows.msys
14997      ;;
14998    *aix*)
14999      VAR_OS=aix
15000      VAR_OS_TYPE=unix
15001      ;;
15002    *)
15003      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15004      ;;
15005  esac
15006
15007
15008  # First argument is the cpu name from the trip/quad
15009  case "$build_cpu" in
15010    x86_64)
15011      VAR_CPU=x86_64
15012      VAR_CPU_ARCH=x86
15013      VAR_CPU_BITS=64
15014      VAR_CPU_ENDIAN=little
15015      ;;
15016    i?86)
15017      VAR_CPU=x86
15018      VAR_CPU_ARCH=x86
15019      VAR_CPU_BITS=32
15020      VAR_CPU_ENDIAN=little
15021      ;;
15022    arm*)
15023      VAR_CPU=arm
15024      VAR_CPU_ARCH=arm
15025      VAR_CPU_BITS=32
15026      VAR_CPU_ENDIAN=little
15027      ;;
15028    aarch64)
15029      VAR_CPU=aarch64
15030      VAR_CPU_ARCH=aarch64
15031      VAR_CPU_BITS=64
15032      VAR_CPU_ENDIAN=little
15033      ;;
15034    powerpc)
15035      VAR_CPU=ppc
15036      VAR_CPU_ARCH=ppc
15037      VAR_CPU_BITS=32
15038      VAR_CPU_ENDIAN=big
15039      ;;
15040    powerpc64)
15041      VAR_CPU=ppc64
15042      VAR_CPU_ARCH=ppc
15043      VAR_CPU_BITS=64
15044      VAR_CPU_ENDIAN=big
15045      ;;
15046    powerpc64le)
15047      VAR_CPU=ppc64le
15048      VAR_CPU_ARCH=ppc
15049      VAR_CPU_BITS=64
15050      VAR_CPU_ENDIAN=little
15051      ;;
15052    s390)
15053      VAR_CPU=s390
15054      VAR_CPU_ARCH=s390
15055      VAR_CPU_BITS=32
15056      VAR_CPU_ENDIAN=big
15057      ;;
15058    s390x)
15059      VAR_CPU=s390x
15060      VAR_CPU_ARCH=s390
15061      VAR_CPU_BITS=64
15062      VAR_CPU_ENDIAN=big
15063      ;;
15064    sparc)
15065      VAR_CPU=sparc
15066      VAR_CPU_ARCH=sparc
15067      VAR_CPU_BITS=32
15068      VAR_CPU_ENDIAN=big
15069      ;;
15070    sparcv9|sparc64)
15071      VAR_CPU=sparcv9
15072      VAR_CPU_ARCH=sparc
15073      VAR_CPU_BITS=64
15074      VAR_CPU_ENDIAN=big
15075      ;;
15076    *)
15077      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15078      ;;
15079  esac
15080
15081  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15082  OPENJDK_BUILD_OS="$VAR_OS"
15083  if test "x$VAR_OS_TYPE" != x; then
15084    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15085  else
15086    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15087  fi
15088  if test "x$VAR_OS_ENV" != x; then
15089    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15090  else
15091    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15092  fi
15093  OPENJDK_BUILD_CPU="$VAR_CPU"
15094  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15095  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15096  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15097
15098
15099
15100
15101
15102
15103
15104
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15106$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15108$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15109
15110  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15111
15112  case "$host_os" in
15113    *linux*)
15114      VAR_OS=linux
15115      VAR_OS_TYPE=unix
15116      ;;
15117    *solaris*)
15118      VAR_OS=solaris
15119      VAR_OS_TYPE=unix
15120      ;;
15121    *darwin*)
15122      VAR_OS=macosx
15123      VAR_OS_TYPE=unix
15124      ;;
15125    *bsd*)
15126      VAR_OS=bsd
15127      VAR_OS_TYPE=unix
15128      ;;
15129    *cygwin*)
15130      VAR_OS=windows
15131      VAR_OS_ENV=windows.cygwin
15132      ;;
15133    *mingw*)
15134      VAR_OS=windows
15135      VAR_OS_ENV=windows.msys
15136      ;;
15137    *aix*)
15138      VAR_OS=aix
15139      VAR_OS_TYPE=unix
15140      ;;
15141    *)
15142      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15143      ;;
15144  esac
15145
15146
15147  # First argument is the cpu name from the trip/quad
15148  case "$host_cpu" in
15149    x86_64)
15150      VAR_CPU=x86_64
15151      VAR_CPU_ARCH=x86
15152      VAR_CPU_BITS=64
15153      VAR_CPU_ENDIAN=little
15154      ;;
15155    i?86)
15156      VAR_CPU=x86
15157      VAR_CPU_ARCH=x86
15158      VAR_CPU_BITS=32
15159      VAR_CPU_ENDIAN=little
15160      ;;
15161    arm*)
15162      VAR_CPU=arm
15163      VAR_CPU_ARCH=arm
15164      VAR_CPU_BITS=32
15165      VAR_CPU_ENDIAN=little
15166      ;;
15167    aarch64)
15168      VAR_CPU=aarch64
15169      VAR_CPU_ARCH=aarch64
15170      VAR_CPU_BITS=64
15171      VAR_CPU_ENDIAN=little
15172      ;;
15173    powerpc)
15174      VAR_CPU=ppc
15175      VAR_CPU_ARCH=ppc
15176      VAR_CPU_BITS=32
15177      VAR_CPU_ENDIAN=big
15178      ;;
15179    powerpc64)
15180      VAR_CPU=ppc64
15181      VAR_CPU_ARCH=ppc
15182      VAR_CPU_BITS=64
15183      VAR_CPU_ENDIAN=big
15184      ;;
15185    powerpc64le)
15186      VAR_CPU=ppc64le
15187      VAR_CPU_ARCH=ppc
15188      VAR_CPU_BITS=64
15189      VAR_CPU_ENDIAN=little
15190      ;;
15191    s390)
15192      VAR_CPU=s390
15193      VAR_CPU_ARCH=s390
15194      VAR_CPU_BITS=32
15195      VAR_CPU_ENDIAN=big
15196      ;;
15197    s390x)
15198      VAR_CPU=s390x
15199      VAR_CPU_ARCH=s390
15200      VAR_CPU_BITS=64
15201      VAR_CPU_ENDIAN=big
15202      ;;
15203    sparc)
15204      VAR_CPU=sparc
15205      VAR_CPU_ARCH=sparc
15206      VAR_CPU_BITS=32
15207      VAR_CPU_ENDIAN=big
15208      ;;
15209    sparcv9|sparc64)
15210      VAR_CPU=sparcv9
15211      VAR_CPU_ARCH=sparc
15212      VAR_CPU_BITS=64
15213      VAR_CPU_ENDIAN=big
15214      ;;
15215    *)
15216      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15217      ;;
15218  esac
15219
15220  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15221  OPENJDK_TARGET_OS="$VAR_OS"
15222  if test "x$VAR_OS_TYPE" != x; then
15223    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15224  else
15225    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15226  fi
15227  if test "x$VAR_OS_ENV" != x; then
15228    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15229  else
15230    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15231  fi
15232  OPENJDK_TARGET_CPU="$VAR_CPU"
15233  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15234  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15235  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15236
15237
15238
15239
15240
15241
15242
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15245$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15247$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15248
15249
15250
15251# Check whether --with-target-bits was given.
15252if test "${with_target_bits+set}" = set; then :
15253  withval=$with_target_bits;
15254fi
15255
15256
15257  # We have three types of compiles:
15258  # native  == normal compilation, target system == build system
15259  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15260  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15261  #
15262  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15263    # We're doing a proper cross-compilation
15264    COMPILE_TYPE="cross"
15265  else
15266    COMPILE_TYPE="native"
15267  fi
15268
15269  if test "x$with_target_bits" != x; then
15270    if test "x$COMPILE_TYPE" = "xcross"; then
15271      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15272    fi
15273
15274    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15275      # A reduced build is requested
15276      COMPILE_TYPE="reduced"
15277      OPENJDK_TARGET_CPU_BITS=32
15278      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15279        OPENJDK_TARGET_CPU=x86
15280      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15281        OPENJDK_TARGET_CPU=sparc
15282      else
15283        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15284      fi
15285    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15286      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
15287    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15288      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15289$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15290    else
15291      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15292    fi
15293  fi
15294
15295
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15297$as_echo_n "checking compilation type... " >&6; }
15298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15299$as_echo "$COMPILE_TYPE" >&6; }
15300
15301
15302  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15303    REQUIRED_OS_NAME=SunOS
15304    REQUIRED_OS_VERSION=5.10
15305  fi
15306  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15307    REQUIRED_OS_NAME=Linux
15308    REQUIRED_OS_VERSION=2.6
15309  fi
15310  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15311    REQUIRED_OS_NAME=Windows
15312    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15313      REQUIRED_OS_VERSION=5.2
15314    else
15315      REQUIRED_OS_VERSION=5.1
15316    fi
15317  fi
15318  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15319    REQUIRED_OS_NAME=Darwin
15320    REQUIRED_OS_VERSION=11.2
15321  fi
15322  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15323    REQUIRED_OS_NAME=AIX
15324    REQUIRED_OS_VERSION=7.1
15325  fi
15326
15327
15328
15329
15330
15331
15332  # Also store the legacy naming of the cpu.
15333  # Ie i586 and amd64 instead of x86 and x86_64
15334  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15335  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15336    OPENJDK_TARGET_CPU_LEGACY="i586"
15337  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15338    # On all platforms except MacOSX replace x86_64 with amd64.
15339    OPENJDK_TARGET_CPU_LEGACY="amd64"
15340  fi
15341
15342
15343  # And the second legacy naming of the cpu.
15344  # Ie i386 and amd64 instead of x86 and x86_64.
15345  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15346  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15347    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15348  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15349    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15350  fi
15351
15352
15353  # This is the name of the cpu (but using i386 and amd64 instead of
15354  # x86 and x86_64, respectively), preceeded by a /, to be used when
15355  # locating libraries. On macosx, it's empty, though.
15356  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15357  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15358    OPENJDK_TARGET_CPU_LIBDIR=""
15359  fi
15360
15361
15362  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15363  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15364  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15365  OPENJDK_TARGET_CPU_ISADIR=""
15366  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15367    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15368      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15369    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15370      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15371    fi
15372  fi
15373
15374
15375  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15376  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15377  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15378    # On linux only, we replace x86 with i386.
15379    OPENJDK_TARGET_CPU_OSARCH="i386"
15380  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15381    # On all platforms except macosx, we replace x86_64 with amd64.
15382    OPENJDK_TARGET_CPU_OSARCH="amd64"
15383  fi
15384
15385
15386  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15387  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15388    OPENJDK_TARGET_CPU_JLI="i386"
15389  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15390    # On all platforms except macosx, we replace x86_64 with amd64.
15391    OPENJDK_TARGET_CPU_JLI="amd64"
15392  fi
15393  # Now setup the -D flags for building libjli.
15394  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15395  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15396    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15397      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15398    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15399      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15400    fi
15401  fi
15402
15403
15404  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15405      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15406  else
15407      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15408  fi
15409
15410
15411  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15412    A_LP64="LP64:="
15413    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15414    # unpack200.exe
15415    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15416      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15417    fi
15418  fi
15419  LP64=$A_LP64
15420
15421
15422  if test "x$COMPILE_TYPE" = "xcross"; then
15423    # FIXME: ... or should this include reduced builds..?
15424    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15425  else
15426    DEFINE_CROSS_COMPILE_ARCH=""
15427  fi
15428
15429
15430  # Convert openjdk platform names to hotspot names
15431
15432  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15433  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15434    HOTSPOT_TARGET_OS=bsd
15435  fi
15436
15437
15438  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15439  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15440    HOTSPOT_TARGET_OS_TYPE=posix
15441  fi
15442
15443
15444  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15445  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15446    HOTSPOT_TARGET_CPU=x86_32
15447  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15448    HOTSPOT_TARGET_CPU=sparc
15449  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15450    HOTSPOT_TARGET_CPU=ppc_64
15451  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15452    HOTSPOT_TARGET_CPU=ppc_64
15453  fi
15454
15455
15456  # This is identical with OPENJDK_*, but define anyway for consistency.
15457  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15458
15459
15460  # Setup HOTSPOT_TARGET_CPU_DEFINE
15461  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15462    HOTSPOT_TARGET_CPU_DEFINE=IA32
15463  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15464    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15465  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15466    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15467  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15468    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15469  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15470    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15471  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15472    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15473
15474  # The cpu defines below are for zero, we don't support them directly.
15475  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15476    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15477  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15478    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15479  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15480    HOTSPOT_TARGET_CPU_DEFINE=S390
15481  elif test "x$OPENJDK_TARGET_CPU" = ss390x; then
15482    HOTSPOT_TARGET_CPU_DEFINE=S390
15483  fi
15484
15485
15486
15487
15488  # Also store the legacy naming of the cpu.
15489  # Ie i586 and amd64 instead of x86 and x86_64
15490  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15491  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15492    OPENJDK_BUILD_CPU_LEGACY="i586"
15493  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15494    # On all platforms except MacOSX replace x86_64 with amd64.
15495    OPENJDK_BUILD_CPU_LEGACY="amd64"
15496  fi
15497
15498
15499  # And the second legacy naming of the cpu.
15500  # Ie i386 and amd64 instead of x86 and x86_64.
15501  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15502  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15503    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15504  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15505    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15506  fi
15507
15508
15509  # This is the name of the cpu (but using i386 and amd64 instead of
15510  # x86 and x86_64, respectively), preceeded by a /, to be used when
15511  # locating libraries. On macosx, it's empty, though.
15512  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15513  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15514    OPENJDK_BUILD_CPU_LIBDIR=""
15515  fi
15516
15517
15518  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15519  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15520  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15521  OPENJDK_BUILD_CPU_ISADIR=""
15522  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15523    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15524      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15525    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15526      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15527    fi
15528  fi
15529
15530
15531  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15532  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15533  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15534    # On linux only, we replace x86 with i386.
15535    OPENJDK_BUILD_CPU_OSARCH="i386"
15536  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15537    # On all platforms except macosx, we replace x86_64 with amd64.
15538    OPENJDK_BUILD_CPU_OSARCH="amd64"
15539  fi
15540
15541
15542  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15543  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15544    OPENJDK_BUILD_CPU_JLI="i386"
15545  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15546    # On all platforms except macosx, we replace x86_64 with amd64.
15547    OPENJDK_BUILD_CPU_JLI="amd64"
15548  fi
15549  # Now setup the -D flags for building libjli.
15550  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15551  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15552    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15553      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15554    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15555      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15556    fi
15557  fi
15558
15559
15560  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15561      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15562  else
15563      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15564  fi
15565
15566
15567  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15568    A_LP64="LP64:="
15569    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15570    # unpack200.exe
15571    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15572      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15573    fi
15574  fi
15575  LP64=$A_LP64
15576
15577
15578  if test "x$COMPILE_TYPE" = "xcross"; then
15579    # FIXME: ... or should this include reduced builds..?
15580    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15581  else
15582    DEFINE_CROSS_COMPILE_ARCH=""
15583  fi
15584
15585
15586  # Convert openjdk platform names to hotspot names
15587
15588  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15589  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15590    HOTSPOT_BUILD_OS=bsd
15591  fi
15592
15593
15594  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15595  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15596    HOTSPOT_BUILD_OS_TYPE=posix
15597  fi
15598
15599
15600  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15601  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15602    HOTSPOT_BUILD_CPU=x86_32
15603  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15604    HOTSPOT_BUILD_CPU=sparc
15605  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15606    HOTSPOT_BUILD_CPU=ppc_64
15607  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15608    HOTSPOT_BUILD_CPU=ppc_64
15609  fi
15610
15611
15612  # This is identical with OPENJDK_*, but define anyway for consistency.
15613  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15614
15615
15616  # Setup HOTSPOT_BUILD_CPU_DEFINE
15617  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15618    HOTSPOT_BUILD_CPU_DEFINE=IA32
15619  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15620    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15621  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15622    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15623  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15624    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15625  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15626    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15627  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15628    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15629
15630  # The cpu defines below are for zero, we don't support them directly.
15631  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15632    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15633  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15634    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15635  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15636    HOTSPOT_BUILD_CPU_DEFINE=S390
15637  elif test "x$OPENJDK_BUILD_CPU" = ss390x; then
15638    HOTSPOT_BUILD_CPU_DEFINE=S390
15639  fi
15640
15641
15642
15643
15644  # ZERO_ARCHDEF is used to enable architecture-specific code.
15645  # This is used in legacy hotspot build.
15646  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15647
15648
15649
15650
15651
15652# Continue setting up basic stuff. Most remaining code require fundamental tools.
15653
15654  # Save the current directory this script was started from
15655  CURDIR="$PWD"
15656
15657  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15658  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15659  # was not available at that time.
15660  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15661  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15662    ORIGINAL_PATH="$REWRITTEN_PATH"
15663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15664$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15665  fi
15666
15667  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15668    PATH_SEP=";"
15669
15670  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15671  if test $SRC_ROOT_LENGTH -gt 100; then
15672    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15673  fi
15674
15675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15677$as_echo_n "checking cygwin release... " >&6; }
15678    CYGWIN_VERSION=`$UNAME -r`
15679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15680$as_echo "$CYGWIN_VERSION" >&6; }
15681    WINDOWS_ENV_VENDOR='cygwin'
15682    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15683
15684    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15685    if test "x$CYGWIN_VERSION_OLD" != x; then
15686      { $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
15687$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;}
15688      as_fn_error $? "Cannot continue" "$LINENO" 5
15689    fi
15690    if test "x$CYGPATH" = x; then
15691      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15692    fi
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15694$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15695    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15696    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15697    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15698    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15700$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15701    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15702    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15703    if test "x$test_cygdrive_prefix" = x; then
15704      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15705    fi
15706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15708$as_echo_n "checking msys release... " >&6; }
15709    MSYS_VERSION=`$UNAME -r`
15710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15711$as_echo "$MSYS_VERSION" >&6; }
15712
15713    WINDOWS_ENV_VENDOR='msys'
15714    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15715
15716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15717$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15718    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15719    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15720
15721  windows_path="$MSYS_ROOT_PATH"
15722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15723    unix_path=`$CYGPATH -u "$windows_path"`
15724    MSYS_ROOT_PATH="$unix_path"
15725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15727    MSYS_ROOT_PATH="$unix_path"
15728  fi
15729
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15731$as_echo "$MSYS_ROOT_PATH" >&6; }
15732    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15733  else
15734    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15735  fi
15736
15737  # Test if windows or unix (cygwin/msys) find is first in path.
15738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15739$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15740  FIND_BINARY_OUTPUT=`find --version 2>&1`
15741  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15743$as_echo "unix style" >&6; }
15744  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15746$as_echo "Windows" >&6; }
15747    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15748$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15749    { $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
15750$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15751    as_fn_error $? "Cannot continue" "$LINENO" 5
15752  else
15753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15754$as_echo "unknown" >&6; }
15755    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15756$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15757  fi
15758
15759  else
15760    PATH_SEP=":"
15761  fi
15762
15763
15764  # We get the top-level directory from the supporting wrappers.
15765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15766$as_echo_n "checking for top-level directory... " >&6; }
15767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15768$as_echo "$TOPDIR" >&6; }
15769
15770
15771  # Save the original version of TOPDIR for string comparisons
15772  ORIGINAL_TOPDIR="$TOPDIR"
15773
15774
15775  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15776
15777  # Only process if variable expands to non-empty
15778
15779  if test "x$CURDIR" != x; then
15780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15781
15782  # Input might be given as Windows format, start by converting to
15783  # unix format.
15784  path="$CURDIR"
15785  new_path=`$CYGPATH -u "$path"`
15786
15787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15790  # "foo.exe" is OK but "foo" is an error.
15791  #
15792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15793  # It is also a way to make sure we got the proper file name for the real test later on.
15794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15795  if test "x$test_shortpath" = x; then
15796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15797$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15798    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15799  fi
15800
15801  # Call helper function which possibly converts this using DOS-style short mode.
15802  # If so, the updated path is stored in $new_path.
15803
15804  input_path="$new_path"
15805  # Check if we need to convert this using DOS-style short mode. If the path
15806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15807  # take no chances and rewrite it.
15808  # Note: m4 eats our [], so we need to use [ and ] instead.
15809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15810  if test "x$has_forbidden_chars" != x; then
15811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15815      # Going to short mode and back again did indeed matter. Since short mode is
15816      # case insensitive, let's make it lowercase to improve readability.
15817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15818      # Now convert it back to Unix-style (cygpath)
15819      input_path=`$CYGPATH -u "$shortmode_path"`
15820      new_path="$input_path"
15821    fi
15822  fi
15823
15824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15825  if test "x$test_cygdrive_prefix" = x; then
15826    # As a simple fix, exclude /usr/bin since it's not a real path.
15827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15829      # a path prefixed by /cygdrive for fixpath to work.
15830      new_path="$CYGWIN_ROOT_PATH$input_path"
15831    fi
15832  fi
15833
15834
15835  if test "x$path" != "x$new_path"; then
15836    CURDIR="$new_path"
15837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15838$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15839  fi
15840
15841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15842
15843  path="$CURDIR"
15844  has_colon=`$ECHO $path | $GREP ^.:`
15845  new_path="$path"
15846  if test "x$has_colon" = x; then
15847    # Not in mixed or Windows style, start by that.
15848    new_path=`cmd //c echo $path`
15849  fi
15850
15851
15852  input_path="$new_path"
15853  # Check if we need to convert this using DOS-style short mode. If the path
15854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15855  # take no chances and rewrite it.
15856  # Note: m4 eats our [], so we need to use [ and ] instead.
15857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15858  if test "x$has_forbidden_chars" != x; then
15859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15861  fi
15862
15863
15864  windows_path="$new_path"
15865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15866    unix_path=`$CYGPATH -u "$windows_path"`
15867    new_path="$unix_path"
15868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15870    new_path="$unix_path"
15871  fi
15872
15873  if test "x$path" != "x$new_path"; then
15874    CURDIR="$new_path"
15875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15876$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15877  fi
15878
15879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15881
15882    else
15883      # We're on a unix platform. Hooray! :)
15884      path="$CURDIR"
15885      has_space=`$ECHO "$path" | $GREP " "`
15886      if test "x$has_space" != x; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15888$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15890      fi
15891
15892      # Use eval to expand a potential ~
15893      eval path="$path"
15894      if test ! -f "$path" && test ! -d "$path"; then
15895        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15896      fi
15897
15898      if test -d "$path"; then
15899        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15900      else
15901        dir="`$DIRNAME "$path"`"
15902        base="`$BASENAME "$path"`"
15903        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15904      fi
15905    fi
15906  fi
15907
15908
15909  # Only process if variable expands to non-empty
15910
15911  if test "x$TOPDIR" != x; then
15912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15913
15914  # Input might be given as Windows format, start by converting to
15915  # unix format.
15916  path="$TOPDIR"
15917  new_path=`$CYGPATH -u "$path"`
15918
15919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15922  # "foo.exe" is OK but "foo" is an error.
15923  #
15924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15925  # It is also a way to make sure we got the proper file name for the real test later on.
15926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15927  if test "x$test_shortpath" = x; then
15928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15929$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15930    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15931  fi
15932
15933  # Call helper function which possibly converts this using DOS-style short mode.
15934  # If so, the updated path is stored in $new_path.
15935
15936  input_path="$new_path"
15937  # Check if we need to convert this using DOS-style short mode. If the path
15938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15939  # take no chances and rewrite it.
15940  # Note: m4 eats our [], so we need to use [ and ] instead.
15941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15942  if test "x$has_forbidden_chars" != x; then
15943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15947      # Going to short mode and back again did indeed matter. Since short mode is
15948      # case insensitive, let's make it lowercase to improve readability.
15949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15950      # Now convert it back to Unix-style (cygpath)
15951      input_path=`$CYGPATH -u "$shortmode_path"`
15952      new_path="$input_path"
15953    fi
15954  fi
15955
15956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15957  if test "x$test_cygdrive_prefix" = x; then
15958    # As a simple fix, exclude /usr/bin since it's not a real path.
15959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15961      # a path prefixed by /cygdrive for fixpath to work.
15962      new_path="$CYGWIN_ROOT_PATH$input_path"
15963    fi
15964  fi
15965
15966
15967  if test "x$path" != "x$new_path"; then
15968    TOPDIR="$new_path"
15969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15970$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15971  fi
15972
15973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15974
15975  path="$TOPDIR"
15976  has_colon=`$ECHO $path | $GREP ^.:`
15977  new_path="$path"
15978  if test "x$has_colon" = x; then
15979    # Not in mixed or Windows style, start by that.
15980    new_path=`cmd //c echo $path`
15981  fi
15982
15983
15984  input_path="$new_path"
15985  # Check if we need to convert this using DOS-style short mode. If the path
15986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987  # take no chances and rewrite it.
15988  # Note: m4 eats our [], so we need to use [ and ] instead.
15989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15990  if test "x$has_forbidden_chars" != x; then
15991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15993  fi
15994
15995
15996  windows_path="$new_path"
15997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15998    unix_path=`$CYGPATH -u "$windows_path"`
15999    new_path="$unix_path"
16000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16002    new_path="$unix_path"
16003  fi
16004
16005  if test "x$path" != "x$new_path"; then
16006    TOPDIR="$new_path"
16007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16008$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16009  fi
16010
16011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16013
16014    else
16015      # We're on a unix platform. Hooray! :)
16016      path="$TOPDIR"
16017      has_space=`$ECHO "$path" | $GREP " "`
16018      if test "x$has_space" != x; then
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16020$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16022      fi
16023
16024      # Use eval to expand a potential ~
16025      eval path="$path"
16026      if test ! -f "$path" && test ! -d "$path"; then
16027        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16028      fi
16029
16030      if test -d "$path"; then
16031        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16032      else
16033        dir="`$DIRNAME "$path"`"
16034        base="`$BASENAME "$path"`"
16035        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16036      fi
16037    fi
16038  fi
16039
16040  # SRC_ROOT is a traditional alias for TOPDIR.
16041  SRC_ROOT=$TOPDIR
16042
16043  # Calculate a canonical version of TOPDIR for string comparisons
16044  CANONICAL_TOPDIR=$TOPDIR
16045
16046  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16047    # Follow a chain of symbolic links. Use readlink
16048    # where it exists, else fall back to horribly
16049    # complicated shell code.
16050    if test "x$READLINK_TESTED" != yes; then
16051      # On MacOSX there is a readlink tool with a different
16052      # purpose than the GNU readlink tool. Check the found readlink.
16053      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16054      if test "x$ISGNU" = x; then
16055        # A readlink that we do not know how to use.
16056        # Are there other non-GNU readlinks out there?
16057        READLINK_TESTED=yes
16058        READLINK=
16059      fi
16060    fi
16061
16062    if test "x$READLINK" != x; then
16063      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16064    else
16065      # Save the current directory for restoring afterwards
16066      STARTDIR=$PWD
16067      COUNTER=0
16068      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16069      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16070      cd $sym_link_dir
16071      # Use -P flag to resolve symlinks in directories.
16072      cd `$THEPWDCMD -P`
16073      sym_link_dir=`$THEPWDCMD -P`
16074      # Resolve file symlinks
16075      while test $COUNTER -lt 20; do
16076        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16077        if test "x$ISLINK" == x; then
16078          # This is not a symbolic link! We are done!
16079          break
16080        fi
16081        # Again resolve directory symlinks since the target of the just found
16082        # link could be in a different directory
16083        cd `$DIRNAME $ISLINK`
16084        sym_link_dir=`$THEPWDCMD -P`
16085        sym_link_file=`$BASENAME $ISLINK`
16086        let COUNTER=COUNTER+1
16087      done
16088      cd $STARTDIR
16089      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16090    fi
16091  fi
16092
16093
16094
16095  # Locate the directory of this script.
16096  AUTOCONF_DIR=$TOPDIR/common/autoconf
16097
16098  # Setup username (for use in adhoc version strings etc)
16099  # Outer [ ] to quote m4.
16100   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16101
16102
16103
16104# Check if it's a pure open build or if custom sources are to be used.
16105
16106  # Check whether --enable-openjdk-only was given.
16107if test "${enable_openjdk_only+set}" = set; then :
16108  enableval=$enable_openjdk_only;
16109else
16110  enable_openjdk_only="no"
16111fi
16112
16113
16114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16115$as_echo_n "checking for presence of closed sources... " >&6; }
16116  if test -d "$SRC_ROOT/jdk/src/closed"; then
16117    CLOSED_SOURCE_PRESENT=yes
16118  else
16119    CLOSED_SOURCE_PRESENT=no
16120  fi
16121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16122$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16123
16124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16125$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16126  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16128$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16129
16130  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16131    OPENJDK=true
16132    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16133      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16134$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16135    fi
16136  else
16137    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16138      OPENJDK=true
16139    else
16140      OPENJDK=false
16141    fi
16142  fi
16143
16144  if test "x$OPENJDK" = "xtrue"; then
16145    SET_OPENJDK="OPENJDK=true"
16146  fi
16147
16148
16149
16150  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16151  # the IncludeCustomExtension macro.
16152
16153
16154# Check whether --with-custom-make-dir was given.
16155if test "${with_custom_make_dir+set}" = set; then :
16156  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
16157$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16158fi
16159
16160
16161
16162
16163# These are needed to be able to create a configuration name (and thus the output directory)
16164
16165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16166$as_echo_n "checking which variant of the JDK to build... " >&6; }
16167
16168# Check whether --with-jdk-variant was given.
16169if test "${with_jdk_variant+set}" = set; then :
16170  withval=$with_jdk_variant;
16171fi
16172
16173
16174  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16175    JDK_VARIANT="normal"
16176  else
16177    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16178  fi
16179
16180
16181
16182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16183$as_echo "$JDK_VARIANT" >&6; }
16184
16185
16186  DEBUG_LEVEL="release"
16187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16188$as_echo_n "checking which debug level to use... " >&6; }
16189  # Check whether --enable-debug was given.
16190if test "${enable_debug+set}" = set; then :
16191  enableval=$enable_debug;
16192        ENABLE_DEBUG="${enableval}"
16193        DEBUG_LEVEL="fastdebug"
16194
16195else
16196  ENABLE_DEBUG="no"
16197fi
16198
16199
16200
16201# Check whether --with-debug-level was given.
16202if test "${with_debug_level+set}" = set; then :
16203  withval=$with_debug_level;
16204        DEBUG_LEVEL="${withval}"
16205        if test "x$ENABLE_DEBUG" = xyes; then
16206          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16207        fi
16208
16209fi
16210
16211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16212$as_echo "$DEBUG_LEVEL" >&6; }
16213
16214  if test "x$DEBUG_LEVEL" != xrelease && \
16215      test "x$DEBUG_LEVEL" != xoptimized && \
16216      test "x$DEBUG_LEVEL" != xfastdebug && \
16217      test "x$DEBUG_LEVEL" != xslowdebug; then
16218    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16219  fi
16220
16221  # Translate DEBUG_LEVEL to debug level used by Hotspot
16222  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16223  if test "x$DEBUG_LEVEL" = xrelease; then
16224    HOTSPOT_DEBUG_LEVEL="product"
16225  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16226    HOTSPOT_DEBUG_LEVEL="debug"
16227  fi
16228
16229  if test "x$DEBUG_LEVEL" = xoptimized; then
16230    # The debug level 'optimized' is a little special because it is currently only
16231    # applicable to the HotSpot build where it means to build a completely
16232    # optimized version of the VM without any debugging code (like for the
16233    # 'release' debug level which is called 'product' in the HotSpot build) but
16234    # with the exception that it can contain additional code which is otherwise
16235    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16236    # test new and/or experimental features which are not intended for customer
16237    # shipment. Because these new features need to be tested and benchmarked in
16238    # real world scenarios, we want to build the containing JDK at the 'release'
16239    # debug level.
16240    DEBUG_LEVEL="release"
16241  fi
16242
16243
16244
16245
16246
16247
16248# Check whether --with-jvm-variants was given.
16249if test "${with_jvm_variants+set}" = set; then :
16250  withval=$with_jvm_variants;
16251fi
16252
16253
16254  if test "x$with_jvm_variants" = x; then
16255    with_jvm_variants="server"
16256  fi
16257  JVM_VARIANTS_OPT="$with_jvm_variants"
16258
16259  # Has the user listed more than one variant?
16260  # Additional [] needed to keep m4 from mangling shell constructs.
16261  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16262    BUILDING_MULTIPLE_JVM_VARIANTS=true
16263  else
16264    BUILDING_MULTIPLE_JVM_VARIANTS=false
16265  fi
16266  # Replace the commas with AND for use in the build directory name.
16267  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16268
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16270$as_echo_n "checking which variants of the JVM to build... " >&6; }
16271  # JVM_VARIANTS is a space-separated list.
16272  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16273  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16275$as_echo "$JVM_VARIANTS" >&6; }
16276
16277  # Check that the selected variants are valid
16278
16279  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16280  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16281  if test "x$INVALID_VARIANTS" != x; then
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16283$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16284    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16285  fi
16286
16287  # All "special" variants share the same output directory ("server")
16288  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16289  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16290  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16291    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16292  fi
16293
16294
16295
16296
16297  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16298    # zero behaves as a platform and rewrites these values. This is really weird. :(
16299    # We are guaranteed that we do not build any other variants when building zero.
16300    HOTSPOT_TARGET_CPU=zero
16301    HOTSPOT_TARGET_CPU_ARCH=zero
16302  fi
16303
16304
16305# With basic setup done, call the custom early hook.
16306
16307
16308# Check if we have devkits, extra paths or sysroot set.
16309
16310
16311# Check whether --with-devkit was given.
16312if test "${with_devkit+set}" = set; then :
16313  withval=$with_devkit;
16314
16315  # Only process if variable expands to non-empty
16316
16317  if test "x$with_devkit" != x; then
16318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16319
16320  # Input might be given as Windows format, start by converting to
16321  # unix format.
16322  path="$with_devkit"
16323  new_path=`$CYGPATH -u "$path"`
16324
16325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16328  # "foo.exe" is OK but "foo" is an error.
16329  #
16330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16331  # It is also a way to make sure we got the proper file name for the real test later on.
16332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16333  if test "x$test_shortpath" = x; then
16334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16335$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16336    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16337  fi
16338
16339  # Call helper function which possibly converts this using DOS-style short mode.
16340  # If so, the updated path is stored in $new_path.
16341
16342  input_path="$new_path"
16343  # Check if we need to convert this using DOS-style short mode. If the path
16344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16345  # take no chances and rewrite it.
16346  # Note: m4 eats our [], so we need to use [ and ] instead.
16347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16348  if test "x$has_forbidden_chars" != x; then
16349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16353      # Going to short mode and back again did indeed matter. Since short mode is
16354      # case insensitive, let's make it lowercase to improve readability.
16355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16356      # Now convert it back to Unix-style (cygpath)
16357      input_path=`$CYGPATH -u "$shortmode_path"`
16358      new_path="$input_path"
16359    fi
16360  fi
16361
16362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16363  if test "x$test_cygdrive_prefix" = x; then
16364    # As a simple fix, exclude /usr/bin since it's not a real path.
16365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16367      # a path prefixed by /cygdrive for fixpath to work.
16368      new_path="$CYGWIN_ROOT_PATH$input_path"
16369    fi
16370  fi
16371
16372
16373  if test "x$path" != "x$new_path"; then
16374    with_devkit="$new_path"
16375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16376$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16377  fi
16378
16379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380
16381  path="$with_devkit"
16382  has_colon=`$ECHO $path | $GREP ^.:`
16383  new_path="$path"
16384  if test "x$has_colon" = x; then
16385    # Not in mixed or Windows style, start by that.
16386    new_path=`cmd //c echo $path`
16387  fi
16388
16389
16390  input_path="$new_path"
16391  # Check if we need to convert this using DOS-style short mode. If the path
16392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16393  # take no chances and rewrite it.
16394  # Note: m4 eats our [], so we need to use [ and ] instead.
16395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16396  if test "x$has_forbidden_chars" != x; then
16397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16399  fi
16400
16401
16402  windows_path="$new_path"
16403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16404    unix_path=`$CYGPATH -u "$windows_path"`
16405    new_path="$unix_path"
16406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16408    new_path="$unix_path"
16409  fi
16410
16411  if test "x$path" != "x$new_path"; then
16412    with_devkit="$new_path"
16413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16414$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16415  fi
16416
16417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16419
16420    else
16421      # We're on a unix platform. Hooray! :)
16422      path="$with_devkit"
16423      has_space=`$ECHO "$path" | $GREP " "`
16424      if test "x$has_space" != x; then
16425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16426$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16428      fi
16429
16430      # Use eval to expand a potential ~
16431      eval path="$path"
16432      if test ! -f "$path" && test ! -d "$path"; then
16433        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16434      fi
16435
16436      if test -d "$path"; then
16437        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16438      else
16439        dir="`$DIRNAME "$path"`"
16440        base="`$BASENAME "$path"`"
16441        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16442      fi
16443    fi
16444  fi
16445
16446        DEVKIT_ROOT="$with_devkit"
16447        # Check for a meta data info file in the root of the devkit
16448        if test -f "$DEVKIT_ROOT/devkit.info"; then
16449          . $DEVKIT_ROOT/devkit.info
16450          # This potentially sets the following:
16451          # A descriptive name of the devkit
16452
16453  if test "x$DEVKIT_NAME" = x; then
16454    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16455  fi
16456
16457          # Corresponds to --with-extra-path
16458
16459  if test "x$DEVKIT_EXTRA_PATH" = x; then
16460    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16461  fi
16462
16463          # Corresponds to --with-toolchain-path
16464
16465  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16466    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16467  fi
16468
16469          # Corresponds to --with-sysroot
16470
16471  if test "x$DEVKIT_SYSROOT" = x; then
16472    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16473  fi
16474
16475
16476          # Identifies the Visual Studio version in the devkit
16477
16478  if test "x$DEVKIT_VS_VERSION" = x; then
16479    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16480  fi
16481
16482          # The Visual Studio include environment variable
16483
16484  if test "x$DEVKIT_VS_INCLUDE" = x; then
16485    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16486  fi
16487
16488          # The Visual Studio lib environment variable
16489
16490  if test "x$DEVKIT_VS_LIB" = x; then
16491    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16492  fi
16493
16494          # Corresponds to --with-msvcr-dll
16495
16496  if test "x$DEVKIT_MSVCR_DLL" = x; then
16497    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16498  fi
16499
16500          # Corresponds to --with-msvcp-dll
16501
16502  if test "x$DEVKIT_MSVCP_DLL" = x; then
16503    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16504  fi
16505
16506        fi
16507
16508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16509$as_echo_n "checking for devkit... " >&6; }
16510        if test "x$DEVKIT_NAME" != x; then
16511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16512$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16513        else
16514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16515$as_echo "$DEVKIT_ROOT" >&6; }
16516        fi
16517
16518
16519  if test "x$DEVKIT_EXTRA_PATH" != x; then
16520    if test "x$EXTRA_PATH" = x; then
16521      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16522    else
16523      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16524    fi
16525  fi
16526
16527
16528        # Fallback default of just /bin if DEVKIT_PATH is not defined
16529        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16530          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16531        fi
16532
16533  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16534    if test "x$TOOLCHAIN_PATH" = x; then
16535      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16536    else
16537      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16538    fi
16539  fi
16540
16541
16542        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16543        # places for backwards compatiblity.
16544        if test "x$DEVKIT_SYSROOT" != x; then
16545          SYSROOT="$DEVKIT_SYSROOT"
16546        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16547          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16548        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16549          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16550        fi
16551
16552
16553fi
16554
16555
16556  # You can force the sysroot if the sysroot encoded into the compiler tools
16557  # is not correct.
16558
16559# Check whether --with-sys-root was given.
16560if test "${with_sys_root+set}" = set; then :
16561  withval=$with_sys_root; SYSROOT=$with_sys_root
16562
16563fi
16564
16565
16566
16567# Check whether --with-sysroot was given.
16568if test "${with_sysroot+set}" = set; then :
16569  withval=$with_sysroot; SYSROOT=$with_sysroot
16570
16571fi
16572
16573
16574
16575# Check whether --with-tools-dir was given.
16576if test "${with_tools_dir+set}" = set; then :
16577  withval=$with_tools_dir;
16578  if test "x$with_tools_dir" != x; then
16579    if test "x$TOOLCHAIN_PATH" = x; then
16580      TOOLCHAIN_PATH="$with_tools_dir"
16581    else
16582      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16583    fi
16584  fi
16585
16586
16587fi
16588
16589
16590
16591# Check whether --with-toolchain-path was given.
16592if test "${with_toolchain_path+set}" = set; then :
16593  withval=$with_toolchain_path;
16594  if test "x$with_toolchain_path" != x; then
16595    if test "x$TOOLCHAIN_PATH" = x; then
16596      TOOLCHAIN_PATH="$with_toolchain_path"
16597    else
16598      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16599    fi
16600  fi
16601
16602
16603fi
16604
16605
16606
16607# Check whether --with-extra-path was given.
16608if test "${with_extra_path+set}" = set; then :
16609  withval=$with_extra_path;
16610  if test "x$with_extra_path" != x; then
16611    if test "x$EXTRA_PATH" = x; then
16612      EXTRA_PATH="$with_extra_path"
16613    else
16614      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16615    fi
16616  fi
16617
16618
16619fi
16620
16621
16622  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16623    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16624    # If not, detect if Xcode is installed by running xcodebuild -version
16625    # if no Xcode installed, xcodebuild exits with 1
16626    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16627    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16628      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16629      # fall back on the stub binary in /usr/bin/xcodebuild
16630      # Extract the first word of "xcodebuild", so it can be a program name with args.
16631set dummy xcodebuild; ac_word=$2
16632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16633$as_echo_n "checking for $ac_word... " >&6; }
16634if ${ac_cv_path_XCODEBUILD+:} false; then :
16635  $as_echo_n "(cached) " >&6
16636else
16637  case $XCODEBUILD in
16638  [\\/]* | ?:[\\/]*)
16639  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16640  ;;
16641  *)
16642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16643for as_dir in $TOOLCHAIN_PATH
16644do
16645  IFS=$as_save_IFS
16646  test -z "$as_dir" && as_dir=.
16647    for ac_exec_ext in '' $ac_executable_extensions; do
16648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16649    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16651    break 2
16652  fi
16653done
16654  done
16655IFS=$as_save_IFS
16656
16657  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16658  ;;
16659esac
16660fi
16661XCODEBUILD=$ac_cv_path_XCODEBUILD
16662if test -n "$XCODEBUILD"; then
16663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16664$as_echo "$XCODEBUILD" >&6; }
16665else
16666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16667$as_echo "no" >&6; }
16668fi
16669
16670
16671    else
16672      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16673      # when only the command line tools are installed there are no SDKs, so headers
16674      # are copied into the system frameworks
16675      XCODEBUILD=
16676
16677    fi
16678
16679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16680$as_echo_n "checking for sdk name... " >&6; }
16681
16682# Check whether --with-sdk-name was given.
16683if test "${with_sdk_name+set}" = set; then :
16684  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16685
16686fi
16687
16688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16689$as_echo "$SDKNAME" >&6; }
16690
16691    # if toolchain path is specified then don't rely on system headers, they may not compile
16692    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16693    test -z "$TOOLCHAIN_PATH" && \
16694      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16695
16696    if test -z "$SYSROOT"; then
16697      if test -n "$XCODEBUILD"; then
16698        # if we don't have system headers, use default SDK name (last resort)
16699        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16700          SDKNAME=${SDKNAME:-macosx}
16701        fi
16702
16703        if test -n "$SDKNAME"; then
16704          # Call xcodebuild to determine SYSROOT
16705          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16706        fi
16707      else
16708        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16709          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
16710        fi
16711      fi
16712    else
16713      # warn user if --with-sdk-name was also set
16714      if test -n "$with_sdk_name"; then
16715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16716$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16717      fi
16718    fi
16719
16720    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16721      # If no system framework headers, then SYSROOT must be set, or we won't build
16722      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
16723    fi
16724
16725    # Perform a basic sanity test
16726    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16727      if test -z "$SYSROOT"; then
16728        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
16729      else
16730        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16731      fi
16732    fi
16733
16734    # set SDKROOT too, Xcode tools will pick it up
16735    SDKROOT=$SYSROOT
16736
16737  fi
16738
16739  # Prepend the extra path to the global path
16740
16741  if test "x$EXTRA_PATH" != x; then
16742    if test "x$PATH" = x; then
16743      PATH="$EXTRA_PATH"
16744    else
16745      PATH="$EXTRA_PATH:$PATH"
16746    fi
16747  fi
16748
16749
16750  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16751    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16752    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16753  fi
16754
16755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16756$as_echo_n "checking for sysroot... " >&6; }
16757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16758$as_echo "$SYSROOT" >&6; }
16759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16760$as_echo_n "checking for toolchain path... " >&6; }
16761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16762$as_echo "$TOOLCHAIN_PATH" >&6; }
16763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16764$as_echo_n "checking for extra path... " >&6; }
16765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16766$as_echo "$EXTRA_PATH" >&6; }
16767
16768
16769# To properly create a configuration name, we need to have the OpenJDK target
16770# and options (variants and debug level) parsed.
16771
16772
16773
16774# Check whether --with-conf-name was given.
16775if test "${with_conf_name+set}" = set; then :
16776  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16777fi
16778
16779
16780  # Test from where we are running configure, in or outside of src root.
16781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16782$as_echo_n "checking where to store configuration... " >&6; }
16783  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16784      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16785      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16786    # We are running configure from the src root.
16787    # Create a default ./build/target-variant-debuglevel output root.
16788    if test "x${CONF_NAME}" = x; then
16789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16790$as_echo "in default location" >&6; }
16791      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16792    else
16793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16794$as_echo "in build directory with custom name" >&6; }
16795    fi
16796    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16797    $MKDIR -p "$OUTPUT_ROOT"
16798    if test ! -d "$OUTPUT_ROOT"; then
16799      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16800    fi
16801  else
16802    # We are running configure from outside of the src dir.
16803    # Then use the current directory as output dir!
16804    # If configuration is situated in normal build directory, just use the build
16805    # directory name as configuration name, otherwise use the complete path.
16806    if test "x${CONF_NAME}" = x; then
16807      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16808    fi
16809    OUTPUT_ROOT="$CURDIR"
16810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16811$as_echo "in current directory" >&6; }
16812
16813    # WARNING: This might be a bad thing to do. You need to be sure you want to
16814    # have a configuration in this directory. Do some sanity checks!
16815
16816    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16817      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16818      # other files
16819      files_present=`$LS $OUTPUT_ROOT`
16820      # Configure has already touched config.log and confdefs.h in the current dir when this check
16821      # is performed.
16822      filtered_files=`$ECHO "$files_present" \
16823          | $SED -e 's/config.log//g' \
16824              -e 's/configure.log//g' \
16825              -e 's/confdefs.h//g' \
16826              -e 's/ //g' \
16827          | $TR -d '\n'`
16828      if test "x$filtered_files" != x; then
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16830$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16832$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16834$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16836$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16838$as_echo "$as_me: seriously mess up just about everything." >&6;}
16839        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16840$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16842$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16843        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16844      fi
16845    fi
16846  fi
16847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16848$as_echo_n "checking what configuration name to use... " >&6; }
16849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16850$as_echo "$CONF_NAME" >&6; }
16851
16852
16853  # Only process if variable expands to non-empty
16854
16855  if test "x$OUTPUT_ROOT" != x; then
16856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16857
16858  # Input might be given as Windows format, start by converting to
16859  # unix format.
16860  path="$OUTPUT_ROOT"
16861  new_path=`$CYGPATH -u "$path"`
16862
16863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16866  # "foo.exe" is OK but "foo" is an error.
16867  #
16868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16869  # It is also a way to make sure we got the proper file name for the real test later on.
16870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16871  if test "x$test_shortpath" = x; then
16872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16873$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16874    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16875  fi
16876
16877  # Call helper function which possibly converts this using DOS-style short mode.
16878  # If so, the updated path is stored in $new_path.
16879
16880  input_path="$new_path"
16881  # Check if we need to convert this using DOS-style short mode. If the path
16882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16883  # take no chances and rewrite it.
16884  # Note: m4 eats our [], so we need to use [ and ] instead.
16885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16886  if test "x$has_forbidden_chars" != x; then
16887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16891      # Going to short mode and back again did indeed matter. Since short mode is
16892      # case insensitive, let's make it lowercase to improve readability.
16893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16894      # Now convert it back to Unix-style (cygpath)
16895      input_path=`$CYGPATH -u "$shortmode_path"`
16896      new_path="$input_path"
16897    fi
16898  fi
16899
16900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16901  if test "x$test_cygdrive_prefix" = x; then
16902    # As a simple fix, exclude /usr/bin since it's not a real path.
16903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16905      # a path prefixed by /cygdrive for fixpath to work.
16906      new_path="$CYGWIN_ROOT_PATH$input_path"
16907    fi
16908  fi
16909
16910
16911  if test "x$path" != "x$new_path"; then
16912    OUTPUT_ROOT="$new_path"
16913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16914$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16915  fi
16916
16917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918
16919  path="$OUTPUT_ROOT"
16920  has_colon=`$ECHO $path | $GREP ^.:`
16921  new_path="$path"
16922  if test "x$has_colon" = x; then
16923    # Not in mixed or Windows style, start by that.
16924    new_path=`cmd //c echo $path`
16925  fi
16926
16927
16928  input_path="$new_path"
16929  # Check if we need to convert this using DOS-style short mode. If the path
16930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16931  # take no chances and rewrite it.
16932  # Note: m4 eats our [], so we need to use [ and ] instead.
16933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16934  if test "x$has_forbidden_chars" != x; then
16935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16937  fi
16938
16939
16940  windows_path="$new_path"
16941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942    unix_path=`$CYGPATH -u "$windows_path"`
16943    new_path="$unix_path"
16944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16946    new_path="$unix_path"
16947  fi
16948
16949  if test "x$path" != "x$new_path"; then
16950    OUTPUT_ROOT="$new_path"
16951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16952$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16953  fi
16954
16955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16957
16958    else
16959      # We're on a unix platform. Hooray! :)
16960      path="$OUTPUT_ROOT"
16961      has_space=`$ECHO "$path" | $GREP " "`
16962      if test "x$has_space" != x; then
16963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16964$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16966      fi
16967
16968      # Use eval to expand a potential ~
16969      eval path="$path"
16970      if test ! -f "$path" && test ! -d "$path"; then
16971        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16972      fi
16973
16974      if test -d "$path"; then
16975        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16976      else
16977        dir="`$DIRNAME "$path"`"
16978        base="`$BASENAME "$path"`"
16979        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16980      fi
16981    fi
16982  fi
16983
16984
16985  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16986  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16987
16988  SPEC=$OUTPUT_ROOT/spec.gmk
16989
16990  CONF_NAME=$CONF_NAME
16991
16992  OUTPUT_ROOT=$OUTPUT_ROOT
16993
16994
16995
16996  # The spec.gmk file contains all variables for the make system.
16997  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16998
16999  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17000  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17001
17002  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17003  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17004
17005  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17006  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17007
17008  # The compare.sh is used to compare the build output to other builds.
17009  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17010
17011  # The generated Makefile knows where the spec.gmk is and where the source is.
17012  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17013  # which will look for generated configurations
17014  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17015
17016
17017
17018# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17019
17020  for ac_prog in apt-get yum port pkgutil pkgadd
17021do
17022  # Extract the first word of "$ac_prog", so it can be a program name with args.
17023set dummy $ac_prog; ac_word=$2
17024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17025$as_echo_n "checking for $ac_word... " >&6; }
17026if ${ac_cv_prog_PKGHANDLER+:} false; then :
17027  $as_echo_n "(cached) " >&6
17028else
17029  if test -n "$PKGHANDLER"; then
17030  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17031else
17032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17033for as_dir in $PATH
17034do
17035  IFS=$as_save_IFS
17036  test -z "$as_dir" && as_dir=.
17037    for ac_exec_ext in '' $ac_executable_extensions; do
17038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17039    ac_cv_prog_PKGHANDLER="$ac_prog"
17040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17041    break 2
17042  fi
17043done
17044  done
17045IFS=$as_save_IFS
17046
17047fi
17048fi
17049PKGHANDLER=$ac_cv_prog_PKGHANDLER
17050if test -n "$PKGHANDLER"; then
17051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17052$as_echo "$PKGHANDLER" >&6; }
17053else
17054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17055$as_echo "no" >&6; }
17056fi
17057
17058
17059  test -n "$PKGHANDLER" && break
17060done
17061
17062
17063
17064# Setup tools that requires more complex handling, or that is not needed by the configure script.
17065
17066
17067
17068  # Publish this variable in the help.
17069
17070
17071  if [ -z "${MAKE+x}" ]; then
17072    # The variable is not set by user, try to locate tool using the code snippet
17073
17074    # Try our hardest to locate a correct version of GNU make
17075    for ac_prog in gmake
17076do
17077  # Extract the first word of "$ac_prog", so it can be a program name with args.
17078set dummy $ac_prog; ac_word=$2
17079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17080$as_echo_n "checking for $ac_word... " >&6; }
17081if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17082  $as_echo_n "(cached) " >&6
17083else
17084  case $CHECK_GMAKE in
17085  [\\/]* | ?:[\\/]*)
17086  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17087  ;;
17088  *)
17089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17090for as_dir in $PATH
17091do
17092  IFS=$as_save_IFS
17093  test -z "$as_dir" && as_dir=.
17094    for ac_exec_ext in '' $ac_executable_extensions; do
17095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17096    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17098    break 2
17099  fi
17100done
17101  done
17102IFS=$as_save_IFS
17103
17104  ;;
17105esac
17106fi
17107CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17108if test -n "$CHECK_GMAKE"; then
17109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17110$as_echo "$CHECK_GMAKE" >&6; }
17111else
17112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17113$as_echo "no" >&6; }
17114fi
17115
17116
17117  test -n "$CHECK_GMAKE" && break
17118done
17119
17120
17121  MAKE_CANDIDATE=""$CHECK_GMAKE""
17122  DESCRIPTION="gmake in PATH"
17123
17124  # On Cygwin, we require a newer version of make than on other platforms
17125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17126    MAKE_VERSION_EXPR="-e 4\."
17127    MAKE_REQUIRED_VERSION="4.0"
17128   else
17129    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17130    MAKE_REQUIRED_VERSION="3.81"
17131  fi
17132
17133  if test "x$MAKE_CANDIDATE" != x; then
17134    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17135$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17136    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17137    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17138    if test "x$IS_GNU_MAKE" = x; then
17139      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17140$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17141    else
17142      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17143      if test "x$IS_MODERN_MAKE" = x; then
17144        { $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
17145$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;}
17146      else
17147        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17148          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149            MAKE_EXPECTED_ENV='cygwin'
17150          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17151            MAKE_EXPECTED_ENV='msys'
17152          else
17153            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17154          fi
17155          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17156          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17157        else
17158          # Not relevant for non-Windows
17159          IS_MAKE_CORRECT_ENV=true
17160        fi
17161        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17162          { $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
17163$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;}
17164        else
17165          FOUND_MAKE=$MAKE_CANDIDATE
17166
17167  # Only process if variable expands to non-empty
17168
17169  if test "x$FOUND_MAKE" != x; then
17170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17171
17172  # First separate the path from the arguments. This will split at the first
17173  # space.
17174  complete="$FOUND_MAKE"
17175  path="${complete%% *}"
17176  tmp="$complete EOL"
17177  arguments="${tmp#* }"
17178
17179  # Input might be given as Windows format, start by converting to
17180  # unix format.
17181  new_path=`$CYGPATH -u "$path"`
17182
17183  # Now try to locate executable using which
17184  new_path=`$WHICH "$new_path" 2> /dev/null`
17185  # bat and cmd files are not always considered executable in cygwin causing which
17186  # to not find them
17187  if test "x$new_path" = x \
17188      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17189      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17190    new_path=`$CYGPATH -u "$path"`
17191  fi
17192  if test "x$new_path" = x; then
17193    # Oops. Which didn't find the executable.
17194    # The splitting of arguments from the executable at a space might have been incorrect,
17195    # since paths with space are more likely in Windows. Give it another try with the whole
17196    # argument.
17197    path="$complete"
17198    arguments="EOL"
17199    new_path=`$CYGPATH -u "$path"`
17200    new_path=`$WHICH "$new_path" 2> /dev/null`
17201    # bat and cmd files are not always considered executable in cygwin causing which
17202    # to not find them
17203    if test "x$new_path" = x \
17204        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17205        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17206      new_path=`$CYGPATH -u "$path"`
17207    fi
17208    if test "x$new_path" = x; then
17209      # It's still not found. Now this is an unrecoverable error.
17210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17211$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17212      has_space=`$ECHO "$complete" | $GREP " "`
17213      if test "x$has_space" != x; then
17214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17216      fi
17217      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17218    fi
17219  fi
17220
17221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17224  # "foo.exe" is OK but "foo" is an error.
17225  #
17226  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17227  # It is also a way to make sure we got the proper file name for the real test later on.
17228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17229  if test "x$test_shortpath" = x; then
17230    # Short path failed, file does not exist as specified.
17231    # Try adding .exe or .cmd
17232    if test -f "${new_path}.exe"; then
17233      input_to_shortpath="${new_path}.exe"
17234    elif test -f "${new_path}.cmd"; then
17235      input_to_shortpath="${new_path}.cmd"
17236    else
17237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17238$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17242    fi
17243  else
17244    input_to_shortpath="$new_path"
17245  fi
17246
17247  # Call helper function which possibly converts this using DOS-style short mode.
17248  # If so, the updated path is stored in $new_path.
17249  new_path="$input_to_shortpath"
17250
17251  input_path="$input_to_shortpath"
17252  # Check if we need to convert this using DOS-style short mode. If the path
17253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17254  # take no chances and rewrite it.
17255  # Note: m4 eats our [], so we need to use [ and ] instead.
17256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17257  if test "x$has_forbidden_chars" != x; then
17258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17262      # Going to short mode and back again did indeed matter. Since short mode is
17263      # case insensitive, let's make it lowercase to improve readability.
17264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17265      # Now convert it back to Unix-style (cygpath)
17266      input_path=`$CYGPATH -u "$shortmode_path"`
17267      new_path="$input_path"
17268    fi
17269  fi
17270
17271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17272  if test "x$test_cygdrive_prefix" = x; then
17273    # As a simple fix, exclude /usr/bin since it's not a real path.
17274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17276      # a path prefixed by /cygdrive for fixpath to work.
17277      new_path="$CYGWIN_ROOT_PATH$input_path"
17278    fi
17279  fi
17280
17281  # remove trailing .exe if any
17282  new_path="${new_path/%.exe/}"
17283
17284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17285
17286  # First separate the path from the arguments. This will split at the first
17287  # space.
17288  complete="$FOUND_MAKE"
17289  path="${complete%% *}"
17290  tmp="$complete EOL"
17291  arguments="${tmp#* }"
17292
17293  # Input might be given as Windows format, start by converting to
17294  # unix format.
17295  new_path="$path"
17296
17297  windows_path="$new_path"
17298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17299    unix_path=`$CYGPATH -u "$windows_path"`
17300    new_path="$unix_path"
17301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17303    new_path="$unix_path"
17304  fi
17305
17306
17307  # Now try to locate executable using which
17308  new_path=`$WHICH "$new_path" 2> /dev/null`
17309
17310  if test "x$new_path" = x; then
17311    # Oops. Which didn't find the executable.
17312    # The splitting of arguments from the executable at a space might have been incorrect,
17313    # since paths with space are more likely in Windows. Give it another try with the whole
17314    # argument.
17315    path="$complete"
17316    arguments="EOL"
17317    new_path="$path"
17318
17319  windows_path="$new_path"
17320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17321    unix_path=`$CYGPATH -u "$windows_path"`
17322    new_path="$unix_path"
17323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17325    new_path="$unix_path"
17326  fi
17327
17328
17329    new_path=`$WHICH "$new_path" 2> /dev/null`
17330    # bat and cmd files are not always considered executable in MSYS causing which
17331    # to not find them
17332    if test "x$new_path" = x \
17333        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17334        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17335      new_path="$path"
17336
17337  windows_path="$new_path"
17338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17339    unix_path=`$CYGPATH -u "$windows_path"`
17340    new_path="$unix_path"
17341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17343    new_path="$unix_path"
17344  fi
17345
17346    fi
17347
17348    if test "x$new_path" = x; then
17349      # It's still not found. Now this is an unrecoverable error.
17350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17351$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17352      has_space=`$ECHO "$complete" | $GREP " "`
17353      if test "x$has_space" != x; then
17354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17356      fi
17357      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17358    fi
17359  fi
17360
17361  # Now new_path has a complete unix path to the binary
17362  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17363    # Keep paths in /bin as-is, but remove trailing .exe if any
17364    new_path="${new_path/%.exe/}"
17365    # Do not save /bin paths to all_fixpath_prefixes!
17366  else
17367    # Not in mixed or Windows style, start by that.
17368    new_path=`cmd //c echo $new_path`
17369
17370  input_path="$new_path"
17371  # Check if we need to convert this using DOS-style short mode. If the path
17372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17373  # take no chances and rewrite it.
17374  # Note: m4 eats our [], so we need to use [ and ] instead.
17375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17376  if test "x$has_forbidden_chars" != x; then
17377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17379  fi
17380
17381    # Output is in $new_path
17382
17383  windows_path="$new_path"
17384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17385    unix_path=`$CYGPATH -u "$windows_path"`
17386    new_path="$unix_path"
17387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17389    new_path="$unix_path"
17390  fi
17391
17392    # remove trailing .exe if any
17393    new_path="${new_path/%.exe/}"
17394
17395    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17396    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17397  fi
17398
17399    else
17400      # We're on a unix platform. Hooray! :)
17401      # First separate the path from the arguments. This will split at the first
17402      # space.
17403      complete="$FOUND_MAKE"
17404      path="${complete%% *}"
17405      tmp="$complete EOL"
17406      arguments="${tmp#* }"
17407
17408      # Cannot rely on the command "which" here since it doesn't always work.
17409      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17410      if test -z "$is_absolute_path"; then
17411        # Path to executable is not absolute. Find it.
17412        IFS_save="$IFS"
17413        IFS=:
17414        for p in $PATH; do
17415          if test -f "$p/$path" && test -x "$p/$path"; then
17416            new_path="$p/$path"
17417            break
17418          fi
17419        done
17420        IFS="$IFS_save"
17421      else
17422        # This is an absolute path, we can use it without further modifications.
17423        new_path="$path"
17424      fi
17425
17426      if test "x$new_path" = x; then
17427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17428$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17429        has_space=`$ECHO "$complete" | $GREP " "`
17430        if test "x$has_space" != x; then
17431          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17432$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17433        fi
17434        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17435      fi
17436    fi
17437
17438    # Now join together the path and the arguments once again
17439    if test "x$arguments" != xEOL; then
17440      new_complete="$new_path ${arguments% *}"
17441    else
17442      new_complete="$new_path"
17443    fi
17444
17445    if test "x$complete" != "x$new_complete"; then
17446      FOUND_MAKE="$new_complete"
17447      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17448$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17449    fi
17450  fi
17451
17452        fi
17453      fi
17454    fi
17455  fi
17456
17457
17458    if test "x$FOUND_MAKE" = x; then
17459      for ac_prog in make
17460do
17461  # Extract the first word of "$ac_prog", so it can be a program name with args.
17462set dummy $ac_prog; ac_word=$2
17463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17464$as_echo_n "checking for $ac_word... " >&6; }
17465if ${ac_cv_path_CHECK_MAKE+:} false; then :
17466  $as_echo_n "(cached) " >&6
17467else
17468  case $CHECK_MAKE in
17469  [\\/]* | ?:[\\/]*)
17470  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17471  ;;
17472  *)
17473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17474for as_dir in $PATH
17475do
17476  IFS=$as_save_IFS
17477  test -z "$as_dir" && as_dir=.
17478    for ac_exec_ext in '' $ac_executable_extensions; do
17479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17480    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17482    break 2
17483  fi
17484done
17485  done
17486IFS=$as_save_IFS
17487
17488  ;;
17489esac
17490fi
17491CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17492if test -n "$CHECK_MAKE"; then
17493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17494$as_echo "$CHECK_MAKE" >&6; }
17495else
17496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17497$as_echo "no" >&6; }
17498fi
17499
17500
17501  test -n "$CHECK_MAKE" && break
17502done
17503
17504
17505  MAKE_CANDIDATE=""$CHECK_MAKE""
17506  DESCRIPTION="make in PATH"
17507
17508  # On Cygwin, we require a newer version of make than on other platforms
17509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17510    MAKE_VERSION_EXPR="-e 4\."
17511    MAKE_REQUIRED_VERSION="4.0"
17512   else
17513    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17514    MAKE_REQUIRED_VERSION="3.81"
17515  fi
17516
17517  if test "x$MAKE_CANDIDATE" != x; then
17518    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17519$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17520    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17521    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17522    if test "x$IS_GNU_MAKE" = x; then
17523      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17524$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17525    else
17526      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17527      if test "x$IS_MODERN_MAKE" = x; then
17528        { $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
17529$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;}
17530      else
17531        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17532          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17533            MAKE_EXPECTED_ENV='cygwin'
17534          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17535            MAKE_EXPECTED_ENV='msys'
17536          else
17537            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17538          fi
17539          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17540          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17541        else
17542          # Not relevant for non-Windows
17543          IS_MAKE_CORRECT_ENV=true
17544        fi
17545        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17546          { $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
17547$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;}
17548        else
17549          FOUND_MAKE=$MAKE_CANDIDATE
17550
17551  # Only process if variable expands to non-empty
17552
17553  if test "x$FOUND_MAKE" != x; then
17554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17555
17556  # First separate the path from the arguments. This will split at the first
17557  # space.
17558  complete="$FOUND_MAKE"
17559  path="${complete%% *}"
17560  tmp="$complete EOL"
17561  arguments="${tmp#* }"
17562
17563  # Input might be given as Windows format, start by converting to
17564  # unix format.
17565  new_path=`$CYGPATH -u "$path"`
17566
17567  # Now try to locate executable using which
17568  new_path=`$WHICH "$new_path" 2> /dev/null`
17569  # bat and cmd files are not always considered executable in cygwin causing which
17570  # to not find them
17571  if test "x$new_path" = x \
17572      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17573      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17574    new_path=`$CYGPATH -u "$path"`
17575  fi
17576  if test "x$new_path" = x; then
17577    # Oops. Which didn't find the executable.
17578    # The splitting of arguments from the executable at a space might have been incorrect,
17579    # since paths with space are more likely in Windows. Give it another try with the whole
17580    # argument.
17581    path="$complete"
17582    arguments="EOL"
17583    new_path=`$CYGPATH -u "$path"`
17584    new_path=`$WHICH "$new_path" 2> /dev/null`
17585    # bat and cmd files are not always considered executable in cygwin causing which
17586    # to not find them
17587    if test "x$new_path" = x \
17588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17590      new_path=`$CYGPATH -u "$path"`
17591    fi
17592    if test "x$new_path" = x; then
17593      # It's still not found. Now this is an unrecoverable error.
17594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17596      has_space=`$ECHO "$complete" | $GREP " "`
17597      if test "x$has_space" != x; then
17598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17600      fi
17601      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17602    fi
17603  fi
17604
17605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17608  # "foo.exe" is OK but "foo" is an error.
17609  #
17610  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17611  # It is also a way to make sure we got the proper file name for the real test later on.
17612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17613  if test "x$test_shortpath" = x; then
17614    # Short path failed, file does not exist as specified.
17615    # Try adding .exe or .cmd
17616    if test -f "${new_path}.exe"; then
17617      input_to_shortpath="${new_path}.exe"
17618    elif test -f "${new_path}.cmd"; then
17619      input_to_shortpath="${new_path}.cmd"
17620    else
17621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17622$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17625      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17626    fi
17627  else
17628    input_to_shortpath="$new_path"
17629  fi
17630
17631  # Call helper function which possibly converts this using DOS-style short mode.
17632  # If so, the updated path is stored in $new_path.
17633  new_path="$input_to_shortpath"
17634
17635  input_path="$input_to_shortpath"
17636  # Check if we need to convert this using DOS-style short mode. If the path
17637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17638  # take no chances and rewrite it.
17639  # Note: m4 eats our [], so we need to use [ and ] instead.
17640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17641  if test "x$has_forbidden_chars" != x; then
17642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17646      # Going to short mode and back again did indeed matter. Since short mode is
17647      # case insensitive, let's make it lowercase to improve readability.
17648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17649      # Now convert it back to Unix-style (cygpath)
17650      input_path=`$CYGPATH -u "$shortmode_path"`
17651      new_path="$input_path"
17652    fi
17653  fi
17654
17655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17656  if test "x$test_cygdrive_prefix" = x; then
17657    # As a simple fix, exclude /usr/bin since it's not a real path.
17658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17660      # a path prefixed by /cygdrive for fixpath to work.
17661      new_path="$CYGWIN_ROOT_PATH$input_path"
17662    fi
17663  fi
17664
17665  # remove trailing .exe if any
17666  new_path="${new_path/%.exe/}"
17667
17668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17669
17670  # First separate the path from the arguments. This will split at the first
17671  # space.
17672  complete="$FOUND_MAKE"
17673  path="${complete%% *}"
17674  tmp="$complete EOL"
17675  arguments="${tmp#* }"
17676
17677  # Input might be given as Windows format, start by converting to
17678  # unix format.
17679  new_path="$path"
17680
17681  windows_path="$new_path"
17682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17683    unix_path=`$CYGPATH -u "$windows_path"`
17684    new_path="$unix_path"
17685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17687    new_path="$unix_path"
17688  fi
17689
17690
17691  # Now try to locate executable using which
17692  new_path=`$WHICH "$new_path" 2> /dev/null`
17693
17694  if test "x$new_path" = x; then
17695    # Oops. Which didn't find the executable.
17696    # The splitting of arguments from the executable at a space might have been incorrect,
17697    # since paths with space are more likely in Windows. Give it another try with the whole
17698    # argument.
17699    path="$complete"
17700    arguments="EOL"
17701    new_path="$path"
17702
17703  windows_path="$new_path"
17704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17705    unix_path=`$CYGPATH -u "$windows_path"`
17706    new_path="$unix_path"
17707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17709    new_path="$unix_path"
17710  fi
17711
17712
17713    new_path=`$WHICH "$new_path" 2> /dev/null`
17714    # bat and cmd files are not always considered executable in MSYS causing which
17715    # to not find them
17716    if test "x$new_path" = x \
17717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17719      new_path="$path"
17720
17721  windows_path="$new_path"
17722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17723    unix_path=`$CYGPATH -u "$windows_path"`
17724    new_path="$unix_path"
17725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17727    new_path="$unix_path"
17728  fi
17729
17730    fi
17731
17732    if test "x$new_path" = x; then
17733      # It's still not found. Now this is an unrecoverable error.
17734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17735$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17736      has_space=`$ECHO "$complete" | $GREP " "`
17737      if test "x$has_space" != x; then
17738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17740      fi
17741      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17742    fi
17743  fi
17744
17745  # Now new_path has a complete unix path to the binary
17746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17747    # Keep paths in /bin as-is, but remove trailing .exe if any
17748    new_path="${new_path/%.exe/}"
17749    # Do not save /bin paths to all_fixpath_prefixes!
17750  else
17751    # Not in mixed or Windows style, start by that.
17752    new_path=`cmd //c echo $new_path`
17753
17754  input_path="$new_path"
17755  # Check if we need to convert this using DOS-style short mode. If the path
17756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17757  # take no chances and rewrite it.
17758  # Note: m4 eats our [], so we need to use [ and ] instead.
17759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17760  if test "x$has_forbidden_chars" != x; then
17761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17763  fi
17764
17765    # Output is in $new_path
17766
17767  windows_path="$new_path"
17768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17769    unix_path=`$CYGPATH -u "$windows_path"`
17770    new_path="$unix_path"
17771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17773    new_path="$unix_path"
17774  fi
17775
17776    # remove trailing .exe if any
17777    new_path="${new_path/%.exe/}"
17778
17779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17781  fi
17782
17783    else
17784      # We're on a unix platform. Hooray! :)
17785      # First separate the path from the arguments. This will split at the first
17786      # space.
17787      complete="$FOUND_MAKE"
17788      path="${complete%% *}"
17789      tmp="$complete EOL"
17790      arguments="${tmp#* }"
17791
17792      # Cannot rely on the command "which" here since it doesn't always work.
17793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17794      if test -z "$is_absolute_path"; then
17795        # Path to executable is not absolute. Find it.
17796        IFS_save="$IFS"
17797        IFS=:
17798        for p in $PATH; do
17799          if test -f "$p/$path" && test -x "$p/$path"; then
17800            new_path="$p/$path"
17801            break
17802          fi
17803        done
17804        IFS="$IFS_save"
17805      else
17806        # This is an absolute path, we can use it without further modifications.
17807        new_path="$path"
17808      fi
17809
17810      if test "x$new_path" = x; then
17811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17812$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17813        has_space=`$ECHO "$complete" | $GREP " "`
17814        if test "x$has_space" != x; then
17815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17817        fi
17818        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17819      fi
17820    fi
17821
17822    # Now join together the path and the arguments once again
17823    if test "x$arguments" != xEOL; then
17824      new_complete="$new_path ${arguments% *}"
17825    else
17826      new_complete="$new_path"
17827    fi
17828
17829    if test "x$complete" != "x$new_complete"; then
17830      FOUND_MAKE="$new_complete"
17831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17832$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17833    fi
17834  fi
17835
17836        fi
17837      fi
17838    fi
17839  fi
17840
17841    fi
17842
17843    if test "x$FOUND_MAKE" = x; then
17844      if test "x$TOOLCHAIN_PATH" != x; then
17845        # We have a toolchain path, check that as well before giving up.
17846        OLD_PATH=$PATH
17847        PATH=$TOOLCHAIN_PATH:$PATH
17848        for ac_prog in gmake
17849do
17850  # Extract the first word of "$ac_prog", so it can be a program name with args.
17851set dummy $ac_prog; ac_word=$2
17852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17853$as_echo_n "checking for $ac_word... " >&6; }
17854if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17855  $as_echo_n "(cached) " >&6
17856else
17857  case $CHECK_TOOLSDIR_GMAKE in
17858  [\\/]* | ?:[\\/]*)
17859  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17860  ;;
17861  *)
17862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17863for as_dir in $PATH
17864do
17865  IFS=$as_save_IFS
17866  test -z "$as_dir" && as_dir=.
17867    for ac_exec_ext in '' $ac_executable_extensions; do
17868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17869    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17871    break 2
17872  fi
17873done
17874  done
17875IFS=$as_save_IFS
17876
17877  ;;
17878esac
17879fi
17880CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17881if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17883$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17884else
17885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17886$as_echo "no" >&6; }
17887fi
17888
17889
17890  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17891done
17892
17893
17894  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17895  DESCRIPTION="gmake in tools-dir"
17896
17897  # On Cygwin, we require a newer version of make than on other platforms
17898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17899    MAKE_VERSION_EXPR="-e 4\."
17900    MAKE_REQUIRED_VERSION="4.0"
17901   else
17902    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17903    MAKE_REQUIRED_VERSION="3.81"
17904  fi
17905
17906  if test "x$MAKE_CANDIDATE" != x; then
17907    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17908$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17909    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17910    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17911    if test "x$IS_GNU_MAKE" = x; then
17912      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17913$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17914    else
17915      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17916      if test "x$IS_MODERN_MAKE" = x; then
17917        { $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
17918$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;}
17919      else
17920        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17921          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922            MAKE_EXPECTED_ENV='cygwin'
17923          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17924            MAKE_EXPECTED_ENV='msys'
17925          else
17926            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17927          fi
17928          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17929          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17930        else
17931          # Not relevant for non-Windows
17932          IS_MAKE_CORRECT_ENV=true
17933        fi
17934        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17935          { $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
17936$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;}
17937        else
17938          FOUND_MAKE=$MAKE_CANDIDATE
17939
17940  # Only process if variable expands to non-empty
17941
17942  if test "x$FOUND_MAKE" != x; then
17943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17944
17945  # First separate the path from the arguments. This will split at the first
17946  # space.
17947  complete="$FOUND_MAKE"
17948  path="${complete%% *}"
17949  tmp="$complete EOL"
17950  arguments="${tmp#* }"
17951
17952  # Input might be given as Windows format, start by converting to
17953  # unix format.
17954  new_path=`$CYGPATH -u "$path"`
17955
17956  # Now try to locate executable using which
17957  new_path=`$WHICH "$new_path" 2> /dev/null`
17958  # bat and cmd files are not always considered executable in cygwin causing which
17959  # to not find them
17960  if test "x$new_path" = x \
17961      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17962      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17963    new_path=`$CYGPATH -u "$path"`
17964  fi
17965  if test "x$new_path" = x; then
17966    # Oops. Which didn't find the executable.
17967    # The splitting of arguments from the executable at a space might have been incorrect,
17968    # since paths with space are more likely in Windows. Give it another try with the whole
17969    # argument.
17970    path="$complete"
17971    arguments="EOL"
17972    new_path=`$CYGPATH -u "$path"`
17973    new_path=`$WHICH "$new_path" 2> /dev/null`
17974    # bat and cmd files are not always considered executable in cygwin causing which
17975    # to not find them
17976    if test "x$new_path" = x \
17977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17979      new_path=`$CYGPATH -u "$path"`
17980    fi
17981    if test "x$new_path" = x; then
17982      # It's still not found. Now this is an unrecoverable error.
17983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17984$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17985      has_space=`$ECHO "$complete" | $GREP " "`
17986      if test "x$has_space" != x; then
17987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17989      fi
17990      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17991    fi
17992  fi
17993
17994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17997  # "foo.exe" is OK but "foo" is an error.
17998  #
17999  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18000  # It is also a way to make sure we got the proper file name for the real test later on.
18001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18002  if test "x$test_shortpath" = x; then
18003    # Short path failed, file does not exist as specified.
18004    # Try adding .exe or .cmd
18005    if test -f "${new_path}.exe"; then
18006      input_to_shortpath="${new_path}.exe"
18007    elif test -f "${new_path}.cmd"; then
18008      input_to_shortpath="${new_path}.cmd"
18009    else
18010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18011$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18012      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18013$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18014      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18015    fi
18016  else
18017    input_to_shortpath="$new_path"
18018  fi
18019
18020  # Call helper function which possibly converts this using DOS-style short mode.
18021  # If so, the updated path is stored in $new_path.
18022  new_path="$input_to_shortpath"
18023
18024  input_path="$input_to_shortpath"
18025  # Check if we need to convert this using DOS-style short mode. If the path
18026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18027  # take no chances and rewrite it.
18028  # Note: m4 eats our [], so we need to use [ and ] instead.
18029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18030  if test "x$has_forbidden_chars" != x; then
18031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18035      # Going to short mode and back again did indeed matter. Since short mode is
18036      # case insensitive, let's make it lowercase to improve readability.
18037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18038      # Now convert it back to Unix-style (cygpath)
18039      input_path=`$CYGPATH -u "$shortmode_path"`
18040      new_path="$input_path"
18041    fi
18042  fi
18043
18044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18045  if test "x$test_cygdrive_prefix" = x; then
18046    # As a simple fix, exclude /usr/bin since it's not a real path.
18047    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18049      # a path prefixed by /cygdrive for fixpath to work.
18050      new_path="$CYGWIN_ROOT_PATH$input_path"
18051    fi
18052  fi
18053
18054  # remove trailing .exe if any
18055  new_path="${new_path/%.exe/}"
18056
18057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18058
18059  # First separate the path from the arguments. This will split at the first
18060  # space.
18061  complete="$FOUND_MAKE"
18062  path="${complete%% *}"
18063  tmp="$complete EOL"
18064  arguments="${tmp#* }"
18065
18066  # Input might be given as Windows format, start by converting to
18067  # unix format.
18068  new_path="$path"
18069
18070  windows_path="$new_path"
18071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18072    unix_path=`$CYGPATH -u "$windows_path"`
18073    new_path="$unix_path"
18074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18076    new_path="$unix_path"
18077  fi
18078
18079
18080  # Now try to locate executable using which
18081  new_path=`$WHICH "$new_path" 2> /dev/null`
18082
18083  if test "x$new_path" = x; then
18084    # Oops. Which didn't find the executable.
18085    # The splitting of arguments from the executable at a space might have been incorrect,
18086    # since paths with space are more likely in Windows. Give it another try with the whole
18087    # argument.
18088    path="$complete"
18089    arguments="EOL"
18090    new_path="$path"
18091
18092  windows_path="$new_path"
18093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18094    unix_path=`$CYGPATH -u "$windows_path"`
18095    new_path="$unix_path"
18096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18098    new_path="$unix_path"
18099  fi
18100
18101
18102    new_path=`$WHICH "$new_path" 2> /dev/null`
18103    # bat and cmd files are not always considered executable in MSYS causing which
18104    # to not find them
18105    if test "x$new_path" = x \
18106        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18107        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18108      new_path="$path"
18109
18110  windows_path="$new_path"
18111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18112    unix_path=`$CYGPATH -u "$windows_path"`
18113    new_path="$unix_path"
18114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18116    new_path="$unix_path"
18117  fi
18118
18119    fi
18120
18121    if test "x$new_path" = x; then
18122      # It's still not found. Now this is an unrecoverable error.
18123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18124$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18125      has_space=`$ECHO "$complete" | $GREP " "`
18126      if test "x$has_space" != x; then
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18128$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18129      fi
18130      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18131    fi
18132  fi
18133
18134  # Now new_path has a complete unix path to the binary
18135  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18136    # Keep paths in /bin as-is, but remove trailing .exe if any
18137    new_path="${new_path/%.exe/}"
18138    # Do not save /bin paths to all_fixpath_prefixes!
18139  else
18140    # Not in mixed or Windows style, start by that.
18141    new_path=`cmd //c echo $new_path`
18142
18143  input_path="$new_path"
18144  # Check if we need to convert this using DOS-style short mode. If the path
18145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18146  # take no chances and rewrite it.
18147  # Note: m4 eats our [], so we need to use [ and ] instead.
18148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18149  if test "x$has_forbidden_chars" != x; then
18150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18152  fi
18153
18154    # Output is in $new_path
18155
18156  windows_path="$new_path"
18157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18158    unix_path=`$CYGPATH -u "$windows_path"`
18159    new_path="$unix_path"
18160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18162    new_path="$unix_path"
18163  fi
18164
18165    # remove trailing .exe if any
18166    new_path="${new_path/%.exe/}"
18167
18168    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18169    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18170  fi
18171
18172    else
18173      # We're on a unix platform. Hooray! :)
18174      # First separate the path from the arguments. This will split at the first
18175      # space.
18176      complete="$FOUND_MAKE"
18177      path="${complete%% *}"
18178      tmp="$complete EOL"
18179      arguments="${tmp#* }"
18180
18181      # Cannot rely on the command "which" here since it doesn't always work.
18182      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18183      if test -z "$is_absolute_path"; then
18184        # Path to executable is not absolute. Find it.
18185        IFS_save="$IFS"
18186        IFS=:
18187        for p in $PATH; do
18188          if test -f "$p/$path" && test -x "$p/$path"; then
18189            new_path="$p/$path"
18190            break
18191          fi
18192        done
18193        IFS="$IFS_save"
18194      else
18195        # This is an absolute path, we can use it without further modifications.
18196        new_path="$path"
18197      fi
18198
18199      if test "x$new_path" = x; then
18200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18202        has_space=`$ECHO "$complete" | $GREP " "`
18203        if test "x$has_space" != x; then
18204          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18205$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18206        fi
18207        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18208      fi
18209    fi
18210
18211    # Now join together the path and the arguments once again
18212    if test "x$arguments" != xEOL; then
18213      new_complete="$new_path ${arguments% *}"
18214    else
18215      new_complete="$new_path"
18216    fi
18217
18218    if test "x$complete" != "x$new_complete"; then
18219      FOUND_MAKE="$new_complete"
18220      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18221$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18222    fi
18223  fi
18224
18225        fi
18226      fi
18227    fi
18228  fi
18229
18230        if test "x$FOUND_MAKE" = x; then
18231          for ac_prog in make
18232do
18233  # Extract the first word of "$ac_prog", so it can be a program name with args.
18234set dummy $ac_prog; ac_word=$2
18235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18236$as_echo_n "checking for $ac_word... " >&6; }
18237if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18238  $as_echo_n "(cached) " >&6
18239else
18240  case $CHECK_TOOLSDIR_MAKE in
18241  [\\/]* | ?:[\\/]*)
18242  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18243  ;;
18244  *)
18245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18246for as_dir in $PATH
18247do
18248  IFS=$as_save_IFS
18249  test -z "$as_dir" && as_dir=.
18250    for ac_exec_ext in '' $ac_executable_extensions; do
18251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18252    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18254    break 2
18255  fi
18256done
18257  done
18258IFS=$as_save_IFS
18259
18260  ;;
18261esac
18262fi
18263CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18264if test -n "$CHECK_TOOLSDIR_MAKE"; then
18265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18266$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18267else
18268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18269$as_echo "no" >&6; }
18270fi
18271
18272
18273  test -n "$CHECK_TOOLSDIR_MAKE" && break
18274done
18275
18276
18277  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18278  DESCRIPTION="make in tools-dir"
18279
18280  # On Cygwin, we require a newer version of make than on other platforms
18281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18282    MAKE_VERSION_EXPR="-e 4\."
18283    MAKE_REQUIRED_VERSION="4.0"
18284   else
18285    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18286    MAKE_REQUIRED_VERSION="3.81"
18287  fi
18288
18289  if test "x$MAKE_CANDIDATE" != x; then
18290    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18291$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18292    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18293    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18294    if test "x$IS_GNU_MAKE" = x; then
18295      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18296$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18297    else
18298      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18299      if test "x$IS_MODERN_MAKE" = x; then
18300        { $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
18301$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;}
18302      else
18303        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18304          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18305            MAKE_EXPECTED_ENV='cygwin'
18306          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18307            MAKE_EXPECTED_ENV='msys'
18308          else
18309            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18310          fi
18311          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18312          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18313        else
18314          # Not relevant for non-Windows
18315          IS_MAKE_CORRECT_ENV=true
18316        fi
18317        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18318          { $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
18319$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;}
18320        else
18321          FOUND_MAKE=$MAKE_CANDIDATE
18322
18323  # Only process if variable expands to non-empty
18324
18325  if test "x$FOUND_MAKE" != x; then
18326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18327
18328  # First separate the path from the arguments. This will split at the first
18329  # space.
18330  complete="$FOUND_MAKE"
18331  path="${complete%% *}"
18332  tmp="$complete EOL"
18333  arguments="${tmp#* }"
18334
18335  # Input might be given as Windows format, start by converting to
18336  # unix format.
18337  new_path=`$CYGPATH -u "$path"`
18338
18339  # Now try to locate executable using which
18340  new_path=`$WHICH "$new_path" 2> /dev/null`
18341  # bat and cmd files are not always considered executable in cygwin causing which
18342  # to not find them
18343  if test "x$new_path" = x \
18344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18346    new_path=`$CYGPATH -u "$path"`
18347  fi
18348  if test "x$new_path" = x; then
18349    # Oops. Which didn't find the executable.
18350    # The splitting of arguments from the executable at a space might have been incorrect,
18351    # since paths with space are more likely in Windows. Give it another try with the whole
18352    # argument.
18353    path="$complete"
18354    arguments="EOL"
18355    new_path=`$CYGPATH -u "$path"`
18356    new_path=`$WHICH "$new_path" 2> /dev/null`
18357    # bat and cmd files are not always considered executable in cygwin causing which
18358    # to not find them
18359    if test "x$new_path" = x \
18360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18362      new_path=`$CYGPATH -u "$path"`
18363    fi
18364    if test "x$new_path" = x; then
18365      # It's still not found. Now this is an unrecoverable error.
18366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18368      has_space=`$ECHO "$complete" | $GREP " "`
18369      if test "x$has_space" != x; then
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18372      fi
18373      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18374    fi
18375  fi
18376
18377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18380  # "foo.exe" is OK but "foo" is an error.
18381  #
18382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18383  # It is also a way to make sure we got the proper file name for the real test later on.
18384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18385  if test "x$test_shortpath" = x; then
18386    # Short path failed, file does not exist as specified.
18387    # Try adding .exe or .cmd
18388    if test -f "${new_path}.exe"; then
18389      input_to_shortpath="${new_path}.exe"
18390    elif test -f "${new_path}.cmd"; then
18391      input_to_shortpath="${new_path}.cmd"
18392    else
18393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18394$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18398    fi
18399  else
18400    input_to_shortpath="$new_path"
18401  fi
18402
18403  # Call helper function which possibly converts this using DOS-style short mode.
18404  # If so, the updated path is stored in $new_path.
18405  new_path="$input_to_shortpath"
18406
18407  input_path="$input_to_shortpath"
18408  # Check if we need to convert this using DOS-style short mode. If the path
18409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18410  # take no chances and rewrite it.
18411  # Note: m4 eats our [], so we need to use [ and ] instead.
18412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18413  if test "x$has_forbidden_chars" != x; then
18414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18418      # Going to short mode and back again did indeed matter. Since short mode is
18419      # case insensitive, let's make it lowercase to improve readability.
18420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18421      # Now convert it back to Unix-style (cygpath)
18422      input_path=`$CYGPATH -u "$shortmode_path"`
18423      new_path="$input_path"
18424    fi
18425  fi
18426
18427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18428  if test "x$test_cygdrive_prefix" = x; then
18429    # As a simple fix, exclude /usr/bin since it's not a real path.
18430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18432      # a path prefixed by /cygdrive for fixpath to work.
18433      new_path="$CYGWIN_ROOT_PATH$input_path"
18434    fi
18435  fi
18436
18437  # remove trailing .exe if any
18438  new_path="${new_path/%.exe/}"
18439
18440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18441
18442  # First separate the path from the arguments. This will split at the first
18443  # space.
18444  complete="$FOUND_MAKE"
18445  path="${complete%% *}"
18446  tmp="$complete EOL"
18447  arguments="${tmp#* }"
18448
18449  # Input might be given as Windows format, start by converting to
18450  # unix format.
18451  new_path="$path"
18452
18453  windows_path="$new_path"
18454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18455    unix_path=`$CYGPATH -u "$windows_path"`
18456    new_path="$unix_path"
18457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18459    new_path="$unix_path"
18460  fi
18461
18462
18463  # Now try to locate executable using which
18464  new_path=`$WHICH "$new_path" 2> /dev/null`
18465
18466  if test "x$new_path" = x; then
18467    # Oops. Which didn't find the executable.
18468    # The splitting of arguments from the executable at a space might have been incorrect,
18469    # since paths with space are more likely in Windows. Give it another try with the whole
18470    # argument.
18471    path="$complete"
18472    arguments="EOL"
18473    new_path="$path"
18474
18475  windows_path="$new_path"
18476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18477    unix_path=`$CYGPATH -u "$windows_path"`
18478    new_path="$unix_path"
18479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18481    new_path="$unix_path"
18482  fi
18483
18484
18485    new_path=`$WHICH "$new_path" 2> /dev/null`
18486    # bat and cmd files are not always considered executable in MSYS causing which
18487    # to not find them
18488    if test "x$new_path" = x \
18489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18491      new_path="$path"
18492
18493  windows_path="$new_path"
18494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18495    unix_path=`$CYGPATH -u "$windows_path"`
18496    new_path="$unix_path"
18497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18499    new_path="$unix_path"
18500  fi
18501
18502    fi
18503
18504    if test "x$new_path" = x; then
18505      # It's still not found. Now this is an unrecoverable error.
18506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18508      has_space=`$ECHO "$complete" | $GREP " "`
18509      if test "x$has_space" != x; then
18510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18512      fi
18513      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18514    fi
18515  fi
18516
18517  # Now new_path has a complete unix path to the binary
18518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18519    # Keep paths in /bin as-is, but remove trailing .exe if any
18520    new_path="${new_path/%.exe/}"
18521    # Do not save /bin paths to all_fixpath_prefixes!
18522  else
18523    # Not in mixed or Windows style, start by that.
18524    new_path=`cmd //c echo $new_path`
18525
18526  input_path="$new_path"
18527  # Check if we need to convert this using DOS-style short mode. If the path
18528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18529  # take no chances and rewrite it.
18530  # Note: m4 eats our [], so we need to use [ and ] instead.
18531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18532  if test "x$has_forbidden_chars" != x; then
18533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18535  fi
18536
18537    # Output is in $new_path
18538
18539  windows_path="$new_path"
18540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18541    unix_path=`$CYGPATH -u "$windows_path"`
18542    new_path="$unix_path"
18543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18545    new_path="$unix_path"
18546  fi
18547
18548    # remove trailing .exe if any
18549    new_path="${new_path/%.exe/}"
18550
18551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18553  fi
18554
18555    else
18556      # We're on a unix platform. Hooray! :)
18557      # First separate the path from the arguments. This will split at the first
18558      # space.
18559      complete="$FOUND_MAKE"
18560      path="${complete%% *}"
18561      tmp="$complete EOL"
18562      arguments="${tmp#* }"
18563
18564      # Cannot rely on the command "which" here since it doesn't always work.
18565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18566      if test -z "$is_absolute_path"; then
18567        # Path to executable is not absolute. Find it.
18568        IFS_save="$IFS"
18569        IFS=:
18570        for p in $PATH; do
18571          if test -f "$p/$path" && test -x "$p/$path"; then
18572            new_path="$p/$path"
18573            break
18574          fi
18575        done
18576        IFS="$IFS_save"
18577      else
18578        # This is an absolute path, we can use it without further modifications.
18579        new_path="$path"
18580      fi
18581
18582      if test "x$new_path" = x; then
18583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18584$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18585        has_space=`$ECHO "$complete" | $GREP " "`
18586        if test "x$has_space" != x; then
18587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18589        fi
18590        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18591      fi
18592    fi
18593
18594    # Now join together the path and the arguments once again
18595    if test "x$arguments" != xEOL; then
18596      new_complete="$new_path ${arguments% *}"
18597    else
18598      new_complete="$new_path"
18599    fi
18600
18601    if test "x$complete" != "x$new_complete"; then
18602      FOUND_MAKE="$new_complete"
18603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18604$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18605    fi
18606  fi
18607
18608        fi
18609      fi
18610    fi
18611  fi
18612
18613        fi
18614        PATH=$OLD_PATH
18615      fi
18616    fi
18617
18618    if test "x$FOUND_MAKE" = x; then
18619      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
18620    fi
18621
18622  else
18623    # The variable is set, but is it from the command line or the environment?
18624
18625    # Try to remove the string !MAKE! from our list.
18626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18628      # If it failed, the variable was not from the command line. Ignore it,
18629      # but warn the user (except for BASH, which is always set by the calling BASH).
18630      if test "xMAKE" != xBASH; then
18631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18632$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18633      fi
18634      # Try to locate tool using the code snippet
18635
18636    # Try our hardest to locate a correct version of GNU make
18637    for ac_prog in gmake
18638do
18639  # Extract the first word of "$ac_prog", so it can be a program name with args.
18640set dummy $ac_prog; ac_word=$2
18641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18642$as_echo_n "checking for $ac_word... " >&6; }
18643if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18644  $as_echo_n "(cached) " >&6
18645else
18646  case $CHECK_GMAKE in
18647  [\\/]* | ?:[\\/]*)
18648  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18649  ;;
18650  *)
18651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18652for as_dir in $PATH
18653do
18654  IFS=$as_save_IFS
18655  test -z "$as_dir" && as_dir=.
18656    for ac_exec_ext in '' $ac_executable_extensions; do
18657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18658    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18660    break 2
18661  fi
18662done
18663  done
18664IFS=$as_save_IFS
18665
18666  ;;
18667esac
18668fi
18669CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18670if test -n "$CHECK_GMAKE"; then
18671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18672$as_echo "$CHECK_GMAKE" >&6; }
18673else
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18675$as_echo "no" >&6; }
18676fi
18677
18678
18679  test -n "$CHECK_GMAKE" && break
18680done
18681
18682
18683  MAKE_CANDIDATE=""$CHECK_GMAKE""
18684  DESCRIPTION="gmake in PATH"
18685
18686  # On Cygwin, we require a newer version of make than on other platforms
18687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18688    MAKE_VERSION_EXPR="-e 4\."
18689    MAKE_REQUIRED_VERSION="4.0"
18690   else
18691    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18692    MAKE_REQUIRED_VERSION="3.81"
18693  fi
18694
18695  if test "x$MAKE_CANDIDATE" != x; then
18696    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18697$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18698    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18699    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18700    if test "x$IS_GNU_MAKE" = x; then
18701      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18702$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18703    else
18704      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18705      if test "x$IS_MODERN_MAKE" = x; then
18706        { $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
18707$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;}
18708      else
18709        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18710          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18711            MAKE_EXPECTED_ENV='cygwin'
18712          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18713            MAKE_EXPECTED_ENV='msys'
18714          else
18715            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18716          fi
18717          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18718          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18719        else
18720          # Not relevant for non-Windows
18721          IS_MAKE_CORRECT_ENV=true
18722        fi
18723        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18724          { $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
18725$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;}
18726        else
18727          FOUND_MAKE=$MAKE_CANDIDATE
18728
18729  # Only process if variable expands to non-empty
18730
18731  if test "x$FOUND_MAKE" != x; then
18732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18733
18734  # First separate the path from the arguments. This will split at the first
18735  # space.
18736  complete="$FOUND_MAKE"
18737  path="${complete%% *}"
18738  tmp="$complete EOL"
18739  arguments="${tmp#* }"
18740
18741  # Input might be given as Windows format, start by converting to
18742  # unix format.
18743  new_path=`$CYGPATH -u "$path"`
18744
18745  # Now try to locate executable using which
18746  new_path=`$WHICH "$new_path" 2> /dev/null`
18747  # bat and cmd files are not always considered executable in cygwin causing which
18748  # to not find them
18749  if test "x$new_path" = x \
18750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18752    new_path=`$CYGPATH -u "$path"`
18753  fi
18754  if test "x$new_path" = x; then
18755    # Oops. Which didn't find the executable.
18756    # The splitting of arguments from the executable at a space might have been incorrect,
18757    # since paths with space are more likely in Windows. Give it another try with the whole
18758    # argument.
18759    path="$complete"
18760    arguments="EOL"
18761    new_path=`$CYGPATH -u "$path"`
18762    new_path=`$WHICH "$new_path" 2> /dev/null`
18763    # bat and cmd files are not always considered executable in cygwin causing which
18764    # to not find them
18765    if test "x$new_path" = x \
18766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18768      new_path=`$CYGPATH -u "$path"`
18769    fi
18770    if test "x$new_path" = x; then
18771      # It's still not found. Now this is an unrecoverable error.
18772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18773$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18774      has_space=`$ECHO "$complete" | $GREP " "`
18775      if test "x$has_space" != x; then
18776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18778      fi
18779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18780    fi
18781  fi
18782
18783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18786  # "foo.exe" is OK but "foo" is an error.
18787  #
18788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18789  # It is also a way to make sure we got the proper file name for the real test later on.
18790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18791  if test "x$test_shortpath" = x; then
18792    # Short path failed, file does not exist as specified.
18793    # Try adding .exe or .cmd
18794    if test -f "${new_path}.exe"; then
18795      input_to_shortpath="${new_path}.exe"
18796    elif test -f "${new_path}.cmd"; then
18797      input_to_shortpath="${new_path}.cmd"
18798    else
18799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18800$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18803      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18804    fi
18805  else
18806    input_to_shortpath="$new_path"
18807  fi
18808
18809  # Call helper function which possibly converts this using DOS-style short mode.
18810  # If so, the updated path is stored in $new_path.
18811  new_path="$input_to_shortpath"
18812
18813  input_path="$input_to_shortpath"
18814  # Check if we need to convert this using DOS-style short mode. If the path
18815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18816  # take no chances and rewrite it.
18817  # Note: m4 eats our [], so we need to use [ and ] instead.
18818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18819  if test "x$has_forbidden_chars" != x; then
18820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18824      # Going to short mode and back again did indeed matter. Since short mode is
18825      # case insensitive, let's make it lowercase to improve readability.
18826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18827      # Now convert it back to Unix-style (cygpath)
18828      input_path=`$CYGPATH -u "$shortmode_path"`
18829      new_path="$input_path"
18830    fi
18831  fi
18832
18833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18834  if test "x$test_cygdrive_prefix" = x; then
18835    # As a simple fix, exclude /usr/bin since it's not a real path.
18836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18838      # a path prefixed by /cygdrive for fixpath to work.
18839      new_path="$CYGWIN_ROOT_PATH$input_path"
18840    fi
18841  fi
18842
18843  # remove trailing .exe if any
18844  new_path="${new_path/%.exe/}"
18845
18846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847
18848  # First separate the path from the arguments. This will split at the first
18849  # space.
18850  complete="$FOUND_MAKE"
18851  path="${complete%% *}"
18852  tmp="$complete EOL"
18853  arguments="${tmp#* }"
18854
18855  # Input might be given as Windows format, start by converting to
18856  # unix format.
18857  new_path="$path"
18858
18859  windows_path="$new_path"
18860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18861    unix_path=`$CYGPATH -u "$windows_path"`
18862    new_path="$unix_path"
18863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18865    new_path="$unix_path"
18866  fi
18867
18868
18869  # Now try to locate executable using which
18870  new_path=`$WHICH "$new_path" 2> /dev/null`
18871
18872  if test "x$new_path" = x; then
18873    # Oops. Which didn't find the executable.
18874    # The splitting of arguments from the executable at a space might have been incorrect,
18875    # since paths with space are more likely in Windows. Give it another try with the whole
18876    # argument.
18877    path="$complete"
18878    arguments="EOL"
18879    new_path="$path"
18880
18881  windows_path="$new_path"
18882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18883    unix_path=`$CYGPATH -u "$windows_path"`
18884    new_path="$unix_path"
18885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18887    new_path="$unix_path"
18888  fi
18889
18890
18891    new_path=`$WHICH "$new_path" 2> /dev/null`
18892    # bat and cmd files are not always considered executable in MSYS causing which
18893    # to not find them
18894    if test "x$new_path" = x \
18895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18897      new_path="$path"
18898
18899  windows_path="$new_path"
18900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18901    unix_path=`$CYGPATH -u "$windows_path"`
18902    new_path="$unix_path"
18903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18905    new_path="$unix_path"
18906  fi
18907
18908    fi
18909
18910    if test "x$new_path" = x; then
18911      # It's still not found. Now this is an unrecoverable error.
18912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18913$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18914      has_space=`$ECHO "$complete" | $GREP " "`
18915      if test "x$has_space" != x; then
18916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18918      fi
18919      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18920    fi
18921  fi
18922
18923  # Now new_path has a complete unix path to the binary
18924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18925    # Keep paths in /bin as-is, but remove trailing .exe if any
18926    new_path="${new_path/%.exe/}"
18927    # Do not save /bin paths to all_fixpath_prefixes!
18928  else
18929    # Not in mixed or Windows style, start by that.
18930    new_path=`cmd //c echo $new_path`
18931
18932  input_path="$new_path"
18933  # Check if we need to convert this using DOS-style short mode. If the path
18934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18935  # take no chances and rewrite it.
18936  # Note: m4 eats our [], so we need to use [ and ] instead.
18937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18938  if test "x$has_forbidden_chars" != x; then
18939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18941  fi
18942
18943    # Output is in $new_path
18944
18945  windows_path="$new_path"
18946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18947    unix_path=`$CYGPATH -u "$windows_path"`
18948    new_path="$unix_path"
18949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18951    new_path="$unix_path"
18952  fi
18953
18954    # remove trailing .exe if any
18955    new_path="${new_path/%.exe/}"
18956
18957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18959  fi
18960
18961    else
18962      # We're on a unix platform. Hooray! :)
18963      # First separate the path from the arguments. This will split at the first
18964      # space.
18965      complete="$FOUND_MAKE"
18966      path="${complete%% *}"
18967      tmp="$complete EOL"
18968      arguments="${tmp#* }"
18969
18970      # Cannot rely on the command "which" here since it doesn't always work.
18971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18972      if test -z "$is_absolute_path"; then
18973        # Path to executable is not absolute. Find it.
18974        IFS_save="$IFS"
18975        IFS=:
18976        for p in $PATH; do
18977          if test -f "$p/$path" && test -x "$p/$path"; then
18978            new_path="$p/$path"
18979            break
18980          fi
18981        done
18982        IFS="$IFS_save"
18983      else
18984        # This is an absolute path, we can use it without further modifications.
18985        new_path="$path"
18986      fi
18987
18988      if test "x$new_path" = x; then
18989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18990$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18991        has_space=`$ECHO "$complete" | $GREP " "`
18992        if test "x$has_space" != x; then
18993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18995        fi
18996        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18997      fi
18998    fi
18999
19000    # Now join together the path and the arguments once again
19001    if test "x$arguments" != xEOL; then
19002      new_complete="$new_path ${arguments% *}"
19003    else
19004      new_complete="$new_path"
19005    fi
19006
19007    if test "x$complete" != "x$new_complete"; then
19008      FOUND_MAKE="$new_complete"
19009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19010$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19011    fi
19012  fi
19013
19014        fi
19015      fi
19016    fi
19017  fi
19018
19019
19020    if test "x$FOUND_MAKE" = x; then
19021      for ac_prog in make
19022do
19023  # Extract the first word of "$ac_prog", so it can be a program name with args.
19024set dummy $ac_prog; ac_word=$2
19025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19026$as_echo_n "checking for $ac_word... " >&6; }
19027if ${ac_cv_path_CHECK_MAKE+:} false; then :
19028  $as_echo_n "(cached) " >&6
19029else
19030  case $CHECK_MAKE in
19031  [\\/]* | ?:[\\/]*)
19032  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19033  ;;
19034  *)
19035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19036for as_dir in $PATH
19037do
19038  IFS=$as_save_IFS
19039  test -z "$as_dir" && as_dir=.
19040    for ac_exec_ext in '' $ac_executable_extensions; do
19041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19042    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19044    break 2
19045  fi
19046done
19047  done
19048IFS=$as_save_IFS
19049
19050  ;;
19051esac
19052fi
19053CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19054if test -n "$CHECK_MAKE"; then
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19056$as_echo "$CHECK_MAKE" >&6; }
19057else
19058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19059$as_echo "no" >&6; }
19060fi
19061
19062
19063  test -n "$CHECK_MAKE" && break
19064done
19065
19066
19067  MAKE_CANDIDATE=""$CHECK_MAKE""
19068  DESCRIPTION="make in PATH"
19069
19070  # On Cygwin, we require a newer version of make than on other platforms
19071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19072    MAKE_VERSION_EXPR="-e 4\."
19073    MAKE_REQUIRED_VERSION="4.0"
19074   else
19075    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19076    MAKE_REQUIRED_VERSION="3.81"
19077  fi
19078
19079  if test "x$MAKE_CANDIDATE" != x; then
19080    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19081$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19082    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19083    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19084    if test "x$IS_GNU_MAKE" = x; then
19085      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19086$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19087    else
19088      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19089      if test "x$IS_MODERN_MAKE" = x; then
19090        { $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
19091$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;}
19092      else
19093        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19094          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19095            MAKE_EXPECTED_ENV='cygwin'
19096          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19097            MAKE_EXPECTED_ENV='msys'
19098          else
19099            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19100          fi
19101          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19102          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19103        else
19104          # Not relevant for non-Windows
19105          IS_MAKE_CORRECT_ENV=true
19106        fi
19107        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19108          { $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
19109$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;}
19110        else
19111          FOUND_MAKE=$MAKE_CANDIDATE
19112
19113  # Only process if variable expands to non-empty
19114
19115  if test "x$FOUND_MAKE" != x; then
19116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19117
19118  # First separate the path from the arguments. This will split at the first
19119  # space.
19120  complete="$FOUND_MAKE"
19121  path="${complete%% *}"
19122  tmp="$complete EOL"
19123  arguments="${tmp#* }"
19124
19125  # Input might be given as Windows format, start by converting to
19126  # unix format.
19127  new_path=`$CYGPATH -u "$path"`
19128
19129  # Now try to locate executable using which
19130  new_path=`$WHICH "$new_path" 2> /dev/null`
19131  # bat and cmd files are not always considered executable in cygwin causing which
19132  # to not find them
19133  if test "x$new_path" = x \
19134      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19135      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19136    new_path=`$CYGPATH -u "$path"`
19137  fi
19138  if test "x$new_path" = x; then
19139    # Oops. Which didn't find the executable.
19140    # The splitting of arguments from the executable at a space might have been incorrect,
19141    # since paths with space are more likely in Windows. Give it another try with the whole
19142    # argument.
19143    path="$complete"
19144    arguments="EOL"
19145    new_path=`$CYGPATH -u "$path"`
19146    new_path=`$WHICH "$new_path" 2> /dev/null`
19147    # bat and cmd files are not always considered executable in cygwin causing which
19148    # to not find them
19149    if test "x$new_path" = x \
19150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19152      new_path=`$CYGPATH -u "$path"`
19153    fi
19154    if test "x$new_path" = x; then
19155      # It's still not found. Now this is an unrecoverable error.
19156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19157$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19158      has_space=`$ECHO "$complete" | $GREP " "`
19159      if test "x$has_space" != x; then
19160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19162      fi
19163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19164    fi
19165  fi
19166
19167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19170  # "foo.exe" is OK but "foo" is an error.
19171  #
19172  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19173  # It is also a way to make sure we got the proper file name for the real test later on.
19174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19175  if test "x$test_shortpath" = x; then
19176    # Short path failed, file does not exist as specified.
19177    # Try adding .exe or .cmd
19178    if test -f "${new_path}.exe"; then
19179      input_to_shortpath="${new_path}.exe"
19180    elif test -f "${new_path}.cmd"; then
19181      input_to_shortpath="${new_path}.cmd"
19182    else
19183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19184$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19187      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19188    fi
19189  else
19190    input_to_shortpath="$new_path"
19191  fi
19192
19193  # Call helper function which possibly converts this using DOS-style short mode.
19194  # If so, the updated path is stored in $new_path.
19195  new_path="$input_to_shortpath"
19196
19197  input_path="$input_to_shortpath"
19198  # Check if we need to convert this using DOS-style short mode. If the path
19199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19200  # take no chances and rewrite it.
19201  # Note: m4 eats our [], so we need to use [ and ] instead.
19202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19203  if test "x$has_forbidden_chars" != x; then
19204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19208      # Going to short mode and back again did indeed matter. Since short mode is
19209      # case insensitive, let's make it lowercase to improve readability.
19210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19211      # Now convert it back to Unix-style (cygpath)
19212      input_path=`$CYGPATH -u "$shortmode_path"`
19213      new_path="$input_path"
19214    fi
19215  fi
19216
19217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19218  if test "x$test_cygdrive_prefix" = x; then
19219    # As a simple fix, exclude /usr/bin since it's not a real path.
19220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19222      # a path prefixed by /cygdrive for fixpath to work.
19223      new_path="$CYGWIN_ROOT_PATH$input_path"
19224    fi
19225  fi
19226
19227  # remove trailing .exe if any
19228  new_path="${new_path/%.exe/}"
19229
19230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19231
19232  # First separate the path from the arguments. This will split at the first
19233  # space.
19234  complete="$FOUND_MAKE"
19235  path="${complete%% *}"
19236  tmp="$complete EOL"
19237  arguments="${tmp#* }"
19238
19239  # Input might be given as Windows format, start by converting to
19240  # unix format.
19241  new_path="$path"
19242
19243  windows_path="$new_path"
19244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19245    unix_path=`$CYGPATH -u "$windows_path"`
19246    new_path="$unix_path"
19247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19249    new_path="$unix_path"
19250  fi
19251
19252
19253  # Now try to locate executable using which
19254  new_path=`$WHICH "$new_path" 2> /dev/null`
19255
19256  if test "x$new_path" = x; then
19257    # Oops. Which didn't find the executable.
19258    # The splitting of arguments from the executable at a space might have been incorrect,
19259    # since paths with space are more likely in Windows. Give it another try with the whole
19260    # argument.
19261    path="$complete"
19262    arguments="EOL"
19263    new_path="$path"
19264
19265  windows_path="$new_path"
19266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19267    unix_path=`$CYGPATH -u "$windows_path"`
19268    new_path="$unix_path"
19269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19271    new_path="$unix_path"
19272  fi
19273
19274
19275    new_path=`$WHICH "$new_path" 2> /dev/null`
19276    # bat and cmd files are not always considered executable in MSYS causing which
19277    # to not find them
19278    if test "x$new_path" = x \
19279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19281      new_path="$path"
19282
19283  windows_path="$new_path"
19284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19285    unix_path=`$CYGPATH -u "$windows_path"`
19286    new_path="$unix_path"
19287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19289    new_path="$unix_path"
19290  fi
19291
19292    fi
19293
19294    if test "x$new_path" = x; then
19295      # It's still not found. Now this is an unrecoverable error.
19296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19297$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19298      has_space=`$ECHO "$complete" | $GREP " "`
19299      if test "x$has_space" != x; then
19300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19302      fi
19303      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19304    fi
19305  fi
19306
19307  # Now new_path has a complete unix path to the binary
19308  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19309    # Keep paths in /bin as-is, but remove trailing .exe if any
19310    new_path="${new_path/%.exe/}"
19311    # Do not save /bin paths to all_fixpath_prefixes!
19312  else
19313    # Not in mixed or Windows style, start by that.
19314    new_path=`cmd //c echo $new_path`
19315
19316  input_path="$new_path"
19317  # Check if we need to convert this using DOS-style short mode. If the path
19318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19319  # take no chances and rewrite it.
19320  # Note: m4 eats our [], so we need to use [ and ] instead.
19321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19322  if test "x$has_forbidden_chars" != x; then
19323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19325  fi
19326
19327    # Output is in $new_path
19328
19329  windows_path="$new_path"
19330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19331    unix_path=`$CYGPATH -u "$windows_path"`
19332    new_path="$unix_path"
19333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19335    new_path="$unix_path"
19336  fi
19337
19338    # remove trailing .exe if any
19339    new_path="${new_path/%.exe/}"
19340
19341    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19342    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19343  fi
19344
19345    else
19346      # We're on a unix platform. Hooray! :)
19347      # First separate the path from the arguments. This will split at the first
19348      # space.
19349      complete="$FOUND_MAKE"
19350      path="${complete%% *}"
19351      tmp="$complete EOL"
19352      arguments="${tmp#* }"
19353
19354      # Cannot rely on the command "which" here since it doesn't always work.
19355      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19356      if test -z "$is_absolute_path"; then
19357        # Path to executable is not absolute. Find it.
19358        IFS_save="$IFS"
19359        IFS=:
19360        for p in $PATH; do
19361          if test -f "$p/$path" && test -x "$p/$path"; then
19362            new_path="$p/$path"
19363            break
19364          fi
19365        done
19366        IFS="$IFS_save"
19367      else
19368        # This is an absolute path, we can use it without further modifications.
19369        new_path="$path"
19370      fi
19371
19372      if test "x$new_path" = x; then
19373        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19375        has_space=`$ECHO "$complete" | $GREP " "`
19376        if test "x$has_space" != x; then
19377          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19378$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19379        fi
19380        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19381      fi
19382    fi
19383
19384    # Now join together the path and the arguments once again
19385    if test "x$arguments" != xEOL; then
19386      new_complete="$new_path ${arguments% *}"
19387    else
19388      new_complete="$new_path"
19389    fi
19390
19391    if test "x$complete" != "x$new_complete"; then
19392      FOUND_MAKE="$new_complete"
19393      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19394$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19395    fi
19396  fi
19397
19398        fi
19399      fi
19400    fi
19401  fi
19402
19403    fi
19404
19405    if test "x$FOUND_MAKE" = x; then
19406      if test "x$TOOLCHAIN_PATH" != x; then
19407        # We have a toolchain path, check that as well before giving up.
19408        OLD_PATH=$PATH
19409        PATH=$TOOLCHAIN_PATH:$PATH
19410        for ac_prog in gmake
19411do
19412  # Extract the first word of "$ac_prog", so it can be a program name with args.
19413set dummy $ac_prog; ac_word=$2
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19415$as_echo_n "checking for $ac_word... " >&6; }
19416if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19417  $as_echo_n "(cached) " >&6
19418else
19419  case $CHECK_TOOLSDIR_GMAKE in
19420  [\\/]* | ?:[\\/]*)
19421  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19422  ;;
19423  *)
19424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19425for as_dir in $PATH
19426do
19427  IFS=$as_save_IFS
19428  test -z "$as_dir" && as_dir=.
19429    for ac_exec_ext in '' $ac_executable_extensions; do
19430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19431    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19433    break 2
19434  fi
19435done
19436  done
19437IFS=$as_save_IFS
19438
19439  ;;
19440esac
19441fi
19442CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19443if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19445$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19446else
19447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19448$as_echo "no" >&6; }
19449fi
19450
19451
19452  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19453done
19454
19455
19456  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19457  DESCRIPTION="gmake in tools-dir"
19458
19459  # On Cygwin, we require a newer version of make than on other platforms
19460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19461    MAKE_VERSION_EXPR="-e 4\."
19462    MAKE_REQUIRED_VERSION="4.0"
19463   else
19464    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19465    MAKE_REQUIRED_VERSION="3.81"
19466  fi
19467
19468  if test "x$MAKE_CANDIDATE" != x; then
19469    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19470$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19471    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19472    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19473    if test "x$IS_GNU_MAKE" = x; then
19474      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19475$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19476    else
19477      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19478      if test "x$IS_MODERN_MAKE" = x; then
19479        { $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
19480$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;}
19481      else
19482        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19483          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19484            MAKE_EXPECTED_ENV='cygwin'
19485          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19486            MAKE_EXPECTED_ENV='msys'
19487          else
19488            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19489          fi
19490          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19491          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19492        else
19493          # Not relevant for non-Windows
19494          IS_MAKE_CORRECT_ENV=true
19495        fi
19496        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19497          { $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
19498$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;}
19499        else
19500          FOUND_MAKE=$MAKE_CANDIDATE
19501
19502  # Only process if variable expands to non-empty
19503
19504  if test "x$FOUND_MAKE" != x; then
19505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506
19507  # First separate the path from the arguments. This will split at the first
19508  # space.
19509  complete="$FOUND_MAKE"
19510  path="${complete%% *}"
19511  tmp="$complete EOL"
19512  arguments="${tmp#* }"
19513
19514  # Input might be given as Windows format, start by converting to
19515  # unix format.
19516  new_path=`$CYGPATH -u "$path"`
19517
19518  # Now try to locate executable using which
19519  new_path=`$WHICH "$new_path" 2> /dev/null`
19520  # bat and cmd files are not always considered executable in cygwin causing which
19521  # to not find them
19522  if test "x$new_path" = x \
19523      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19524      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19525    new_path=`$CYGPATH -u "$path"`
19526  fi
19527  if test "x$new_path" = x; then
19528    # Oops. Which didn't find the executable.
19529    # The splitting of arguments from the executable at a space might have been incorrect,
19530    # since paths with space are more likely in Windows. Give it another try with the whole
19531    # argument.
19532    path="$complete"
19533    arguments="EOL"
19534    new_path=`$CYGPATH -u "$path"`
19535    new_path=`$WHICH "$new_path" 2> /dev/null`
19536    # bat and cmd files are not always considered executable in cygwin causing which
19537    # to not find them
19538    if test "x$new_path" = x \
19539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19541      new_path=`$CYGPATH -u "$path"`
19542    fi
19543    if test "x$new_path" = x; then
19544      # It's still not found. Now this is an unrecoverable error.
19545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19547      has_space=`$ECHO "$complete" | $GREP " "`
19548      if test "x$has_space" != x; then
19549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19551      fi
19552      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19553    fi
19554  fi
19555
19556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19559  # "foo.exe" is OK but "foo" is an error.
19560  #
19561  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19562  # It is also a way to make sure we got the proper file name for the real test later on.
19563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19564  if test "x$test_shortpath" = x; then
19565    # Short path failed, file does not exist as specified.
19566    # Try adding .exe or .cmd
19567    if test -f "${new_path}.exe"; then
19568      input_to_shortpath="${new_path}.exe"
19569    elif test -f "${new_path}.cmd"; then
19570      input_to_shortpath="${new_path}.cmd"
19571    else
19572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19576      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19577    fi
19578  else
19579    input_to_shortpath="$new_path"
19580  fi
19581
19582  # Call helper function which possibly converts this using DOS-style short mode.
19583  # If so, the updated path is stored in $new_path.
19584  new_path="$input_to_shortpath"
19585
19586  input_path="$input_to_shortpath"
19587  # Check if we need to convert this using DOS-style short mode. If the path
19588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19589  # take no chances and rewrite it.
19590  # Note: m4 eats our [], so we need to use [ and ] instead.
19591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19592  if test "x$has_forbidden_chars" != x; then
19593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19597      # Going to short mode and back again did indeed matter. Since short mode is
19598      # case insensitive, let's make it lowercase to improve readability.
19599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19600      # Now convert it back to Unix-style (cygpath)
19601      input_path=`$CYGPATH -u "$shortmode_path"`
19602      new_path="$input_path"
19603    fi
19604  fi
19605
19606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19607  if test "x$test_cygdrive_prefix" = x; then
19608    # As a simple fix, exclude /usr/bin since it's not a real path.
19609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19611      # a path prefixed by /cygdrive for fixpath to work.
19612      new_path="$CYGWIN_ROOT_PATH$input_path"
19613    fi
19614  fi
19615
19616  # remove trailing .exe if any
19617  new_path="${new_path/%.exe/}"
19618
19619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19620
19621  # First separate the path from the arguments. This will split at the first
19622  # space.
19623  complete="$FOUND_MAKE"
19624  path="${complete%% *}"
19625  tmp="$complete EOL"
19626  arguments="${tmp#* }"
19627
19628  # Input might be given as Windows format, start by converting to
19629  # unix format.
19630  new_path="$path"
19631
19632  windows_path="$new_path"
19633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19634    unix_path=`$CYGPATH -u "$windows_path"`
19635    new_path="$unix_path"
19636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19638    new_path="$unix_path"
19639  fi
19640
19641
19642  # Now try to locate executable using which
19643  new_path=`$WHICH "$new_path" 2> /dev/null`
19644
19645  if test "x$new_path" = x; then
19646    # Oops. Which didn't find the executable.
19647    # The splitting of arguments from the executable at a space might have been incorrect,
19648    # since paths with space are more likely in Windows. Give it another try with the whole
19649    # argument.
19650    path="$complete"
19651    arguments="EOL"
19652    new_path="$path"
19653
19654  windows_path="$new_path"
19655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19656    unix_path=`$CYGPATH -u "$windows_path"`
19657    new_path="$unix_path"
19658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19660    new_path="$unix_path"
19661  fi
19662
19663
19664    new_path=`$WHICH "$new_path" 2> /dev/null`
19665    # bat and cmd files are not always considered executable in MSYS causing which
19666    # to not find them
19667    if test "x$new_path" = x \
19668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19670      new_path="$path"
19671
19672  windows_path="$new_path"
19673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19674    unix_path=`$CYGPATH -u "$windows_path"`
19675    new_path="$unix_path"
19676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19678    new_path="$unix_path"
19679  fi
19680
19681    fi
19682
19683    if test "x$new_path" = x; then
19684      # It's still not found. Now this is an unrecoverable error.
19685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19687      has_space=`$ECHO "$complete" | $GREP " "`
19688      if test "x$has_space" != x; then
19689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19691      fi
19692      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19693    fi
19694  fi
19695
19696  # Now new_path has a complete unix path to the binary
19697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19698    # Keep paths in /bin as-is, but remove trailing .exe if any
19699    new_path="${new_path/%.exe/}"
19700    # Do not save /bin paths to all_fixpath_prefixes!
19701  else
19702    # Not in mixed or Windows style, start by that.
19703    new_path=`cmd //c echo $new_path`
19704
19705  input_path="$new_path"
19706  # Check if we need to convert this using DOS-style short mode. If the path
19707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19708  # take no chances and rewrite it.
19709  # Note: m4 eats our [], so we need to use [ and ] instead.
19710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19711  if test "x$has_forbidden_chars" != x; then
19712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19714  fi
19715
19716    # Output is in $new_path
19717
19718  windows_path="$new_path"
19719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19720    unix_path=`$CYGPATH -u "$windows_path"`
19721    new_path="$unix_path"
19722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19724    new_path="$unix_path"
19725  fi
19726
19727    # remove trailing .exe if any
19728    new_path="${new_path/%.exe/}"
19729
19730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19732  fi
19733
19734    else
19735      # We're on a unix platform. Hooray! :)
19736      # First separate the path from the arguments. This will split at the first
19737      # space.
19738      complete="$FOUND_MAKE"
19739      path="${complete%% *}"
19740      tmp="$complete EOL"
19741      arguments="${tmp#* }"
19742
19743      # Cannot rely on the command "which" here since it doesn't always work.
19744      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19745      if test -z "$is_absolute_path"; then
19746        # Path to executable is not absolute. Find it.
19747        IFS_save="$IFS"
19748        IFS=:
19749        for p in $PATH; do
19750          if test -f "$p/$path" && test -x "$p/$path"; then
19751            new_path="$p/$path"
19752            break
19753          fi
19754        done
19755        IFS="$IFS_save"
19756      else
19757        # This is an absolute path, we can use it without further modifications.
19758        new_path="$path"
19759      fi
19760
19761      if test "x$new_path" = x; then
19762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19764        has_space=`$ECHO "$complete" | $GREP " "`
19765        if test "x$has_space" != x; then
19766          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19768        fi
19769        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19770      fi
19771    fi
19772
19773    # Now join together the path and the arguments once again
19774    if test "x$arguments" != xEOL; then
19775      new_complete="$new_path ${arguments% *}"
19776    else
19777      new_complete="$new_path"
19778    fi
19779
19780    if test "x$complete" != "x$new_complete"; then
19781      FOUND_MAKE="$new_complete"
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19783$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19784    fi
19785  fi
19786
19787        fi
19788      fi
19789    fi
19790  fi
19791
19792        if test "x$FOUND_MAKE" = x; then
19793          for ac_prog in make
19794do
19795  # Extract the first word of "$ac_prog", so it can be a program name with args.
19796set dummy $ac_prog; ac_word=$2
19797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19798$as_echo_n "checking for $ac_word... " >&6; }
19799if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19800  $as_echo_n "(cached) " >&6
19801else
19802  case $CHECK_TOOLSDIR_MAKE in
19803  [\\/]* | ?:[\\/]*)
19804  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19805  ;;
19806  *)
19807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19808for as_dir in $PATH
19809do
19810  IFS=$as_save_IFS
19811  test -z "$as_dir" && as_dir=.
19812    for ac_exec_ext in '' $ac_executable_extensions; do
19813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19814    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19816    break 2
19817  fi
19818done
19819  done
19820IFS=$as_save_IFS
19821
19822  ;;
19823esac
19824fi
19825CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19826if test -n "$CHECK_TOOLSDIR_MAKE"; then
19827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19828$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19829else
19830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19831$as_echo "no" >&6; }
19832fi
19833
19834
19835  test -n "$CHECK_TOOLSDIR_MAKE" && break
19836done
19837
19838
19839  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19840  DESCRIPTION="make in tools-dir"
19841
19842  # On Cygwin, we require a newer version of make than on other platforms
19843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19844    MAKE_VERSION_EXPR="-e 4\."
19845    MAKE_REQUIRED_VERSION="4.0"
19846   else
19847    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19848    MAKE_REQUIRED_VERSION="3.81"
19849  fi
19850
19851  if test "x$MAKE_CANDIDATE" != x; then
19852    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19853$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19854    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19855    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19856    if test "x$IS_GNU_MAKE" = x; then
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19858$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19859    else
19860      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19861      if test "x$IS_MODERN_MAKE" = x; then
19862        { $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
19863$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;}
19864      else
19865        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19866          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19867            MAKE_EXPECTED_ENV='cygwin'
19868          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19869            MAKE_EXPECTED_ENV='msys'
19870          else
19871            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19872          fi
19873          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19874          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19875        else
19876          # Not relevant for non-Windows
19877          IS_MAKE_CORRECT_ENV=true
19878        fi
19879        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19880          { $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
19881$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;}
19882        else
19883          FOUND_MAKE=$MAKE_CANDIDATE
19884
19885  # Only process if variable expands to non-empty
19886
19887  if test "x$FOUND_MAKE" != x; then
19888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19889
19890  # First separate the path from the arguments. This will split at the first
19891  # space.
19892  complete="$FOUND_MAKE"
19893  path="${complete%% *}"
19894  tmp="$complete EOL"
19895  arguments="${tmp#* }"
19896
19897  # Input might be given as Windows format, start by converting to
19898  # unix format.
19899  new_path=`$CYGPATH -u "$path"`
19900
19901  # Now try to locate executable using which
19902  new_path=`$WHICH "$new_path" 2> /dev/null`
19903  # bat and cmd files are not always considered executable in cygwin causing which
19904  # to not find them
19905  if test "x$new_path" = x \
19906      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19907      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19908    new_path=`$CYGPATH -u "$path"`
19909  fi
19910  if test "x$new_path" = x; then
19911    # Oops. Which didn't find the executable.
19912    # The splitting of arguments from the executable at a space might have been incorrect,
19913    # since paths with space are more likely in Windows. Give it another try with the whole
19914    # argument.
19915    path="$complete"
19916    arguments="EOL"
19917    new_path=`$CYGPATH -u "$path"`
19918    new_path=`$WHICH "$new_path" 2> /dev/null`
19919    # bat and cmd files are not always considered executable in cygwin causing which
19920    # to not find them
19921    if test "x$new_path" = x \
19922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19924      new_path=`$CYGPATH -u "$path"`
19925    fi
19926    if test "x$new_path" = x; then
19927      # It's still not found. Now this is an unrecoverable error.
19928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19929$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19930      has_space=`$ECHO "$complete" | $GREP " "`
19931      if test "x$has_space" != x; then
19932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19934      fi
19935      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19936    fi
19937  fi
19938
19939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19942  # "foo.exe" is OK but "foo" is an error.
19943  #
19944  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19945  # It is also a way to make sure we got the proper file name for the real test later on.
19946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19947  if test "x$test_shortpath" = x; then
19948    # Short path failed, file does not exist as specified.
19949    # Try adding .exe or .cmd
19950    if test -f "${new_path}.exe"; then
19951      input_to_shortpath="${new_path}.exe"
19952    elif test -f "${new_path}.cmd"; then
19953      input_to_shortpath="${new_path}.cmd"
19954    else
19955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19957      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19959      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19960    fi
19961  else
19962    input_to_shortpath="$new_path"
19963  fi
19964
19965  # Call helper function which possibly converts this using DOS-style short mode.
19966  # If so, the updated path is stored in $new_path.
19967  new_path="$input_to_shortpath"
19968
19969  input_path="$input_to_shortpath"
19970  # Check if we need to convert this using DOS-style short mode. If the path
19971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19972  # take no chances and rewrite it.
19973  # Note: m4 eats our [], so we need to use [ and ] instead.
19974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19975  if test "x$has_forbidden_chars" != x; then
19976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19980      # Going to short mode and back again did indeed matter. Since short mode is
19981      # case insensitive, let's make it lowercase to improve readability.
19982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19983      # Now convert it back to Unix-style (cygpath)
19984      input_path=`$CYGPATH -u "$shortmode_path"`
19985      new_path="$input_path"
19986    fi
19987  fi
19988
19989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19990  if test "x$test_cygdrive_prefix" = x; then
19991    # As a simple fix, exclude /usr/bin since it's not a real path.
19992    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19994      # a path prefixed by /cygdrive for fixpath to work.
19995      new_path="$CYGWIN_ROOT_PATH$input_path"
19996    fi
19997  fi
19998
19999  # remove trailing .exe if any
20000  new_path="${new_path/%.exe/}"
20001
20002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20003
20004  # First separate the path from the arguments. This will split at the first
20005  # space.
20006  complete="$FOUND_MAKE"
20007  path="${complete%% *}"
20008  tmp="$complete EOL"
20009  arguments="${tmp#* }"
20010
20011  # Input might be given as Windows format, start by converting to
20012  # unix format.
20013  new_path="$path"
20014
20015  windows_path="$new_path"
20016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20017    unix_path=`$CYGPATH -u "$windows_path"`
20018    new_path="$unix_path"
20019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20021    new_path="$unix_path"
20022  fi
20023
20024
20025  # Now try to locate executable using which
20026  new_path=`$WHICH "$new_path" 2> /dev/null`
20027
20028  if test "x$new_path" = x; then
20029    # Oops. Which didn't find the executable.
20030    # The splitting of arguments from the executable at a space might have been incorrect,
20031    # since paths with space are more likely in Windows. Give it another try with the whole
20032    # argument.
20033    path="$complete"
20034    arguments="EOL"
20035    new_path="$path"
20036
20037  windows_path="$new_path"
20038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20039    unix_path=`$CYGPATH -u "$windows_path"`
20040    new_path="$unix_path"
20041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20043    new_path="$unix_path"
20044  fi
20045
20046
20047    new_path=`$WHICH "$new_path" 2> /dev/null`
20048    # bat and cmd files are not always considered executable in MSYS causing which
20049    # to not find them
20050    if test "x$new_path" = x \
20051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20053      new_path="$path"
20054
20055  windows_path="$new_path"
20056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20057    unix_path=`$CYGPATH -u "$windows_path"`
20058    new_path="$unix_path"
20059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20061    new_path="$unix_path"
20062  fi
20063
20064    fi
20065
20066    if test "x$new_path" = x; then
20067      # It's still not found. Now this is an unrecoverable error.
20068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20069$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20070      has_space=`$ECHO "$complete" | $GREP " "`
20071      if test "x$has_space" != x; then
20072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20074      fi
20075      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20076    fi
20077  fi
20078
20079  # Now new_path has a complete unix path to the binary
20080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20081    # Keep paths in /bin as-is, but remove trailing .exe if any
20082    new_path="${new_path/%.exe/}"
20083    # Do not save /bin paths to all_fixpath_prefixes!
20084  else
20085    # Not in mixed or Windows style, start by that.
20086    new_path=`cmd //c echo $new_path`
20087
20088  input_path="$new_path"
20089  # Check if we need to convert this using DOS-style short mode. If the path
20090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20091  # take no chances and rewrite it.
20092  # Note: m4 eats our [], so we need to use [ and ] instead.
20093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20094  if test "x$has_forbidden_chars" != x; then
20095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20097  fi
20098
20099    # Output is in $new_path
20100
20101  windows_path="$new_path"
20102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20103    unix_path=`$CYGPATH -u "$windows_path"`
20104    new_path="$unix_path"
20105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20107    new_path="$unix_path"
20108  fi
20109
20110    # remove trailing .exe if any
20111    new_path="${new_path/%.exe/}"
20112
20113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20115  fi
20116
20117    else
20118      # We're on a unix platform. Hooray! :)
20119      # First separate the path from the arguments. This will split at the first
20120      # space.
20121      complete="$FOUND_MAKE"
20122      path="${complete%% *}"
20123      tmp="$complete EOL"
20124      arguments="${tmp#* }"
20125
20126      # Cannot rely on the command "which" here since it doesn't always work.
20127      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20128      if test -z "$is_absolute_path"; then
20129        # Path to executable is not absolute. Find it.
20130        IFS_save="$IFS"
20131        IFS=:
20132        for p in $PATH; do
20133          if test -f "$p/$path" && test -x "$p/$path"; then
20134            new_path="$p/$path"
20135            break
20136          fi
20137        done
20138        IFS="$IFS_save"
20139      else
20140        # This is an absolute path, we can use it without further modifications.
20141        new_path="$path"
20142      fi
20143
20144      if test "x$new_path" = x; then
20145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20147        has_space=`$ECHO "$complete" | $GREP " "`
20148        if test "x$has_space" != x; then
20149          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20151        fi
20152        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20153      fi
20154    fi
20155
20156    # Now join together the path and the arguments once again
20157    if test "x$arguments" != xEOL; then
20158      new_complete="$new_path ${arguments% *}"
20159    else
20160      new_complete="$new_path"
20161    fi
20162
20163    if test "x$complete" != "x$new_complete"; then
20164      FOUND_MAKE="$new_complete"
20165      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20166$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20167    fi
20168  fi
20169
20170        fi
20171      fi
20172    fi
20173  fi
20174
20175        fi
20176        PATH=$OLD_PATH
20177      fi
20178    fi
20179
20180    if test "x$FOUND_MAKE" = x; then
20181      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
20182    fi
20183
20184    else
20185      # If it succeeded, then it was overridden by the user. We will use it
20186      # for the tool.
20187
20188      # First remove it from the list of overridden variables, so we can test
20189      # for unknown variables in the end.
20190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20191
20192      # Check if we try to supply an empty value
20193      if test "x$MAKE" = x; then
20194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20195$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20197$as_echo_n "checking for MAKE... " >&6; }
20198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20199$as_echo "disabled" >&6; }
20200      else
20201        # Check if the provided tool contains a complete path.
20202        tool_specified="$MAKE"
20203        tool_basename="${tool_specified##*/}"
20204        if test "x$tool_basename" = "x$tool_specified"; then
20205          # A command without a complete path is provided, search $PATH.
20206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20207$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20208          # Extract the first word of "$tool_basename", so it can be a program name with args.
20209set dummy $tool_basename; ac_word=$2
20210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20211$as_echo_n "checking for $ac_word... " >&6; }
20212if ${ac_cv_path_MAKE+:} false; then :
20213  $as_echo_n "(cached) " >&6
20214else
20215  case $MAKE in
20216  [\\/]* | ?:[\\/]*)
20217  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20218  ;;
20219  *)
20220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20221for as_dir in $PATH
20222do
20223  IFS=$as_save_IFS
20224  test -z "$as_dir" && as_dir=.
20225    for ac_exec_ext in '' $ac_executable_extensions; do
20226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20227    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20229    break 2
20230  fi
20231done
20232  done
20233IFS=$as_save_IFS
20234
20235  ;;
20236esac
20237fi
20238MAKE=$ac_cv_path_MAKE
20239if test -n "$MAKE"; then
20240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20241$as_echo "$MAKE" >&6; }
20242else
20243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20244$as_echo "no" >&6; }
20245fi
20246
20247
20248          if test "x$MAKE" = x; then
20249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20250          fi
20251        else
20252          # Otherwise we believe it is a complete path. Use it as it is.
20253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20254$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20256$as_echo_n "checking for MAKE... " >&6; }
20257          if test ! -x "$tool_specified"; then
20258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20259$as_echo "not found" >&6; }
20260            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20261          fi
20262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20263$as_echo "$tool_specified" >&6; }
20264        fi
20265      fi
20266    fi
20267
20268    # If MAKE was set by user, verify the version
20269
20270  MAKE_CANDIDATE=""$MAKE""
20271  DESCRIPTION="user supplied MAKE=$MAKE"
20272
20273  # On Cygwin, we require a newer version of make than on other platforms
20274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20275    MAKE_VERSION_EXPR="-e 4\."
20276    MAKE_REQUIRED_VERSION="4.0"
20277   else
20278    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20279    MAKE_REQUIRED_VERSION="3.81"
20280  fi
20281
20282  if test "x$MAKE_CANDIDATE" != x; then
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20284$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20285    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20286    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20287    if test "x$IS_GNU_MAKE" = x; then
20288      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20289$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20290    else
20291      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20292      if test "x$IS_MODERN_MAKE" = x; then
20293        { $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
20294$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;}
20295      else
20296        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20297          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20298            MAKE_EXPECTED_ENV='cygwin'
20299          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20300            MAKE_EXPECTED_ENV='msys'
20301          else
20302            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20303          fi
20304          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20305          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20306        else
20307          # Not relevant for non-Windows
20308          IS_MAKE_CORRECT_ENV=true
20309        fi
20310        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20311          { $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
20312$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;}
20313        else
20314          FOUND_MAKE=$MAKE_CANDIDATE
20315
20316  # Only process if variable expands to non-empty
20317
20318  if test "x$FOUND_MAKE" != x; then
20319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20320
20321  # First separate the path from the arguments. This will split at the first
20322  # space.
20323  complete="$FOUND_MAKE"
20324  path="${complete%% *}"
20325  tmp="$complete EOL"
20326  arguments="${tmp#* }"
20327
20328  # Input might be given as Windows format, start by converting to
20329  # unix format.
20330  new_path=`$CYGPATH -u "$path"`
20331
20332  # Now try to locate executable using which
20333  new_path=`$WHICH "$new_path" 2> /dev/null`
20334  # bat and cmd files are not always considered executable in cygwin causing which
20335  # to not find them
20336  if test "x$new_path" = x \
20337      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20338      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20339    new_path=`$CYGPATH -u "$path"`
20340  fi
20341  if test "x$new_path" = x; then
20342    # Oops. Which didn't find the executable.
20343    # The splitting of arguments from the executable at a space might have been incorrect,
20344    # since paths with space are more likely in Windows. Give it another try with the whole
20345    # argument.
20346    path="$complete"
20347    arguments="EOL"
20348    new_path=`$CYGPATH -u "$path"`
20349    new_path=`$WHICH "$new_path" 2> /dev/null`
20350    # bat and cmd files are not always considered executable in cygwin causing which
20351    # to not find them
20352    if test "x$new_path" = x \
20353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20355      new_path=`$CYGPATH -u "$path"`
20356    fi
20357    if test "x$new_path" = x; then
20358      # It's still not found. Now this is an unrecoverable error.
20359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20360$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20361      has_space=`$ECHO "$complete" | $GREP " "`
20362      if test "x$has_space" != x; then
20363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20365      fi
20366      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20367    fi
20368  fi
20369
20370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20373  # "foo.exe" is OK but "foo" is an error.
20374  #
20375  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20376  # It is also a way to make sure we got the proper file name for the real test later on.
20377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20378  if test "x$test_shortpath" = x; then
20379    # Short path failed, file does not exist as specified.
20380    # Try adding .exe or .cmd
20381    if test -f "${new_path}.exe"; then
20382      input_to_shortpath="${new_path}.exe"
20383    elif test -f "${new_path}.cmd"; then
20384      input_to_shortpath="${new_path}.cmd"
20385    else
20386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20390      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20391    fi
20392  else
20393    input_to_shortpath="$new_path"
20394  fi
20395
20396  # Call helper function which possibly converts this using DOS-style short mode.
20397  # If so, the updated path is stored in $new_path.
20398  new_path="$input_to_shortpath"
20399
20400  input_path="$input_to_shortpath"
20401  # Check if we need to convert this using DOS-style short mode. If the path
20402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20403  # take no chances and rewrite it.
20404  # Note: m4 eats our [], so we need to use [ and ] instead.
20405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20406  if test "x$has_forbidden_chars" != x; then
20407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20411      # Going to short mode and back again did indeed matter. Since short mode is
20412      # case insensitive, let's make it lowercase to improve readability.
20413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20414      # Now convert it back to Unix-style (cygpath)
20415      input_path=`$CYGPATH -u "$shortmode_path"`
20416      new_path="$input_path"
20417    fi
20418  fi
20419
20420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20421  if test "x$test_cygdrive_prefix" = x; then
20422    # As a simple fix, exclude /usr/bin since it's not a real path.
20423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20425      # a path prefixed by /cygdrive for fixpath to work.
20426      new_path="$CYGWIN_ROOT_PATH$input_path"
20427    fi
20428  fi
20429
20430  # remove trailing .exe if any
20431  new_path="${new_path/%.exe/}"
20432
20433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20434
20435  # First separate the path from the arguments. This will split at the first
20436  # space.
20437  complete="$FOUND_MAKE"
20438  path="${complete%% *}"
20439  tmp="$complete EOL"
20440  arguments="${tmp#* }"
20441
20442  # Input might be given as Windows format, start by converting to
20443  # unix format.
20444  new_path="$path"
20445
20446  windows_path="$new_path"
20447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20448    unix_path=`$CYGPATH -u "$windows_path"`
20449    new_path="$unix_path"
20450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20452    new_path="$unix_path"
20453  fi
20454
20455
20456  # Now try to locate executable using which
20457  new_path=`$WHICH "$new_path" 2> /dev/null`
20458
20459  if test "x$new_path" = x; then
20460    # Oops. Which didn't find the executable.
20461    # The splitting of arguments from the executable at a space might have been incorrect,
20462    # since paths with space are more likely in Windows. Give it another try with the whole
20463    # argument.
20464    path="$complete"
20465    arguments="EOL"
20466    new_path="$path"
20467
20468  windows_path="$new_path"
20469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20470    unix_path=`$CYGPATH -u "$windows_path"`
20471    new_path="$unix_path"
20472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20474    new_path="$unix_path"
20475  fi
20476
20477
20478    new_path=`$WHICH "$new_path" 2> /dev/null`
20479    # bat and cmd files are not always considered executable in MSYS causing which
20480    # to not find them
20481    if test "x$new_path" = x \
20482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20484      new_path="$path"
20485
20486  windows_path="$new_path"
20487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20488    unix_path=`$CYGPATH -u "$windows_path"`
20489    new_path="$unix_path"
20490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20492    new_path="$unix_path"
20493  fi
20494
20495    fi
20496
20497    if test "x$new_path" = x; then
20498      # It's still not found. Now this is an unrecoverable error.
20499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20500$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20501      has_space=`$ECHO "$complete" | $GREP " "`
20502      if test "x$has_space" != x; then
20503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20505      fi
20506      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20507    fi
20508  fi
20509
20510  # Now new_path has a complete unix path to the binary
20511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20512    # Keep paths in /bin as-is, but remove trailing .exe if any
20513    new_path="${new_path/%.exe/}"
20514    # Do not save /bin paths to all_fixpath_prefixes!
20515  else
20516    # Not in mixed or Windows style, start by that.
20517    new_path=`cmd //c echo $new_path`
20518
20519  input_path="$new_path"
20520  # Check if we need to convert this using DOS-style short mode. If the path
20521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20522  # take no chances and rewrite it.
20523  # Note: m4 eats our [], so we need to use [ and ] instead.
20524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20525  if test "x$has_forbidden_chars" != x; then
20526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20528  fi
20529
20530    # Output is in $new_path
20531
20532  windows_path="$new_path"
20533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20534    unix_path=`$CYGPATH -u "$windows_path"`
20535    new_path="$unix_path"
20536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20538    new_path="$unix_path"
20539  fi
20540
20541    # remove trailing .exe if any
20542    new_path="${new_path/%.exe/}"
20543
20544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20546  fi
20547
20548    else
20549      # We're on a unix platform. Hooray! :)
20550      # First separate the path from the arguments. This will split at the first
20551      # space.
20552      complete="$FOUND_MAKE"
20553      path="${complete%% *}"
20554      tmp="$complete EOL"
20555      arguments="${tmp#* }"
20556
20557      # Cannot rely on the command "which" here since it doesn't always work.
20558      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20559      if test -z "$is_absolute_path"; then
20560        # Path to executable is not absolute. Find it.
20561        IFS_save="$IFS"
20562        IFS=:
20563        for p in $PATH; do
20564          if test -f "$p/$path" && test -x "$p/$path"; then
20565            new_path="$p/$path"
20566            break
20567          fi
20568        done
20569        IFS="$IFS_save"
20570      else
20571        # This is an absolute path, we can use it without further modifications.
20572        new_path="$path"
20573      fi
20574
20575      if test "x$new_path" = x; then
20576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20577$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20578        has_space=`$ECHO "$complete" | $GREP " "`
20579        if test "x$has_space" != x; then
20580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20582        fi
20583        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20584      fi
20585    fi
20586
20587    # Now join together the path and the arguments once again
20588    if test "x$arguments" != xEOL; then
20589      new_complete="$new_path ${arguments% *}"
20590    else
20591      new_complete="$new_path"
20592    fi
20593
20594    if test "x$complete" != "x$new_complete"; then
20595      FOUND_MAKE="$new_complete"
20596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20597$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20598    fi
20599  fi
20600
20601        fi
20602      fi
20603    fi
20604  fi
20605
20606    if test "x$FOUND_MAKE" = x; then
20607      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20608    fi
20609
20610  fi
20611
20612
20613  MAKE=$FOUND_MAKE
20614
20615  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20616$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20617
20618
20619  # Check if make supports the output sync option and if so, setup using it.
20620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20621$as_echo_n "checking if make --output-sync is supported... " >&6; }
20622  if $MAKE --version -O > /dev/null 2>&1; then
20623    OUTPUT_SYNC_SUPPORTED=true
20624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20625$as_echo "yes" >&6; }
20626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20627$as_echo_n "checking for output-sync value... " >&6; }
20628
20629# Check whether --with-output-sync was given.
20630if test "${with_output_sync+set}" = set; then :
20631  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20632fi
20633
20634    if test "x$OUTPUT_SYNC" = "x"; then
20635      OUTPUT_SYNC=none
20636    fi
20637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20638$as_echo "$OUTPUT_SYNC" >&6; }
20639    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20640      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20641    fi
20642  else
20643    OUTPUT_SYNC_SUPPORTED=false
20644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20645$as_echo "no" >&6; }
20646  fi
20647
20648
20649
20650
20651
20652
20653  # Test if find supports -delete
20654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20655$as_echo_n "checking if find supports -delete... " >&6; }
20656  FIND_DELETE="-delete"
20657
20658  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20659
20660  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20661
20662  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20663  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20664    # No, it does not.
20665    rm $DELETEDIR/TestIfFindSupportsDelete
20666    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20667      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20668      FIND_DELETE="-print | xargs rm"
20669    else
20670      FIND_DELETE="-exec rm \{\} \+"
20671    fi
20672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20673$as_echo "no" >&6; }
20674  else
20675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20676$as_echo "yes" >&6; }
20677  fi
20678  rmdir $DELETEDIR
20679
20680
20681
20682  # These tools might not be installed by default,
20683  # need hint on how to install them.
20684
20685
20686
20687  # Publish this variable in the help.
20688
20689
20690  if [ -z "${UNZIP+x}" ]; then
20691    # The variable is not set by user, try to locate tool using the code snippet
20692    for ac_prog in unzip
20693do
20694  # Extract the first word of "$ac_prog", so it can be a program name with args.
20695set dummy $ac_prog; ac_word=$2
20696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20697$as_echo_n "checking for $ac_word... " >&6; }
20698if ${ac_cv_path_UNZIP+:} false; then :
20699  $as_echo_n "(cached) " >&6
20700else
20701  case $UNZIP in
20702  [\\/]* | ?:[\\/]*)
20703  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20704  ;;
20705  *)
20706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20707for as_dir in $PATH
20708do
20709  IFS=$as_save_IFS
20710  test -z "$as_dir" && as_dir=.
20711    for ac_exec_ext in '' $ac_executable_extensions; do
20712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20713    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20715    break 2
20716  fi
20717done
20718  done
20719IFS=$as_save_IFS
20720
20721  ;;
20722esac
20723fi
20724UNZIP=$ac_cv_path_UNZIP
20725if test -n "$UNZIP"; then
20726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20727$as_echo "$UNZIP" >&6; }
20728else
20729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20730$as_echo "no" >&6; }
20731fi
20732
20733
20734  test -n "$UNZIP" && break
20735done
20736
20737  else
20738    # The variable is set, but is it from the command line or the environment?
20739
20740    # Try to remove the string !UNZIP! from our list.
20741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20743      # If it failed, the variable was not from the command line. Ignore it,
20744      # but warn the user (except for BASH, which is always set by the calling BASH).
20745      if test "xUNZIP" != xBASH; then
20746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20747$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20748      fi
20749      # Try to locate tool using the code snippet
20750      for ac_prog in unzip
20751do
20752  # Extract the first word of "$ac_prog", so it can be a program name with args.
20753set dummy $ac_prog; ac_word=$2
20754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20755$as_echo_n "checking for $ac_word... " >&6; }
20756if ${ac_cv_path_UNZIP+:} false; then :
20757  $as_echo_n "(cached) " >&6
20758else
20759  case $UNZIP in
20760  [\\/]* | ?:[\\/]*)
20761  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20762  ;;
20763  *)
20764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20765for as_dir in $PATH
20766do
20767  IFS=$as_save_IFS
20768  test -z "$as_dir" && as_dir=.
20769    for ac_exec_ext in '' $ac_executable_extensions; do
20770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20771    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20773    break 2
20774  fi
20775done
20776  done
20777IFS=$as_save_IFS
20778
20779  ;;
20780esac
20781fi
20782UNZIP=$ac_cv_path_UNZIP
20783if test -n "$UNZIP"; then
20784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20785$as_echo "$UNZIP" >&6; }
20786else
20787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20788$as_echo "no" >&6; }
20789fi
20790
20791
20792  test -n "$UNZIP" && break
20793done
20794
20795    else
20796      # If it succeeded, then it was overridden by the user. We will use it
20797      # for the tool.
20798
20799      # First remove it from the list of overridden variables, so we can test
20800      # for unknown variables in the end.
20801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20802
20803      # Check if we try to supply an empty value
20804      if test "x$UNZIP" = x; then
20805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20806$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20808$as_echo_n "checking for UNZIP... " >&6; }
20809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20810$as_echo "disabled" >&6; }
20811      else
20812        # Check if the provided tool contains a complete path.
20813        tool_specified="$UNZIP"
20814        tool_basename="${tool_specified##*/}"
20815        if test "x$tool_basename" = "x$tool_specified"; then
20816          # A command without a complete path is provided, search $PATH.
20817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20818$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20819          # Extract the first word of "$tool_basename", so it can be a program name with args.
20820set dummy $tool_basename; ac_word=$2
20821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20822$as_echo_n "checking for $ac_word... " >&6; }
20823if ${ac_cv_path_UNZIP+:} false; then :
20824  $as_echo_n "(cached) " >&6
20825else
20826  case $UNZIP in
20827  [\\/]* | ?:[\\/]*)
20828  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20829  ;;
20830  *)
20831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20832for as_dir in $PATH
20833do
20834  IFS=$as_save_IFS
20835  test -z "$as_dir" && as_dir=.
20836    for ac_exec_ext in '' $ac_executable_extensions; do
20837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20838    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20840    break 2
20841  fi
20842done
20843  done
20844IFS=$as_save_IFS
20845
20846  ;;
20847esac
20848fi
20849UNZIP=$ac_cv_path_UNZIP
20850if test -n "$UNZIP"; then
20851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20852$as_echo "$UNZIP" >&6; }
20853else
20854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20855$as_echo "no" >&6; }
20856fi
20857
20858
20859          if test "x$UNZIP" = x; then
20860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20861          fi
20862        else
20863          # Otherwise we believe it is a complete path. Use it as it is.
20864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20865$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20867$as_echo_n "checking for UNZIP... " >&6; }
20868          if test ! -x "$tool_specified"; then
20869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20870$as_echo "not found" >&6; }
20871            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20872          fi
20873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20874$as_echo "$tool_specified" >&6; }
20875        fi
20876      fi
20877    fi
20878
20879  fi
20880
20881
20882
20883  if test "x$UNZIP" = x; then
20884    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20885  fi
20886
20887
20888
20889
20890
20891  # Publish this variable in the help.
20892
20893
20894  if [ -z "${ZIP+x}" ]; then
20895    # The variable is not set by user, try to locate tool using the code snippet
20896    for ac_prog in zip
20897do
20898  # Extract the first word of "$ac_prog", so it can be a program name with args.
20899set dummy $ac_prog; ac_word=$2
20900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20901$as_echo_n "checking for $ac_word... " >&6; }
20902if ${ac_cv_path_ZIP+:} false; then :
20903  $as_echo_n "(cached) " >&6
20904else
20905  case $ZIP in
20906  [\\/]* | ?:[\\/]*)
20907  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20908  ;;
20909  *)
20910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20911for as_dir in $PATH
20912do
20913  IFS=$as_save_IFS
20914  test -z "$as_dir" && as_dir=.
20915    for ac_exec_ext in '' $ac_executable_extensions; do
20916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20917    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20919    break 2
20920  fi
20921done
20922  done
20923IFS=$as_save_IFS
20924
20925  ;;
20926esac
20927fi
20928ZIP=$ac_cv_path_ZIP
20929if test -n "$ZIP"; then
20930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20931$as_echo "$ZIP" >&6; }
20932else
20933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20934$as_echo "no" >&6; }
20935fi
20936
20937
20938  test -n "$ZIP" && break
20939done
20940
20941  else
20942    # The variable is set, but is it from the command line or the environment?
20943
20944    # Try to remove the string !ZIP! from our list.
20945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20947      # If it failed, the variable was not from the command line. Ignore it,
20948      # but warn the user (except for BASH, which is always set by the calling BASH).
20949      if test "xZIP" != xBASH; then
20950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20951$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20952      fi
20953      # Try to locate tool using the code snippet
20954      for ac_prog in zip
20955do
20956  # Extract the first word of "$ac_prog", so it can be a program name with args.
20957set dummy $ac_prog; ac_word=$2
20958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20959$as_echo_n "checking for $ac_word... " >&6; }
20960if ${ac_cv_path_ZIP+:} false; then :
20961  $as_echo_n "(cached) " >&6
20962else
20963  case $ZIP in
20964  [\\/]* | ?:[\\/]*)
20965  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20966  ;;
20967  *)
20968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20969for as_dir in $PATH
20970do
20971  IFS=$as_save_IFS
20972  test -z "$as_dir" && as_dir=.
20973    for ac_exec_ext in '' $ac_executable_extensions; do
20974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20975    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20977    break 2
20978  fi
20979done
20980  done
20981IFS=$as_save_IFS
20982
20983  ;;
20984esac
20985fi
20986ZIP=$ac_cv_path_ZIP
20987if test -n "$ZIP"; then
20988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20989$as_echo "$ZIP" >&6; }
20990else
20991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20992$as_echo "no" >&6; }
20993fi
20994
20995
20996  test -n "$ZIP" && break
20997done
20998
20999    else
21000      # If it succeeded, then it was overridden by the user. We will use it
21001      # for the tool.
21002
21003      # First remove it from the list of overridden variables, so we can test
21004      # for unknown variables in the end.
21005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21006
21007      # Check if we try to supply an empty value
21008      if test "x$ZIP" = x; then
21009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21010$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21012$as_echo_n "checking for ZIP... " >&6; }
21013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21014$as_echo "disabled" >&6; }
21015      else
21016        # Check if the provided tool contains a complete path.
21017        tool_specified="$ZIP"
21018        tool_basename="${tool_specified##*/}"
21019        if test "x$tool_basename" = "x$tool_specified"; then
21020          # A command without a complete path is provided, search $PATH.
21021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21022$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21023          # Extract the first word of "$tool_basename", so it can be a program name with args.
21024set dummy $tool_basename; ac_word=$2
21025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21026$as_echo_n "checking for $ac_word... " >&6; }
21027if ${ac_cv_path_ZIP+:} false; then :
21028  $as_echo_n "(cached) " >&6
21029else
21030  case $ZIP in
21031  [\\/]* | ?:[\\/]*)
21032  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21033  ;;
21034  *)
21035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21036for as_dir in $PATH
21037do
21038  IFS=$as_save_IFS
21039  test -z "$as_dir" && as_dir=.
21040    for ac_exec_ext in '' $ac_executable_extensions; do
21041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21042    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21044    break 2
21045  fi
21046done
21047  done
21048IFS=$as_save_IFS
21049
21050  ;;
21051esac
21052fi
21053ZIP=$ac_cv_path_ZIP
21054if test -n "$ZIP"; then
21055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21056$as_echo "$ZIP" >&6; }
21057else
21058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21059$as_echo "no" >&6; }
21060fi
21061
21062
21063          if test "x$ZIP" = x; then
21064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21065          fi
21066        else
21067          # Otherwise we believe it is a complete path. Use it as it is.
21068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21069$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21071$as_echo_n "checking for ZIP... " >&6; }
21072          if test ! -x "$tool_specified"; then
21073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21074$as_echo "not found" >&6; }
21075            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21076          fi
21077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21078$as_echo "$tool_specified" >&6; }
21079        fi
21080      fi
21081    fi
21082
21083  fi
21084
21085
21086
21087  if test "x$ZIP" = x; then
21088    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21089  fi
21090
21091
21092
21093  # Non-required basic tools
21094
21095
21096
21097  # Publish this variable in the help.
21098
21099
21100  if [ -z "${LDD+x}" ]; then
21101    # The variable is not set by user, try to locate tool using the code snippet
21102    for ac_prog in ldd
21103do
21104  # Extract the first word of "$ac_prog", so it can be a program name with args.
21105set dummy $ac_prog; ac_word=$2
21106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21107$as_echo_n "checking for $ac_word... " >&6; }
21108if ${ac_cv_path_LDD+:} false; then :
21109  $as_echo_n "(cached) " >&6
21110else
21111  case $LDD in
21112  [\\/]* | ?:[\\/]*)
21113  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21114  ;;
21115  *)
21116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21117for as_dir in $PATH
21118do
21119  IFS=$as_save_IFS
21120  test -z "$as_dir" && as_dir=.
21121    for ac_exec_ext in '' $ac_executable_extensions; do
21122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21123    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21125    break 2
21126  fi
21127done
21128  done
21129IFS=$as_save_IFS
21130
21131  ;;
21132esac
21133fi
21134LDD=$ac_cv_path_LDD
21135if test -n "$LDD"; then
21136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21137$as_echo "$LDD" >&6; }
21138else
21139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21140$as_echo "no" >&6; }
21141fi
21142
21143
21144  test -n "$LDD" && break
21145done
21146
21147  else
21148    # The variable is set, but is it from the command line or the environment?
21149
21150    # Try to remove the string !LDD! from our list.
21151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21153      # If it failed, the variable was not from the command line. Ignore it,
21154      # but warn the user (except for BASH, which is always set by the calling BASH).
21155      if test "xLDD" != xBASH; then
21156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21157$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21158      fi
21159      # Try to locate tool using the code snippet
21160      for ac_prog in ldd
21161do
21162  # Extract the first word of "$ac_prog", so it can be a program name with args.
21163set dummy $ac_prog; ac_word=$2
21164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21165$as_echo_n "checking for $ac_word... " >&6; }
21166if ${ac_cv_path_LDD+:} false; then :
21167  $as_echo_n "(cached) " >&6
21168else
21169  case $LDD in
21170  [\\/]* | ?:[\\/]*)
21171  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21172  ;;
21173  *)
21174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21175for as_dir in $PATH
21176do
21177  IFS=$as_save_IFS
21178  test -z "$as_dir" && as_dir=.
21179    for ac_exec_ext in '' $ac_executable_extensions; do
21180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21181    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21183    break 2
21184  fi
21185done
21186  done
21187IFS=$as_save_IFS
21188
21189  ;;
21190esac
21191fi
21192LDD=$ac_cv_path_LDD
21193if test -n "$LDD"; then
21194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21195$as_echo "$LDD" >&6; }
21196else
21197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21198$as_echo "no" >&6; }
21199fi
21200
21201
21202  test -n "$LDD" && break
21203done
21204
21205    else
21206      # If it succeeded, then it was overridden by the user. We will use it
21207      # for the tool.
21208
21209      # First remove it from the list of overridden variables, so we can test
21210      # for unknown variables in the end.
21211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21212
21213      # Check if we try to supply an empty value
21214      if test "x$LDD" = x; then
21215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21216$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21218$as_echo_n "checking for LDD... " >&6; }
21219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21220$as_echo "disabled" >&6; }
21221      else
21222        # Check if the provided tool contains a complete path.
21223        tool_specified="$LDD"
21224        tool_basename="${tool_specified##*/}"
21225        if test "x$tool_basename" = "x$tool_specified"; then
21226          # A command without a complete path is provided, search $PATH.
21227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21228$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21229          # Extract the first word of "$tool_basename", so it can be a program name with args.
21230set dummy $tool_basename; ac_word=$2
21231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21232$as_echo_n "checking for $ac_word... " >&6; }
21233if ${ac_cv_path_LDD+:} false; then :
21234  $as_echo_n "(cached) " >&6
21235else
21236  case $LDD in
21237  [\\/]* | ?:[\\/]*)
21238  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21239  ;;
21240  *)
21241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21242for as_dir in $PATH
21243do
21244  IFS=$as_save_IFS
21245  test -z "$as_dir" && as_dir=.
21246    for ac_exec_ext in '' $ac_executable_extensions; do
21247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21248    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21250    break 2
21251  fi
21252done
21253  done
21254IFS=$as_save_IFS
21255
21256  ;;
21257esac
21258fi
21259LDD=$ac_cv_path_LDD
21260if test -n "$LDD"; then
21261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21262$as_echo "$LDD" >&6; }
21263else
21264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21265$as_echo "no" >&6; }
21266fi
21267
21268
21269          if test "x$LDD" = x; then
21270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21271          fi
21272        else
21273          # Otherwise we believe it is a complete path. Use it as it is.
21274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21275$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21277$as_echo_n "checking for LDD... " >&6; }
21278          if test ! -x "$tool_specified"; then
21279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21280$as_echo "not found" >&6; }
21281            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21282          fi
21283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21284$as_echo "$tool_specified" >&6; }
21285        fi
21286      fi
21287    fi
21288
21289  fi
21290
21291
21292  if test "x$LDD" = "x"; then
21293    # List shared lib dependencies is used for
21294    # debug output and checking for forbidden dependencies.
21295    # We can build without it.
21296    LDD="true"
21297  fi
21298
21299
21300  # Publish this variable in the help.
21301
21302
21303  if [ -z "${OTOOL+x}" ]; then
21304    # The variable is not set by user, try to locate tool using the code snippet
21305    for ac_prog in otool
21306do
21307  # Extract the first word of "$ac_prog", so it can be a program name with args.
21308set dummy $ac_prog; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if ${ac_cv_path_OTOOL+:} false; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  case $OTOOL in
21315  [\\/]* | ?:[\\/]*)
21316  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21317  ;;
21318  *)
21319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320for as_dir in $PATH
21321do
21322  IFS=$as_save_IFS
21323  test -z "$as_dir" && as_dir=.
21324    for ac_exec_ext in '' $ac_executable_extensions; do
21325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328    break 2
21329  fi
21330done
21331  done
21332IFS=$as_save_IFS
21333
21334  ;;
21335esac
21336fi
21337OTOOL=$ac_cv_path_OTOOL
21338if test -n "$OTOOL"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21340$as_echo "$OTOOL" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347  test -n "$OTOOL" && break
21348done
21349
21350  else
21351    # The variable is set, but is it from the command line or the environment?
21352
21353    # Try to remove the string !OTOOL! from our list.
21354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21356      # If it failed, the variable was not from the command line. Ignore it,
21357      # but warn the user (except for BASH, which is always set by the calling BASH).
21358      if test "xOTOOL" != xBASH; then
21359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21360$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21361      fi
21362      # Try to locate tool using the code snippet
21363      for ac_prog in otool
21364do
21365  # Extract the first word of "$ac_prog", so it can be a program name with args.
21366set dummy $ac_prog; ac_word=$2
21367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21368$as_echo_n "checking for $ac_word... " >&6; }
21369if ${ac_cv_path_OTOOL+:} false; then :
21370  $as_echo_n "(cached) " >&6
21371else
21372  case $OTOOL in
21373  [\\/]* | ?:[\\/]*)
21374  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21375  ;;
21376  *)
21377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21378for as_dir in $PATH
21379do
21380  IFS=$as_save_IFS
21381  test -z "$as_dir" && as_dir=.
21382    for ac_exec_ext in '' $ac_executable_extensions; do
21383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21384    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21386    break 2
21387  fi
21388done
21389  done
21390IFS=$as_save_IFS
21391
21392  ;;
21393esac
21394fi
21395OTOOL=$ac_cv_path_OTOOL
21396if test -n "$OTOOL"; then
21397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21398$as_echo "$OTOOL" >&6; }
21399else
21400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21401$as_echo "no" >&6; }
21402fi
21403
21404
21405  test -n "$OTOOL" && break
21406done
21407
21408    else
21409      # If it succeeded, then it was overridden by the user. We will use it
21410      # for the tool.
21411
21412      # First remove it from the list of overridden variables, so we can test
21413      # for unknown variables in the end.
21414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21415
21416      # Check if we try to supply an empty value
21417      if test "x$OTOOL" = x; then
21418        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21419$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21421$as_echo_n "checking for OTOOL... " >&6; }
21422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21423$as_echo "disabled" >&6; }
21424      else
21425        # Check if the provided tool contains a complete path.
21426        tool_specified="$OTOOL"
21427        tool_basename="${tool_specified##*/}"
21428        if test "x$tool_basename" = "x$tool_specified"; then
21429          # A command without a complete path is provided, search $PATH.
21430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21431$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21432          # Extract the first word of "$tool_basename", so it can be a program name with args.
21433set dummy $tool_basename; ac_word=$2
21434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21435$as_echo_n "checking for $ac_word... " >&6; }
21436if ${ac_cv_path_OTOOL+:} false; then :
21437  $as_echo_n "(cached) " >&6
21438else
21439  case $OTOOL in
21440  [\\/]* | ?:[\\/]*)
21441  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21442  ;;
21443  *)
21444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21445for as_dir in $PATH
21446do
21447  IFS=$as_save_IFS
21448  test -z "$as_dir" && as_dir=.
21449    for ac_exec_ext in '' $ac_executable_extensions; do
21450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21451    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21453    break 2
21454  fi
21455done
21456  done
21457IFS=$as_save_IFS
21458
21459  ;;
21460esac
21461fi
21462OTOOL=$ac_cv_path_OTOOL
21463if test -n "$OTOOL"; then
21464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21465$as_echo "$OTOOL" >&6; }
21466else
21467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21468$as_echo "no" >&6; }
21469fi
21470
21471
21472          if test "x$OTOOL" = x; then
21473            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21474          fi
21475        else
21476          # Otherwise we believe it is a complete path. Use it as it is.
21477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21478$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21479          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21480$as_echo_n "checking for OTOOL... " >&6; }
21481          if test ! -x "$tool_specified"; then
21482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21483$as_echo "not found" >&6; }
21484            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21485          fi
21486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21487$as_echo "$tool_specified" >&6; }
21488        fi
21489      fi
21490    fi
21491
21492  fi
21493
21494
21495  if test "x$OTOOL" = "x"; then
21496    OTOOL="true"
21497  fi
21498
21499
21500  # Publish this variable in the help.
21501
21502
21503  if [ -z "${READELF+x}" ]; then
21504    # The variable is not set by user, try to locate tool using the code snippet
21505    for ac_prog in greadelf readelf
21506do
21507  # Extract the first word of "$ac_prog", so it can be a program name with args.
21508set dummy $ac_prog; ac_word=$2
21509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21510$as_echo_n "checking for $ac_word... " >&6; }
21511if ${ac_cv_path_READELF+:} false; then :
21512  $as_echo_n "(cached) " >&6
21513else
21514  case $READELF in
21515  [\\/]* | ?:[\\/]*)
21516  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21517  ;;
21518  *)
21519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21520for as_dir in $PATH
21521do
21522  IFS=$as_save_IFS
21523  test -z "$as_dir" && as_dir=.
21524    for ac_exec_ext in '' $ac_executable_extensions; do
21525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21526    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21528    break 2
21529  fi
21530done
21531  done
21532IFS=$as_save_IFS
21533
21534  ;;
21535esac
21536fi
21537READELF=$ac_cv_path_READELF
21538if test -n "$READELF"; then
21539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21540$as_echo "$READELF" >&6; }
21541else
21542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21543$as_echo "no" >&6; }
21544fi
21545
21546
21547  test -n "$READELF" && break
21548done
21549
21550  else
21551    # The variable is set, but is it from the command line or the environment?
21552
21553    # Try to remove the string !READELF! from our list.
21554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21556      # If it failed, the variable was not from the command line. Ignore it,
21557      # but warn the user (except for BASH, which is always set by the calling BASH).
21558      if test "xREADELF" != xBASH; then
21559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21560$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21561      fi
21562      # Try to locate tool using the code snippet
21563      for ac_prog in greadelf readelf
21564do
21565  # Extract the first word of "$ac_prog", so it can be a program name with args.
21566set dummy $ac_prog; ac_word=$2
21567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21568$as_echo_n "checking for $ac_word... " >&6; }
21569if ${ac_cv_path_READELF+:} false; then :
21570  $as_echo_n "(cached) " >&6
21571else
21572  case $READELF in
21573  [\\/]* | ?:[\\/]*)
21574  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21575  ;;
21576  *)
21577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21578for as_dir in $PATH
21579do
21580  IFS=$as_save_IFS
21581  test -z "$as_dir" && as_dir=.
21582    for ac_exec_ext in '' $ac_executable_extensions; do
21583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21584    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21586    break 2
21587  fi
21588done
21589  done
21590IFS=$as_save_IFS
21591
21592  ;;
21593esac
21594fi
21595READELF=$ac_cv_path_READELF
21596if test -n "$READELF"; then
21597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21598$as_echo "$READELF" >&6; }
21599else
21600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21601$as_echo "no" >&6; }
21602fi
21603
21604
21605  test -n "$READELF" && break
21606done
21607
21608    else
21609      # If it succeeded, then it was overridden by the user. We will use it
21610      # for the tool.
21611
21612      # First remove it from the list of overridden variables, so we can test
21613      # for unknown variables in the end.
21614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21615
21616      # Check if we try to supply an empty value
21617      if test "x$READELF" = x; then
21618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21619$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21621$as_echo_n "checking for READELF... " >&6; }
21622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21623$as_echo "disabled" >&6; }
21624      else
21625        # Check if the provided tool contains a complete path.
21626        tool_specified="$READELF"
21627        tool_basename="${tool_specified##*/}"
21628        if test "x$tool_basename" = "x$tool_specified"; then
21629          # A command without a complete path is provided, search $PATH.
21630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21631$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21632          # Extract the first word of "$tool_basename", so it can be a program name with args.
21633set dummy $tool_basename; ac_word=$2
21634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21635$as_echo_n "checking for $ac_word... " >&6; }
21636if ${ac_cv_path_READELF+:} false; then :
21637  $as_echo_n "(cached) " >&6
21638else
21639  case $READELF in
21640  [\\/]* | ?:[\\/]*)
21641  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21642  ;;
21643  *)
21644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21645for as_dir in $PATH
21646do
21647  IFS=$as_save_IFS
21648  test -z "$as_dir" && as_dir=.
21649    for ac_exec_ext in '' $ac_executable_extensions; do
21650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21651    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21653    break 2
21654  fi
21655done
21656  done
21657IFS=$as_save_IFS
21658
21659  ;;
21660esac
21661fi
21662READELF=$ac_cv_path_READELF
21663if test -n "$READELF"; then
21664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21665$as_echo "$READELF" >&6; }
21666else
21667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21668$as_echo "no" >&6; }
21669fi
21670
21671
21672          if test "x$READELF" = x; then
21673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21674          fi
21675        else
21676          # Otherwise we believe it is a complete path. Use it as it is.
21677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21678$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21680$as_echo_n "checking for READELF... " >&6; }
21681          if test ! -x "$tool_specified"; then
21682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21683$as_echo "not found" >&6; }
21684            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21685          fi
21686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21687$as_echo "$tool_specified" >&6; }
21688        fi
21689      fi
21690    fi
21691
21692  fi
21693
21694
21695
21696
21697  # Publish this variable in the help.
21698
21699
21700  if [ -z "${HG+x}" ]; then
21701    # The variable is not set by user, try to locate tool using the code snippet
21702    for ac_prog in hg
21703do
21704  # Extract the first word of "$ac_prog", so it can be a program name with args.
21705set dummy $ac_prog; ac_word=$2
21706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21707$as_echo_n "checking for $ac_word... " >&6; }
21708if ${ac_cv_path_HG+:} false; then :
21709  $as_echo_n "(cached) " >&6
21710else
21711  case $HG in
21712  [\\/]* | ?:[\\/]*)
21713  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21714  ;;
21715  *)
21716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21717for as_dir in $PATH
21718do
21719  IFS=$as_save_IFS
21720  test -z "$as_dir" && as_dir=.
21721    for ac_exec_ext in '' $ac_executable_extensions; do
21722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21723    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21725    break 2
21726  fi
21727done
21728  done
21729IFS=$as_save_IFS
21730
21731  ;;
21732esac
21733fi
21734HG=$ac_cv_path_HG
21735if test -n "$HG"; then
21736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21737$as_echo "$HG" >&6; }
21738else
21739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21740$as_echo "no" >&6; }
21741fi
21742
21743
21744  test -n "$HG" && break
21745done
21746
21747  else
21748    # The variable is set, but is it from the command line or the environment?
21749
21750    # Try to remove the string !HG! from our list.
21751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21753      # If it failed, the variable was not from the command line. Ignore it,
21754      # but warn the user (except for BASH, which is always set by the calling BASH).
21755      if test "xHG" != xBASH; then
21756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21757$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21758      fi
21759      # Try to locate tool using the code snippet
21760      for ac_prog in hg
21761do
21762  # Extract the first word of "$ac_prog", so it can be a program name with args.
21763set dummy $ac_prog; ac_word=$2
21764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21765$as_echo_n "checking for $ac_word... " >&6; }
21766if ${ac_cv_path_HG+:} false; then :
21767  $as_echo_n "(cached) " >&6
21768else
21769  case $HG in
21770  [\\/]* | ?:[\\/]*)
21771  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21772  ;;
21773  *)
21774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21775for as_dir in $PATH
21776do
21777  IFS=$as_save_IFS
21778  test -z "$as_dir" && as_dir=.
21779    for ac_exec_ext in '' $ac_executable_extensions; do
21780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21781    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21783    break 2
21784  fi
21785done
21786  done
21787IFS=$as_save_IFS
21788
21789  ;;
21790esac
21791fi
21792HG=$ac_cv_path_HG
21793if test -n "$HG"; then
21794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21795$as_echo "$HG" >&6; }
21796else
21797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21798$as_echo "no" >&6; }
21799fi
21800
21801
21802  test -n "$HG" && break
21803done
21804
21805    else
21806      # If it succeeded, then it was overridden by the user. We will use it
21807      # for the tool.
21808
21809      # First remove it from the list of overridden variables, so we can test
21810      # for unknown variables in the end.
21811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21812
21813      # Check if we try to supply an empty value
21814      if test "x$HG" = x; then
21815        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21816$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21818$as_echo_n "checking for HG... " >&6; }
21819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21820$as_echo "disabled" >&6; }
21821      else
21822        # Check if the provided tool contains a complete path.
21823        tool_specified="$HG"
21824        tool_basename="${tool_specified##*/}"
21825        if test "x$tool_basename" = "x$tool_specified"; then
21826          # A command without a complete path is provided, search $PATH.
21827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21828$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21829          # Extract the first word of "$tool_basename", so it can be a program name with args.
21830set dummy $tool_basename; ac_word=$2
21831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21832$as_echo_n "checking for $ac_word... " >&6; }
21833if ${ac_cv_path_HG+:} false; then :
21834  $as_echo_n "(cached) " >&6
21835else
21836  case $HG in
21837  [\\/]* | ?:[\\/]*)
21838  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21839  ;;
21840  *)
21841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21842for as_dir in $PATH
21843do
21844  IFS=$as_save_IFS
21845  test -z "$as_dir" && as_dir=.
21846    for ac_exec_ext in '' $ac_executable_extensions; do
21847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21848    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21850    break 2
21851  fi
21852done
21853  done
21854IFS=$as_save_IFS
21855
21856  ;;
21857esac
21858fi
21859HG=$ac_cv_path_HG
21860if test -n "$HG"; then
21861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21862$as_echo "$HG" >&6; }
21863else
21864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21865$as_echo "no" >&6; }
21866fi
21867
21868
21869          if test "x$HG" = x; then
21870            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21871          fi
21872        else
21873          # Otherwise we believe it is a complete path. Use it as it is.
21874          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21875$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21876          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21877$as_echo_n "checking for HG... " >&6; }
21878          if test ! -x "$tool_specified"; then
21879            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21880$as_echo "not found" >&6; }
21881            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21882          fi
21883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21884$as_echo "$tool_specified" >&6; }
21885        fi
21886      fi
21887    fi
21888
21889  fi
21890
21891
21892
21893
21894  # Publish this variable in the help.
21895
21896
21897  if [ -z "${STAT+x}" ]; then
21898    # The variable is not set by user, try to locate tool using the code snippet
21899    for ac_prog in stat
21900do
21901  # Extract the first word of "$ac_prog", so it can be a program name with args.
21902set dummy $ac_prog; ac_word=$2
21903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21904$as_echo_n "checking for $ac_word... " >&6; }
21905if ${ac_cv_path_STAT+:} false; then :
21906  $as_echo_n "(cached) " >&6
21907else
21908  case $STAT in
21909  [\\/]* | ?:[\\/]*)
21910  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21911  ;;
21912  *)
21913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21914for as_dir in $PATH
21915do
21916  IFS=$as_save_IFS
21917  test -z "$as_dir" && as_dir=.
21918    for ac_exec_ext in '' $ac_executable_extensions; do
21919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21920    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21922    break 2
21923  fi
21924done
21925  done
21926IFS=$as_save_IFS
21927
21928  ;;
21929esac
21930fi
21931STAT=$ac_cv_path_STAT
21932if test -n "$STAT"; then
21933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21934$as_echo "$STAT" >&6; }
21935else
21936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21937$as_echo "no" >&6; }
21938fi
21939
21940
21941  test -n "$STAT" && break
21942done
21943
21944  else
21945    # The variable is set, but is it from the command line or the environment?
21946
21947    # Try to remove the string !STAT! from our list.
21948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21950      # If it failed, the variable was not from the command line. Ignore it,
21951      # but warn the user (except for BASH, which is always set by the calling BASH).
21952      if test "xSTAT" != xBASH; then
21953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21954$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21955      fi
21956      # Try to locate tool using the code snippet
21957      for ac_prog in stat
21958do
21959  # Extract the first word of "$ac_prog", so it can be a program name with args.
21960set dummy $ac_prog; ac_word=$2
21961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21962$as_echo_n "checking for $ac_word... " >&6; }
21963if ${ac_cv_path_STAT+:} false; then :
21964  $as_echo_n "(cached) " >&6
21965else
21966  case $STAT in
21967  [\\/]* | ?:[\\/]*)
21968  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21969  ;;
21970  *)
21971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21972for as_dir in $PATH
21973do
21974  IFS=$as_save_IFS
21975  test -z "$as_dir" && as_dir=.
21976    for ac_exec_ext in '' $ac_executable_extensions; do
21977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21978    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21980    break 2
21981  fi
21982done
21983  done
21984IFS=$as_save_IFS
21985
21986  ;;
21987esac
21988fi
21989STAT=$ac_cv_path_STAT
21990if test -n "$STAT"; then
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21992$as_echo "$STAT" >&6; }
21993else
21994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21995$as_echo "no" >&6; }
21996fi
21997
21998
21999  test -n "$STAT" && break
22000done
22001
22002    else
22003      # If it succeeded, then it was overridden by the user. We will use it
22004      # for the tool.
22005
22006      # First remove it from the list of overridden variables, so we can test
22007      # for unknown variables in the end.
22008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22009
22010      # Check if we try to supply an empty value
22011      if test "x$STAT" = x; then
22012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22013$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22015$as_echo_n "checking for STAT... " >&6; }
22016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22017$as_echo "disabled" >&6; }
22018      else
22019        # Check if the provided tool contains a complete path.
22020        tool_specified="$STAT"
22021        tool_basename="${tool_specified##*/}"
22022        if test "x$tool_basename" = "x$tool_specified"; then
22023          # A command without a complete path is provided, search $PATH.
22024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22025$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22026          # Extract the first word of "$tool_basename", so it can be a program name with args.
22027set dummy $tool_basename; ac_word=$2
22028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22029$as_echo_n "checking for $ac_word... " >&6; }
22030if ${ac_cv_path_STAT+:} false; then :
22031  $as_echo_n "(cached) " >&6
22032else
22033  case $STAT in
22034  [\\/]* | ?:[\\/]*)
22035  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22036  ;;
22037  *)
22038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22039for as_dir in $PATH
22040do
22041  IFS=$as_save_IFS
22042  test -z "$as_dir" && as_dir=.
22043    for ac_exec_ext in '' $ac_executable_extensions; do
22044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22045    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22047    break 2
22048  fi
22049done
22050  done
22051IFS=$as_save_IFS
22052
22053  ;;
22054esac
22055fi
22056STAT=$ac_cv_path_STAT
22057if test -n "$STAT"; then
22058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22059$as_echo "$STAT" >&6; }
22060else
22061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22062$as_echo "no" >&6; }
22063fi
22064
22065
22066          if test "x$STAT" = x; then
22067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22068          fi
22069        else
22070          # Otherwise we believe it is a complete path. Use it as it is.
22071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22072$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22074$as_echo_n "checking for STAT... " >&6; }
22075          if test ! -x "$tool_specified"; then
22076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22077$as_echo "not found" >&6; }
22078            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22079          fi
22080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22081$as_echo "$tool_specified" >&6; }
22082        fi
22083      fi
22084    fi
22085
22086  fi
22087
22088
22089
22090
22091  # Publish this variable in the help.
22092
22093
22094  if [ -z "${TIME+x}" ]; then
22095    # The variable is not set by user, try to locate tool using the code snippet
22096    for ac_prog in time
22097do
22098  # Extract the first word of "$ac_prog", so it can be a program name with args.
22099set dummy $ac_prog; ac_word=$2
22100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22101$as_echo_n "checking for $ac_word... " >&6; }
22102if ${ac_cv_path_TIME+:} false; then :
22103  $as_echo_n "(cached) " >&6
22104else
22105  case $TIME in
22106  [\\/]* | ?:[\\/]*)
22107  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22108  ;;
22109  *)
22110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22111for as_dir in $PATH
22112do
22113  IFS=$as_save_IFS
22114  test -z "$as_dir" && as_dir=.
22115    for ac_exec_ext in '' $ac_executable_extensions; do
22116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22117    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22119    break 2
22120  fi
22121done
22122  done
22123IFS=$as_save_IFS
22124
22125  ;;
22126esac
22127fi
22128TIME=$ac_cv_path_TIME
22129if test -n "$TIME"; then
22130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22131$as_echo "$TIME" >&6; }
22132else
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22134$as_echo "no" >&6; }
22135fi
22136
22137
22138  test -n "$TIME" && break
22139done
22140
22141  else
22142    # The variable is set, but is it from the command line or the environment?
22143
22144    # Try to remove the string !TIME! from our list.
22145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22147      # If it failed, the variable was not from the command line. Ignore it,
22148      # but warn the user (except for BASH, which is always set by the calling BASH).
22149      if test "xTIME" != xBASH; then
22150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22151$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22152      fi
22153      # Try to locate tool using the code snippet
22154      for ac_prog in time
22155do
22156  # Extract the first word of "$ac_prog", so it can be a program name with args.
22157set dummy $ac_prog; ac_word=$2
22158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22159$as_echo_n "checking for $ac_word... " >&6; }
22160if ${ac_cv_path_TIME+:} false; then :
22161  $as_echo_n "(cached) " >&6
22162else
22163  case $TIME in
22164  [\\/]* | ?:[\\/]*)
22165  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22166  ;;
22167  *)
22168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22169for as_dir in $PATH
22170do
22171  IFS=$as_save_IFS
22172  test -z "$as_dir" && as_dir=.
22173    for ac_exec_ext in '' $ac_executable_extensions; do
22174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22175    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22177    break 2
22178  fi
22179done
22180  done
22181IFS=$as_save_IFS
22182
22183  ;;
22184esac
22185fi
22186TIME=$ac_cv_path_TIME
22187if test -n "$TIME"; then
22188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22189$as_echo "$TIME" >&6; }
22190else
22191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22192$as_echo "no" >&6; }
22193fi
22194
22195
22196  test -n "$TIME" && break
22197done
22198
22199    else
22200      # If it succeeded, then it was overridden by the user. We will use it
22201      # for the tool.
22202
22203      # First remove it from the list of overridden variables, so we can test
22204      # for unknown variables in the end.
22205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22206
22207      # Check if we try to supply an empty value
22208      if test "x$TIME" = x; then
22209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22210$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22212$as_echo_n "checking for TIME... " >&6; }
22213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22214$as_echo "disabled" >&6; }
22215      else
22216        # Check if the provided tool contains a complete path.
22217        tool_specified="$TIME"
22218        tool_basename="${tool_specified##*/}"
22219        if test "x$tool_basename" = "x$tool_specified"; then
22220          # A command without a complete path is provided, search $PATH.
22221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22222$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22223          # Extract the first word of "$tool_basename", so it can be a program name with args.
22224set dummy $tool_basename; ac_word=$2
22225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22226$as_echo_n "checking for $ac_word... " >&6; }
22227if ${ac_cv_path_TIME+:} false; then :
22228  $as_echo_n "(cached) " >&6
22229else
22230  case $TIME in
22231  [\\/]* | ?:[\\/]*)
22232  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22233  ;;
22234  *)
22235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22236for as_dir in $PATH
22237do
22238  IFS=$as_save_IFS
22239  test -z "$as_dir" && as_dir=.
22240    for ac_exec_ext in '' $ac_executable_extensions; do
22241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22242    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22244    break 2
22245  fi
22246done
22247  done
22248IFS=$as_save_IFS
22249
22250  ;;
22251esac
22252fi
22253TIME=$ac_cv_path_TIME
22254if test -n "$TIME"; then
22255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22256$as_echo "$TIME" >&6; }
22257else
22258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22259$as_echo "no" >&6; }
22260fi
22261
22262
22263          if test "x$TIME" = x; then
22264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22265          fi
22266        else
22267          # Otherwise we believe it is a complete path. Use it as it is.
22268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22269$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22271$as_echo_n "checking for TIME... " >&6; }
22272          if test ! -x "$tool_specified"; then
22273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22274$as_echo "not found" >&6; }
22275            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22276          fi
22277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22278$as_echo "$tool_specified" >&6; }
22279        fi
22280      fi
22281    fi
22282
22283  fi
22284
22285
22286
22287
22288  # Publish this variable in the help.
22289
22290
22291  if [ -z "${DTRACE+x}" ]; then
22292    # The variable is not set by user, try to locate tool using the code snippet
22293    for ac_prog in dtrace
22294do
22295  # Extract the first word of "$ac_prog", so it can be a program name with args.
22296set dummy $ac_prog; ac_word=$2
22297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22298$as_echo_n "checking for $ac_word... " >&6; }
22299if ${ac_cv_path_DTRACE+:} false; then :
22300  $as_echo_n "(cached) " >&6
22301else
22302  case $DTRACE in
22303  [\\/]* | ?:[\\/]*)
22304  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22305  ;;
22306  *)
22307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22308for as_dir in $PATH
22309do
22310  IFS=$as_save_IFS
22311  test -z "$as_dir" && as_dir=.
22312    for ac_exec_ext in '' $ac_executable_extensions; do
22313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22314    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22316    break 2
22317  fi
22318done
22319  done
22320IFS=$as_save_IFS
22321
22322  ;;
22323esac
22324fi
22325DTRACE=$ac_cv_path_DTRACE
22326if test -n "$DTRACE"; then
22327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22328$as_echo "$DTRACE" >&6; }
22329else
22330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22331$as_echo "no" >&6; }
22332fi
22333
22334
22335  test -n "$DTRACE" && break
22336done
22337
22338  else
22339    # The variable is set, but is it from the command line or the environment?
22340
22341    # Try to remove the string !DTRACE! from our list.
22342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22344      # If it failed, the variable was not from the command line. Ignore it,
22345      # but warn the user (except for BASH, which is always set by the calling BASH).
22346      if test "xDTRACE" != xBASH; then
22347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22348$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22349      fi
22350      # Try to locate tool using the code snippet
22351      for ac_prog in dtrace
22352do
22353  # Extract the first word of "$ac_prog", so it can be a program name with args.
22354set dummy $ac_prog; ac_word=$2
22355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22356$as_echo_n "checking for $ac_word... " >&6; }
22357if ${ac_cv_path_DTRACE+:} false; then :
22358  $as_echo_n "(cached) " >&6
22359else
22360  case $DTRACE in
22361  [\\/]* | ?:[\\/]*)
22362  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22363  ;;
22364  *)
22365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22366for as_dir in $PATH
22367do
22368  IFS=$as_save_IFS
22369  test -z "$as_dir" && as_dir=.
22370    for ac_exec_ext in '' $ac_executable_extensions; do
22371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22372    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22374    break 2
22375  fi
22376done
22377  done
22378IFS=$as_save_IFS
22379
22380  ;;
22381esac
22382fi
22383DTRACE=$ac_cv_path_DTRACE
22384if test -n "$DTRACE"; then
22385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22386$as_echo "$DTRACE" >&6; }
22387else
22388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22389$as_echo "no" >&6; }
22390fi
22391
22392
22393  test -n "$DTRACE" && break
22394done
22395
22396    else
22397      # If it succeeded, then it was overridden by the user. We will use it
22398      # for the tool.
22399
22400      # First remove it from the list of overridden variables, so we can test
22401      # for unknown variables in the end.
22402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22403
22404      # Check if we try to supply an empty value
22405      if test "x$DTRACE" = x; then
22406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22407$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22409$as_echo_n "checking for DTRACE... " >&6; }
22410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22411$as_echo "disabled" >&6; }
22412      else
22413        # Check if the provided tool contains a complete path.
22414        tool_specified="$DTRACE"
22415        tool_basename="${tool_specified##*/}"
22416        if test "x$tool_basename" = "x$tool_specified"; then
22417          # A command without a complete path is provided, search $PATH.
22418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22419$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22420          # Extract the first word of "$tool_basename", so it can be a program name with args.
22421set dummy $tool_basename; ac_word=$2
22422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22423$as_echo_n "checking for $ac_word... " >&6; }
22424if ${ac_cv_path_DTRACE+:} false; then :
22425  $as_echo_n "(cached) " >&6
22426else
22427  case $DTRACE in
22428  [\\/]* | ?:[\\/]*)
22429  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22430  ;;
22431  *)
22432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22433for as_dir in $PATH
22434do
22435  IFS=$as_save_IFS
22436  test -z "$as_dir" && as_dir=.
22437    for ac_exec_ext in '' $ac_executable_extensions; do
22438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22439    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22441    break 2
22442  fi
22443done
22444  done
22445IFS=$as_save_IFS
22446
22447  ;;
22448esac
22449fi
22450DTRACE=$ac_cv_path_DTRACE
22451if test -n "$DTRACE"; then
22452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22453$as_echo "$DTRACE" >&6; }
22454else
22455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22456$as_echo "no" >&6; }
22457fi
22458
22459
22460          if test "x$DTRACE" = x; then
22461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22462          fi
22463        else
22464          # Otherwise we believe it is a complete path. Use it as it is.
22465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22466$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22468$as_echo_n "checking for DTRACE... " >&6; }
22469          if test ! -x "$tool_specified"; then
22470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22471$as_echo "not found" >&6; }
22472            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22473          fi
22474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22475$as_echo "$tool_specified" >&6; }
22476        fi
22477      fi
22478    fi
22479
22480  fi
22481
22482
22483
22484
22485  # Publish this variable in the help.
22486
22487
22488  if [ -z "${PATCH+x}" ]; then
22489    # The variable is not set by user, try to locate tool using the code snippet
22490    for ac_prog in gpatch patch
22491do
22492  # Extract the first word of "$ac_prog", so it can be a program name with args.
22493set dummy $ac_prog; ac_word=$2
22494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22495$as_echo_n "checking for $ac_word... " >&6; }
22496if ${ac_cv_path_PATCH+:} false; then :
22497  $as_echo_n "(cached) " >&6
22498else
22499  case $PATCH in
22500  [\\/]* | ?:[\\/]*)
22501  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22502  ;;
22503  *)
22504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22505for as_dir in $PATH
22506do
22507  IFS=$as_save_IFS
22508  test -z "$as_dir" && as_dir=.
22509    for ac_exec_ext in '' $ac_executable_extensions; do
22510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22511    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22513    break 2
22514  fi
22515done
22516  done
22517IFS=$as_save_IFS
22518
22519  ;;
22520esac
22521fi
22522PATCH=$ac_cv_path_PATCH
22523if test -n "$PATCH"; then
22524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22525$as_echo "$PATCH" >&6; }
22526else
22527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22528$as_echo "no" >&6; }
22529fi
22530
22531
22532  test -n "$PATCH" && break
22533done
22534
22535  else
22536    # The variable is set, but is it from the command line or the environment?
22537
22538    # Try to remove the string !PATCH! from our list.
22539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22541      # If it failed, the variable was not from the command line. Ignore it,
22542      # but warn the user (except for BASH, which is always set by the calling BASH).
22543      if test "xPATCH" != xBASH; then
22544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22545$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22546      fi
22547      # Try to locate tool using the code snippet
22548      for ac_prog in gpatch patch
22549do
22550  # Extract the first word of "$ac_prog", so it can be a program name with args.
22551set dummy $ac_prog; ac_word=$2
22552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22553$as_echo_n "checking for $ac_word... " >&6; }
22554if ${ac_cv_path_PATCH+:} false; then :
22555  $as_echo_n "(cached) " >&6
22556else
22557  case $PATCH in
22558  [\\/]* | ?:[\\/]*)
22559  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22560  ;;
22561  *)
22562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22563for as_dir in $PATH
22564do
22565  IFS=$as_save_IFS
22566  test -z "$as_dir" && as_dir=.
22567    for ac_exec_ext in '' $ac_executable_extensions; do
22568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22569    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22571    break 2
22572  fi
22573done
22574  done
22575IFS=$as_save_IFS
22576
22577  ;;
22578esac
22579fi
22580PATCH=$ac_cv_path_PATCH
22581if test -n "$PATCH"; then
22582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22583$as_echo "$PATCH" >&6; }
22584else
22585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22586$as_echo "no" >&6; }
22587fi
22588
22589
22590  test -n "$PATCH" && break
22591done
22592
22593    else
22594      # If it succeeded, then it was overridden by the user. We will use it
22595      # for the tool.
22596
22597      # First remove it from the list of overridden variables, so we can test
22598      # for unknown variables in the end.
22599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22600
22601      # Check if we try to supply an empty value
22602      if test "x$PATCH" = x; then
22603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22604$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22606$as_echo_n "checking for PATCH... " >&6; }
22607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22608$as_echo "disabled" >&6; }
22609      else
22610        # Check if the provided tool contains a complete path.
22611        tool_specified="$PATCH"
22612        tool_basename="${tool_specified##*/}"
22613        if test "x$tool_basename" = "x$tool_specified"; then
22614          # A command without a complete path is provided, search $PATH.
22615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22616$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22617          # Extract the first word of "$tool_basename", so it can be a program name with args.
22618set dummy $tool_basename; ac_word=$2
22619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22620$as_echo_n "checking for $ac_word... " >&6; }
22621if ${ac_cv_path_PATCH+:} false; then :
22622  $as_echo_n "(cached) " >&6
22623else
22624  case $PATCH in
22625  [\\/]* | ?:[\\/]*)
22626  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22627  ;;
22628  *)
22629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22630for as_dir in $PATH
22631do
22632  IFS=$as_save_IFS
22633  test -z "$as_dir" && as_dir=.
22634    for ac_exec_ext in '' $ac_executable_extensions; do
22635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22636    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22638    break 2
22639  fi
22640done
22641  done
22642IFS=$as_save_IFS
22643
22644  ;;
22645esac
22646fi
22647PATCH=$ac_cv_path_PATCH
22648if test -n "$PATCH"; then
22649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22650$as_echo "$PATCH" >&6; }
22651else
22652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22653$as_echo "no" >&6; }
22654fi
22655
22656
22657          if test "x$PATCH" = x; then
22658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22659          fi
22660        else
22661          # Otherwise we believe it is a complete path. Use it as it is.
22662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22663$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22665$as_echo_n "checking for PATCH... " >&6; }
22666          if test ! -x "$tool_specified"; then
22667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22668$as_echo "not found" >&6; }
22669            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22670          fi
22671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22672$as_echo "$tool_specified" >&6; }
22673        fi
22674      fi
22675    fi
22676
22677  fi
22678
22679
22680  # Check if it's GNU time
22681  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22682  if test "x$IS_GNU_TIME" != x; then
22683    IS_GNU_TIME=yes
22684  else
22685    IS_GNU_TIME=no
22686  fi
22687
22688
22689  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22690
22691
22692
22693  # Publish this variable in the help.
22694
22695
22696  if [ -z "${DSYMUTIL+x}" ]; then
22697    # The variable is not set by user, try to locate tool using the code snippet
22698    for ac_prog in dsymutil
22699do
22700  # Extract the first word of "$ac_prog", so it can be a program name with args.
22701set dummy $ac_prog; ac_word=$2
22702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22703$as_echo_n "checking for $ac_word... " >&6; }
22704if ${ac_cv_path_DSYMUTIL+:} false; then :
22705  $as_echo_n "(cached) " >&6
22706else
22707  case $DSYMUTIL in
22708  [\\/]* | ?:[\\/]*)
22709  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22710  ;;
22711  *)
22712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22713for as_dir in $PATH
22714do
22715  IFS=$as_save_IFS
22716  test -z "$as_dir" && as_dir=.
22717    for ac_exec_ext in '' $ac_executable_extensions; do
22718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22719    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22721    break 2
22722  fi
22723done
22724  done
22725IFS=$as_save_IFS
22726
22727  ;;
22728esac
22729fi
22730DSYMUTIL=$ac_cv_path_DSYMUTIL
22731if test -n "$DSYMUTIL"; then
22732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22733$as_echo "$DSYMUTIL" >&6; }
22734else
22735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22736$as_echo "no" >&6; }
22737fi
22738
22739
22740  test -n "$DSYMUTIL" && break
22741done
22742
22743  else
22744    # The variable is set, but is it from the command line or the environment?
22745
22746    # Try to remove the string !DSYMUTIL! from our list.
22747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22749      # If it failed, the variable was not from the command line. Ignore it,
22750      # but warn the user (except for BASH, which is always set by the calling BASH).
22751      if test "xDSYMUTIL" != xBASH; then
22752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22753$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22754      fi
22755      # Try to locate tool using the code snippet
22756      for ac_prog in dsymutil
22757do
22758  # Extract the first word of "$ac_prog", so it can be a program name with args.
22759set dummy $ac_prog; ac_word=$2
22760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22761$as_echo_n "checking for $ac_word... " >&6; }
22762if ${ac_cv_path_DSYMUTIL+:} false; then :
22763  $as_echo_n "(cached) " >&6
22764else
22765  case $DSYMUTIL in
22766  [\\/]* | ?:[\\/]*)
22767  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22768  ;;
22769  *)
22770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22771for as_dir in $PATH
22772do
22773  IFS=$as_save_IFS
22774  test -z "$as_dir" && as_dir=.
22775    for ac_exec_ext in '' $ac_executable_extensions; do
22776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22777    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22779    break 2
22780  fi
22781done
22782  done
22783IFS=$as_save_IFS
22784
22785  ;;
22786esac
22787fi
22788DSYMUTIL=$ac_cv_path_DSYMUTIL
22789if test -n "$DSYMUTIL"; then
22790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22791$as_echo "$DSYMUTIL" >&6; }
22792else
22793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22794$as_echo "no" >&6; }
22795fi
22796
22797
22798  test -n "$DSYMUTIL" && break
22799done
22800
22801    else
22802      # If it succeeded, then it was overridden by the user. We will use it
22803      # for the tool.
22804
22805      # First remove it from the list of overridden variables, so we can test
22806      # for unknown variables in the end.
22807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22808
22809      # Check if we try to supply an empty value
22810      if test "x$DSYMUTIL" = x; then
22811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22812$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22814$as_echo_n "checking for DSYMUTIL... " >&6; }
22815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22816$as_echo "disabled" >&6; }
22817      else
22818        # Check if the provided tool contains a complete path.
22819        tool_specified="$DSYMUTIL"
22820        tool_basename="${tool_specified##*/}"
22821        if test "x$tool_basename" = "x$tool_specified"; then
22822          # A command without a complete path is provided, search $PATH.
22823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22824$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22825          # Extract the first word of "$tool_basename", so it can be a program name with args.
22826set dummy $tool_basename; ac_word=$2
22827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22828$as_echo_n "checking for $ac_word... " >&6; }
22829if ${ac_cv_path_DSYMUTIL+:} false; then :
22830  $as_echo_n "(cached) " >&6
22831else
22832  case $DSYMUTIL in
22833  [\\/]* | ?:[\\/]*)
22834  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22835  ;;
22836  *)
22837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22838for as_dir in $PATH
22839do
22840  IFS=$as_save_IFS
22841  test -z "$as_dir" && as_dir=.
22842    for ac_exec_ext in '' $ac_executable_extensions; do
22843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22844    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22846    break 2
22847  fi
22848done
22849  done
22850IFS=$as_save_IFS
22851
22852  ;;
22853esac
22854fi
22855DSYMUTIL=$ac_cv_path_DSYMUTIL
22856if test -n "$DSYMUTIL"; then
22857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22858$as_echo "$DSYMUTIL" >&6; }
22859else
22860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22861$as_echo "no" >&6; }
22862fi
22863
22864
22865          if test "x$DSYMUTIL" = x; then
22866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22867          fi
22868        else
22869          # Otherwise we believe it is a complete path. Use it as it is.
22870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22871$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22873$as_echo_n "checking for DSYMUTIL... " >&6; }
22874          if test ! -x "$tool_specified"; then
22875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22876$as_echo "not found" >&6; }
22877            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22878          fi
22879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22880$as_echo "$tool_specified" >&6; }
22881        fi
22882      fi
22883    fi
22884
22885  fi
22886
22887
22888
22889  if test "x$DSYMUTIL" = x; then
22890    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22891  fi
22892
22893
22894
22895
22896
22897  # Publish this variable in the help.
22898
22899
22900  if [ -z "${XATTR+x}" ]; then
22901    # The variable is not set by user, try to locate tool using the code snippet
22902    for ac_prog in xattr
22903do
22904  # Extract the first word of "$ac_prog", so it can be a program name with args.
22905set dummy $ac_prog; ac_word=$2
22906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22907$as_echo_n "checking for $ac_word... " >&6; }
22908if ${ac_cv_path_XATTR+:} false; then :
22909  $as_echo_n "(cached) " >&6
22910else
22911  case $XATTR in
22912  [\\/]* | ?:[\\/]*)
22913  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22914  ;;
22915  *)
22916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22917for as_dir in $PATH
22918do
22919  IFS=$as_save_IFS
22920  test -z "$as_dir" && as_dir=.
22921    for ac_exec_ext in '' $ac_executable_extensions; do
22922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22923    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22925    break 2
22926  fi
22927done
22928  done
22929IFS=$as_save_IFS
22930
22931  ;;
22932esac
22933fi
22934XATTR=$ac_cv_path_XATTR
22935if test -n "$XATTR"; then
22936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22937$as_echo "$XATTR" >&6; }
22938else
22939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22940$as_echo "no" >&6; }
22941fi
22942
22943
22944  test -n "$XATTR" && break
22945done
22946
22947  else
22948    # The variable is set, but is it from the command line or the environment?
22949
22950    # Try to remove the string !XATTR! from our list.
22951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22953      # If it failed, the variable was not from the command line. Ignore it,
22954      # but warn the user (except for BASH, which is always set by the calling BASH).
22955      if test "xXATTR" != xBASH; then
22956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22957$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22958      fi
22959      # Try to locate tool using the code snippet
22960      for ac_prog in xattr
22961do
22962  # Extract the first word of "$ac_prog", so it can be a program name with args.
22963set dummy $ac_prog; ac_word=$2
22964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22965$as_echo_n "checking for $ac_word... " >&6; }
22966if ${ac_cv_path_XATTR+:} false; then :
22967  $as_echo_n "(cached) " >&6
22968else
22969  case $XATTR in
22970  [\\/]* | ?:[\\/]*)
22971  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22972  ;;
22973  *)
22974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22975for as_dir in $PATH
22976do
22977  IFS=$as_save_IFS
22978  test -z "$as_dir" && as_dir=.
22979    for ac_exec_ext in '' $ac_executable_extensions; do
22980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22981    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22983    break 2
22984  fi
22985done
22986  done
22987IFS=$as_save_IFS
22988
22989  ;;
22990esac
22991fi
22992XATTR=$ac_cv_path_XATTR
22993if test -n "$XATTR"; then
22994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22995$as_echo "$XATTR" >&6; }
22996else
22997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22998$as_echo "no" >&6; }
22999fi
23000
23001
23002  test -n "$XATTR" && break
23003done
23004
23005    else
23006      # If it succeeded, then it was overridden by the user. We will use it
23007      # for the tool.
23008
23009      # First remove it from the list of overridden variables, so we can test
23010      # for unknown variables in the end.
23011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23012
23013      # Check if we try to supply an empty value
23014      if test "x$XATTR" = x; then
23015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23016$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23018$as_echo_n "checking for XATTR... " >&6; }
23019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23020$as_echo "disabled" >&6; }
23021      else
23022        # Check if the provided tool contains a complete path.
23023        tool_specified="$XATTR"
23024        tool_basename="${tool_specified##*/}"
23025        if test "x$tool_basename" = "x$tool_specified"; then
23026          # A command without a complete path is provided, search $PATH.
23027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23028$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23029          # Extract the first word of "$tool_basename", so it can be a program name with args.
23030set dummy $tool_basename; ac_word=$2
23031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23032$as_echo_n "checking for $ac_word... " >&6; }
23033if ${ac_cv_path_XATTR+:} false; then :
23034  $as_echo_n "(cached) " >&6
23035else
23036  case $XATTR in
23037  [\\/]* | ?:[\\/]*)
23038  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23039  ;;
23040  *)
23041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23042for as_dir in $PATH
23043do
23044  IFS=$as_save_IFS
23045  test -z "$as_dir" && as_dir=.
23046    for ac_exec_ext in '' $ac_executable_extensions; do
23047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23048    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23050    break 2
23051  fi
23052done
23053  done
23054IFS=$as_save_IFS
23055
23056  ;;
23057esac
23058fi
23059XATTR=$ac_cv_path_XATTR
23060if test -n "$XATTR"; then
23061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23062$as_echo "$XATTR" >&6; }
23063else
23064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23065$as_echo "no" >&6; }
23066fi
23067
23068
23069          if test "x$XATTR" = x; then
23070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23071          fi
23072        else
23073          # Otherwise we believe it is a complete path. Use it as it is.
23074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23075$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23077$as_echo_n "checking for XATTR... " >&6; }
23078          if test ! -x "$tool_specified"; then
23079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23080$as_echo "not found" >&6; }
23081            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23082          fi
23083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23084$as_echo "$tool_specified" >&6; }
23085        fi
23086      fi
23087    fi
23088
23089  fi
23090
23091
23092
23093  if test "x$XATTR" = x; then
23094    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23095  fi
23096
23097
23098
23099
23100  # Publish this variable in the help.
23101
23102
23103  if [ -z "${CODESIGN+x}" ]; then
23104    # The variable is not set by user, try to locate tool using the code snippet
23105    for ac_prog in codesign
23106do
23107  # Extract the first word of "$ac_prog", so it can be a program name with args.
23108set dummy $ac_prog; ac_word=$2
23109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23110$as_echo_n "checking for $ac_word... " >&6; }
23111if ${ac_cv_path_CODESIGN+:} false; then :
23112  $as_echo_n "(cached) " >&6
23113else
23114  case $CODESIGN in
23115  [\\/]* | ?:[\\/]*)
23116  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23117  ;;
23118  *)
23119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23120for as_dir in $PATH
23121do
23122  IFS=$as_save_IFS
23123  test -z "$as_dir" && as_dir=.
23124    for ac_exec_ext in '' $ac_executable_extensions; do
23125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23126    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23128    break 2
23129  fi
23130done
23131  done
23132IFS=$as_save_IFS
23133
23134  ;;
23135esac
23136fi
23137CODESIGN=$ac_cv_path_CODESIGN
23138if test -n "$CODESIGN"; then
23139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23140$as_echo "$CODESIGN" >&6; }
23141else
23142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23143$as_echo "no" >&6; }
23144fi
23145
23146
23147  test -n "$CODESIGN" && break
23148done
23149
23150  else
23151    # The variable is set, but is it from the command line or the environment?
23152
23153    # Try to remove the string !CODESIGN! from our list.
23154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23156      # If it failed, the variable was not from the command line. Ignore it,
23157      # but warn the user (except for BASH, which is always set by the calling BASH).
23158      if test "xCODESIGN" != xBASH; then
23159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23160$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23161      fi
23162      # Try to locate tool using the code snippet
23163      for ac_prog in codesign
23164do
23165  # Extract the first word of "$ac_prog", so it can be a program name with args.
23166set dummy $ac_prog; ac_word=$2
23167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23168$as_echo_n "checking for $ac_word... " >&6; }
23169if ${ac_cv_path_CODESIGN+:} false; then :
23170  $as_echo_n "(cached) " >&6
23171else
23172  case $CODESIGN in
23173  [\\/]* | ?:[\\/]*)
23174  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23175  ;;
23176  *)
23177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23178for as_dir in $PATH
23179do
23180  IFS=$as_save_IFS
23181  test -z "$as_dir" && as_dir=.
23182    for ac_exec_ext in '' $ac_executable_extensions; do
23183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23184    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23186    break 2
23187  fi
23188done
23189  done
23190IFS=$as_save_IFS
23191
23192  ;;
23193esac
23194fi
23195CODESIGN=$ac_cv_path_CODESIGN
23196if test -n "$CODESIGN"; then
23197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23198$as_echo "$CODESIGN" >&6; }
23199else
23200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23201$as_echo "no" >&6; }
23202fi
23203
23204
23205  test -n "$CODESIGN" && break
23206done
23207
23208    else
23209      # If it succeeded, then it was overridden by the user. We will use it
23210      # for the tool.
23211
23212      # First remove it from the list of overridden variables, so we can test
23213      # for unknown variables in the end.
23214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23215
23216      # Check if we try to supply an empty value
23217      if test "x$CODESIGN" = x; then
23218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23219$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23221$as_echo_n "checking for CODESIGN... " >&6; }
23222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23223$as_echo "disabled" >&6; }
23224      else
23225        # Check if the provided tool contains a complete path.
23226        tool_specified="$CODESIGN"
23227        tool_basename="${tool_specified##*/}"
23228        if test "x$tool_basename" = "x$tool_specified"; then
23229          # A command without a complete path is provided, search $PATH.
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23231$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23232          # Extract the first word of "$tool_basename", so it can be a program name with args.
23233set dummy $tool_basename; ac_word=$2
23234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23235$as_echo_n "checking for $ac_word... " >&6; }
23236if ${ac_cv_path_CODESIGN+:} false; then :
23237  $as_echo_n "(cached) " >&6
23238else
23239  case $CODESIGN in
23240  [\\/]* | ?:[\\/]*)
23241  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23242  ;;
23243  *)
23244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23245for as_dir in $PATH
23246do
23247  IFS=$as_save_IFS
23248  test -z "$as_dir" && as_dir=.
23249    for ac_exec_ext in '' $ac_executable_extensions; do
23250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23251    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23253    break 2
23254  fi
23255done
23256  done
23257IFS=$as_save_IFS
23258
23259  ;;
23260esac
23261fi
23262CODESIGN=$ac_cv_path_CODESIGN
23263if test -n "$CODESIGN"; then
23264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23265$as_echo "$CODESIGN" >&6; }
23266else
23267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23268$as_echo "no" >&6; }
23269fi
23270
23271
23272          if test "x$CODESIGN" = x; then
23273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23274          fi
23275        else
23276          # Otherwise we believe it is a complete path. Use it as it is.
23277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23278$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23280$as_echo_n "checking for CODESIGN... " >&6; }
23281          if test ! -x "$tool_specified"; then
23282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23283$as_echo "not found" >&6; }
23284            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23285          fi
23286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23287$as_echo "$tool_specified" >&6; }
23288        fi
23289      fi
23290    fi
23291
23292  fi
23293
23294
23295    if test "x$CODESIGN" != "x"; then
23296      # Verify that the openjdk_codesign certificate is present
23297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23298$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23299      rm -f codesign-testfile
23300      touch codesign-testfile
23301      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23302      rm -f codesign-testfile
23303      if test "x$CODESIGN" = x; then
23304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23305$as_echo "no" >&6; }
23306      else
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23308$as_echo "yes" >&6; }
23309      fi
23310    fi
23311
23312
23313
23314  # Publish this variable in the help.
23315
23316
23317  if [ -z "${SETFILE+x}" ]; then
23318    # The variable is not set by user, try to locate tool using the code snippet
23319    for ac_prog in SetFile
23320do
23321  # Extract the first word of "$ac_prog", so it can be a program name with args.
23322set dummy $ac_prog; ac_word=$2
23323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23324$as_echo_n "checking for $ac_word... " >&6; }
23325if ${ac_cv_path_SETFILE+:} false; then :
23326  $as_echo_n "(cached) " >&6
23327else
23328  case $SETFILE in
23329  [\\/]* | ?:[\\/]*)
23330  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23331  ;;
23332  *)
23333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23334for as_dir in $PATH
23335do
23336  IFS=$as_save_IFS
23337  test -z "$as_dir" && as_dir=.
23338    for ac_exec_ext in '' $ac_executable_extensions; do
23339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23340    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23342    break 2
23343  fi
23344done
23345  done
23346IFS=$as_save_IFS
23347
23348  ;;
23349esac
23350fi
23351SETFILE=$ac_cv_path_SETFILE
23352if test -n "$SETFILE"; then
23353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23354$as_echo "$SETFILE" >&6; }
23355else
23356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23357$as_echo "no" >&6; }
23358fi
23359
23360
23361  test -n "$SETFILE" && break
23362done
23363
23364  else
23365    # The variable is set, but is it from the command line or the environment?
23366
23367    # Try to remove the string !SETFILE! from our list.
23368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23370      # If it failed, the variable was not from the command line. Ignore it,
23371      # but warn the user (except for BASH, which is always set by the calling BASH).
23372      if test "xSETFILE" != xBASH; then
23373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23374$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23375      fi
23376      # Try to locate tool using the code snippet
23377      for ac_prog in SetFile
23378do
23379  # Extract the first word of "$ac_prog", so it can be a program name with args.
23380set dummy $ac_prog; ac_word=$2
23381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23382$as_echo_n "checking for $ac_word... " >&6; }
23383if ${ac_cv_path_SETFILE+:} false; then :
23384  $as_echo_n "(cached) " >&6
23385else
23386  case $SETFILE in
23387  [\\/]* | ?:[\\/]*)
23388  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23389  ;;
23390  *)
23391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23392for as_dir in $PATH
23393do
23394  IFS=$as_save_IFS
23395  test -z "$as_dir" && as_dir=.
23396    for ac_exec_ext in '' $ac_executable_extensions; do
23397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23398    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23400    break 2
23401  fi
23402done
23403  done
23404IFS=$as_save_IFS
23405
23406  ;;
23407esac
23408fi
23409SETFILE=$ac_cv_path_SETFILE
23410if test -n "$SETFILE"; then
23411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23412$as_echo "$SETFILE" >&6; }
23413else
23414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23415$as_echo "no" >&6; }
23416fi
23417
23418
23419  test -n "$SETFILE" && break
23420done
23421
23422    else
23423      # If it succeeded, then it was overridden by the user. We will use it
23424      # for the tool.
23425
23426      # First remove it from the list of overridden variables, so we can test
23427      # for unknown variables in the end.
23428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23429
23430      # Check if we try to supply an empty value
23431      if test "x$SETFILE" = x; then
23432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23433$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23435$as_echo_n "checking for SETFILE... " >&6; }
23436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23437$as_echo "disabled" >&6; }
23438      else
23439        # Check if the provided tool contains a complete path.
23440        tool_specified="$SETFILE"
23441        tool_basename="${tool_specified##*/}"
23442        if test "x$tool_basename" = "x$tool_specified"; then
23443          # A command without a complete path is provided, search $PATH.
23444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23445$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23446          # Extract the first word of "$tool_basename", so it can be a program name with args.
23447set dummy $tool_basename; ac_word=$2
23448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23449$as_echo_n "checking for $ac_word... " >&6; }
23450if ${ac_cv_path_SETFILE+:} false; then :
23451  $as_echo_n "(cached) " >&6
23452else
23453  case $SETFILE in
23454  [\\/]* | ?:[\\/]*)
23455  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23456  ;;
23457  *)
23458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23459for as_dir in $PATH
23460do
23461  IFS=$as_save_IFS
23462  test -z "$as_dir" && as_dir=.
23463    for ac_exec_ext in '' $ac_executable_extensions; do
23464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23465    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23467    break 2
23468  fi
23469done
23470  done
23471IFS=$as_save_IFS
23472
23473  ;;
23474esac
23475fi
23476SETFILE=$ac_cv_path_SETFILE
23477if test -n "$SETFILE"; then
23478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23479$as_echo "$SETFILE" >&6; }
23480else
23481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23482$as_echo "no" >&6; }
23483fi
23484
23485
23486          if test "x$SETFILE" = x; then
23487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23488          fi
23489        else
23490          # Otherwise we believe it is a complete path. Use it as it is.
23491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23492$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23494$as_echo_n "checking for SETFILE... " >&6; }
23495          if test ! -x "$tool_specified"; then
23496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23497$as_echo "not found" >&6; }
23498            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23499          fi
23500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23501$as_echo "$tool_specified" >&6; }
23502        fi
23503      fi
23504    fi
23505
23506  fi
23507
23508
23509
23510  if test "x$SETFILE" = x; then
23511    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23512  fi
23513
23514
23515  fi
23516
23517
23518  # Test if bash supports pipefail.
23519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23520$as_echo_n "checking if bash supports pipefail... " >&6; }
23521  if ${BASH} -c 'set -o pipefail'; then
23522    BASH_ARGS="$BASH_ARGS -o pipefail"
23523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23524$as_echo "yes" >&6; }
23525  else
23526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23527$as_echo "no" >&6; }
23528  fi
23529
23530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23531$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23532  if ${BASH} -e -c 'true'; then
23533    BASH_ARGS="$BASH_ARGS -e"
23534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23535$as_echo "yes" >&6; }
23536  else
23537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23538$as_echo "no" >&6; }
23539  fi
23540
23541
23542
23543
23544# Check if pkg-config is available.
23545
23546
23547if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23548	if test -n "$ac_tool_prefix"; then
23549  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23550set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23552$as_echo_n "checking for $ac_word... " >&6; }
23553if ${ac_cv_path_PKG_CONFIG+:} false; then :
23554  $as_echo_n "(cached) " >&6
23555else
23556  case $PKG_CONFIG in
23557  [\\/]* | ?:[\\/]*)
23558  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23559  ;;
23560  *)
23561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23562for as_dir in $PATH
23563do
23564  IFS=$as_save_IFS
23565  test -z "$as_dir" && as_dir=.
23566    for ac_exec_ext in '' $ac_executable_extensions; do
23567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23568    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23570    break 2
23571  fi
23572done
23573  done
23574IFS=$as_save_IFS
23575
23576  ;;
23577esac
23578fi
23579PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23580if test -n "$PKG_CONFIG"; then
23581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23582$as_echo "$PKG_CONFIG" >&6; }
23583else
23584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23585$as_echo "no" >&6; }
23586fi
23587
23588
23589fi
23590if test -z "$ac_cv_path_PKG_CONFIG"; then
23591  ac_pt_PKG_CONFIG=$PKG_CONFIG
23592  # Extract the first word of "pkg-config", so it can be a program name with args.
23593set dummy pkg-config; ac_word=$2
23594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23595$as_echo_n "checking for $ac_word... " >&6; }
23596if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23597  $as_echo_n "(cached) " >&6
23598else
23599  case $ac_pt_PKG_CONFIG in
23600  [\\/]* | ?:[\\/]*)
23601  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23602  ;;
23603  *)
23604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23605for as_dir in $PATH
23606do
23607  IFS=$as_save_IFS
23608  test -z "$as_dir" && as_dir=.
23609    for ac_exec_ext in '' $ac_executable_extensions; do
23610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23611    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23613    break 2
23614  fi
23615done
23616  done
23617IFS=$as_save_IFS
23618
23619  ;;
23620esac
23621fi
23622ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23623if test -n "$ac_pt_PKG_CONFIG"; then
23624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23625$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23626else
23627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23628$as_echo "no" >&6; }
23629fi
23630
23631  if test "x$ac_pt_PKG_CONFIG" = x; then
23632    PKG_CONFIG=""
23633  else
23634    case $cross_compiling:$ac_tool_warned in
23635yes:)
23636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23638ac_tool_warned=yes ;;
23639esac
23640    PKG_CONFIG=$ac_pt_PKG_CONFIG
23641  fi
23642else
23643  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23644fi
23645
23646fi
23647if test -n "$PKG_CONFIG"; then
23648	_pkg_min_version=0.9.0
23649	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23650$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23651	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23652		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23653$as_echo "yes" >&6; }
23654	else
23655		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23656$as_echo "no" >&6; }
23657		PKG_CONFIG=""
23658	fi
23659
23660fi
23661
23662# After basic tools have been setup, we can check build os specific details.
23663
23664  ###############################################################################
23665
23666  # Note that this is the build platform OS version!
23667
23668  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23669  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23670  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23671  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23672
23673
23674
23675
23676
23677# Misc basic settings
23678
23679
23680# Check whether --with-default-make-target was given.
23681if test "${with_default_make_target+set}" = set; then :
23682  withval=$with_default_make_target;
23683fi
23684
23685  if test "x$with_default_make_target" = "x" \
23686      || test "x$with_default_make_target" = "xyes"; then
23687    DEFAULT_MAKE_TARGET="exploded-image"
23688  elif test "x$with_default_make_target" = "xno"; then
23689    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23690  else
23691    DEFAULT_MAKE_TARGET="$with_default_make_target"
23692  fi
23693
23694
23695
23696
23697###############################################################################
23698#
23699# Determine OpenJDK variants, options and version numbers.
23700#
23701###############################################################################
23702
23703# We need build & target for this.
23704
23705  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23706  # We always build headless support.
23707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23708$as_echo_n "checking headful support... " >&6; }
23709  # Check whether --enable-headful was given.
23710if test "${enable_headful+set}" = set; then :
23711  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23712else
23713  SUPPORT_HEADFUL=yes
23714fi
23715
23716
23717  SUPPORT_HEADLESS=yes
23718  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23719
23720  if test "x$SUPPORT_HEADFUL" = xyes; then
23721    # We are building both headful and headless.
23722    headful_msg="include support for both headful and headless"
23723  fi
23724
23725  if test "x$SUPPORT_HEADFUL" = xno; then
23726    # Thus we are building headless only.
23727    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23728    headful_msg="headless only"
23729  fi
23730
23731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23732$as_echo "$headful_msg" >&6; }
23733
23734
23735
23736
23737
23738  # Choose cacerts source file
23739
23740# Check whether --with-cacerts-file was given.
23741if test "${with_cacerts_file+set}" = set; then :
23742  withval=$with_cacerts_file;
23743fi
23744
23745  if test "x$with_cacerts_file" != x; then
23746    CACERTS_FILE=$with_cacerts_file
23747  fi
23748
23749
23750  # Enable or disable unlimited crypto
23751  # Check whether --enable-unlimited-crypto was given.
23752if test "${enable_unlimited_crypto+set}" = set; then :
23753  enableval=$enable_unlimited_crypto;
23754else
23755  enable_unlimited_crypto=no
23756fi
23757
23758  if test "x$enable_unlimited_crypto" = "xyes"; then
23759    UNLIMITED_CRYPTO=true
23760  else
23761    UNLIMITED_CRYPTO=false
23762  fi
23763
23764
23765  # Should we build the serviceability agent (SA)?
23766  INCLUDE_SA=true
23767  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23768    INCLUDE_SA=false
23769  fi
23770  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23771    INCLUDE_SA=false
23772  fi
23773  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23774    INCLUDE_SA=false
23775  fi
23776
23777
23778  # Compress jars
23779  COMPRESS_JARS=false
23780
23781
23782
23783  # Setup default copyright year. Mostly overridden when building close to a new year.
23784
23785# Check whether --with-copyright-year was given.
23786if test "${with_copyright_year+set}" = set; then :
23787  withval=$with_copyright_year;
23788fi
23789
23790  if test "x$with_copyright_year" = xyes; then
23791    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23792  elif test "x$with_copyright_year" != x; then
23793    COPYRIGHT_YEAR="$with_copyright_year"
23794  else
23795    COPYRIGHT_YEAR=`date +'%Y'`
23796  fi
23797
23798
23799
23800  # Check whether --enable-keep-packaged-modules was given.
23801if test "${enable_keep_packaged_modules+set}" = set; then :
23802  enableval=$enable_keep_packaged_modules;
23803fi
23804
23805
23806  if test "x$enable_keep_packaged_modules" = "xyes"; then
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23808$as_echo_n "checking if packaged modules are kept... " >&6; }
23809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23810$as_echo "yes" >&6; }
23811    JLINK_KEEP_PACKAGED_MODULES=true
23812  elif test "x$enable_keep_packaged_modules" = "xno"; then
23813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23814$as_echo_n "checking if packaged modules are kept... " >&6; }
23815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23816$as_echo "no" >&6; }
23817    JLINK_KEEP_PACKAGED_MODULES=false
23818  elif test "x$enable_keep_packaged_modules" = "x"; then
23819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23820$as_echo "yes (default)" >&6; }
23821    JLINK_KEEP_PACKAGED_MODULES=true
23822  else
23823    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23824  fi
23825
23826
23827
23828
23829  # Warn user that old version arguments are deprecated.
23830
23831
23832# Check whether --with-milestone was given.
23833if test "${with_milestone+set}" = set; then :
23834  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23835$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23836fi
23837
23838
23839
23840
23841# Check whether --with-update-version was given.
23842if test "${with_update_version+set}" = set; then :
23843  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23844$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23845fi
23846
23847
23848
23849
23850# Check whether --with-user-release-suffix was given.
23851if test "${with_user_release_suffix+set}" = set; then :
23852  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
23853$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23854fi
23855
23856
23857
23858
23859# Check whether --with-build-number was given.
23860if test "${with_build_number+set}" = set; then :
23861  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23862$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23863fi
23864
23865
23866
23867  # Source the version numbers file
23868  . $AUTOCONF_DIR/version-numbers
23869
23870  # Some non-version number information is set in that file
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880  # Override version from arguments
23881
23882  # If --with-version-string is set, process it first. It is possible to
23883  # override parts with more specific flags, since these are processed later.
23884
23885# Check whether --with-version-string was given.
23886if test "${with_version_string+set}" = set; then :
23887  withval=$with_version_string;
23888fi
23889
23890  if test "x$with_version_string" = xyes; then
23891    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23892  elif test "x$with_version_string" != x; then
23893    # Additional [] needed to keep m4 from mangling shell constructs.
23894    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23895      VERSION_MAJOR=${BASH_REMATCH[1]}
23896      VERSION_MINOR=${BASH_REMATCH[3]}
23897      VERSION_SECURITY=${BASH_REMATCH[5]}
23898      VERSION_PATCH=${BASH_REMATCH[7]}
23899      VERSION_PRE=${BASH_REMATCH[9]}
23900      version_plus_separator=${BASH_REMATCH[11]}
23901      VERSION_BUILD=${BASH_REMATCH[12]}
23902      VERSION_OPT=${BASH_REMATCH[14]}
23903      # Unspecified numerical fields are interpreted as 0.
23904      if test "x$VERSION_MINOR" = x; then
23905        VERSION_MINOR=0
23906      fi
23907      if test "x$VERSION_SECURITY" = x; then
23908        VERSION_SECURITY=0
23909      fi
23910      if test "x$VERSION_PATCH" = x; then
23911        VERSION_PATCH=0
23912      fi
23913      if test "x$version_plus_separator" != x \
23914          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23915        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23916      fi
23917      # Stop the version part process from setting default values.
23918      # We still allow them to explicitely override though.
23919      NO_DEFAULT_VERSION_PARTS=true
23920    else
23921      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23922    fi
23923  fi
23924
23925
23926# Check whether --with-version-pre was given.
23927if test "${with_version_pre+set}" = set; then :
23928  withval=$with_version_pre; with_version_pre_present=true
23929else
23930  with_version_pre_present=false
23931fi
23932
23933
23934  if test "x$with_version_pre_present" = xtrue; then
23935    if test "x$with_version_pre" = xyes; then
23936      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23937    elif test "x$with_version_pre" = xno; then
23938      # Interpret --without-* as empty string instead of the literal "no"
23939      VERSION_PRE=
23940    else
23941      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23942       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23943      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23945$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23946      fi
23947    fi
23948  else
23949    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23950      # Default is to use "internal" as pre
23951      VERSION_PRE="internal"
23952    fi
23953  fi
23954
23955
23956# Check whether --with-version-opt was given.
23957if test "${with_version_opt+set}" = set; then :
23958  withval=$with_version_opt; with_version_opt_present=true
23959else
23960  with_version_opt_present=false
23961fi
23962
23963
23964  if test "x$with_version_opt_present" = xtrue; then
23965    if test "x$with_version_opt" = xyes; then
23966      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23967    elif test "x$with_version_opt" = xno; then
23968      # Interpret --without-* as empty string instead of the literal "no"
23969      VERSION_OPT=
23970    else
23971      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23972       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23973      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23975$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23976      fi
23977    fi
23978  else
23979    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23980      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23981      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23982      # Outer [ ] to quote m4.
23983       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23984      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23985    fi
23986  fi
23987
23988
23989# Check whether --with-version-build was given.
23990if test "${with_version_build+set}" = set; then :
23991  withval=$with_version_build; with_version_build_present=true
23992else
23993  with_version_build_present=false
23994fi
23995
23996
23997  if test "x$with_version_build_present" = xtrue; then
23998    if test "x$with_version_build" = xyes; then
23999      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24000    elif test "x$with_version_build" = xno; then
24001      # Interpret --without-* as empty string instead of the literal "no"
24002      VERSION_BUILD=
24003    elif test "x$with_version_build" = x; then
24004      VERSION_BUILD=
24005    else
24006
24007  # Additional [] needed to keep m4 from mangling shell constructs.
24008  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24009    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24010  fi
24011  # Extract the version number without leading zeros.
24012  cleaned_value=${BASH_REMATCH[1]}
24013  if test "x$cleaned_value" = x; then
24014    # Special case for zero
24015    cleaned_value=${BASH_REMATCH[2]}
24016  fi
24017
24018  if test $cleaned_value -gt 255; then
24019    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24020  fi
24021  if test "x$cleaned_value" != "x$with_version_build"; then
24022    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24023$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24024  fi
24025  VERSION_BUILD=$cleaned_value
24026
24027    fi
24028  else
24029    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24030      # Default is to not have a build number.
24031      VERSION_BUILD=""
24032      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24033      VERSION_BUILD=0
24034    fi
24035  fi
24036
24037
24038# Check whether --with-version-major was given.
24039if test "${with_version_major+set}" = set; then :
24040  withval=$with_version_major; with_version_major_present=true
24041else
24042  with_version_major_present=false
24043fi
24044
24045
24046  if test "x$with_version_major_present" = xtrue; then
24047    if test "x$with_version_major" = xyes; then
24048      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24049    else
24050
24051  # Additional [] needed to keep m4 from mangling shell constructs.
24052  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24053    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24054  fi
24055  # Extract the version number without leading zeros.
24056  cleaned_value=${BASH_REMATCH[1]}
24057  if test "x$cleaned_value" = x; then
24058    # Special case for zero
24059    cleaned_value=${BASH_REMATCH[2]}
24060  fi
24061
24062  if test $cleaned_value -gt 255; then
24063    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24064  fi
24065  if test "x$cleaned_value" != "x$with_version_major"; then
24066    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24067$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24068  fi
24069  VERSION_MAJOR=$cleaned_value
24070
24071    fi
24072  else
24073    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24074      # Default is to get value from version-numbers
24075      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24076    fi
24077  fi
24078
24079
24080# Check whether --with-version-minor was given.
24081if test "${with_version_minor+set}" = set; then :
24082  withval=$with_version_minor; with_version_minor_present=true
24083else
24084  with_version_minor_present=false
24085fi
24086
24087
24088  if test "x$with_version_minor_present" = xtrue; then
24089    if test "x$with_version_minor" = xyes; then
24090      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24091    elif test "x$with_version_minor" = xno; then
24092      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24093      VERSION_MINOR=0
24094    elif test "x$with_version_minor" = x; then
24095      VERSION_MINOR=0
24096    else
24097
24098  # Additional [] needed to keep m4 from mangling shell constructs.
24099  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24100    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24101  fi
24102  # Extract the version number without leading zeros.
24103  cleaned_value=${BASH_REMATCH[1]}
24104  if test "x$cleaned_value" = x; then
24105    # Special case for zero
24106    cleaned_value=${BASH_REMATCH[2]}
24107  fi
24108
24109  if test $cleaned_value -gt 255; then
24110    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24111  fi
24112  if test "x$cleaned_value" != "x$with_version_minor"; then
24113    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24114$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24115  fi
24116  VERSION_MINOR=$cleaned_value
24117
24118    fi
24119  else
24120    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24121      # Default is 0, if unspecified
24122      VERSION_MINOR=0
24123    fi
24124  fi
24125
24126
24127# Check whether --with-version-security was given.
24128if test "${with_version_security+set}" = set; then :
24129  withval=$with_version_security; with_version_security_present=true
24130else
24131  with_version_security_present=false
24132fi
24133
24134
24135  if test "x$with_version_security_present" = xtrue; then
24136    if test "x$with_version_security" = xyes; then
24137      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24138    elif test "x$with_version_security" = xno; then
24139      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24140      VERSION_SECURITY=0
24141    elif test "x$with_version_security" = x; then
24142      VERSION_SECURITY=0
24143    else
24144
24145  # Additional [] needed to keep m4 from mangling shell constructs.
24146  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24147    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24148  fi
24149  # Extract the version number without leading zeros.
24150  cleaned_value=${BASH_REMATCH[1]}
24151  if test "x$cleaned_value" = x; then
24152    # Special case for zero
24153    cleaned_value=${BASH_REMATCH[2]}
24154  fi
24155
24156  if test $cleaned_value -gt 255; then
24157    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24158  fi
24159  if test "x$cleaned_value" != "x$with_version_security"; then
24160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24161$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24162  fi
24163  VERSION_SECURITY=$cleaned_value
24164
24165    fi
24166  else
24167    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24168      # Default is 0, if unspecified
24169      VERSION_SECURITY=0
24170    fi
24171  fi
24172
24173
24174# Check whether --with-version-patch was given.
24175if test "${with_version_patch+set}" = set; then :
24176  withval=$with_version_patch; with_version_patch_present=true
24177else
24178  with_version_patch_present=false
24179fi
24180
24181
24182  if test "x$with_version_patch_present" = xtrue; then
24183    if test "x$with_version_patch" = xyes; then
24184      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24185    elif test "x$with_version_patch" = xno; then
24186      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24187      VERSION_PATCH=0
24188    elif test "x$with_version_patch" = x; then
24189      VERSION_PATCH=0
24190    else
24191
24192  # Additional [] needed to keep m4 from mangling shell constructs.
24193  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24194    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24195  fi
24196  # Extract the version number without leading zeros.
24197  cleaned_value=${BASH_REMATCH[1]}
24198  if test "x$cleaned_value" = x; then
24199    # Special case for zero
24200    cleaned_value=${BASH_REMATCH[2]}
24201  fi
24202
24203  if test $cleaned_value -gt 255; then
24204    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24205  fi
24206  if test "x$cleaned_value" != "x$with_version_patch"; then
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24208$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24209  fi
24210  VERSION_PATCH=$cleaned_value
24211
24212    fi
24213  else
24214    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24215      # Default is 0, if unspecified
24216      VERSION_PATCH=0
24217    fi
24218  fi
24219
24220  # Calculate derived version properties
24221
24222  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24223  if test "x$VERSION_PRE" = x; then
24224    VERSION_IS_GA=true
24225  else
24226    VERSION_IS_GA=false
24227  fi
24228
24229  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24230  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24231
24232  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24233  # Strip trailing zeroes from stripped_version_number
24234  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24235  VERSION_NUMBER=$stripped_version_number
24236
24237  # The complete version string, with additional build information
24238  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24239    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24240  else
24241    # If either build or opt is set, we need a + separator
24242    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24243  fi
24244
24245  # The short version string, just VERSION_NUMBER and PRE, if present.
24246  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24247
24248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24249$as_echo_n "checking for version string... " >&6; }
24250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24251$as_echo "$VERSION_STRING" >&6; }
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267###############################################################################
24268#
24269# Setup BootJDK, used to bootstrap the build.
24270#
24271###############################################################################
24272
24273
24274  BOOT_JDK_FOUND=no
24275
24276# Check whether --with-boot-jdk was given.
24277if test "${with_boot_jdk+set}" = set; then :
24278  withval=$with_boot_jdk;
24279fi
24280
24281
24282  # We look for the Boot JDK through various means, going from more certain to
24283  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24284  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24285  # must check if this is indeed valid; otherwise we'll continue looking.
24286
24287  # Test: Is bootjdk explicitely set by command line arguments?
24288
24289  if test "x$BOOT_JDK_FOUND" = xno; then
24290    # Now execute the test
24291
24292  if test "x$with_boot_jdk" != x; then
24293    BOOT_JDK=$with_boot_jdk
24294    BOOT_JDK_FOUND=maybe
24295    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24296$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24297  fi
24298
24299
24300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24302      # Do we have a bin/java?
24303      if test ! -x "$BOOT_JDK/bin/java"; then
24304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24306        BOOT_JDK_FOUND=no
24307      else
24308        # Do we have a bin/javac?
24309        if test ! -x "$BOOT_JDK/bin/javac"; then
24310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24314          BOOT_JDK_FOUND=no
24315        else
24316          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24317          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24318
24319          # Extra M4 quote needed to protect [] in grep expression.
24320          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24321          if test "x$FOUND_CORRECT_VERSION" = x; then
24322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24324            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24325$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24326            BOOT_JDK_FOUND=no
24327          else
24328            # We're done! :-)
24329            BOOT_JDK_FOUND=yes
24330
24331  # Only process if variable expands to non-empty
24332
24333  if test "x$BOOT_JDK" != x; then
24334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24335
24336  # Input might be given as Windows format, start by converting to
24337  # unix format.
24338  path="$BOOT_JDK"
24339  new_path=`$CYGPATH -u "$path"`
24340
24341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24344  # "foo.exe" is OK but "foo" is an error.
24345  #
24346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24347  # It is also a way to make sure we got the proper file name for the real test later on.
24348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24349  if test "x$test_shortpath" = x; then
24350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24353  fi
24354
24355  # Call helper function which possibly converts this using DOS-style short mode.
24356  # If so, the updated path is stored in $new_path.
24357
24358  input_path="$new_path"
24359  # Check if we need to convert this using DOS-style short mode. If the path
24360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24361  # take no chances and rewrite it.
24362  # Note: m4 eats our [], so we need to use [ and ] instead.
24363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24364  if test "x$has_forbidden_chars" != x; then
24365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24369      # Going to short mode and back again did indeed matter. Since short mode is
24370      # case insensitive, let's make it lowercase to improve readability.
24371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24372      # Now convert it back to Unix-style (cygpath)
24373      input_path=`$CYGPATH -u "$shortmode_path"`
24374      new_path="$input_path"
24375    fi
24376  fi
24377
24378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24379  if test "x$test_cygdrive_prefix" = x; then
24380    # As a simple fix, exclude /usr/bin since it's not a real path.
24381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24383      # a path prefixed by /cygdrive for fixpath to work.
24384      new_path="$CYGWIN_ROOT_PATH$input_path"
24385    fi
24386  fi
24387
24388
24389  if test "x$path" != "x$new_path"; then
24390    BOOT_JDK="$new_path"
24391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24393  fi
24394
24395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24396
24397  path="$BOOT_JDK"
24398  has_colon=`$ECHO $path | $GREP ^.:`
24399  new_path="$path"
24400  if test "x$has_colon" = x; then
24401    # Not in mixed or Windows style, start by that.
24402    new_path=`cmd //c echo $path`
24403  fi
24404
24405
24406  input_path="$new_path"
24407  # Check if we need to convert this using DOS-style short mode. If the path
24408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24409  # take no chances and rewrite it.
24410  # Note: m4 eats our [], so we need to use [ and ] instead.
24411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24412  if test "x$has_forbidden_chars" != x; then
24413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24415  fi
24416
24417
24418  windows_path="$new_path"
24419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24420    unix_path=`$CYGPATH -u "$windows_path"`
24421    new_path="$unix_path"
24422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24424    new_path="$unix_path"
24425  fi
24426
24427  if test "x$path" != "x$new_path"; then
24428    BOOT_JDK="$new_path"
24429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24431  fi
24432
24433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24435
24436    else
24437      # We're on a unix platform. Hooray! :)
24438      path="$BOOT_JDK"
24439      has_space=`$ECHO "$path" | $GREP " "`
24440      if test "x$has_space" != x; then
24441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24444      fi
24445
24446      # Use eval to expand a potential ~
24447      eval path="$path"
24448      if test ! -f "$path" && test ! -d "$path"; then
24449        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24450      fi
24451
24452      if test -d "$path"; then
24453        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24454      else
24455        dir="`$DIRNAME "$path"`"
24456        base="`$BASENAME "$path"`"
24457        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24458      fi
24459    fi
24460  fi
24461
24462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24463$as_echo_n "checking for Boot JDK... " >&6; }
24464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24465$as_echo "$BOOT_JDK" >&6; }
24466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24467$as_echo_n "checking Boot JDK version... " >&6; }
24468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24470$as_echo "$BOOT_JDK_VERSION" >&6; }
24471          fi # end check jdk version
24472        fi # end check javac
24473      fi # end check java
24474    fi # end check boot jdk found
24475  fi
24476
24477  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24478    # Having specified an argument which is incorrect will produce an instant failure;
24479    # we should not go on looking
24480    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24481  fi
24482
24483  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24484
24485  if test "x$BOOT_JDK_FOUND" = xno; then
24486    # Now execute the test
24487
24488  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24489    # First check at user selected default
24490
24491  if test "x$BOOT_JDK_FOUND" = xno; then
24492    # Now execute the test
24493
24494  if test -x /usr/libexec/java_home; then
24495    BOOT_JDK=`/usr/libexec/java_home `
24496    BOOT_JDK_FOUND=maybe
24497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24498$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24499  fi
24500
24501
24502    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24503    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24504      # Do we have a bin/java?
24505      if test ! -x "$BOOT_JDK/bin/java"; then
24506        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24508        BOOT_JDK_FOUND=no
24509      else
24510        # Do we have a bin/javac?
24511        if test ! -x "$BOOT_JDK/bin/javac"; then
24512          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24514          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24515$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24516          BOOT_JDK_FOUND=no
24517        else
24518          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24519          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24520
24521          # Extra M4 quote needed to protect [] in grep expression.
24522          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24523          if test "x$FOUND_CORRECT_VERSION" = x; then
24524            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24526            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24527$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24528            BOOT_JDK_FOUND=no
24529          else
24530            # We're done! :-)
24531            BOOT_JDK_FOUND=yes
24532
24533  # Only process if variable expands to non-empty
24534
24535  if test "x$BOOT_JDK" != x; then
24536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24537
24538  # Input might be given as Windows format, start by converting to
24539  # unix format.
24540  path="$BOOT_JDK"
24541  new_path=`$CYGPATH -u "$path"`
24542
24543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24546  # "foo.exe" is OK but "foo" is an error.
24547  #
24548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24549  # It is also a way to make sure we got the proper file name for the real test later on.
24550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24551  if test "x$test_shortpath" = x; then
24552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24553$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24554    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24555  fi
24556
24557  # Call helper function which possibly converts this using DOS-style short mode.
24558  # If so, the updated path is stored in $new_path.
24559
24560  input_path="$new_path"
24561  # Check if we need to convert this using DOS-style short mode. If the path
24562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24563  # take no chances and rewrite it.
24564  # Note: m4 eats our [], so we need to use [ and ] instead.
24565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24566  if test "x$has_forbidden_chars" != x; then
24567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24571      # Going to short mode and back again did indeed matter. Since short mode is
24572      # case insensitive, let's make it lowercase to improve readability.
24573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24574      # Now convert it back to Unix-style (cygpath)
24575      input_path=`$CYGPATH -u "$shortmode_path"`
24576      new_path="$input_path"
24577    fi
24578  fi
24579
24580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24581  if test "x$test_cygdrive_prefix" = x; then
24582    # As a simple fix, exclude /usr/bin since it's not a real path.
24583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24585      # a path prefixed by /cygdrive for fixpath to work.
24586      new_path="$CYGWIN_ROOT_PATH$input_path"
24587    fi
24588  fi
24589
24590
24591  if test "x$path" != "x$new_path"; then
24592    BOOT_JDK="$new_path"
24593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24595  fi
24596
24597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24598
24599  path="$BOOT_JDK"
24600  has_colon=`$ECHO $path | $GREP ^.:`
24601  new_path="$path"
24602  if test "x$has_colon" = x; then
24603    # Not in mixed or Windows style, start by that.
24604    new_path=`cmd //c echo $path`
24605  fi
24606
24607
24608  input_path="$new_path"
24609  # Check if we need to convert this using DOS-style short mode. If the path
24610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24611  # take no chances and rewrite it.
24612  # Note: m4 eats our [], so we need to use [ and ] instead.
24613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24614  if test "x$has_forbidden_chars" != x; then
24615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24617  fi
24618
24619
24620  windows_path="$new_path"
24621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24622    unix_path=`$CYGPATH -u "$windows_path"`
24623    new_path="$unix_path"
24624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24626    new_path="$unix_path"
24627  fi
24628
24629  if test "x$path" != "x$new_path"; then
24630    BOOT_JDK="$new_path"
24631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24633  fi
24634
24635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24637
24638    else
24639      # We're on a unix platform. Hooray! :)
24640      path="$BOOT_JDK"
24641      has_space=`$ECHO "$path" | $GREP " "`
24642      if test "x$has_space" != x; then
24643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24646      fi
24647
24648      # Use eval to expand a potential ~
24649      eval path="$path"
24650      if test ! -f "$path" && test ! -d "$path"; then
24651        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24652      fi
24653
24654      if test -d "$path"; then
24655        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24656      else
24657        dir="`$DIRNAME "$path"`"
24658        base="`$BASENAME "$path"`"
24659        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24660      fi
24661    fi
24662  fi
24663
24664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24665$as_echo_n "checking for Boot JDK... " >&6; }
24666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24667$as_echo "$BOOT_JDK" >&6; }
24668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24669$as_echo_n "checking Boot JDK version... " >&6; }
24670            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24672$as_echo "$BOOT_JDK_VERSION" >&6; }
24673          fi # end check jdk version
24674        fi # end check javac
24675      fi # end check java
24676    fi # end check boot jdk found
24677  fi
24678
24679    # If that did not work out (e.g. too old), try explicit versions instead
24680
24681  if test "x$BOOT_JDK_FOUND" = xno; then
24682    # Now execute the test
24683
24684  if test -x /usr/libexec/java_home; then
24685    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24686    BOOT_JDK_FOUND=maybe
24687    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24688$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24689  fi
24690
24691
24692    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24693    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24694      # Do we have a bin/java?
24695      if test ! -x "$BOOT_JDK/bin/java"; then
24696        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24698        BOOT_JDK_FOUND=no
24699      else
24700        # Do we have a bin/javac?
24701        if test ! -x "$BOOT_JDK/bin/javac"; then
24702          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24704          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24705$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24706          BOOT_JDK_FOUND=no
24707        else
24708          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24709          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24710
24711          # Extra M4 quote needed to protect [] in grep expression.
24712          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24713          if test "x$FOUND_CORRECT_VERSION" = x; then
24714            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24716            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24717$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24718            BOOT_JDK_FOUND=no
24719          else
24720            # We're done! :-)
24721            BOOT_JDK_FOUND=yes
24722
24723  # Only process if variable expands to non-empty
24724
24725  if test "x$BOOT_JDK" != x; then
24726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24727
24728  # Input might be given as Windows format, start by converting to
24729  # unix format.
24730  path="$BOOT_JDK"
24731  new_path=`$CYGPATH -u "$path"`
24732
24733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24736  # "foo.exe" is OK but "foo" is an error.
24737  #
24738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24739  # It is also a way to make sure we got the proper file name for the real test later on.
24740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24741  if test "x$test_shortpath" = x; then
24742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24744    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24745  fi
24746
24747  # Call helper function which possibly converts this using DOS-style short mode.
24748  # If so, the updated path is stored in $new_path.
24749
24750  input_path="$new_path"
24751  # Check if we need to convert this using DOS-style short mode. If the path
24752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24753  # take no chances and rewrite it.
24754  # Note: m4 eats our [], so we need to use [ and ] instead.
24755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24756  if test "x$has_forbidden_chars" != x; then
24757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24761      # Going to short mode and back again did indeed matter. Since short mode is
24762      # case insensitive, let's make it lowercase to improve readability.
24763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24764      # Now convert it back to Unix-style (cygpath)
24765      input_path=`$CYGPATH -u "$shortmode_path"`
24766      new_path="$input_path"
24767    fi
24768  fi
24769
24770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24771  if test "x$test_cygdrive_prefix" = x; then
24772    # As a simple fix, exclude /usr/bin since it's not a real path.
24773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24775      # a path prefixed by /cygdrive for fixpath to work.
24776      new_path="$CYGWIN_ROOT_PATH$input_path"
24777    fi
24778  fi
24779
24780
24781  if test "x$path" != "x$new_path"; then
24782    BOOT_JDK="$new_path"
24783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24785  fi
24786
24787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24788
24789  path="$BOOT_JDK"
24790  has_colon=`$ECHO $path | $GREP ^.:`
24791  new_path="$path"
24792  if test "x$has_colon" = x; then
24793    # Not in mixed or Windows style, start by that.
24794    new_path=`cmd //c echo $path`
24795  fi
24796
24797
24798  input_path="$new_path"
24799  # Check if we need to convert this using DOS-style short mode. If the path
24800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24801  # take no chances and rewrite it.
24802  # Note: m4 eats our [], so we need to use [ and ] instead.
24803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24804  if test "x$has_forbidden_chars" != x; then
24805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24807  fi
24808
24809
24810  windows_path="$new_path"
24811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24812    unix_path=`$CYGPATH -u "$windows_path"`
24813    new_path="$unix_path"
24814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24816    new_path="$unix_path"
24817  fi
24818
24819  if test "x$path" != "x$new_path"; then
24820    BOOT_JDK="$new_path"
24821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24823  fi
24824
24825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24827
24828    else
24829      # We're on a unix platform. Hooray! :)
24830      path="$BOOT_JDK"
24831      has_space=`$ECHO "$path" | $GREP " "`
24832      if test "x$has_space" != x; then
24833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24835        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24836      fi
24837
24838      # Use eval to expand a potential ~
24839      eval path="$path"
24840      if test ! -f "$path" && test ! -d "$path"; then
24841        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24842      fi
24843
24844      if test -d "$path"; then
24845        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24846      else
24847        dir="`$DIRNAME "$path"`"
24848        base="`$BASENAME "$path"`"
24849        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24850      fi
24851    fi
24852  fi
24853
24854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24855$as_echo_n "checking for Boot JDK... " >&6; }
24856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24857$as_echo "$BOOT_JDK" >&6; }
24858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24859$as_echo_n "checking Boot JDK version... " >&6; }
24860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24862$as_echo "$BOOT_JDK_VERSION" >&6; }
24863          fi # end check jdk version
24864        fi # end check javac
24865      fi # end check java
24866    fi # end check boot jdk found
24867  fi
24868
24869
24870  if test "x$BOOT_JDK_FOUND" = xno; then
24871    # Now execute the test
24872
24873  if test -x /usr/libexec/java_home; then
24874    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24875    BOOT_JDK_FOUND=maybe
24876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24877$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24878  fi
24879
24880
24881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24883      # Do we have a bin/java?
24884      if test ! -x "$BOOT_JDK/bin/java"; then
24885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24887        BOOT_JDK_FOUND=no
24888      else
24889        # Do we have a bin/javac?
24890        if test ! -x "$BOOT_JDK/bin/javac"; then
24891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24895          BOOT_JDK_FOUND=no
24896        else
24897          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24898          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24899
24900          # Extra M4 quote needed to protect [] in grep expression.
24901          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24902          if test "x$FOUND_CORRECT_VERSION" = x; then
24903            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24905            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24906$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24907            BOOT_JDK_FOUND=no
24908          else
24909            # We're done! :-)
24910            BOOT_JDK_FOUND=yes
24911
24912  # Only process if variable expands to non-empty
24913
24914  if test "x$BOOT_JDK" != x; then
24915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24916
24917  # Input might be given as Windows format, start by converting to
24918  # unix format.
24919  path="$BOOT_JDK"
24920  new_path=`$CYGPATH -u "$path"`
24921
24922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24925  # "foo.exe" is OK but "foo" is an error.
24926  #
24927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24928  # It is also a way to make sure we got the proper file name for the real test later on.
24929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24930  if test "x$test_shortpath" = x; then
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24934  fi
24935
24936  # Call helper function which possibly converts this using DOS-style short mode.
24937  # If so, the updated path is stored in $new_path.
24938
24939  input_path="$new_path"
24940  # Check if we need to convert this using DOS-style short mode. If the path
24941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24942  # take no chances and rewrite it.
24943  # Note: m4 eats our [], so we need to use [ and ] instead.
24944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24945  if test "x$has_forbidden_chars" != x; then
24946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24950      # Going to short mode and back again did indeed matter. Since short mode is
24951      # case insensitive, let's make it lowercase to improve readability.
24952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24953      # Now convert it back to Unix-style (cygpath)
24954      input_path=`$CYGPATH -u "$shortmode_path"`
24955      new_path="$input_path"
24956    fi
24957  fi
24958
24959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24960  if test "x$test_cygdrive_prefix" = x; then
24961    # As a simple fix, exclude /usr/bin since it's not a real path.
24962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24964      # a path prefixed by /cygdrive for fixpath to work.
24965      new_path="$CYGWIN_ROOT_PATH$input_path"
24966    fi
24967  fi
24968
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24977
24978  path="$BOOT_JDK"
24979  has_colon=`$ECHO $path | $GREP ^.:`
24980  new_path="$path"
24981  if test "x$has_colon" = x; then
24982    # Not in mixed or Windows style, start by that.
24983    new_path=`cmd //c echo $path`
24984  fi
24985
24986
24987  input_path="$new_path"
24988  # Check if we need to convert this using DOS-style short mode. If the path
24989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24990  # take no chances and rewrite it.
24991  # Note: m4 eats our [], so we need to use [ and ] instead.
24992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24993  if test "x$has_forbidden_chars" != x; then
24994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24996  fi
24997
24998
24999  windows_path="$new_path"
25000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25001    unix_path=`$CYGPATH -u "$windows_path"`
25002    new_path="$unix_path"
25003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25005    new_path="$unix_path"
25006  fi
25007
25008  if test "x$path" != "x$new_path"; then
25009    BOOT_JDK="$new_path"
25010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25012  fi
25013
25014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25016
25017    else
25018      # We're on a unix platform. Hooray! :)
25019      path="$BOOT_JDK"
25020      has_space=`$ECHO "$path" | $GREP " "`
25021      if test "x$has_space" != x; then
25022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25025      fi
25026
25027      # Use eval to expand a potential ~
25028      eval path="$path"
25029      if test ! -f "$path" && test ! -d "$path"; then
25030        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25031      fi
25032
25033      if test -d "$path"; then
25034        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25035      else
25036        dir="`$DIRNAME "$path"`"
25037        base="`$BASENAME "$path"`"
25038        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25039      fi
25040    fi
25041  fi
25042
25043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25044$as_echo_n "checking for Boot JDK... " >&6; }
25045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25046$as_echo "$BOOT_JDK" >&6; }
25047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25048$as_echo_n "checking Boot JDK version... " >&6; }
25049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25051$as_echo "$BOOT_JDK_VERSION" >&6; }
25052          fi # end check jdk version
25053        fi # end check javac
25054      fi # end check java
25055    fi # end check boot jdk found
25056  fi
25057
25058
25059  if test "x$BOOT_JDK_FOUND" = xno; then
25060    # Now execute the test
25061
25062  if test -x /usr/libexec/java_home; then
25063    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25064    BOOT_JDK_FOUND=maybe
25065    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25066$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25067  fi
25068
25069
25070    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25071    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25072      # Do we have a bin/java?
25073      if test ! -x "$BOOT_JDK/bin/java"; then
25074        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25076        BOOT_JDK_FOUND=no
25077      else
25078        # Do we have a bin/javac?
25079        if test ! -x "$BOOT_JDK/bin/javac"; then
25080          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25082          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25083$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25084          BOOT_JDK_FOUND=no
25085        else
25086          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25087          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25088
25089          # Extra M4 quote needed to protect [] in grep expression.
25090          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25091          if test "x$FOUND_CORRECT_VERSION" = x; then
25092            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25094            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25095$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25096            BOOT_JDK_FOUND=no
25097          else
25098            # We're done! :-)
25099            BOOT_JDK_FOUND=yes
25100
25101  # Only process if variable expands to non-empty
25102
25103  if test "x$BOOT_JDK" != x; then
25104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105
25106  # Input might be given as Windows format, start by converting to
25107  # unix format.
25108  path="$BOOT_JDK"
25109  new_path=`$CYGPATH -u "$path"`
25110
25111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25114  # "foo.exe" is OK but "foo" is an error.
25115  #
25116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25117  # It is also a way to make sure we got the proper file name for the real test later on.
25118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25119  if test "x$test_shortpath" = x; then
25120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25122    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25123  fi
25124
25125  # Call helper function which possibly converts this using DOS-style short mode.
25126  # If so, the updated path is stored in $new_path.
25127
25128  input_path="$new_path"
25129  # Check if we need to convert this using DOS-style short mode. If the path
25130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25131  # take no chances and rewrite it.
25132  # Note: m4 eats our [], so we need to use [ and ] instead.
25133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25134  if test "x$has_forbidden_chars" != x; then
25135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25139      # Going to short mode and back again did indeed matter. Since short mode is
25140      # case insensitive, let's make it lowercase to improve readability.
25141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25142      # Now convert it back to Unix-style (cygpath)
25143      input_path=`$CYGPATH -u "$shortmode_path"`
25144      new_path="$input_path"
25145    fi
25146  fi
25147
25148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25149  if test "x$test_cygdrive_prefix" = x; then
25150    # As a simple fix, exclude /usr/bin since it's not a real path.
25151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25153      # a path prefixed by /cygdrive for fixpath to work.
25154      new_path="$CYGWIN_ROOT_PATH$input_path"
25155    fi
25156  fi
25157
25158
25159  if test "x$path" != "x$new_path"; then
25160    BOOT_JDK="$new_path"
25161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25163  fi
25164
25165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25166
25167  path="$BOOT_JDK"
25168  has_colon=`$ECHO $path | $GREP ^.:`
25169  new_path="$path"
25170  if test "x$has_colon" = x; then
25171    # Not in mixed or Windows style, start by that.
25172    new_path=`cmd //c echo $path`
25173  fi
25174
25175
25176  input_path="$new_path"
25177  # Check if we need to convert this using DOS-style short mode. If the path
25178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25179  # take no chances and rewrite it.
25180  # Note: m4 eats our [], so we need to use [ and ] instead.
25181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25182  if test "x$has_forbidden_chars" != x; then
25183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25185  fi
25186
25187
25188  windows_path="$new_path"
25189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25190    unix_path=`$CYGPATH -u "$windows_path"`
25191    new_path="$unix_path"
25192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25194    new_path="$unix_path"
25195  fi
25196
25197  if test "x$path" != "x$new_path"; then
25198    BOOT_JDK="$new_path"
25199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25201  fi
25202
25203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25205
25206    else
25207      # We're on a unix platform. Hooray! :)
25208      path="$BOOT_JDK"
25209      has_space=`$ECHO "$path" | $GREP " "`
25210      if test "x$has_space" != x; then
25211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25214      fi
25215
25216      # Use eval to expand a potential ~
25217      eval path="$path"
25218      if test ! -f "$path" && test ! -d "$path"; then
25219        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25220      fi
25221
25222      if test -d "$path"; then
25223        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25224      else
25225        dir="`$DIRNAME "$path"`"
25226        base="`$BASENAME "$path"`"
25227        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25228      fi
25229    fi
25230  fi
25231
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25233$as_echo_n "checking for Boot JDK... " >&6; }
25234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25235$as_echo "$BOOT_JDK" >&6; }
25236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25237$as_echo_n "checking Boot JDK version... " >&6; }
25238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25240$as_echo "$BOOT_JDK_VERSION" >&6; }
25241          fi # end check jdk version
25242        fi # end check javac
25243      fi # end check java
25244    fi # end check boot jdk found
25245  fi
25246
25247  fi
25248
25249
25250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25252      # Do we have a bin/java?
25253      if test ! -x "$BOOT_JDK/bin/java"; then
25254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25256        BOOT_JDK_FOUND=no
25257      else
25258        # Do we have a bin/javac?
25259        if test ! -x "$BOOT_JDK/bin/javac"; then
25260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25264          BOOT_JDK_FOUND=no
25265        else
25266          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25267          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25268
25269          # Extra M4 quote needed to protect [] in grep expression.
25270          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25271          if test "x$FOUND_CORRECT_VERSION" = x; then
25272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25274            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25275$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25276            BOOT_JDK_FOUND=no
25277          else
25278            # We're done! :-)
25279            BOOT_JDK_FOUND=yes
25280
25281  # Only process if variable expands to non-empty
25282
25283  if test "x$BOOT_JDK" != x; then
25284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285
25286  # Input might be given as Windows format, start by converting to
25287  # unix format.
25288  path="$BOOT_JDK"
25289  new_path=`$CYGPATH -u "$path"`
25290
25291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25294  # "foo.exe" is OK but "foo" is an error.
25295  #
25296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25297  # It is also a way to make sure we got the proper file name for the real test later on.
25298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25299  if test "x$test_shortpath" = x; then
25300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25303  fi
25304
25305  # Call helper function which possibly converts this using DOS-style short mode.
25306  # If so, the updated path is stored in $new_path.
25307
25308  input_path="$new_path"
25309  # Check if we need to convert this using DOS-style short mode. If the path
25310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25311  # take no chances and rewrite it.
25312  # Note: m4 eats our [], so we need to use [ and ] instead.
25313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25314  if test "x$has_forbidden_chars" != x; then
25315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25319      # Going to short mode and back again did indeed matter. Since short mode is
25320      # case insensitive, let's make it lowercase to improve readability.
25321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322      # Now convert it back to Unix-style (cygpath)
25323      input_path=`$CYGPATH -u "$shortmode_path"`
25324      new_path="$input_path"
25325    fi
25326  fi
25327
25328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25329  if test "x$test_cygdrive_prefix" = x; then
25330    # As a simple fix, exclude /usr/bin since it's not a real path.
25331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25333      # a path prefixed by /cygdrive for fixpath to work.
25334      new_path="$CYGWIN_ROOT_PATH$input_path"
25335    fi
25336  fi
25337
25338
25339  if test "x$path" != "x$new_path"; then
25340    BOOT_JDK="$new_path"
25341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25343  fi
25344
25345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346
25347  path="$BOOT_JDK"
25348  has_colon=`$ECHO $path | $GREP ^.:`
25349  new_path="$path"
25350  if test "x$has_colon" = x; then
25351    # Not in mixed or Windows style, start by that.
25352    new_path=`cmd //c echo $path`
25353  fi
25354
25355
25356  input_path="$new_path"
25357  # Check if we need to convert this using DOS-style short mode. If the path
25358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25359  # take no chances and rewrite it.
25360  # Note: m4 eats our [], so we need to use [ and ] instead.
25361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25362  if test "x$has_forbidden_chars" != x; then
25363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25365  fi
25366
25367
25368  windows_path="$new_path"
25369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25370    unix_path=`$CYGPATH -u "$windows_path"`
25371    new_path="$unix_path"
25372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25374    new_path="$unix_path"
25375  fi
25376
25377  if test "x$path" != "x$new_path"; then
25378    BOOT_JDK="$new_path"
25379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25381  fi
25382
25383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25385
25386    else
25387      # We're on a unix platform. Hooray! :)
25388      path="$BOOT_JDK"
25389      has_space=`$ECHO "$path" | $GREP " "`
25390      if test "x$has_space" != x; then
25391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25394      fi
25395
25396      # Use eval to expand a potential ~
25397      eval path="$path"
25398      if test ! -f "$path" && test ! -d "$path"; then
25399        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25400      fi
25401
25402      if test -d "$path"; then
25403        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25404      else
25405        dir="`$DIRNAME "$path"`"
25406        base="`$BASENAME "$path"`"
25407        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25408      fi
25409    fi
25410  fi
25411
25412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25413$as_echo_n "checking for Boot JDK... " >&6; }
25414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25415$as_echo "$BOOT_JDK" >&6; }
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25417$as_echo_n "checking Boot JDK version... " >&6; }
25418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25420$as_echo "$BOOT_JDK_VERSION" >&6; }
25421          fi # end check jdk version
25422        fi # end check javac
25423      fi # end check java
25424    fi # end check boot jdk found
25425  fi
25426
25427
25428  # Test: Is $JAVA_HOME set?
25429
25430  if test "x$BOOT_JDK_FOUND" = xno; then
25431    # Now execute the test
25432
25433  if test "x$JAVA_HOME" != x; then
25434    JAVA_HOME_PROCESSED="$JAVA_HOME"
25435
25436  # Only process if variable expands to non-empty
25437
25438  if test "x$JAVA_HOME_PROCESSED" != x; then
25439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25440
25441  # Input might be given as Windows format, start by converting to
25442  # unix format.
25443  path="$JAVA_HOME_PROCESSED"
25444  new_path=`$CYGPATH -u "$path"`
25445
25446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25449  # "foo.exe" is OK but "foo" is an error.
25450  #
25451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25452  # It is also a way to make sure we got the proper file name for the real test later on.
25453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25454  if test "x$test_shortpath" = x; then
25455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25456$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25457    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25458  fi
25459
25460  # Call helper function which possibly converts this using DOS-style short mode.
25461  # If so, the updated path is stored in $new_path.
25462
25463  input_path="$new_path"
25464  # Check if we need to convert this using DOS-style short mode. If the path
25465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25466  # take no chances and rewrite it.
25467  # Note: m4 eats our [], so we need to use [ and ] instead.
25468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25469  if test "x$has_forbidden_chars" != x; then
25470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25474      # Going to short mode and back again did indeed matter. Since short mode is
25475      # case insensitive, let's make it lowercase to improve readability.
25476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25477      # Now convert it back to Unix-style (cygpath)
25478      input_path=`$CYGPATH -u "$shortmode_path"`
25479      new_path="$input_path"
25480    fi
25481  fi
25482
25483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25484  if test "x$test_cygdrive_prefix" = x; then
25485    # As a simple fix, exclude /usr/bin since it's not a real path.
25486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25488      # a path prefixed by /cygdrive for fixpath to work.
25489      new_path="$CYGWIN_ROOT_PATH$input_path"
25490    fi
25491  fi
25492
25493
25494  if test "x$path" != "x$new_path"; then
25495    JAVA_HOME_PROCESSED="$new_path"
25496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25497$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25498  fi
25499
25500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25501
25502  path="$JAVA_HOME_PROCESSED"
25503  has_colon=`$ECHO $path | $GREP ^.:`
25504  new_path="$path"
25505  if test "x$has_colon" = x; then
25506    # Not in mixed or Windows style, start by that.
25507    new_path=`cmd //c echo $path`
25508  fi
25509
25510
25511  input_path="$new_path"
25512  # Check if we need to convert this using DOS-style short mode. If the path
25513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25514  # take no chances and rewrite it.
25515  # Note: m4 eats our [], so we need to use [ and ] instead.
25516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25517  if test "x$has_forbidden_chars" != x; then
25518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25520  fi
25521
25522
25523  windows_path="$new_path"
25524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25525    unix_path=`$CYGPATH -u "$windows_path"`
25526    new_path="$unix_path"
25527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25529    new_path="$unix_path"
25530  fi
25531
25532  if test "x$path" != "x$new_path"; then
25533    JAVA_HOME_PROCESSED="$new_path"
25534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25535$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25536  fi
25537
25538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25540
25541    else
25542      # We're on a unix platform. Hooray! :)
25543      path="$JAVA_HOME_PROCESSED"
25544      has_space=`$ECHO "$path" | $GREP " "`
25545      if test "x$has_space" != x; then
25546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25547$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25549      fi
25550
25551      # Use eval to expand a potential ~
25552      eval path="$path"
25553      if test ! -f "$path" && test ! -d "$path"; then
25554        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25555      fi
25556
25557      if test -d "$path"; then
25558        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25559      else
25560        dir="`$DIRNAME "$path"`"
25561        base="`$BASENAME "$path"`"
25562        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25563      fi
25564    fi
25565  fi
25566
25567    if test ! -d "$JAVA_HOME_PROCESSED"; then
25568      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25569$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25570    else
25571      # Aha, the user has set a JAVA_HOME
25572      # let us use that as the Boot JDK.
25573      BOOT_JDK="$JAVA_HOME_PROCESSED"
25574      BOOT_JDK_FOUND=maybe
25575      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25576$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25577    fi
25578  fi
25579
25580
25581    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25582    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25583      # Do we have a bin/java?
25584      if test ! -x "$BOOT_JDK/bin/java"; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25587        BOOT_JDK_FOUND=no
25588      else
25589        # Do we have a bin/javac?
25590        if test ! -x "$BOOT_JDK/bin/javac"; then
25591          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25593          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25594$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25595          BOOT_JDK_FOUND=no
25596        else
25597          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25598          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25599
25600          # Extra M4 quote needed to protect [] in grep expression.
25601          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25602          if test "x$FOUND_CORRECT_VERSION" = x; then
25603            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25605            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25606$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25607            BOOT_JDK_FOUND=no
25608          else
25609            # We're done! :-)
25610            BOOT_JDK_FOUND=yes
25611
25612  # Only process if variable expands to non-empty
25613
25614  if test "x$BOOT_JDK" != x; then
25615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25616
25617  # Input might be given as Windows format, start by converting to
25618  # unix format.
25619  path="$BOOT_JDK"
25620  new_path=`$CYGPATH -u "$path"`
25621
25622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25625  # "foo.exe" is OK but "foo" is an error.
25626  #
25627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25628  # It is also a way to make sure we got the proper file name for the real test later on.
25629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25630  if test "x$test_shortpath" = x; then
25631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25633    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25634  fi
25635
25636  # Call helper function which possibly converts this using DOS-style short mode.
25637  # If so, the updated path is stored in $new_path.
25638
25639  input_path="$new_path"
25640  # Check if we need to convert this using DOS-style short mode. If the path
25641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25642  # take no chances and rewrite it.
25643  # Note: m4 eats our [], so we need to use [ and ] instead.
25644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25645  if test "x$has_forbidden_chars" != x; then
25646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25650      # Going to short mode and back again did indeed matter. Since short mode is
25651      # case insensitive, let's make it lowercase to improve readability.
25652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25653      # Now convert it back to Unix-style (cygpath)
25654      input_path=`$CYGPATH -u "$shortmode_path"`
25655      new_path="$input_path"
25656    fi
25657  fi
25658
25659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25660  if test "x$test_cygdrive_prefix" = x; then
25661    # As a simple fix, exclude /usr/bin since it's not a real path.
25662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25664      # a path prefixed by /cygdrive for fixpath to work.
25665      new_path="$CYGWIN_ROOT_PATH$input_path"
25666    fi
25667  fi
25668
25669
25670  if test "x$path" != "x$new_path"; then
25671    BOOT_JDK="$new_path"
25672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25674  fi
25675
25676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25677
25678  path="$BOOT_JDK"
25679  has_colon=`$ECHO $path | $GREP ^.:`
25680  new_path="$path"
25681  if test "x$has_colon" = x; then
25682    # Not in mixed or Windows style, start by that.
25683    new_path=`cmd //c echo $path`
25684  fi
25685
25686
25687  input_path="$new_path"
25688  # Check if we need to convert this using DOS-style short mode. If the path
25689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25690  # take no chances and rewrite it.
25691  # Note: m4 eats our [], so we need to use [ and ] instead.
25692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25693  if test "x$has_forbidden_chars" != x; then
25694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25696  fi
25697
25698
25699  windows_path="$new_path"
25700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25701    unix_path=`$CYGPATH -u "$windows_path"`
25702    new_path="$unix_path"
25703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25705    new_path="$unix_path"
25706  fi
25707
25708  if test "x$path" != "x$new_path"; then
25709    BOOT_JDK="$new_path"
25710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25712  fi
25713
25714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25716
25717    else
25718      # We're on a unix platform. Hooray! :)
25719      path="$BOOT_JDK"
25720      has_space=`$ECHO "$path" | $GREP " "`
25721      if test "x$has_space" != x; then
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25725      fi
25726
25727      # Use eval to expand a potential ~
25728      eval path="$path"
25729      if test ! -f "$path" && test ! -d "$path"; then
25730        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25731      fi
25732
25733      if test -d "$path"; then
25734        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25735      else
25736        dir="`$DIRNAME "$path"`"
25737        base="`$BASENAME "$path"`"
25738        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25739      fi
25740    fi
25741  fi
25742
25743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25744$as_echo_n "checking for Boot JDK... " >&6; }
25745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25746$as_echo "$BOOT_JDK" >&6; }
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25748$as_echo_n "checking Boot JDK version... " >&6; }
25749            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25751$as_echo "$BOOT_JDK_VERSION" >&6; }
25752          fi # end check jdk version
25753        fi # end check javac
25754      fi # end check java
25755    fi # end check boot jdk found
25756  fi
25757
25758
25759  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25760
25761  if test "x$BOOT_JDK_FOUND" = xno; then
25762    # Now execute the test
25763
25764  # Extract the first word of "javac", so it can be a program name with args.
25765set dummy javac; ac_word=$2
25766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25767$as_echo_n "checking for $ac_word... " >&6; }
25768if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25769  $as_echo_n "(cached) " >&6
25770else
25771  case $JAVAC_CHECK in
25772  [\\/]* | ?:[\\/]*)
25773  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25774  ;;
25775  *)
25776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25777for as_dir in $PATH
25778do
25779  IFS=$as_save_IFS
25780  test -z "$as_dir" && as_dir=.
25781    for ac_exec_ext in '' $ac_executable_extensions; do
25782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25783    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25785    break 2
25786  fi
25787done
25788  done
25789IFS=$as_save_IFS
25790
25791  ;;
25792esac
25793fi
25794JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25795if test -n "$JAVAC_CHECK"; then
25796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25797$as_echo "$JAVAC_CHECK" >&6; }
25798else
25799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25800$as_echo "no" >&6; }
25801fi
25802
25803
25804  # Extract the first word of "java", so it can be a program name with args.
25805set dummy java; ac_word=$2
25806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25807$as_echo_n "checking for $ac_word... " >&6; }
25808if ${ac_cv_path_JAVA_CHECK+:} false; then :
25809  $as_echo_n "(cached) " >&6
25810else
25811  case $JAVA_CHECK in
25812  [\\/]* | ?:[\\/]*)
25813  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25814  ;;
25815  *)
25816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25817for as_dir in $PATH
25818do
25819  IFS=$as_save_IFS
25820  test -z "$as_dir" && as_dir=.
25821    for ac_exec_ext in '' $ac_executable_extensions; do
25822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25823    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25825    break 2
25826  fi
25827done
25828  done
25829IFS=$as_save_IFS
25830
25831  ;;
25832esac
25833fi
25834JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25835if test -n "$JAVA_CHECK"; then
25836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25837$as_echo "$JAVA_CHECK" >&6; }
25838else
25839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25840$as_echo "no" >&6; }
25841fi
25842
25843
25844  BINARY="$JAVAC_CHECK"
25845  if test "x$JAVAC_CHECK" = x; then
25846    BINARY="$JAVA_CHECK"
25847  fi
25848  if test "x$BINARY" != x; then
25849    # So there is a java(c) binary, it might be part of a JDK.
25850    # Lets find the JDK/JRE directory by following symbolic links.
25851    # Linux/GNU systems often have links from /usr/bin/java to
25852    # /etc/alternatives/java to the real JDK binary.
25853
25854  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25855    # Follow a chain of symbolic links. Use readlink
25856    # where it exists, else fall back to horribly
25857    # complicated shell code.
25858    if test "x$READLINK_TESTED" != yes; then
25859      # On MacOSX there is a readlink tool with a different
25860      # purpose than the GNU readlink tool. Check the found readlink.
25861      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25862      if test "x$ISGNU" = x; then
25863        # A readlink that we do not know how to use.
25864        # Are there other non-GNU readlinks out there?
25865        READLINK_TESTED=yes
25866        READLINK=
25867      fi
25868    fi
25869
25870    if test "x$READLINK" != x; then
25871      BINARY=`$READLINK -f $BINARY`
25872    else
25873      # Save the current directory for restoring afterwards
25874      STARTDIR=$PWD
25875      COUNTER=0
25876      sym_link_dir=`$DIRNAME $BINARY`
25877      sym_link_file=`$BASENAME $BINARY`
25878      cd $sym_link_dir
25879      # Use -P flag to resolve symlinks in directories.
25880      cd `$THEPWDCMD -P`
25881      sym_link_dir=`$THEPWDCMD -P`
25882      # Resolve file symlinks
25883      while test $COUNTER -lt 20; do
25884        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25885        if test "x$ISLINK" == x; then
25886          # This is not a symbolic link! We are done!
25887          break
25888        fi
25889        # Again resolve directory symlinks since the target of the just found
25890        # link could be in a different directory
25891        cd `$DIRNAME $ISLINK`
25892        sym_link_dir=`$THEPWDCMD -P`
25893        sym_link_file=`$BASENAME $ISLINK`
25894        let COUNTER=COUNTER+1
25895      done
25896      cd $STARTDIR
25897      BINARY=$sym_link_dir/$sym_link_file
25898    fi
25899  fi
25900
25901    BOOT_JDK=`dirname "$BINARY"`
25902    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25903    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25904      # Looks like we found ourselves an JDK
25905      BOOT_JDK_FOUND=maybe
25906      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25907$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25908    fi
25909  fi
25910
25911
25912    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25913    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25914      # Do we have a bin/java?
25915      if test ! -x "$BOOT_JDK/bin/java"; then
25916        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25918        BOOT_JDK_FOUND=no
25919      else
25920        # Do we have a bin/javac?
25921        if test ! -x "$BOOT_JDK/bin/javac"; then
25922          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25924          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25925$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25926          BOOT_JDK_FOUND=no
25927        else
25928          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25929          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25930
25931          # Extra M4 quote needed to protect [] in grep expression.
25932          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25933          if test "x$FOUND_CORRECT_VERSION" = x; then
25934            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25936            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25937$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25938            BOOT_JDK_FOUND=no
25939          else
25940            # We're done! :-)
25941            BOOT_JDK_FOUND=yes
25942
25943  # Only process if variable expands to non-empty
25944
25945  if test "x$BOOT_JDK" != x; then
25946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25947
25948  # Input might be given as Windows format, start by converting to
25949  # unix format.
25950  path="$BOOT_JDK"
25951  new_path=`$CYGPATH -u "$path"`
25952
25953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25956  # "foo.exe" is OK but "foo" is an error.
25957  #
25958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25959  # It is also a way to make sure we got the proper file name for the real test later on.
25960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25961  if test "x$test_shortpath" = x; then
25962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25964    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25965  fi
25966
25967  # Call helper function which possibly converts this using DOS-style short mode.
25968  # If so, the updated path is stored in $new_path.
25969
25970  input_path="$new_path"
25971  # Check if we need to convert this using DOS-style short mode. If the path
25972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25973  # take no chances and rewrite it.
25974  # Note: m4 eats our [], so we need to use [ and ] instead.
25975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25976  if test "x$has_forbidden_chars" != x; then
25977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25981      # Going to short mode and back again did indeed matter. Since short mode is
25982      # case insensitive, let's make it lowercase to improve readability.
25983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25984      # Now convert it back to Unix-style (cygpath)
25985      input_path=`$CYGPATH -u "$shortmode_path"`
25986      new_path="$input_path"
25987    fi
25988  fi
25989
25990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25991  if test "x$test_cygdrive_prefix" = x; then
25992    # As a simple fix, exclude /usr/bin since it's not a real path.
25993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25995      # a path prefixed by /cygdrive for fixpath to work.
25996      new_path="$CYGWIN_ROOT_PATH$input_path"
25997    fi
25998  fi
25999
26000
26001  if test "x$path" != "x$new_path"; then
26002    BOOT_JDK="$new_path"
26003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26005  fi
26006
26007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26008
26009  path="$BOOT_JDK"
26010  has_colon=`$ECHO $path | $GREP ^.:`
26011  new_path="$path"
26012  if test "x$has_colon" = x; then
26013    # Not in mixed or Windows style, start by that.
26014    new_path=`cmd //c echo $path`
26015  fi
26016
26017
26018  input_path="$new_path"
26019  # Check if we need to convert this using DOS-style short mode. If the path
26020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26021  # take no chances and rewrite it.
26022  # Note: m4 eats our [], so we need to use [ and ] instead.
26023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26024  if test "x$has_forbidden_chars" != x; then
26025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26027  fi
26028
26029
26030  windows_path="$new_path"
26031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26032    unix_path=`$CYGPATH -u "$windows_path"`
26033    new_path="$unix_path"
26034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26036    new_path="$unix_path"
26037  fi
26038
26039  if test "x$path" != "x$new_path"; then
26040    BOOT_JDK="$new_path"
26041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26043  fi
26044
26045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26047
26048    else
26049      # We're on a unix platform. Hooray! :)
26050      path="$BOOT_JDK"
26051      has_space=`$ECHO "$path" | $GREP " "`
26052      if test "x$has_space" != x; then
26053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26055        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26056      fi
26057
26058      # Use eval to expand a potential ~
26059      eval path="$path"
26060      if test ! -f "$path" && test ! -d "$path"; then
26061        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26062      fi
26063
26064      if test -d "$path"; then
26065        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26066      else
26067        dir="`$DIRNAME "$path"`"
26068        base="`$BASENAME "$path"`"
26069        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26070      fi
26071    fi
26072  fi
26073
26074            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26075$as_echo_n "checking for Boot JDK... " >&6; }
26076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26077$as_echo "$BOOT_JDK" >&6; }
26078            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26079$as_echo_n "checking Boot JDK version... " >&6; }
26080            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26082$as_echo "$BOOT_JDK_VERSION" >&6; }
26083          fi # end check jdk version
26084        fi # end check javac
26085      fi # end check java
26086    fi # end check boot jdk found
26087  fi
26088
26089
26090  # Test: Is there a JDK installed in default, well-known locations?
26091
26092  if test "x$BOOT_JDK_FOUND" = xno; then
26093    # Now execute the test
26094
26095  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26096
26097  if test "x$BOOT_JDK_FOUND" = xno; then
26098    # Now execute the test
26099
26100  if test "x$ProgramW6432" != x; then
26101    VIRTUAL_DIR="$ProgramW6432/Java"
26102
26103  windows_path="$VIRTUAL_DIR"
26104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26105    unix_path=`$CYGPATH -u "$windows_path"`
26106    VIRTUAL_DIR="$unix_path"
26107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26109    VIRTUAL_DIR="$unix_path"
26110  fi
26111
26112
26113  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26114  BOOT_JDK_SUFFIX=""
26115  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26116  if test "x$ALL_JDKS_FOUND" != x; then
26117    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26118
26119  if test "x$BOOT_JDK_FOUND" = xno; then
26120    # Now execute the test
26121
26122        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26123        if test -d "$BOOT_JDK"; then
26124          BOOT_JDK_FOUND=maybe
26125          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26126$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26127        fi
26128
26129
26130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26132      # Do we have a bin/java?
26133      if test ! -x "$BOOT_JDK/bin/java"; then
26134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26136        BOOT_JDK_FOUND=no
26137      else
26138        # Do we have a bin/javac?
26139        if test ! -x "$BOOT_JDK/bin/javac"; then
26140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26144          BOOT_JDK_FOUND=no
26145        else
26146          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26147          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26148
26149          # Extra M4 quote needed to protect [] in grep expression.
26150          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26151          if test "x$FOUND_CORRECT_VERSION" = x; then
26152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26154            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26155$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26156            BOOT_JDK_FOUND=no
26157          else
26158            # We're done! :-)
26159            BOOT_JDK_FOUND=yes
26160
26161  # Only process if variable expands to non-empty
26162
26163  if test "x$BOOT_JDK" != x; then
26164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26165
26166  # Input might be given as Windows format, start by converting to
26167  # unix format.
26168  path="$BOOT_JDK"
26169  new_path=`$CYGPATH -u "$path"`
26170
26171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26174  # "foo.exe" is OK but "foo" is an error.
26175  #
26176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26177  # It is also a way to make sure we got the proper file name for the real test later on.
26178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26179  if test "x$test_shortpath" = x; then
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26183  fi
26184
26185  # Call helper function which possibly converts this using DOS-style short mode.
26186  # If so, the updated path is stored in $new_path.
26187
26188  input_path="$new_path"
26189  # Check if we need to convert this using DOS-style short mode. If the path
26190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26191  # take no chances and rewrite it.
26192  # Note: m4 eats our [], so we need to use [ and ] instead.
26193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26194  if test "x$has_forbidden_chars" != x; then
26195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26199      # Going to short mode and back again did indeed matter. Since short mode is
26200      # case insensitive, let's make it lowercase to improve readability.
26201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26202      # Now convert it back to Unix-style (cygpath)
26203      input_path=`$CYGPATH -u "$shortmode_path"`
26204      new_path="$input_path"
26205    fi
26206  fi
26207
26208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26209  if test "x$test_cygdrive_prefix" = x; then
26210    # As a simple fix, exclude /usr/bin since it's not a real path.
26211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26213      # a path prefixed by /cygdrive for fixpath to work.
26214      new_path="$CYGWIN_ROOT_PATH$input_path"
26215    fi
26216  fi
26217
26218
26219  if test "x$path" != "x$new_path"; then
26220    BOOT_JDK="$new_path"
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26223  fi
26224
26225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26226
26227  path="$BOOT_JDK"
26228  has_colon=`$ECHO $path | $GREP ^.:`
26229  new_path="$path"
26230  if test "x$has_colon" = x; then
26231    # Not in mixed or Windows style, start by that.
26232    new_path=`cmd //c echo $path`
26233  fi
26234
26235
26236  input_path="$new_path"
26237  # Check if we need to convert this using DOS-style short mode. If the path
26238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26239  # take no chances and rewrite it.
26240  # Note: m4 eats our [], so we need to use [ and ] instead.
26241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26242  if test "x$has_forbidden_chars" != x; then
26243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26245  fi
26246
26247
26248  windows_path="$new_path"
26249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26250    unix_path=`$CYGPATH -u "$windows_path"`
26251    new_path="$unix_path"
26252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26254    new_path="$unix_path"
26255  fi
26256
26257  if test "x$path" != "x$new_path"; then
26258    BOOT_JDK="$new_path"
26259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26261  fi
26262
26263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26265
26266    else
26267      # We're on a unix platform. Hooray! :)
26268      path="$BOOT_JDK"
26269      has_space=`$ECHO "$path" | $GREP " "`
26270      if test "x$has_space" != x; then
26271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26274      fi
26275
26276      # Use eval to expand a potential ~
26277      eval path="$path"
26278      if test ! -f "$path" && test ! -d "$path"; then
26279        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26280      fi
26281
26282      if test -d "$path"; then
26283        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26284      else
26285        dir="`$DIRNAME "$path"`"
26286        base="`$BASENAME "$path"`"
26287        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26288      fi
26289    fi
26290  fi
26291
26292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26293$as_echo_n "checking for Boot JDK... " >&6; }
26294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26295$as_echo "$BOOT_JDK" >&6; }
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26297$as_echo_n "checking Boot JDK version... " >&6; }
26298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26300$as_echo "$BOOT_JDK_VERSION" >&6; }
26301          fi # end check jdk version
26302        fi # end check javac
26303      fi # end check java
26304    fi # end check boot jdk found
26305  fi
26306
26307    done
26308  fi
26309
26310  fi
26311
26312
26313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26315      # Do we have a bin/java?
26316      if test ! -x "$BOOT_JDK/bin/java"; then
26317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26319        BOOT_JDK_FOUND=no
26320      else
26321        # Do we have a bin/javac?
26322        if test ! -x "$BOOT_JDK/bin/javac"; then
26323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26327          BOOT_JDK_FOUND=no
26328        else
26329          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26330          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26331
26332          # Extra M4 quote needed to protect [] in grep expression.
26333          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26334          if test "x$FOUND_CORRECT_VERSION" = x; then
26335            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26337            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26338$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26339            BOOT_JDK_FOUND=no
26340          else
26341            # We're done! :-)
26342            BOOT_JDK_FOUND=yes
26343
26344  # Only process if variable expands to non-empty
26345
26346  if test "x$BOOT_JDK" != x; then
26347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26348
26349  # Input might be given as Windows format, start by converting to
26350  # unix format.
26351  path="$BOOT_JDK"
26352  new_path=`$CYGPATH -u "$path"`
26353
26354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26357  # "foo.exe" is OK but "foo" is an error.
26358  #
26359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26360  # It is also a way to make sure we got the proper file name for the real test later on.
26361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26362  if test "x$test_shortpath" = x; then
26363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26366  fi
26367
26368  # Call helper function which possibly converts this using DOS-style short mode.
26369  # If so, the updated path is stored in $new_path.
26370
26371  input_path="$new_path"
26372  # Check if we need to convert this using DOS-style short mode. If the path
26373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26374  # take no chances and rewrite it.
26375  # Note: m4 eats our [], so we need to use [ and ] instead.
26376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26377  if test "x$has_forbidden_chars" != x; then
26378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26382      # Going to short mode and back again did indeed matter. Since short mode is
26383      # case insensitive, let's make it lowercase to improve readability.
26384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26385      # Now convert it back to Unix-style (cygpath)
26386      input_path=`$CYGPATH -u "$shortmode_path"`
26387      new_path="$input_path"
26388    fi
26389  fi
26390
26391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26392  if test "x$test_cygdrive_prefix" = x; then
26393    # As a simple fix, exclude /usr/bin since it's not a real path.
26394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26396      # a path prefixed by /cygdrive for fixpath to work.
26397      new_path="$CYGWIN_ROOT_PATH$input_path"
26398    fi
26399  fi
26400
26401
26402  if test "x$path" != "x$new_path"; then
26403    BOOT_JDK="$new_path"
26404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26406  fi
26407
26408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26409
26410  path="$BOOT_JDK"
26411  has_colon=`$ECHO $path | $GREP ^.:`
26412  new_path="$path"
26413  if test "x$has_colon" = x; then
26414    # Not in mixed or Windows style, start by that.
26415    new_path=`cmd //c echo $path`
26416  fi
26417
26418
26419  input_path="$new_path"
26420  # Check if we need to convert this using DOS-style short mode. If the path
26421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26422  # take no chances and rewrite it.
26423  # Note: m4 eats our [], so we need to use [ and ] instead.
26424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26425  if test "x$has_forbidden_chars" != x; then
26426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26428  fi
26429
26430
26431  windows_path="$new_path"
26432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26433    unix_path=`$CYGPATH -u "$windows_path"`
26434    new_path="$unix_path"
26435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26437    new_path="$unix_path"
26438  fi
26439
26440  if test "x$path" != "x$new_path"; then
26441    BOOT_JDK="$new_path"
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26444  fi
26445
26446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26448
26449    else
26450      # We're on a unix platform. Hooray! :)
26451      path="$BOOT_JDK"
26452      has_space=`$ECHO "$path" | $GREP " "`
26453      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
26457      fi
26458
26459      # Use eval to expand a potential ~
26460      eval path="$path"
26461      if test ! -f "$path" && test ! -d "$path"; then
26462        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26463      fi
26464
26465      if test -d "$path"; then
26466        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26467      else
26468        dir="`$DIRNAME "$path"`"
26469        base="`$BASENAME "$path"`"
26470        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26471      fi
26472    fi
26473  fi
26474
26475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26476$as_echo_n "checking for Boot JDK... " >&6; }
26477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26478$as_echo "$BOOT_JDK" >&6; }
26479            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26480$as_echo_n "checking Boot JDK version... " >&6; }
26481            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26483$as_echo "$BOOT_JDK_VERSION" >&6; }
26484          fi # end check jdk version
26485        fi # end check javac
26486      fi # end check java
26487    fi # end check boot jdk found
26488  fi
26489
26490
26491  if test "x$BOOT_JDK_FOUND" = xno; then
26492    # Now execute the test
26493
26494  if test "x$PROGRAMW6432" != x; then
26495    VIRTUAL_DIR="$PROGRAMW6432/Java"
26496
26497  windows_path="$VIRTUAL_DIR"
26498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26499    unix_path=`$CYGPATH -u "$windows_path"`
26500    VIRTUAL_DIR="$unix_path"
26501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26503    VIRTUAL_DIR="$unix_path"
26504  fi
26505
26506
26507  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26508  BOOT_JDK_SUFFIX=""
26509  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26510  if test "x$ALL_JDKS_FOUND" != x; then
26511    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26512
26513  if test "x$BOOT_JDK_FOUND" = xno; then
26514    # Now execute the test
26515
26516        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26517        if test -d "$BOOT_JDK"; then
26518          BOOT_JDK_FOUND=maybe
26519          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26520$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26521        fi
26522
26523
26524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26526      # Do we have a bin/java?
26527      if test ! -x "$BOOT_JDK/bin/java"; then
26528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26530        BOOT_JDK_FOUND=no
26531      else
26532        # Do we have a bin/javac?
26533        if test ! -x "$BOOT_JDK/bin/javac"; then
26534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26538          BOOT_JDK_FOUND=no
26539        else
26540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26542
26543          # Extra M4 quote needed to protect [] in grep expression.
26544          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26545          if test "x$FOUND_CORRECT_VERSION" = x; then
26546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26550            BOOT_JDK_FOUND=no
26551          else
26552            # We're done! :-)
26553            BOOT_JDK_FOUND=yes
26554
26555  # Only process if variable expands to non-empty
26556
26557  if test "x$BOOT_JDK" != x; then
26558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26559
26560  # Input might be given as Windows format, start by converting to
26561  # unix format.
26562  path="$BOOT_JDK"
26563  new_path=`$CYGPATH -u "$path"`
26564
26565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26568  # "foo.exe" is OK but "foo" is an error.
26569  #
26570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26571  # It is also a way to make sure we got the proper file name for the real test later on.
26572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26573  if test "x$test_shortpath" = x; then
26574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26577  fi
26578
26579  # Call helper function which possibly converts this using DOS-style short mode.
26580  # If so, the updated path is stored in $new_path.
26581
26582  input_path="$new_path"
26583  # Check if we need to convert this using DOS-style short mode. If the path
26584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26585  # take no chances and rewrite it.
26586  # Note: m4 eats our [], so we need to use [ and ] instead.
26587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26588  if test "x$has_forbidden_chars" != x; then
26589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26593      # Going to short mode and back again did indeed matter. Since short mode is
26594      # case insensitive, let's make it lowercase to improve readability.
26595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26596      # Now convert it back to Unix-style (cygpath)
26597      input_path=`$CYGPATH -u "$shortmode_path"`
26598      new_path="$input_path"
26599    fi
26600  fi
26601
26602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26603  if test "x$test_cygdrive_prefix" = x; then
26604    # As a simple fix, exclude /usr/bin since it's not a real path.
26605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26607      # a path prefixed by /cygdrive for fixpath to work.
26608      new_path="$CYGWIN_ROOT_PATH$input_path"
26609    fi
26610  fi
26611
26612
26613  if test "x$path" != "x$new_path"; then
26614    BOOT_JDK="$new_path"
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26617  fi
26618
26619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26620
26621  path="$BOOT_JDK"
26622  has_colon=`$ECHO $path | $GREP ^.:`
26623  new_path="$path"
26624  if test "x$has_colon" = x; then
26625    # Not in mixed or Windows style, start by that.
26626    new_path=`cmd //c echo $path`
26627  fi
26628
26629
26630  input_path="$new_path"
26631  # Check if we need to convert this using DOS-style short mode. If the path
26632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26633  # take no chances and rewrite it.
26634  # Note: m4 eats our [], so we need to use [ and ] instead.
26635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26636  if test "x$has_forbidden_chars" != x; then
26637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26639  fi
26640
26641
26642  windows_path="$new_path"
26643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26644    unix_path=`$CYGPATH -u "$windows_path"`
26645    new_path="$unix_path"
26646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26648    new_path="$unix_path"
26649  fi
26650
26651  if test "x$path" != "x$new_path"; then
26652    BOOT_JDK="$new_path"
26653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26655  fi
26656
26657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26659
26660    else
26661      # We're on a unix platform. Hooray! :)
26662      path="$BOOT_JDK"
26663      has_space=`$ECHO "$path" | $GREP " "`
26664      if test "x$has_space" != x; then
26665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26668      fi
26669
26670      # Use eval to expand a potential ~
26671      eval path="$path"
26672      if test ! -f "$path" && test ! -d "$path"; then
26673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26674      fi
26675
26676      if test -d "$path"; then
26677        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26678      else
26679        dir="`$DIRNAME "$path"`"
26680        base="`$BASENAME "$path"`"
26681        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26682      fi
26683    fi
26684  fi
26685
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26687$as_echo_n "checking for Boot JDK... " >&6; }
26688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26689$as_echo "$BOOT_JDK" >&6; }
26690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26691$as_echo_n "checking Boot JDK version... " >&6; }
26692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26694$as_echo "$BOOT_JDK_VERSION" >&6; }
26695          fi # end check jdk version
26696        fi # end check javac
26697      fi # end check java
26698    fi # end check boot jdk found
26699  fi
26700
26701    done
26702  fi
26703
26704  fi
26705
26706
26707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26709      # Do we have a bin/java?
26710      if test ! -x "$BOOT_JDK/bin/java"; then
26711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26713        BOOT_JDK_FOUND=no
26714      else
26715        # Do we have a bin/javac?
26716        if test ! -x "$BOOT_JDK/bin/javac"; then
26717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26721          BOOT_JDK_FOUND=no
26722        else
26723          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26724          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26725
26726          # Extra M4 quote needed to protect [] in grep expression.
26727          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26728          if test "x$FOUND_CORRECT_VERSION" = x; then
26729            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26731            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26732$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26733            BOOT_JDK_FOUND=no
26734          else
26735            # We're done! :-)
26736            BOOT_JDK_FOUND=yes
26737
26738  # Only process if variable expands to non-empty
26739
26740  if test "x$BOOT_JDK" != x; then
26741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742
26743  # Input might be given as Windows format, start by converting to
26744  # unix format.
26745  path="$BOOT_JDK"
26746  new_path=`$CYGPATH -u "$path"`
26747
26748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26751  # "foo.exe" is OK but "foo" is an error.
26752  #
26753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26754  # It is also a way to make sure we got the proper file name for the real test later on.
26755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26756  if test "x$test_shortpath" = x; then
26757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26760  fi
26761
26762  # Call helper function which possibly converts this using DOS-style short mode.
26763  # If so, the updated path is stored in $new_path.
26764
26765  input_path="$new_path"
26766  # Check if we need to convert this using DOS-style short mode. If the path
26767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26768  # take no chances and rewrite it.
26769  # Note: m4 eats our [], so we need to use [ and ] instead.
26770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26771  if test "x$has_forbidden_chars" != x; then
26772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26776      # Going to short mode and back again did indeed matter. Since short mode is
26777      # case insensitive, let's make it lowercase to improve readability.
26778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26779      # Now convert it back to Unix-style (cygpath)
26780      input_path=`$CYGPATH -u "$shortmode_path"`
26781      new_path="$input_path"
26782    fi
26783  fi
26784
26785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26786  if test "x$test_cygdrive_prefix" = x; then
26787    # As a simple fix, exclude /usr/bin since it's not a real path.
26788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26790      # a path prefixed by /cygdrive for fixpath to work.
26791      new_path="$CYGWIN_ROOT_PATH$input_path"
26792    fi
26793  fi
26794
26795
26796  if test "x$path" != "x$new_path"; then
26797    BOOT_JDK="$new_path"
26798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26800  fi
26801
26802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26803
26804  path="$BOOT_JDK"
26805  has_colon=`$ECHO $path | $GREP ^.:`
26806  new_path="$path"
26807  if test "x$has_colon" = x; then
26808    # Not in mixed or Windows style, start by that.
26809    new_path=`cmd //c echo $path`
26810  fi
26811
26812
26813  input_path="$new_path"
26814  # Check if we need to convert this using DOS-style short mode. If the path
26815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26816  # take no chances and rewrite it.
26817  # Note: m4 eats our [], so we need to use [ and ] instead.
26818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26819  if test "x$has_forbidden_chars" != x; then
26820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26822  fi
26823
26824
26825  windows_path="$new_path"
26826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26827    unix_path=`$CYGPATH -u "$windows_path"`
26828    new_path="$unix_path"
26829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26831    new_path="$unix_path"
26832  fi
26833
26834  if test "x$path" != "x$new_path"; then
26835    BOOT_JDK="$new_path"
26836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26838  fi
26839
26840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26842
26843    else
26844      # We're on a unix platform. Hooray! :)
26845      path="$BOOT_JDK"
26846      has_space=`$ECHO "$path" | $GREP " "`
26847      if test "x$has_space" != x; then
26848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26851      fi
26852
26853      # Use eval to expand a potential ~
26854      eval path="$path"
26855      if test ! -f "$path" && test ! -d "$path"; then
26856        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26857      fi
26858
26859      if test -d "$path"; then
26860        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26861      else
26862        dir="`$DIRNAME "$path"`"
26863        base="`$BASENAME "$path"`"
26864        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26865      fi
26866    fi
26867  fi
26868
26869            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26870$as_echo_n "checking for Boot JDK... " >&6; }
26871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26872$as_echo "$BOOT_JDK" >&6; }
26873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26874$as_echo_n "checking Boot JDK version... " >&6; }
26875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26877$as_echo "$BOOT_JDK_VERSION" >&6; }
26878          fi # end check jdk version
26879        fi # end check javac
26880      fi # end check java
26881    fi # end check boot jdk found
26882  fi
26883
26884
26885  if test "x$BOOT_JDK_FOUND" = xno; then
26886    # Now execute the test
26887
26888  if test "x$PROGRAMFILES" != x; then
26889    VIRTUAL_DIR="$PROGRAMFILES/Java"
26890
26891  windows_path="$VIRTUAL_DIR"
26892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26893    unix_path=`$CYGPATH -u "$windows_path"`
26894    VIRTUAL_DIR="$unix_path"
26895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26897    VIRTUAL_DIR="$unix_path"
26898  fi
26899
26900
26901  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26902  BOOT_JDK_SUFFIX=""
26903  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26904  if test "x$ALL_JDKS_FOUND" != x; then
26905    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26906
26907  if test "x$BOOT_JDK_FOUND" = xno; then
26908    # Now execute the test
26909
26910        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26911        if test -d "$BOOT_JDK"; then
26912          BOOT_JDK_FOUND=maybe
26913          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26914$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26915        fi
26916
26917
26918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26920      # Do we have a bin/java?
26921      if test ! -x "$BOOT_JDK/bin/java"; then
26922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26924        BOOT_JDK_FOUND=no
26925      else
26926        # Do we have a bin/javac?
26927        if test ! -x "$BOOT_JDK/bin/javac"; then
26928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26932          BOOT_JDK_FOUND=no
26933        else
26934          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26935          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26936
26937          # Extra M4 quote needed to protect [] in grep expression.
26938          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26939          if test "x$FOUND_CORRECT_VERSION" = x; then
26940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26942            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26943$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26944            BOOT_JDK_FOUND=no
26945          else
26946            # We're done! :-)
26947            BOOT_JDK_FOUND=yes
26948
26949  # Only process if variable expands to non-empty
26950
26951  if test "x$BOOT_JDK" != x; then
26952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26953
26954  # Input might be given as Windows format, start by converting to
26955  # unix format.
26956  path="$BOOT_JDK"
26957  new_path=`$CYGPATH -u "$path"`
26958
26959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26962  # "foo.exe" is OK but "foo" is an error.
26963  #
26964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26965  # It is also a way to make sure we got the proper file name for the real test later on.
26966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26967  if test "x$test_shortpath" = x; then
26968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26970    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26971  fi
26972
26973  # Call helper function which possibly converts this using DOS-style short mode.
26974  # If so, the updated path is stored in $new_path.
26975
26976  input_path="$new_path"
26977  # Check if we need to convert this using DOS-style short mode. If the path
26978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26979  # take no chances and rewrite it.
26980  # Note: m4 eats our [], so we need to use [ and ] instead.
26981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26982  if test "x$has_forbidden_chars" != x; then
26983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26987      # Going to short mode and back again did indeed matter. Since short mode is
26988      # case insensitive, let's make it lowercase to improve readability.
26989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26990      # Now convert it back to Unix-style (cygpath)
26991      input_path=`$CYGPATH -u "$shortmode_path"`
26992      new_path="$input_path"
26993    fi
26994  fi
26995
26996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26997  if test "x$test_cygdrive_prefix" = x; then
26998    # As a simple fix, exclude /usr/bin since it's not a real path.
26999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27001      # a path prefixed by /cygdrive for fixpath to work.
27002      new_path="$CYGWIN_ROOT_PATH$input_path"
27003    fi
27004  fi
27005
27006
27007  if test "x$path" != "x$new_path"; then
27008    BOOT_JDK="$new_path"
27009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27011  fi
27012
27013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27014
27015  path="$BOOT_JDK"
27016  has_colon=`$ECHO $path | $GREP ^.:`
27017  new_path="$path"
27018  if test "x$has_colon" = x; then
27019    # Not in mixed or Windows style, start by that.
27020    new_path=`cmd //c echo $path`
27021  fi
27022
27023
27024  input_path="$new_path"
27025  # Check if we need to convert this using DOS-style short mode. If the path
27026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27027  # take no chances and rewrite it.
27028  # Note: m4 eats our [], so we need to use [ and ] instead.
27029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27030  if test "x$has_forbidden_chars" != x; then
27031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27033  fi
27034
27035
27036  windows_path="$new_path"
27037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27038    unix_path=`$CYGPATH -u "$windows_path"`
27039    new_path="$unix_path"
27040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27042    new_path="$unix_path"
27043  fi
27044
27045  if test "x$path" != "x$new_path"; then
27046    BOOT_JDK="$new_path"
27047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27049  fi
27050
27051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27053
27054    else
27055      # We're on a unix platform. Hooray! :)
27056      path="$BOOT_JDK"
27057      has_space=`$ECHO "$path" | $GREP " "`
27058      if test "x$has_space" != x; then
27059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27062      fi
27063
27064      # Use eval to expand a potential ~
27065      eval path="$path"
27066      if test ! -f "$path" && test ! -d "$path"; then
27067        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27068      fi
27069
27070      if test -d "$path"; then
27071        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27072      else
27073        dir="`$DIRNAME "$path"`"
27074        base="`$BASENAME "$path"`"
27075        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27076      fi
27077    fi
27078  fi
27079
27080            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27081$as_echo_n "checking for Boot JDK... " >&6; }
27082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27083$as_echo "$BOOT_JDK" >&6; }
27084            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27085$as_echo_n "checking Boot JDK version... " >&6; }
27086            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27088$as_echo "$BOOT_JDK_VERSION" >&6; }
27089          fi # end check jdk version
27090        fi # end check javac
27091      fi # end check java
27092    fi # end check boot jdk found
27093  fi
27094
27095    done
27096  fi
27097
27098  fi
27099
27100
27101    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27102    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27103      # Do we have a bin/java?
27104      if test ! -x "$BOOT_JDK/bin/java"; then
27105        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27107        BOOT_JDK_FOUND=no
27108      else
27109        # Do we have a bin/javac?
27110        if test ! -x "$BOOT_JDK/bin/javac"; then
27111          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27113          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27114$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27115          BOOT_JDK_FOUND=no
27116        else
27117          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27118          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27119
27120          # Extra M4 quote needed to protect [] in grep expression.
27121          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27122          if test "x$FOUND_CORRECT_VERSION" = x; then
27123            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27125            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27126$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27127            BOOT_JDK_FOUND=no
27128          else
27129            # We're done! :-)
27130            BOOT_JDK_FOUND=yes
27131
27132  # Only process if variable expands to non-empty
27133
27134  if test "x$BOOT_JDK" != x; then
27135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27136
27137  # Input might be given as Windows format, start by converting to
27138  # unix format.
27139  path="$BOOT_JDK"
27140  new_path=`$CYGPATH -u "$path"`
27141
27142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27145  # "foo.exe" is OK but "foo" is an error.
27146  #
27147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27148  # It is also a way to make sure we got the proper file name for the real test later on.
27149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27150  if test "x$test_shortpath" = x; then
27151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27153    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27154  fi
27155
27156  # Call helper function which possibly converts this using DOS-style short mode.
27157  # If so, the updated path is stored in $new_path.
27158
27159  input_path="$new_path"
27160  # Check if we need to convert this using DOS-style short mode. If the path
27161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27162  # take no chances and rewrite it.
27163  # Note: m4 eats our [], so we need to use [ and ] instead.
27164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27165  if test "x$has_forbidden_chars" != x; then
27166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27170      # Going to short mode and back again did indeed matter. Since short mode is
27171      # case insensitive, let's make it lowercase to improve readability.
27172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27173      # Now convert it back to Unix-style (cygpath)
27174      input_path=`$CYGPATH -u "$shortmode_path"`
27175      new_path="$input_path"
27176    fi
27177  fi
27178
27179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27180  if test "x$test_cygdrive_prefix" = x; then
27181    # As a simple fix, exclude /usr/bin since it's not a real path.
27182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27184      # a path prefixed by /cygdrive for fixpath to work.
27185      new_path="$CYGWIN_ROOT_PATH$input_path"
27186    fi
27187  fi
27188
27189
27190  if test "x$path" != "x$new_path"; then
27191    BOOT_JDK="$new_path"
27192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27194  fi
27195
27196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27197
27198  path="$BOOT_JDK"
27199  has_colon=`$ECHO $path | $GREP ^.:`
27200  new_path="$path"
27201  if test "x$has_colon" = x; then
27202    # Not in mixed or Windows style, start by that.
27203    new_path=`cmd //c echo $path`
27204  fi
27205
27206
27207  input_path="$new_path"
27208  # Check if we need to convert this using DOS-style short mode. If the path
27209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27210  # take no chances and rewrite it.
27211  # Note: m4 eats our [], so we need to use [ and ] instead.
27212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27213  if test "x$has_forbidden_chars" != x; then
27214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27216  fi
27217
27218
27219  windows_path="$new_path"
27220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27221    unix_path=`$CYGPATH -u "$windows_path"`
27222    new_path="$unix_path"
27223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27225    new_path="$unix_path"
27226  fi
27227
27228  if test "x$path" != "x$new_path"; then
27229    BOOT_JDK="$new_path"
27230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27232  fi
27233
27234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27236
27237    else
27238      # We're on a unix platform. Hooray! :)
27239      path="$BOOT_JDK"
27240      has_space=`$ECHO "$path" | $GREP " "`
27241      if test "x$has_space" != x; then
27242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27244        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27245      fi
27246
27247      # Use eval to expand a potential ~
27248      eval path="$path"
27249      if test ! -f "$path" && test ! -d "$path"; then
27250        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27251      fi
27252
27253      if test -d "$path"; then
27254        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27255      else
27256        dir="`$DIRNAME "$path"`"
27257        base="`$BASENAME "$path"`"
27258        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27259      fi
27260    fi
27261  fi
27262
27263            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27264$as_echo_n "checking for Boot JDK... " >&6; }
27265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27266$as_echo "$BOOT_JDK" >&6; }
27267            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27268$as_echo_n "checking Boot JDK version... " >&6; }
27269            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27271$as_echo "$BOOT_JDK_VERSION" >&6; }
27272          fi # end check jdk version
27273        fi # end check javac
27274      fi # end check java
27275    fi # end check boot jdk found
27276  fi
27277
27278
27279  if test "x$BOOT_JDK_FOUND" = xno; then
27280    # Now execute the test
27281
27282  if test "x$ProgramFiles" != x; then
27283    VIRTUAL_DIR="$ProgramFiles/Java"
27284
27285  windows_path="$VIRTUAL_DIR"
27286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27287    unix_path=`$CYGPATH -u "$windows_path"`
27288    VIRTUAL_DIR="$unix_path"
27289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27291    VIRTUAL_DIR="$unix_path"
27292  fi
27293
27294
27295  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27296  BOOT_JDK_SUFFIX=""
27297  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27298  if test "x$ALL_JDKS_FOUND" != x; then
27299    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27300
27301  if test "x$BOOT_JDK_FOUND" = xno; then
27302    # Now execute the test
27303
27304        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27305        if test -d "$BOOT_JDK"; then
27306          BOOT_JDK_FOUND=maybe
27307          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27308$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27309        fi
27310
27311
27312    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27313    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27314      # Do we have a bin/java?
27315      if test ! -x "$BOOT_JDK/bin/java"; then
27316        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27318        BOOT_JDK_FOUND=no
27319      else
27320        # Do we have a bin/javac?
27321        if test ! -x "$BOOT_JDK/bin/javac"; then
27322          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27324          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27325$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27326          BOOT_JDK_FOUND=no
27327        else
27328          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27329          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27330
27331          # Extra M4 quote needed to protect [] in grep expression.
27332          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27333          if test "x$FOUND_CORRECT_VERSION" = x; then
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27336            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27337$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27338            BOOT_JDK_FOUND=no
27339          else
27340            # We're done! :-)
27341            BOOT_JDK_FOUND=yes
27342
27343  # Only process if variable expands to non-empty
27344
27345  if test "x$BOOT_JDK" != x; then
27346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27347
27348  # Input might be given as Windows format, start by converting to
27349  # unix format.
27350  path="$BOOT_JDK"
27351  new_path=`$CYGPATH -u "$path"`
27352
27353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27356  # "foo.exe" is OK but "foo" is an error.
27357  #
27358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27359  # It is also a way to make sure we got the proper file name for the real test later on.
27360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27361  if test "x$test_shortpath" = x; then
27362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27365  fi
27366
27367  # Call helper function which possibly converts this using DOS-style short mode.
27368  # If so, the updated path is stored in $new_path.
27369
27370  input_path="$new_path"
27371  # Check if we need to convert this using DOS-style short mode. If the path
27372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27373  # take no chances and rewrite it.
27374  # Note: m4 eats our [], so we need to use [ and ] instead.
27375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27376  if test "x$has_forbidden_chars" != x; then
27377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27381      # Going to short mode and back again did indeed matter. Since short mode is
27382      # case insensitive, let's make it lowercase to improve readability.
27383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27384      # Now convert it back to Unix-style (cygpath)
27385      input_path=`$CYGPATH -u "$shortmode_path"`
27386      new_path="$input_path"
27387    fi
27388  fi
27389
27390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27391  if test "x$test_cygdrive_prefix" = x; then
27392    # As a simple fix, exclude /usr/bin since it's not a real path.
27393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27395      # a path prefixed by /cygdrive for fixpath to work.
27396      new_path="$CYGWIN_ROOT_PATH$input_path"
27397    fi
27398  fi
27399
27400
27401  if test "x$path" != "x$new_path"; then
27402    BOOT_JDK="$new_path"
27403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27405  fi
27406
27407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27408
27409  path="$BOOT_JDK"
27410  has_colon=`$ECHO $path | $GREP ^.:`
27411  new_path="$path"
27412  if test "x$has_colon" = x; then
27413    # Not in mixed or Windows style, start by that.
27414    new_path=`cmd //c echo $path`
27415  fi
27416
27417
27418  input_path="$new_path"
27419  # Check if we need to convert this using DOS-style short mode. If the path
27420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27421  # take no chances and rewrite it.
27422  # Note: m4 eats our [], so we need to use [ and ] instead.
27423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27424  if test "x$has_forbidden_chars" != x; then
27425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27427  fi
27428
27429
27430  windows_path="$new_path"
27431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27432    unix_path=`$CYGPATH -u "$windows_path"`
27433    new_path="$unix_path"
27434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27436    new_path="$unix_path"
27437  fi
27438
27439  if test "x$path" != "x$new_path"; then
27440    BOOT_JDK="$new_path"
27441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27443  fi
27444
27445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27447
27448    else
27449      # We're on a unix platform. Hooray! :)
27450      path="$BOOT_JDK"
27451      has_space=`$ECHO "$path" | $GREP " "`
27452      if test "x$has_space" != x; then
27453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27456      fi
27457
27458      # Use eval to expand a potential ~
27459      eval path="$path"
27460      if test ! -f "$path" && test ! -d "$path"; then
27461        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27462      fi
27463
27464      if test -d "$path"; then
27465        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27466      else
27467        dir="`$DIRNAME "$path"`"
27468        base="`$BASENAME "$path"`"
27469        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27470      fi
27471    fi
27472  fi
27473
27474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27475$as_echo_n "checking for Boot JDK... " >&6; }
27476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27477$as_echo "$BOOT_JDK" >&6; }
27478            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27479$as_echo_n "checking Boot JDK version... " >&6; }
27480            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27482$as_echo "$BOOT_JDK_VERSION" >&6; }
27483          fi # end check jdk version
27484        fi # end check javac
27485      fi # end check java
27486    fi # end check boot jdk found
27487  fi
27488
27489    done
27490  fi
27491
27492  fi
27493
27494
27495    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27496    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27497      # Do we have a bin/java?
27498      if test ! -x "$BOOT_JDK/bin/java"; then
27499        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27501        BOOT_JDK_FOUND=no
27502      else
27503        # Do we have a bin/javac?
27504        if test ! -x "$BOOT_JDK/bin/javac"; then
27505          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27507          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27508$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27509          BOOT_JDK_FOUND=no
27510        else
27511          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27512          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27513
27514          # Extra M4 quote needed to protect [] in grep expression.
27515          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27516          if test "x$FOUND_CORRECT_VERSION" = x; then
27517            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27519            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27520$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27521            BOOT_JDK_FOUND=no
27522          else
27523            # We're done! :-)
27524            BOOT_JDK_FOUND=yes
27525
27526  # Only process if variable expands to non-empty
27527
27528  if test "x$BOOT_JDK" != x; then
27529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27530
27531  # Input might be given as Windows format, start by converting to
27532  # unix format.
27533  path="$BOOT_JDK"
27534  new_path=`$CYGPATH -u "$path"`
27535
27536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27539  # "foo.exe" is OK but "foo" is an error.
27540  #
27541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27542  # It is also a way to make sure we got the proper file name for the real test later on.
27543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27544  if test "x$test_shortpath" = x; then
27545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27547    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27548  fi
27549
27550  # Call helper function which possibly converts this using DOS-style short mode.
27551  # If so, the updated path is stored in $new_path.
27552
27553  input_path="$new_path"
27554  # Check if we need to convert this using DOS-style short mode. If the path
27555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27556  # take no chances and rewrite it.
27557  # Note: m4 eats our [], so we need to use [ and ] instead.
27558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27559  if test "x$has_forbidden_chars" != x; then
27560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27564      # Going to short mode and back again did indeed matter. Since short mode is
27565      # case insensitive, let's make it lowercase to improve readability.
27566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27567      # Now convert it back to Unix-style (cygpath)
27568      input_path=`$CYGPATH -u "$shortmode_path"`
27569      new_path="$input_path"
27570    fi
27571  fi
27572
27573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27574  if test "x$test_cygdrive_prefix" = x; then
27575    # As a simple fix, exclude /usr/bin since it's not a real path.
27576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27578      # a path prefixed by /cygdrive for fixpath to work.
27579      new_path="$CYGWIN_ROOT_PATH$input_path"
27580    fi
27581  fi
27582
27583
27584  if test "x$path" != "x$new_path"; then
27585    BOOT_JDK="$new_path"
27586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27587$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27588  fi
27589
27590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27591
27592  path="$BOOT_JDK"
27593  has_colon=`$ECHO $path | $GREP ^.:`
27594  new_path="$path"
27595  if test "x$has_colon" = x; then
27596    # Not in mixed or Windows style, start by that.
27597    new_path=`cmd //c echo $path`
27598  fi
27599
27600
27601  input_path="$new_path"
27602  # Check if we need to convert this using DOS-style short mode. If the path
27603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27604  # take no chances and rewrite it.
27605  # Note: m4 eats our [], so we need to use [ and ] instead.
27606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27607  if test "x$has_forbidden_chars" != x; then
27608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27610  fi
27611
27612
27613  windows_path="$new_path"
27614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615    unix_path=`$CYGPATH -u "$windows_path"`
27616    new_path="$unix_path"
27617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27619    new_path="$unix_path"
27620  fi
27621
27622  if test "x$path" != "x$new_path"; then
27623    BOOT_JDK="$new_path"
27624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27626  fi
27627
27628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27630
27631    else
27632      # We're on a unix platform. Hooray! :)
27633      path="$BOOT_JDK"
27634      has_space=`$ECHO "$path" | $GREP " "`
27635      if test "x$has_space" != x; then
27636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27639      fi
27640
27641      # Use eval to expand a potential ~
27642      eval path="$path"
27643      if test ! -f "$path" && test ! -d "$path"; then
27644        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27645      fi
27646
27647      if test -d "$path"; then
27648        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27649      else
27650        dir="`$DIRNAME "$path"`"
27651        base="`$BASENAME "$path"`"
27652        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27653      fi
27654    fi
27655  fi
27656
27657            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27658$as_echo_n "checking for Boot JDK... " >&6; }
27659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27660$as_echo "$BOOT_JDK" >&6; }
27661            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27662$as_echo_n "checking Boot JDK version... " >&6; }
27663            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27665$as_echo "$BOOT_JDK_VERSION" >&6; }
27666          fi # end check jdk version
27667        fi # end check javac
27668      fi # end check java
27669    fi # end check boot jdk found
27670  fi
27671
27672
27673  if test "x$BOOT_JDK_FOUND" = xno; then
27674    # Now execute the test
27675
27676  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27677  BOOT_JDK_SUFFIX=""
27678  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27679  if test "x$ALL_JDKS_FOUND" != x; then
27680    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27681
27682  if test "x$BOOT_JDK_FOUND" = xno; then
27683    # Now execute the test
27684
27685        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27686        if test -d "$BOOT_JDK"; then
27687          BOOT_JDK_FOUND=maybe
27688          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27689$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27690        fi
27691
27692
27693    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27694    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27695      # Do we have a bin/java?
27696      if test ! -x "$BOOT_JDK/bin/java"; then
27697        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27699        BOOT_JDK_FOUND=no
27700      else
27701        # Do we have a bin/javac?
27702        if test ! -x "$BOOT_JDK/bin/javac"; then
27703          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27705          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27706$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27707          BOOT_JDK_FOUND=no
27708        else
27709          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27710          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27711
27712          # Extra M4 quote needed to protect [] in grep expression.
27713          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27714          if test "x$FOUND_CORRECT_VERSION" = x; then
27715            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27717            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27718$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27719            BOOT_JDK_FOUND=no
27720          else
27721            # We're done! :-)
27722            BOOT_JDK_FOUND=yes
27723
27724  # Only process if variable expands to non-empty
27725
27726  if test "x$BOOT_JDK" != x; then
27727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27728
27729  # Input might be given as Windows format, start by converting to
27730  # unix format.
27731  path="$BOOT_JDK"
27732  new_path=`$CYGPATH -u "$path"`
27733
27734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27737  # "foo.exe" is OK but "foo" is an error.
27738  #
27739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27740  # It is also a way to make sure we got the proper file name for the real test later on.
27741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27742  if test "x$test_shortpath" = x; then
27743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27745    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27746  fi
27747
27748  # Call helper function which possibly converts this using DOS-style short mode.
27749  # If so, the updated path is stored in $new_path.
27750
27751  input_path="$new_path"
27752  # Check if we need to convert this using DOS-style short mode. If the path
27753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27754  # take no chances and rewrite it.
27755  # Note: m4 eats our [], so we need to use [ and ] instead.
27756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27757  if test "x$has_forbidden_chars" != x; then
27758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27762      # Going to short mode and back again did indeed matter. Since short mode is
27763      # case insensitive, let's make it lowercase to improve readability.
27764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27765      # Now convert it back to Unix-style (cygpath)
27766      input_path=`$CYGPATH -u "$shortmode_path"`
27767      new_path="$input_path"
27768    fi
27769  fi
27770
27771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27772  if test "x$test_cygdrive_prefix" = x; then
27773    # As a simple fix, exclude /usr/bin since it's not a real path.
27774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27776      # a path prefixed by /cygdrive for fixpath to work.
27777      new_path="$CYGWIN_ROOT_PATH$input_path"
27778    fi
27779  fi
27780
27781
27782  if test "x$path" != "x$new_path"; then
27783    BOOT_JDK="$new_path"
27784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27786  fi
27787
27788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27789
27790  path="$BOOT_JDK"
27791  has_colon=`$ECHO $path | $GREP ^.:`
27792  new_path="$path"
27793  if test "x$has_colon" = x; then
27794    # Not in mixed or Windows style, start by that.
27795    new_path=`cmd //c echo $path`
27796  fi
27797
27798
27799  input_path="$new_path"
27800  # Check if we need to convert this using DOS-style short mode. If the path
27801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27802  # take no chances and rewrite it.
27803  # Note: m4 eats our [], so we need to use [ and ] instead.
27804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27805  if test "x$has_forbidden_chars" != x; then
27806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27808  fi
27809
27810
27811  windows_path="$new_path"
27812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27813    unix_path=`$CYGPATH -u "$windows_path"`
27814    new_path="$unix_path"
27815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27817    new_path="$unix_path"
27818  fi
27819
27820  if test "x$path" != "x$new_path"; then
27821    BOOT_JDK="$new_path"
27822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27824  fi
27825
27826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27828
27829    else
27830      # We're on a unix platform. Hooray! :)
27831      path="$BOOT_JDK"
27832      has_space=`$ECHO "$path" | $GREP " "`
27833      if test "x$has_space" != x; then
27834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27837      fi
27838
27839      # Use eval to expand a potential ~
27840      eval path="$path"
27841      if test ! -f "$path" && test ! -d "$path"; then
27842        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27843      fi
27844
27845      if test -d "$path"; then
27846        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27847      else
27848        dir="`$DIRNAME "$path"`"
27849        base="`$BASENAME "$path"`"
27850        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27851      fi
27852    fi
27853  fi
27854
27855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27856$as_echo_n "checking for Boot JDK... " >&6; }
27857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27858$as_echo "$BOOT_JDK" >&6; }
27859            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27860$as_echo_n "checking Boot JDK version... " >&6; }
27861            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27863$as_echo "$BOOT_JDK_VERSION" >&6; }
27864          fi # end check jdk version
27865        fi # end check javac
27866      fi # end check java
27867    fi # end check boot jdk found
27868  fi
27869
27870    done
27871  fi
27872
27873
27874    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27875    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27876      # Do we have a bin/java?
27877      if test ! -x "$BOOT_JDK/bin/java"; then
27878        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27880        BOOT_JDK_FOUND=no
27881      else
27882        # Do we have a bin/javac?
27883        if test ! -x "$BOOT_JDK/bin/javac"; then
27884          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27886          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27887$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27888          BOOT_JDK_FOUND=no
27889        else
27890          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27891          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27892
27893          # Extra M4 quote needed to protect [] in grep expression.
27894          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27895          if test "x$FOUND_CORRECT_VERSION" = x; then
27896            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27898            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27899$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27900            BOOT_JDK_FOUND=no
27901          else
27902            # We're done! :-)
27903            BOOT_JDK_FOUND=yes
27904
27905  # Only process if variable expands to non-empty
27906
27907  if test "x$BOOT_JDK" != x; then
27908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27909
27910  # Input might be given as Windows format, start by converting to
27911  # unix format.
27912  path="$BOOT_JDK"
27913  new_path=`$CYGPATH -u "$path"`
27914
27915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27918  # "foo.exe" is OK but "foo" is an error.
27919  #
27920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27921  # It is also a way to make sure we got the proper file name for the real test later on.
27922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27923  if test "x$test_shortpath" = x; then
27924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27926    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27927  fi
27928
27929  # Call helper function which possibly converts this using DOS-style short mode.
27930  # If so, the updated path is stored in $new_path.
27931
27932  input_path="$new_path"
27933  # Check if we need to convert this using DOS-style short mode. If the path
27934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27935  # take no chances and rewrite it.
27936  # Note: m4 eats our [], so we need to use [ and ] instead.
27937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27938  if test "x$has_forbidden_chars" != x; then
27939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27943      # Going to short mode and back again did indeed matter. Since short mode is
27944      # case insensitive, let's make it lowercase to improve readability.
27945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27946      # Now convert it back to Unix-style (cygpath)
27947      input_path=`$CYGPATH -u "$shortmode_path"`
27948      new_path="$input_path"
27949    fi
27950  fi
27951
27952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27953  if test "x$test_cygdrive_prefix" = x; then
27954    # As a simple fix, exclude /usr/bin since it's not a real path.
27955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27957      # a path prefixed by /cygdrive for fixpath to work.
27958      new_path="$CYGWIN_ROOT_PATH$input_path"
27959    fi
27960  fi
27961
27962
27963  if test "x$path" != "x$new_path"; then
27964    BOOT_JDK="$new_path"
27965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27966$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27967  fi
27968
27969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27970
27971  path="$BOOT_JDK"
27972  has_colon=`$ECHO $path | $GREP ^.:`
27973  new_path="$path"
27974  if test "x$has_colon" = x; then
27975    # Not in mixed or Windows style, start by that.
27976    new_path=`cmd //c echo $path`
27977  fi
27978
27979
27980  input_path="$new_path"
27981  # Check if we need to convert this using DOS-style short mode. If the path
27982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27983  # take no chances and rewrite it.
27984  # Note: m4 eats our [], so we need to use [ and ] instead.
27985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27986  if test "x$has_forbidden_chars" != x; then
27987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27989  fi
27990
27991
27992  windows_path="$new_path"
27993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27994    unix_path=`$CYGPATH -u "$windows_path"`
27995    new_path="$unix_path"
27996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27998    new_path="$unix_path"
27999  fi
28000
28001  if test "x$path" != "x$new_path"; then
28002    BOOT_JDK="$new_path"
28003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28005  fi
28006
28007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28009
28010    else
28011      # We're on a unix platform. Hooray! :)
28012      path="$BOOT_JDK"
28013      has_space=`$ECHO "$path" | $GREP " "`
28014      if test "x$has_space" != x; then
28015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28018      fi
28019
28020      # Use eval to expand a potential ~
28021      eval path="$path"
28022      if test ! -f "$path" && test ! -d "$path"; then
28023        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28024      fi
28025
28026      if test -d "$path"; then
28027        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28028      else
28029        dir="`$DIRNAME "$path"`"
28030        base="`$BASENAME "$path"`"
28031        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28032      fi
28033    fi
28034  fi
28035
28036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28037$as_echo_n "checking for Boot JDK... " >&6; }
28038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28039$as_echo "$BOOT_JDK" >&6; }
28040            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28041$as_echo_n "checking Boot JDK version... " >&6; }
28042            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28044$as_echo "$BOOT_JDK_VERSION" >&6; }
28045          fi # end check jdk version
28046        fi # end check javac
28047      fi # end check java
28048    fi # end check boot jdk found
28049  fi
28050
28051  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28052
28053  if test "x$BOOT_JDK_FOUND" = xno; then
28054    # Now execute the test
28055
28056  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28057  BOOT_JDK_SUFFIX="/Contents/Home"
28058  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28059  if test "x$ALL_JDKS_FOUND" != x; then
28060    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28061
28062  if test "x$BOOT_JDK_FOUND" = xno; then
28063    # Now execute the test
28064
28065        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28066        if test -d "$BOOT_JDK"; then
28067          BOOT_JDK_FOUND=maybe
28068          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28069$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28070        fi
28071
28072
28073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28075      # Do we have a bin/java?
28076      if test ! -x "$BOOT_JDK/bin/java"; then
28077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28079        BOOT_JDK_FOUND=no
28080      else
28081        # Do we have a bin/javac?
28082        if test ! -x "$BOOT_JDK/bin/javac"; then
28083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28087          BOOT_JDK_FOUND=no
28088        else
28089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28091
28092          # Extra M4 quote needed to protect [] in grep expression.
28093          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28094          if test "x$FOUND_CORRECT_VERSION" = x; then
28095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28099            BOOT_JDK_FOUND=no
28100          else
28101            # We're done! :-)
28102            BOOT_JDK_FOUND=yes
28103
28104  # Only process if variable expands to non-empty
28105
28106  if test "x$BOOT_JDK" != x; then
28107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28108
28109  # Input might be given as Windows format, start by converting to
28110  # unix format.
28111  path="$BOOT_JDK"
28112  new_path=`$CYGPATH -u "$path"`
28113
28114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28117  # "foo.exe" is OK but "foo" is an error.
28118  #
28119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28120  # It is also a way to make sure we got the proper file name for the real test later on.
28121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28122  if test "x$test_shortpath" = x; then
28123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28126  fi
28127
28128  # Call helper function which possibly converts this using DOS-style short mode.
28129  # If so, the updated path is stored in $new_path.
28130
28131  input_path="$new_path"
28132  # Check if we need to convert this using DOS-style short mode. If the path
28133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28134  # take no chances and rewrite it.
28135  # Note: m4 eats our [], so we need to use [ and ] instead.
28136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28137  if test "x$has_forbidden_chars" != x; then
28138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28142      # Going to short mode and back again did indeed matter. Since short mode is
28143      # case insensitive, let's make it lowercase to improve readability.
28144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28145      # Now convert it back to Unix-style (cygpath)
28146      input_path=`$CYGPATH -u "$shortmode_path"`
28147      new_path="$input_path"
28148    fi
28149  fi
28150
28151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28152  if test "x$test_cygdrive_prefix" = x; then
28153    # As a simple fix, exclude /usr/bin since it's not a real path.
28154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28156      # a path prefixed by /cygdrive for fixpath to work.
28157      new_path="$CYGWIN_ROOT_PATH$input_path"
28158    fi
28159  fi
28160
28161
28162  if test "x$path" != "x$new_path"; then
28163    BOOT_JDK="$new_path"
28164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28166  fi
28167
28168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28169
28170  path="$BOOT_JDK"
28171  has_colon=`$ECHO $path | $GREP ^.:`
28172  new_path="$path"
28173  if test "x$has_colon" = x; then
28174    # Not in mixed or Windows style, start by that.
28175    new_path=`cmd //c echo $path`
28176  fi
28177
28178
28179  input_path="$new_path"
28180  # Check if we need to convert this using DOS-style short mode. If the path
28181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28182  # take no chances and rewrite it.
28183  # Note: m4 eats our [], so we need to use [ and ] instead.
28184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28185  if test "x$has_forbidden_chars" != x; then
28186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28188  fi
28189
28190
28191  windows_path="$new_path"
28192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28193    unix_path=`$CYGPATH -u "$windows_path"`
28194    new_path="$unix_path"
28195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28197    new_path="$unix_path"
28198  fi
28199
28200  if test "x$path" != "x$new_path"; then
28201    BOOT_JDK="$new_path"
28202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28204  fi
28205
28206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28208
28209    else
28210      # We're on a unix platform. Hooray! :)
28211      path="$BOOT_JDK"
28212      has_space=`$ECHO "$path" | $GREP " "`
28213      if test "x$has_space" != x; then
28214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28217      fi
28218
28219      # Use eval to expand a potential ~
28220      eval path="$path"
28221      if test ! -f "$path" && test ! -d "$path"; then
28222        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28223      fi
28224
28225      if test -d "$path"; then
28226        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28227      else
28228        dir="`$DIRNAME "$path"`"
28229        base="`$BASENAME "$path"`"
28230        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28231      fi
28232    fi
28233  fi
28234
28235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28236$as_echo_n "checking for Boot JDK... " >&6; }
28237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28238$as_echo "$BOOT_JDK" >&6; }
28239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28240$as_echo_n "checking Boot JDK version... " >&6; }
28241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28243$as_echo "$BOOT_JDK_VERSION" >&6; }
28244          fi # end check jdk version
28245        fi # end check javac
28246      fi # end check java
28247    fi # end check boot jdk found
28248  fi
28249
28250    done
28251  fi
28252
28253
28254    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28255    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28256      # Do we have a bin/java?
28257      if test ! -x "$BOOT_JDK/bin/java"; then
28258        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28260        BOOT_JDK_FOUND=no
28261      else
28262        # Do we have a bin/javac?
28263        if test ! -x "$BOOT_JDK/bin/javac"; then
28264          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28266          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28267$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28268          BOOT_JDK_FOUND=no
28269        else
28270          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28271          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28272
28273          # Extra M4 quote needed to protect [] in grep expression.
28274          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28275          if test "x$FOUND_CORRECT_VERSION" = x; then
28276            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28278            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28279$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28280            BOOT_JDK_FOUND=no
28281          else
28282            # We're done! :-)
28283            BOOT_JDK_FOUND=yes
28284
28285  # Only process if variable expands to non-empty
28286
28287  if test "x$BOOT_JDK" != x; then
28288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28289
28290  # Input might be given as Windows format, start by converting to
28291  # unix format.
28292  path="$BOOT_JDK"
28293  new_path=`$CYGPATH -u "$path"`
28294
28295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28298  # "foo.exe" is OK but "foo" is an error.
28299  #
28300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28301  # It is also a way to make sure we got the proper file name for the real test later on.
28302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28303  if test "x$test_shortpath" = x; then
28304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28306    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28307  fi
28308
28309  # Call helper function which possibly converts this using DOS-style short mode.
28310  # If so, the updated path is stored in $new_path.
28311
28312  input_path="$new_path"
28313  # Check if we need to convert this using DOS-style short mode. If the path
28314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28315  # take no chances and rewrite it.
28316  # Note: m4 eats our [], so we need to use [ and ] instead.
28317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28318  if test "x$has_forbidden_chars" != x; then
28319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28323      # Going to short mode and back again did indeed matter. Since short mode is
28324      # case insensitive, let's make it lowercase to improve readability.
28325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28326      # Now convert it back to Unix-style (cygpath)
28327      input_path=`$CYGPATH -u "$shortmode_path"`
28328      new_path="$input_path"
28329    fi
28330  fi
28331
28332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28333  if test "x$test_cygdrive_prefix" = x; then
28334    # As a simple fix, exclude /usr/bin since it's not a real path.
28335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28337      # a path prefixed by /cygdrive for fixpath to work.
28338      new_path="$CYGWIN_ROOT_PATH$input_path"
28339    fi
28340  fi
28341
28342
28343  if test "x$path" != "x$new_path"; then
28344    BOOT_JDK="$new_path"
28345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28347  fi
28348
28349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28350
28351  path="$BOOT_JDK"
28352  has_colon=`$ECHO $path | $GREP ^.:`
28353  new_path="$path"
28354  if test "x$has_colon" = x; then
28355    # Not in mixed or Windows style, start by that.
28356    new_path=`cmd //c echo $path`
28357  fi
28358
28359
28360  input_path="$new_path"
28361  # Check if we need to convert this using DOS-style short mode. If the path
28362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28363  # take no chances and rewrite it.
28364  # Note: m4 eats our [], so we need to use [ and ] instead.
28365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28366  if test "x$has_forbidden_chars" != x; then
28367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28369  fi
28370
28371
28372  windows_path="$new_path"
28373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28374    unix_path=`$CYGPATH -u "$windows_path"`
28375    new_path="$unix_path"
28376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28378    new_path="$unix_path"
28379  fi
28380
28381  if test "x$path" != "x$new_path"; then
28382    BOOT_JDK="$new_path"
28383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28385  fi
28386
28387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28389
28390    else
28391      # We're on a unix platform. Hooray! :)
28392      path="$BOOT_JDK"
28393      has_space=`$ECHO "$path" | $GREP " "`
28394      if test "x$has_space" != x; then
28395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28396$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28398      fi
28399
28400      # Use eval to expand a potential ~
28401      eval path="$path"
28402      if test ! -f "$path" && test ! -d "$path"; then
28403        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28404      fi
28405
28406      if test -d "$path"; then
28407        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28408      else
28409        dir="`$DIRNAME "$path"`"
28410        base="`$BASENAME "$path"`"
28411        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28412      fi
28413    fi
28414  fi
28415
28416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28417$as_echo_n "checking for Boot JDK... " >&6; }
28418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28419$as_echo "$BOOT_JDK" >&6; }
28420            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28421$as_echo_n "checking Boot JDK version... " >&6; }
28422            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28424$as_echo "$BOOT_JDK_VERSION" >&6; }
28425          fi # end check jdk version
28426        fi # end check javac
28427      fi # end check java
28428    fi # end check boot jdk found
28429  fi
28430
28431
28432  if test "x$BOOT_JDK_FOUND" = xno; then
28433    # Now execute the test
28434
28435  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28436  BOOT_JDK_SUFFIX="/Contents/Home"
28437  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28438  if test "x$ALL_JDKS_FOUND" != x; then
28439    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28440
28441  if test "x$BOOT_JDK_FOUND" = xno; then
28442    # Now execute the test
28443
28444        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28445        if test -d "$BOOT_JDK"; then
28446          BOOT_JDK_FOUND=maybe
28447          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28448$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28449        fi
28450
28451
28452    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28453    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28454      # Do we have a bin/java?
28455      if test ! -x "$BOOT_JDK/bin/java"; then
28456        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28458        BOOT_JDK_FOUND=no
28459      else
28460        # Do we have a bin/javac?
28461        if test ! -x "$BOOT_JDK/bin/javac"; then
28462          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28464          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28465$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28466          BOOT_JDK_FOUND=no
28467        else
28468          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28469          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28470
28471          # Extra M4 quote needed to protect [] in grep expression.
28472          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28473          if test "x$FOUND_CORRECT_VERSION" = x; then
28474            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28476            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28477$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28478            BOOT_JDK_FOUND=no
28479          else
28480            # We're done! :-)
28481            BOOT_JDK_FOUND=yes
28482
28483  # Only process if variable expands to non-empty
28484
28485  if test "x$BOOT_JDK" != x; then
28486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28487
28488  # Input might be given as Windows format, start by converting to
28489  # unix format.
28490  path="$BOOT_JDK"
28491  new_path=`$CYGPATH -u "$path"`
28492
28493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28496  # "foo.exe" is OK but "foo" is an error.
28497  #
28498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28499  # It is also a way to make sure we got the proper file name for the real test later on.
28500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28501  if test "x$test_shortpath" = x; then
28502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28504    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28505  fi
28506
28507  # Call helper function which possibly converts this using DOS-style short mode.
28508  # If so, the updated path is stored in $new_path.
28509
28510  input_path="$new_path"
28511  # Check if we need to convert this using DOS-style short mode. If the path
28512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28513  # take no chances and rewrite it.
28514  # Note: m4 eats our [], so we need to use [ and ] instead.
28515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28516  if test "x$has_forbidden_chars" != x; then
28517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28521      # Going to short mode and back again did indeed matter. Since short mode is
28522      # case insensitive, let's make it lowercase to improve readability.
28523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28524      # Now convert it back to Unix-style (cygpath)
28525      input_path=`$CYGPATH -u "$shortmode_path"`
28526      new_path="$input_path"
28527    fi
28528  fi
28529
28530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28531  if test "x$test_cygdrive_prefix" = x; then
28532    # As a simple fix, exclude /usr/bin since it's not a real path.
28533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28535      # a path prefixed by /cygdrive for fixpath to work.
28536      new_path="$CYGWIN_ROOT_PATH$input_path"
28537    fi
28538  fi
28539
28540
28541  if test "x$path" != "x$new_path"; then
28542    BOOT_JDK="$new_path"
28543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28544$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28545  fi
28546
28547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28548
28549  path="$BOOT_JDK"
28550  has_colon=`$ECHO $path | $GREP ^.:`
28551  new_path="$path"
28552  if test "x$has_colon" = x; then
28553    # Not in mixed or Windows style, start by that.
28554    new_path=`cmd //c echo $path`
28555  fi
28556
28557
28558  input_path="$new_path"
28559  # Check if we need to convert this using DOS-style short mode. If the path
28560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28561  # take no chances and rewrite it.
28562  # Note: m4 eats our [], so we need to use [ and ] instead.
28563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28564  if test "x$has_forbidden_chars" != x; then
28565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28567  fi
28568
28569
28570  windows_path="$new_path"
28571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28572    unix_path=`$CYGPATH -u "$windows_path"`
28573    new_path="$unix_path"
28574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28576    new_path="$unix_path"
28577  fi
28578
28579  if test "x$path" != "x$new_path"; then
28580    BOOT_JDK="$new_path"
28581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28583  fi
28584
28585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28587
28588    else
28589      # We're on a unix platform. Hooray! :)
28590      path="$BOOT_JDK"
28591      has_space=`$ECHO "$path" | $GREP " "`
28592      if test "x$has_space" != x; then
28593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28595        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28596      fi
28597
28598      # Use eval to expand a potential ~
28599      eval path="$path"
28600      if test ! -f "$path" && test ! -d "$path"; then
28601        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28602      fi
28603
28604      if test -d "$path"; then
28605        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28606      else
28607        dir="`$DIRNAME "$path"`"
28608        base="`$BASENAME "$path"`"
28609        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28610      fi
28611    fi
28612  fi
28613
28614            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28615$as_echo_n "checking for Boot JDK... " >&6; }
28616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28617$as_echo "$BOOT_JDK" >&6; }
28618            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28619$as_echo_n "checking Boot JDK version... " >&6; }
28620            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28622$as_echo "$BOOT_JDK_VERSION" >&6; }
28623          fi # end check jdk version
28624        fi # end check javac
28625      fi # end check java
28626    fi # end check boot jdk found
28627  fi
28628
28629    done
28630  fi
28631
28632
28633    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28634    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28635      # Do we have a bin/java?
28636      if test ! -x "$BOOT_JDK/bin/java"; then
28637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28639        BOOT_JDK_FOUND=no
28640      else
28641        # Do we have a bin/javac?
28642        if test ! -x "$BOOT_JDK/bin/javac"; then
28643          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28645          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28646$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28647          BOOT_JDK_FOUND=no
28648        else
28649          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28650          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28651
28652          # Extra M4 quote needed to protect [] in grep expression.
28653          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28654          if test "x$FOUND_CORRECT_VERSION" = x; then
28655            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28657            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28658$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28659            BOOT_JDK_FOUND=no
28660          else
28661            # We're done! :-)
28662            BOOT_JDK_FOUND=yes
28663
28664  # Only process if variable expands to non-empty
28665
28666  if test "x$BOOT_JDK" != x; then
28667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28668
28669  # Input might be given as Windows format, start by converting to
28670  # unix format.
28671  path="$BOOT_JDK"
28672  new_path=`$CYGPATH -u "$path"`
28673
28674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28677  # "foo.exe" is OK but "foo" is an error.
28678  #
28679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28680  # It is also a way to make sure we got the proper file name for the real test later on.
28681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28682  if test "x$test_shortpath" = x; then
28683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28684$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28685    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28686  fi
28687
28688  # Call helper function which possibly converts this using DOS-style short mode.
28689  # If so, the updated path is stored in $new_path.
28690
28691  input_path="$new_path"
28692  # Check if we need to convert this using DOS-style short mode. If the path
28693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28694  # take no chances and rewrite it.
28695  # Note: m4 eats our [], so we need to use [ and ] instead.
28696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28697  if test "x$has_forbidden_chars" != x; then
28698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28702      # Going to short mode and back again did indeed matter. Since short mode is
28703      # case insensitive, let's make it lowercase to improve readability.
28704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28705      # Now convert it back to Unix-style (cygpath)
28706      input_path=`$CYGPATH -u "$shortmode_path"`
28707      new_path="$input_path"
28708    fi
28709  fi
28710
28711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28712  if test "x$test_cygdrive_prefix" = x; then
28713    # As a simple fix, exclude /usr/bin since it's not a real path.
28714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28716      # a path prefixed by /cygdrive for fixpath to work.
28717      new_path="$CYGWIN_ROOT_PATH$input_path"
28718    fi
28719  fi
28720
28721
28722  if test "x$path" != "x$new_path"; then
28723    BOOT_JDK="$new_path"
28724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28726  fi
28727
28728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28729
28730  path="$BOOT_JDK"
28731  has_colon=`$ECHO $path | $GREP ^.:`
28732  new_path="$path"
28733  if test "x$has_colon" = x; then
28734    # Not in mixed or Windows style, start by that.
28735    new_path=`cmd //c echo $path`
28736  fi
28737
28738
28739  input_path="$new_path"
28740  # Check if we need to convert this using DOS-style short mode. If the path
28741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28742  # take no chances and rewrite it.
28743  # Note: m4 eats our [], so we need to use [ and ] instead.
28744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28745  if test "x$has_forbidden_chars" != x; then
28746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28748  fi
28749
28750
28751  windows_path="$new_path"
28752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28753    unix_path=`$CYGPATH -u "$windows_path"`
28754    new_path="$unix_path"
28755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28757    new_path="$unix_path"
28758  fi
28759
28760  if test "x$path" != "x$new_path"; then
28761    BOOT_JDK="$new_path"
28762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28763$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28764  fi
28765
28766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28768
28769    else
28770      # We're on a unix platform. Hooray! :)
28771      path="$BOOT_JDK"
28772      has_space=`$ECHO "$path" | $GREP " "`
28773      if test "x$has_space" != x; then
28774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28777      fi
28778
28779      # Use eval to expand a potential ~
28780      eval path="$path"
28781      if test ! -f "$path" && test ! -d "$path"; then
28782        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28783      fi
28784
28785      if test -d "$path"; then
28786        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28787      else
28788        dir="`$DIRNAME "$path"`"
28789        base="`$BASENAME "$path"`"
28790        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28791      fi
28792    fi
28793  fi
28794
28795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28796$as_echo_n "checking for Boot JDK... " >&6; }
28797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28798$as_echo "$BOOT_JDK" >&6; }
28799            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28800$as_echo_n "checking Boot JDK version... " >&6; }
28801            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28803$as_echo "$BOOT_JDK_VERSION" >&6; }
28804          fi # end check jdk version
28805        fi # end check javac
28806      fi # end check java
28807    fi # end check boot jdk found
28808  fi
28809
28810  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28811
28812  if test "x$BOOT_JDK_FOUND" = xno; then
28813    # Now execute the test
28814
28815  BOOT_JDK_PREFIX="/usr/lib/jvm"
28816  BOOT_JDK_SUFFIX=""
28817  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28818  if test "x$ALL_JDKS_FOUND" != x; then
28819    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28820
28821  if test "x$BOOT_JDK_FOUND" = xno; then
28822    # Now execute the test
28823
28824        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28825        if test -d "$BOOT_JDK"; then
28826          BOOT_JDK_FOUND=maybe
28827          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28828$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28829        fi
28830
28831
28832    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28833    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28834      # Do we have a bin/java?
28835      if test ! -x "$BOOT_JDK/bin/java"; then
28836        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28838        BOOT_JDK_FOUND=no
28839      else
28840        # Do we have a bin/javac?
28841        if test ! -x "$BOOT_JDK/bin/javac"; then
28842          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28844          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28845$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28846          BOOT_JDK_FOUND=no
28847        else
28848          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28849          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28850
28851          # Extra M4 quote needed to protect [] in grep expression.
28852          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28853          if test "x$FOUND_CORRECT_VERSION" = x; then
28854            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28856            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28857$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28858            BOOT_JDK_FOUND=no
28859          else
28860            # We're done! :-)
28861            BOOT_JDK_FOUND=yes
28862
28863  # Only process if variable expands to non-empty
28864
28865  if test "x$BOOT_JDK" != x; then
28866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28867
28868  # Input might be given as Windows format, start by converting to
28869  # unix format.
28870  path="$BOOT_JDK"
28871  new_path=`$CYGPATH -u "$path"`
28872
28873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28876  # "foo.exe" is OK but "foo" is an error.
28877  #
28878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28879  # It is also a way to make sure we got the proper file name for the real test later on.
28880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28881  if test "x$test_shortpath" = x; then
28882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28884    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28885  fi
28886
28887  # Call helper function which possibly converts this using DOS-style short mode.
28888  # If so, the updated path is stored in $new_path.
28889
28890  input_path="$new_path"
28891  # Check if we need to convert this using DOS-style short mode. If the path
28892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28893  # take no chances and rewrite it.
28894  # Note: m4 eats our [], so we need to use [ and ] instead.
28895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28896  if test "x$has_forbidden_chars" != x; then
28897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28901      # Going to short mode and back again did indeed matter. Since short mode is
28902      # case insensitive, let's make it lowercase to improve readability.
28903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28904      # Now convert it back to Unix-style (cygpath)
28905      input_path=`$CYGPATH -u "$shortmode_path"`
28906      new_path="$input_path"
28907    fi
28908  fi
28909
28910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28911  if test "x$test_cygdrive_prefix" = x; then
28912    # As a simple fix, exclude /usr/bin since it's not a real path.
28913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28915      # a path prefixed by /cygdrive for fixpath to work.
28916      new_path="$CYGWIN_ROOT_PATH$input_path"
28917    fi
28918  fi
28919
28920
28921  if test "x$path" != "x$new_path"; then
28922    BOOT_JDK="$new_path"
28923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28925  fi
28926
28927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28928
28929  path="$BOOT_JDK"
28930  has_colon=`$ECHO $path | $GREP ^.:`
28931  new_path="$path"
28932  if test "x$has_colon" = x; then
28933    # Not in mixed or Windows style, start by that.
28934    new_path=`cmd //c echo $path`
28935  fi
28936
28937
28938  input_path="$new_path"
28939  # Check if we need to convert this using DOS-style short mode. If the path
28940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28941  # take no chances and rewrite it.
28942  # Note: m4 eats our [], so we need to use [ and ] instead.
28943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28944  if test "x$has_forbidden_chars" != x; then
28945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28947  fi
28948
28949
28950  windows_path="$new_path"
28951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28952    unix_path=`$CYGPATH -u "$windows_path"`
28953    new_path="$unix_path"
28954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28956    new_path="$unix_path"
28957  fi
28958
28959  if test "x$path" != "x$new_path"; then
28960    BOOT_JDK="$new_path"
28961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28963  fi
28964
28965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28967
28968    else
28969      # We're on a unix platform. Hooray! :)
28970      path="$BOOT_JDK"
28971      has_space=`$ECHO "$path" | $GREP " "`
28972      if test "x$has_space" != x; then
28973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28976      fi
28977
28978      # Use eval to expand a potential ~
28979      eval path="$path"
28980      if test ! -f "$path" && test ! -d "$path"; then
28981        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28982      fi
28983
28984      if test -d "$path"; then
28985        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28986      else
28987        dir="`$DIRNAME "$path"`"
28988        base="`$BASENAME "$path"`"
28989        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28990      fi
28991    fi
28992  fi
28993
28994            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28995$as_echo_n "checking for Boot JDK... " >&6; }
28996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28997$as_echo "$BOOT_JDK" >&6; }
28998            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28999$as_echo_n "checking Boot JDK version... " >&6; }
29000            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29002$as_echo "$BOOT_JDK_VERSION" >&6; }
29003          fi # end check jdk version
29004        fi # end check javac
29005      fi # end check java
29006    fi # end check boot jdk found
29007  fi
29008
29009    done
29010  fi
29011
29012
29013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29015      # Do we have a bin/java?
29016      if test ! -x "$BOOT_JDK/bin/java"; then
29017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29019        BOOT_JDK_FOUND=no
29020      else
29021        # Do we have a bin/javac?
29022        if test ! -x "$BOOT_JDK/bin/javac"; then
29023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29027          BOOT_JDK_FOUND=no
29028        else
29029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29031
29032          # Extra M4 quote needed to protect [] in grep expression.
29033          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29034          if test "x$FOUND_CORRECT_VERSION" = x; then
29035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29039            BOOT_JDK_FOUND=no
29040          else
29041            # We're done! :-)
29042            BOOT_JDK_FOUND=yes
29043
29044  # Only process if variable expands to non-empty
29045
29046  if test "x$BOOT_JDK" != x; then
29047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29048
29049  # Input might be given as Windows format, start by converting to
29050  # unix format.
29051  path="$BOOT_JDK"
29052  new_path=`$CYGPATH -u "$path"`
29053
29054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29057  # "foo.exe" is OK but "foo" is an error.
29058  #
29059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29060  # It is also a way to make sure we got the proper file name for the real test later on.
29061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29062  if test "x$test_shortpath" = x; then
29063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29066  fi
29067
29068  # Call helper function which possibly converts this using DOS-style short mode.
29069  # If so, the updated path is stored in $new_path.
29070
29071  input_path="$new_path"
29072  # Check if we need to convert this using DOS-style short mode. If the path
29073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29074  # take no chances and rewrite it.
29075  # Note: m4 eats our [], so we need to use [ and ] instead.
29076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29077  if test "x$has_forbidden_chars" != x; then
29078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29082      # Going to short mode and back again did indeed matter. Since short mode is
29083      # case insensitive, let's make it lowercase to improve readability.
29084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29085      # Now convert it back to Unix-style (cygpath)
29086      input_path=`$CYGPATH -u "$shortmode_path"`
29087      new_path="$input_path"
29088    fi
29089  fi
29090
29091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29092  if test "x$test_cygdrive_prefix" = x; then
29093    # As a simple fix, exclude /usr/bin since it's not a real path.
29094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29096      # a path prefixed by /cygdrive for fixpath to work.
29097      new_path="$CYGWIN_ROOT_PATH$input_path"
29098    fi
29099  fi
29100
29101
29102  if test "x$path" != "x$new_path"; then
29103    BOOT_JDK="$new_path"
29104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29106  fi
29107
29108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29109
29110  path="$BOOT_JDK"
29111  has_colon=`$ECHO $path | $GREP ^.:`
29112  new_path="$path"
29113  if test "x$has_colon" = x; then
29114    # Not in mixed or Windows style, start by that.
29115    new_path=`cmd //c echo $path`
29116  fi
29117
29118
29119  input_path="$new_path"
29120  # Check if we need to convert this using DOS-style short mode. If the path
29121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29122  # take no chances and rewrite it.
29123  # Note: m4 eats our [], so we need to use [ and ] instead.
29124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29125  if test "x$has_forbidden_chars" != x; then
29126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29128  fi
29129
29130
29131  windows_path="$new_path"
29132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29133    unix_path=`$CYGPATH -u "$windows_path"`
29134    new_path="$unix_path"
29135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29137    new_path="$unix_path"
29138  fi
29139
29140  if test "x$path" != "x$new_path"; then
29141    BOOT_JDK="$new_path"
29142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29144  fi
29145
29146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29148
29149    else
29150      # We're on a unix platform. Hooray! :)
29151      path="$BOOT_JDK"
29152      has_space=`$ECHO "$path" | $GREP " "`
29153      if test "x$has_space" != x; then
29154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29157      fi
29158
29159      # Use eval to expand a potential ~
29160      eval path="$path"
29161      if test ! -f "$path" && test ! -d "$path"; then
29162        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29163      fi
29164
29165      if test -d "$path"; then
29166        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29167      else
29168        dir="`$DIRNAME "$path"`"
29169        base="`$BASENAME "$path"`"
29170        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29171      fi
29172    fi
29173  fi
29174
29175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29176$as_echo_n "checking for Boot JDK... " >&6; }
29177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29178$as_echo "$BOOT_JDK" >&6; }
29179            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29180$as_echo_n "checking Boot JDK version... " >&6; }
29181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29183$as_echo "$BOOT_JDK_VERSION" >&6; }
29184          fi # end check jdk version
29185        fi # end check javac
29186      fi # end check java
29187    fi # end check boot jdk found
29188  fi
29189
29190  fi
29191
29192
29193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29195      # Do we have a bin/java?
29196      if test ! -x "$BOOT_JDK/bin/java"; then
29197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29199        BOOT_JDK_FOUND=no
29200      else
29201        # Do we have a bin/javac?
29202        if test ! -x "$BOOT_JDK/bin/javac"; then
29203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29207          BOOT_JDK_FOUND=no
29208        else
29209          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29210          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29211
29212          # Extra M4 quote needed to protect [] in grep expression.
29213          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29214          if test "x$FOUND_CORRECT_VERSION" = x; then
29215            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29217            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29218$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29219            BOOT_JDK_FOUND=no
29220          else
29221            # We're done! :-)
29222            BOOT_JDK_FOUND=yes
29223
29224  # Only process if variable expands to non-empty
29225
29226  if test "x$BOOT_JDK" != x; then
29227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29228
29229  # Input might be given as Windows format, start by converting to
29230  # unix format.
29231  path="$BOOT_JDK"
29232  new_path=`$CYGPATH -u "$path"`
29233
29234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29237  # "foo.exe" is OK but "foo" is an error.
29238  #
29239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29240  # It is also a way to make sure we got the proper file name for the real test later on.
29241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29242  if test "x$test_shortpath" = x; then
29243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29244$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29245    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29246  fi
29247
29248  # Call helper function which possibly converts this using DOS-style short mode.
29249  # If so, the updated path is stored in $new_path.
29250
29251  input_path="$new_path"
29252  # Check if we need to convert this using DOS-style short mode. If the path
29253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29254  # take no chances and rewrite it.
29255  # Note: m4 eats our [], so we need to use [ and ] instead.
29256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29257  if test "x$has_forbidden_chars" != x; then
29258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29262      # Going to short mode and back again did indeed matter. Since short mode is
29263      # case insensitive, let's make it lowercase to improve readability.
29264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29265      # Now convert it back to Unix-style (cygpath)
29266      input_path=`$CYGPATH -u "$shortmode_path"`
29267      new_path="$input_path"
29268    fi
29269  fi
29270
29271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29272  if test "x$test_cygdrive_prefix" = x; then
29273    # As a simple fix, exclude /usr/bin since it's not a real path.
29274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29276      # a path prefixed by /cygdrive for fixpath to work.
29277      new_path="$CYGWIN_ROOT_PATH$input_path"
29278    fi
29279  fi
29280
29281
29282  if test "x$path" != "x$new_path"; then
29283    BOOT_JDK="$new_path"
29284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29286  fi
29287
29288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29289
29290  path="$BOOT_JDK"
29291  has_colon=`$ECHO $path | $GREP ^.:`
29292  new_path="$path"
29293  if test "x$has_colon" = x; then
29294    # Not in mixed or Windows style, start by that.
29295    new_path=`cmd //c echo $path`
29296  fi
29297
29298
29299  input_path="$new_path"
29300  # Check if we need to convert this using DOS-style short mode. If the path
29301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29302  # take no chances and rewrite it.
29303  # Note: m4 eats our [], so we need to use [ and ] instead.
29304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29305  if test "x$has_forbidden_chars" != x; then
29306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29308  fi
29309
29310
29311  windows_path="$new_path"
29312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29313    unix_path=`$CYGPATH -u "$windows_path"`
29314    new_path="$unix_path"
29315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29317    new_path="$unix_path"
29318  fi
29319
29320  if test "x$path" != "x$new_path"; then
29321    BOOT_JDK="$new_path"
29322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29324  fi
29325
29326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29328
29329    else
29330      # We're on a unix platform. Hooray! :)
29331      path="$BOOT_JDK"
29332      has_space=`$ECHO "$path" | $GREP " "`
29333      if test "x$has_space" != x; then
29334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29337      fi
29338
29339      # Use eval to expand a potential ~
29340      eval path="$path"
29341      if test ! -f "$path" && test ! -d "$path"; then
29342        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29343      fi
29344
29345      if test -d "$path"; then
29346        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29347      else
29348        dir="`$DIRNAME "$path"`"
29349        base="`$BASENAME "$path"`"
29350        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29351      fi
29352    fi
29353  fi
29354
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29356$as_echo_n "checking for Boot JDK... " >&6; }
29357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29358$as_echo "$BOOT_JDK" >&6; }
29359            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29360$as_echo_n "checking Boot JDK version... " >&6; }
29361            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29363$as_echo "$BOOT_JDK_VERSION" >&6; }
29364          fi # end check jdk version
29365        fi # end check javac
29366      fi # end check java
29367    fi # end check boot jdk found
29368  fi
29369
29370
29371  # If we haven't found anything yet, we've truly lost. Give up.
29372  if test "x$BOOT_JDK_FOUND" = xno; then
29373
29374  # Print a helpful message on how to acquire the necessary build dependency.
29375  # openjdk is the help tag: freetype, cups, alsa etc
29376  MISSING_DEPENDENCY=openjdk
29377
29378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29379    cygwin_help $MISSING_DEPENDENCY
29380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29381    msys_help $MISSING_DEPENDENCY
29382  else
29383    PKGHANDLER_COMMAND=
29384
29385    case $PKGHANDLER in
29386      apt-get)
29387        apt_help     $MISSING_DEPENDENCY ;;
29388      yum)
29389        yum_help     $MISSING_DEPENDENCY ;;
29390      port)
29391        port_help    $MISSING_DEPENDENCY ;;
29392      pkgutil)
29393        pkgutil_help $MISSING_DEPENDENCY ;;
29394      pkgadd)
29395        pkgadd_help  $MISSING_DEPENDENCY ;;
29396    esac
29397
29398    if test "x$PKGHANDLER_COMMAND" != x; then
29399      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29400    fi
29401  fi
29402
29403    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29404$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29405    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29406$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29407    as_fn_error $? "Cannot continue" "$LINENO" 5
29408  fi
29409
29410
29411
29412  # Setup tools from the Boot JDK.
29413
29414  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29415
29416  # Publish this variable in the help.
29417
29418
29419  if [ -z "${JAVA+x}" ]; then
29420    # The variable is not set by user, try to locate tool using the code snippet
29421
29422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29423$as_echo_n "checking for java in Boot JDK... " >&6; }
29424      JAVA=$BOOT_JDK/bin/java
29425      if test ! -x $JAVA; then
29426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29427$as_echo "not found" >&6; }
29428        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29429$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29430        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29431      fi
29432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29433$as_echo "ok" >&6; }
29434
29435
29436  else
29437    # The variable is set, but is it from the command line or the environment?
29438
29439    # Try to remove the string !JAVA! from our list.
29440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29442      # If it failed, the variable was not from the command line. Ignore it,
29443      # but warn the user (except for BASH, which is always set by the calling BASH).
29444      if test "xJAVA" != xBASH; then
29445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29446$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29447      fi
29448      # Try to locate tool using the code snippet
29449
29450      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29451$as_echo_n "checking for java in Boot JDK... " >&6; }
29452      JAVA=$BOOT_JDK/bin/java
29453      if test ! -x $JAVA; then
29454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29455$as_echo "not found" >&6; }
29456        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29457$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29458        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29459      fi
29460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29461$as_echo "ok" >&6; }
29462
29463
29464    else
29465      # If it succeeded, then it was overridden by the user. We will use it
29466      # for the tool.
29467
29468      # First remove it from the list of overridden variables, so we can test
29469      # for unknown variables in the end.
29470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29471
29472      # Check if we try to supply an empty value
29473      if test "x$JAVA" = x; then
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29475$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29477$as_echo_n "checking for JAVA... " >&6; }
29478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29479$as_echo "disabled" >&6; }
29480      else
29481        # Check if the provided tool contains a complete path.
29482        tool_specified="$JAVA"
29483        tool_basename="${tool_specified##*/}"
29484        if test "x$tool_basename" = "x$tool_specified"; then
29485          # A command without a complete path is provided, search $PATH.
29486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29487$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29488          # Extract the first word of "$tool_basename", so it can be a program name with args.
29489set dummy $tool_basename; ac_word=$2
29490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29491$as_echo_n "checking for $ac_word... " >&6; }
29492if ${ac_cv_path_JAVA+:} false; then :
29493  $as_echo_n "(cached) " >&6
29494else
29495  case $JAVA in
29496  [\\/]* | ?:[\\/]*)
29497  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29498  ;;
29499  *)
29500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29501for as_dir in $PATH
29502do
29503  IFS=$as_save_IFS
29504  test -z "$as_dir" && as_dir=.
29505    for ac_exec_ext in '' $ac_executable_extensions; do
29506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29507    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29509    break 2
29510  fi
29511done
29512  done
29513IFS=$as_save_IFS
29514
29515  ;;
29516esac
29517fi
29518JAVA=$ac_cv_path_JAVA
29519if test -n "$JAVA"; then
29520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29521$as_echo "$JAVA" >&6; }
29522else
29523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29524$as_echo "no" >&6; }
29525fi
29526
29527
29528          if test "x$JAVA" = x; then
29529            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29530          fi
29531        else
29532          # Otherwise we believe it is a complete path. Use it as it is.
29533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29534$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29535          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29536$as_echo_n "checking for JAVA... " >&6; }
29537          if test ! -x "$tool_specified"; then
29538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29539$as_echo "not found" >&6; }
29540            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29541          fi
29542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29543$as_echo "$tool_specified" >&6; }
29544        fi
29545      fi
29546    fi
29547
29548  fi
29549
29550
29551
29552  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29553
29554  # Publish this variable in the help.
29555
29556
29557  if [ -z "${JAVAC+x}" ]; then
29558    # The variable is not set by user, try to locate tool using the code snippet
29559
29560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29561$as_echo_n "checking for javac in Boot JDK... " >&6; }
29562      JAVAC=$BOOT_JDK/bin/javac
29563      if test ! -x $JAVAC; then
29564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29565$as_echo "not found" >&6; }
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29567$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29568        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29569      fi
29570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29571$as_echo "ok" >&6; }
29572
29573
29574  else
29575    # The variable is set, but is it from the command line or the environment?
29576
29577    # Try to remove the string !JAVAC! from our list.
29578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29580      # If it failed, the variable was not from the command line. Ignore it,
29581      # but warn the user (except for BASH, which is always set by the calling BASH).
29582      if test "xJAVAC" != xBASH; then
29583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29584$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29585      fi
29586      # Try to locate tool using the code snippet
29587
29588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29589$as_echo_n "checking for javac in Boot JDK... " >&6; }
29590      JAVAC=$BOOT_JDK/bin/javac
29591      if test ! -x $JAVAC; then
29592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29593$as_echo "not found" >&6; }
29594        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29595$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29596        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29597      fi
29598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29599$as_echo "ok" >&6; }
29600
29601
29602    else
29603      # If it succeeded, then it was overridden by the user. We will use it
29604      # for the tool.
29605
29606      # First remove it from the list of overridden variables, so we can test
29607      # for unknown variables in the end.
29608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29609
29610      # Check if we try to supply an empty value
29611      if test "x$JAVAC" = x; then
29612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29613$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29615$as_echo_n "checking for JAVAC... " >&6; }
29616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29617$as_echo "disabled" >&6; }
29618      else
29619        # Check if the provided tool contains a complete path.
29620        tool_specified="$JAVAC"
29621        tool_basename="${tool_specified##*/}"
29622        if test "x$tool_basename" = "x$tool_specified"; then
29623          # A command without a complete path is provided, search $PATH.
29624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29625$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29626          # Extract the first word of "$tool_basename", so it can be a program name with args.
29627set dummy $tool_basename; ac_word=$2
29628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29629$as_echo_n "checking for $ac_word... " >&6; }
29630if ${ac_cv_path_JAVAC+:} false; then :
29631  $as_echo_n "(cached) " >&6
29632else
29633  case $JAVAC in
29634  [\\/]* | ?:[\\/]*)
29635  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29636  ;;
29637  *)
29638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29639for as_dir in $PATH
29640do
29641  IFS=$as_save_IFS
29642  test -z "$as_dir" && as_dir=.
29643    for ac_exec_ext in '' $ac_executable_extensions; do
29644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29645    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29647    break 2
29648  fi
29649done
29650  done
29651IFS=$as_save_IFS
29652
29653  ;;
29654esac
29655fi
29656JAVAC=$ac_cv_path_JAVAC
29657if test -n "$JAVAC"; then
29658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29659$as_echo "$JAVAC" >&6; }
29660else
29661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29662$as_echo "no" >&6; }
29663fi
29664
29665
29666          if test "x$JAVAC" = x; then
29667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29668          fi
29669        else
29670          # Otherwise we believe it is a complete path. Use it as it is.
29671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29672$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29674$as_echo_n "checking for JAVAC... " >&6; }
29675          if test ! -x "$tool_specified"; then
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29677$as_echo "not found" >&6; }
29678            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29679          fi
29680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29681$as_echo "$tool_specified" >&6; }
29682        fi
29683      fi
29684    fi
29685
29686  fi
29687
29688
29689
29690  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29691
29692  # Publish this variable in the help.
29693
29694
29695  if [ -z "${JAVAH+x}" ]; then
29696    # The variable is not set by user, try to locate tool using the code snippet
29697
29698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29699$as_echo_n "checking for javah in Boot JDK... " >&6; }
29700      JAVAH=$BOOT_JDK/bin/javah
29701      if test ! -x $JAVAH; then
29702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29703$as_echo "not found" >&6; }
29704        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29705$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29706        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29707      fi
29708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29709$as_echo "ok" >&6; }
29710
29711
29712  else
29713    # The variable is set, but is it from the command line or the environment?
29714
29715    # Try to remove the string !JAVAH! from our list.
29716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29718      # If it failed, the variable was not from the command line. Ignore it,
29719      # but warn the user (except for BASH, which is always set by the calling BASH).
29720      if test "xJAVAH" != xBASH; then
29721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29722$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29723      fi
29724      # Try to locate tool using the code snippet
29725
29726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29727$as_echo_n "checking for javah in Boot JDK... " >&6; }
29728      JAVAH=$BOOT_JDK/bin/javah
29729      if test ! -x $JAVAH; then
29730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29731$as_echo "not found" >&6; }
29732        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29733$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29734        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29735      fi
29736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29737$as_echo "ok" >&6; }
29738
29739
29740    else
29741      # If it succeeded, then it was overridden by the user. We will use it
29742      # for the tool.
29743
29744      # First remove it from the list of overridden variables, so we can test
29745      # for unknown variables in the end.
29746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29747
29748      # Check if we try to supply an empty value
29749      if test "x$JAVAH" = x; then
29750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29751$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29753$as_echo_n "checking for JAVAH... " >&6; }
29754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29755$as_echo "disabled" >&6; }
29756      else
29757        # Check if the provided tool contains a complete path.
29758        tool_specified="$JAVAH"
29759        tool_basename="${tool_specified##*/}"
29760        if test "x$tool_basename" = "x$tool_specified"; then
29761          # A command without a complete path is provided, search $PATH.
29762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29763$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29764          # Extract the first word of "$tool_basename", so it can be a program name with args.
29765set dummy $tool_basename; ac_word=$2
29766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29767$as_echo_n "checking for $ac_word... " >&6; }
29768if ${ac_cv_path_JAVAH+:} false; then :
29769  $as_echo_n "(cached) " >&6
29770else
29771  case $JAVAH in
29772  [\\/]* | ?:[\\/]*)
29773  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29774  ;;
29775  *)
29776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29777for as_dir in $PATH
29778do
29779  IFS=$as_save_IFS
29780  test -z "$as_dir" && as_dir=.
29781    for ac_exec_ext in '' $ac_executable_extensions; do
29782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29783    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29785    break 2
29786  fi
29787done
29788  done
29789IFS=$as_save_IFS
29790
29791  ;;
29792esac
29793fi
29794JAVAH=$ac_cv_path_JAVAH
29795if test -n "$JAVAH"; then
29796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29797$as_echo "$JAVAH" >&6; }
29798else
29799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29800$as_echo "no" >&6; }
29801fi
29802
29803
29804          if test "x$JAVAH" = x; then
29805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29806          fi
29807        else
29808          # Otherwise we believe it is a complete path. Use it as it is.
29809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29810$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29812$as_echo_n "checking for JAVAH... " >&6; }
29813          if test ! -x "$tool_specified"; then
29814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29815$as_echo "not found" >&6; }
29816            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29817          fi
29818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29819$as_echo "$tool_specified" >&6; }
29820        fi
29821      fi
29822    fi
29823
29824  fi
29825
29826
29827
29828  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29829
29830  # Publish this variable in the help.
29831
29832
29833  if [ -z "${JAR+x}" ]; then
29834    # The variable is not set by user, try to locate tool using the code snippet
29835
29836      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29837$as_echo_n "checking for jar in Boot JDK... " >&6; }
29838      JAR=$BOOT_JDK/bin/jar
29839      if test ! -x $JAR; then
29840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29841$as_echo "not found" >&6; }
29842        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29843$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29844        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29845      fi
29846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29847$as_echo "ok" >&6; }
29848
29849
29850  else
29851    # The variable is set, but is it from the command line or the environment?
29852
29853    # Try to remove the string !JAR! from our list.
29854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29856      # If it failed, the variable was not from the command line. Ignore it,
29857      # but warn the user (except for BASH, which is always set by the calling BASH).
29858      if test "xJAR" != xBASH; then
29859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29860$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29861      fi
29862      # Try to locate tool using the code snippet
29863
29864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29865$as_echo_n "checking for jar in Boot JDK... " >&6; }
29866      JAR=$BOOT_JDK/bin/jar
29867      if test ! -x $JAR; then
29868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29869$as_echo "not found" >&6; }
29870        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29871$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29872        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29873      fi
29874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29875$as_echo "ok" >&6; }
29876
29877
29878    else
29879      # If it succeeded, then it was overridden by the user. We will use it
29880      # for the tool.
29881
29882      # First remove it from the list of overridden variables, so we can test
29883      # for unknown variables in the end.
29884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29885
29886      # Check if we try to supply an empty value
29887      if test "x$JAR" = x; then
29888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29889$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29891$as_echo_n "checking for JAR... " >&6; }
29892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29893$as_echo "disabled" >&6; }
29894      else
29895        # Check if the provided tool contains a complete path.
29896        tool_specified="$JAR"
29897        tool_basename="${tool_specified##*/}"
29898        if test "x$tool_basename" = "x$tool_specified"; then
29899          # A command without a complete path is provided, search $PATH.
29900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29901$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29902          # Extract the first word of "$tool_basename", so it can be a program name with args.
29903set dummy $tool_basename; ac_word=$2
29904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29905$as_echo_n "checking for $ac_word... " >&6; }
29906if ${ac_cv_path_JAR+:} false; then :
29907  $as_echo_n "(cached) " >&6
29908else
29909  case $JAR in
29910  [\\/]* | ?:[\\/]*)
29911  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29912  ;;
29913  *)
29914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29915for as_dir in $PATH
29916do
29917  IFS=$as_save_IFS
29918  test -z "$as_dir" && as_dir=.
29919    for ac_exec_ext in '' $ac_executable_extensions; do
29920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29921    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29923    break 2
29924  fi
29925done
29926  done
29927IFS=$as_save_IFS
29928
29929  ;;
29930esac
29931fi
29932JAR=$ac_cv_path_JAR
29933if test -n "$JAR"; then
29934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29935$as_echo "$JAR" >&6; }
29936else
29937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29938$as_echo "no" >&6; }
29939fi
29940
29941
29942          if test "x$JAR" = x; then
29943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29944          fi
29945        else
29946          # Otherwise we believe it is a complete path. Use it as it is.
29947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29948$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29950$as_echo_n "checking for JAR... " >&6; }
29951          if test ! -x "$tool_specified"; then
29952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29953$as_echo "not found" >&6; }
29954            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29955          fi
29956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29957$as_echo "$tool_specified" >&6; }
29958        fi
29959      fi
29960    fi
29961
29962  fi
29963
29964
29965
29966  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29967
29968  # Publish this variable in the help.
29969
29970
29971  if [ -z "${JARSIGNER+x}" ]; then
29972    # The variable is not set by user, try to locate tool using the code snippet
29973
29974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29975$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29976      JARSIGNER=$BOOT_JDK/bin/jarsigner
29977      if test ! -x $JARSIGNER; then
29978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29979$as_echo "not found" >&6; }
29980        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29981$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29982        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29983      fi
29984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29985$as_echo "ok" >&6; }
29986
29987
29988  else
29989    # The variable is set, but is it from the command line or the environment?
29990
29991    # Try to remove the string !JARSIGNER! from our list.
29992    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29993    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29994      # If it failed, the variable was not from the command line. Ignore it,
29995      # but warn the user (except for BASH, which is always set by the calling BASH).
29996      if test "xJARSIGNER" != xBASH; then
29997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29998$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29999      fi
30000      # Try to locate tool using the code snippet
30001
30002      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30003$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30004      JARSIGNER=$BOOT_JDK/bin/jarsigner
30005      if test ! -x $JARSIGNER; then
30006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30007$as_echo "not found" >&6; }
30008        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30009$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30010        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30011      fi
30012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30013$as_echo "ok" >&6; }
30014
30015
30016    else
30017      # If it succeeded, then it was overridden by the user. We will use it
30018      # for the tool.
30019
30020      # First remove it from the list of overridden variables, so we can test
30021      # for unknown variables in the end.
30022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30023
30024      # Check if we try to supply an empty value
30025      if test "x$JARSIGNER" = x; then
30026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30027$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30029$as_echo_n "checking for JARSIGNER... " >&6; }
30030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30031$as_echo "disabled" >&6; }
30032      else
30033        # Check if the provided tool contains a complete path.
30034        tool_specified="$JARSIGNER"
30035        tool_basename="${tool_specified##*/}"
30036        if test "x$tool_basename" = "x$tool_specified"; then
30037          # A command without a complete path is provided, search $PATH.
30038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30039$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30040          # Extract the first word of "$tool_basename", so it can be a program name with args.
30041set dummy $tool_basename; ac_word=$2
30042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30043$as_echo_n "checking for $ac_word... " >&6; }
30044if ${ac_cv_path_JARSIGNER+:} false; then :
30045  $as_echo_n "(cached) " >&6
30046else
30047  case $JARSIGNER in
30048  [\\/]* | ?:[\\/]*)
30049  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30050  ;;
30051  *)
30052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30053for as_dir in $PATH
30054do
30055  IFS=$as_save_IFS
30056  test -z "$as_dir" && as_dir=.
30057    for ac_exec_ext in '' $ac_executable_extensions; do
30058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30059    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30061    break 2
30062  fi
30063done
30064  done
30065IFS=$as_save_IFS
30066
30067  ;;
30068esac
30069fi
30070JARSIGNER=$ac_cv_path_JARSIGNER
30071if test -n "$JARSIGNER"; then
30072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30073$as_echo "$JARSIGNER" >&6; }
30074else
30075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30076$as_echo "no" >&6; }
30077fi
30078
30079
30080          if test "x$JARSIGNER" = x; then
30081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30082          fi
30083        else
30084          # Otherwise we believe it is a complete path. Use it as it is.
30085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30086$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30088$as_echo_n "checking for JARSIGNER... " >&6; }
30089          if test ! -x "$tool_specified"; then
30090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30091$as_echo "not found" >&6; }
30092            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30093          fi
30094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30095$as_echo "$tool_specified" >&6; }
30096        fi
30097      fi
30098    fi
30099
30100  fi
30101
30102
30103
30104  # Finally, set some other options...
30105
30106  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30107  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30108
30109
30110
30111  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30112  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30113  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30114  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30115  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30116  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30117    dummy="$dummy -Xpatch:foo=bar"
30118    JVM_ARG_OK=true
30119  else
30120    $ECHO "Arg failed:" >&5
30121    $ECHO "$OUTPUT" >&5
30122    JVM_ARG_OK=false
30123  fi
30124
30125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30126$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30127  if test "x$JVM_ARG_OK" = "xtrue"; then
30128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30129$as_echo "yes" >&6; }
30130    BOOT_JDK_MODULAR="true"
30131  else
30132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30133$as_echo "no" >&6; }
30134    BOOT_JDK_MODULAR="false"
30135  fi
30136
30137
30138
30139
30140  # Check if the boot jdk is 32 or 64 bit
30141  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30142    BOOT_JDK_BITS="64"
30143  else
30144    BOOT_JDK_BITS="32"
30145  fi
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30147$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30149$as_echo "$BOOT_JDK_BITS" >&6; }
30150
30151
30152
30153
30154# Check whether --with-build-jdk was given.
30155if test "${with_build_jdk+set}" = set; then :
30156  withval=$with_build_jdk;
30157fi
30158
30159
30160  CREATE_BUILDJDK_FOR_HOST=false
30161  BUILD_JDK_FOUND="no"
30162  if test "x$with_build_jdk" != "x"; then
30163
30164  if test "x$BUILD_JDK_FOUND" = xno; then
30165    # Execute the test
30166
30167       if test "x$with_build_jdk" != x; then
30168         BUILD_JDK=$with_build_jdk
30169         BUILD_JDK_FOUND=maybe
30170         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30171$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30172       fi
30173
30174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30175    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30176      # Do we have a bin/java?
30177      if test ! -x "$BUILD_JDK/bin/java"; then
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30179$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30180        BUILD_JDK_FOUND=no
30181      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30183$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30184        BUILD_JDK_FOUND=no
30185      elif test ! -x "$BUILD_JDK/bin/javac"; then
30186        # Do we have a bin/javac?
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30188$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30190$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30191        BUILD_JDK_FOUND=no
30192      else
30193        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30194        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30195
30196        # Extra M4 quote needed to protect [] in grep expression.
30197        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30198        if test "x$FOUND_CORRECT_VERSION" = x; then
30199          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30200$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30201          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30202$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30203          BUILD_JDK_FOUND=no
30204        else
30205          # We're done!
30206          BUILD_JDK_FOUND=yes
30207
30208  # Only process if variable expands to non-empty
30209
30210  if test "x$BUILD_JDK" != x; then
30211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30212
30213  # Input might be given as Windows format, start by converting to
30214  # unix format.
30215  path="$BUILD_JDK"
30216  new_path=`$CYGPATH -u "$path"`
30217
30218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30221  # "foo.exe" is OK but "foo" is an error.
30222  #
30223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30224  # It is also a way to make sure we got the proper file name for the real test later on.
30225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30226  if test "x$test_shortpath" = x; then
30227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30228$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30229    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30230  fi
30231
30232  # Call helper function which possibly converts this using DOS-style short mode.
30233  # If so, the updated path is stored in $new_path.
30234
30235  input_path="$new_path"
30236  # Check if we need to convert this using DOS-style short mode. If the path
30237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30238  # take no chances and rewrite it.
30239  # Note: m4 eats our [], so we need to use [ and ] instead.
30240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30241  if test "x$has_forbidden_chars" != x; then
30242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30246      # Going to short mode and back again did indeed matter. Since short mode is
30247      # case insensitive, let's make it lowercase to improve readability.
30248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30249      # Now convert it back to Unix-style (cygpath)
30250      input_path=`$CYGPATH -u "$shortmode_path"`
30251      new_path="$input_path"
30252    fi
30253  fi
30254
30255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30256  if test "x$test_cygdrive_prefix" = x; then
30257    # As a simple fix, exclude /usr/bin since it's not a real path.
30258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30260      # a path prefixed by /cygdrive for fixpath to work.
30261      new_path="$CYGWIN_ROOT_PATH$input_path"
30262    fi
30263  fi
30264
30265
30266  if test "x$path" != "x$new_path"; then
30267    BUILD_JDK="$new_path"
30268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30269$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30270  fi
30271
30272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30273
30274  path="$BUILD_JDK"
30275  has_colon=`$ECHO $path | $GREP ^.:`
30276  new_path="$path"
30277  if test "x$has_colon" = x; then
30278    # Not in mixed or Windows style, start by that.
30279    new_path=`cmd //c echo $path`
30280  fi
30281
30282
30283  input_path="$new_path"
30284  # Check if we need to convert this using DOS-style short mode. If the path
30285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30286  # take no chances and rewrite it.
30287  # Note: m4 eats our [], so we need to use [ and ] instead.
30288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30289  if test "x$has_forbidden_chars" != x; then
30290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30292  fi
30293
30294
30295  windows_path="$new_path"
30296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30297    unix_path=`$CYGPATH -u "$windows_path"`
30298    new_path="$unix_path"
30299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30301    new_path="$unix_path"
30302  fi
30303
30304  if test "x$path" != "x$new_path"; then
30305    BUILD_JDK="$new_path"
30306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30307$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30308  fi
30309
30310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30312
30313    else
30314      # We're on a unix platform. Hooray! :)
30315      path="$BUILD_JDK"
30316      has_space=`$ECHO "$path" | $GREP " "`
30317      if test "x$has_space" != x; then
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30319$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30321      fi
30322
30323      # Use eval to expand a potential ~
30324      eval path="$path"
30325      if test ! -f "$path" && test ! -d "$path"; then
30326        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30327      fi
30328
30329      if test -d "$path"; then
30330        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30331      else
30332        dir="`$DIRNAME "$path"`"
30333        base="`$BASENAME "$path"`"
30334        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30335      fi
30336    fi
30337  fi
30338
30339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30340$as_echo_n "checking for Build JDK... " >&6; }
30341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30342$as_echo "$BUILD_JDK" >&6; }
30343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30344$as_echo_n "checking Build JDK version... " >&6; }
30345          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30347$as_echo "$BUILD_JDK_VERSION" >&6; }
30348        fi # end check jdk version
30349      fi # end check java
30350    fi # end check build jdk found
30351  fi
30352
30353  else
30354    if test "x$COMPILE_TYPE" = "xcross"; then
30355      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30356      BUILD_JDK_FOUND=yes
30357      CREATE_BUILDJDK=true
30358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30359$as_echo_n "checking for Build JDK... " >&6; }
30360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30361$as_echo "yes, will build it for the host platform" >&6; }
30362    else
30363      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30364      BUILD_JDK_FOUND=yes
30365      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30366$as_echo_n "checking for Build JDK... " >&6; }
30367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30368$as_echo "yes, will use output dir" >&6; }
30369    fi
30370  fi
30371
30372  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30374$as_echo_n "checking for Build JDK... " >&6; }
30375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30376$as_echo "no" >&6; }
30377    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30378  fi
30379
30380
30381
30382
30383
30384###############################################################################
30385#
30386# Configure the sources to use. We can add or override individual directories.
30387#
30388###############################################################################
30389
30390
30391  # Where are the sources.
30392  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30393  CORBA_TOPDIR="$SRC_ROOT/corba"
30394  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30395  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30396  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30397  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30398  JDK_TOPDIR="$SRC_ROOT/jdk"
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408  # This feature is no longer supported.
30409
30410
30411
30412# Check whether --with-add-source-root was given.
30413if test "${with_add_source_root+set}" = set; then :
30414  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
30415$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30416fi
30417
30418
30419
30420
30421# Check whether --with-override-source-root was given.
30422if test "${with_override_source_root+set}" = set; then :
30423  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
30424$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30425fi
30426
30427
30428
30429
30430# Check whether --with-adds-and-overrides was given.
30431if test "${with_adds_and_overrides+set}" = set; then :
30432  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
30433$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30434fi
30435
30436
30437
30438
30439# Check whether --with-override-langtools was given.
30440if test "${with_override_langtools+set}" = set; then :
30441  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30442$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30443fi
30444
30445
30446
30447
30448# Check whether --with-override-corba was given.
30449if test "${with_override_corba+set}" = set; then :
30450  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30451$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30452fi
30453
30454
30455
30456
30457# Check whether --with-override-jaxp was given.
30458if test "${with_override_jaxp+set}" = set; then :
30459  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30460$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30461fi
30462
30463
30464
30465
30466# Check whether --with-override-jaxws was given.
30467if test "${with_override_jaxws+set}" = set; then :
30468  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30469$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30470fi
30471
30472
30473
30474
30475# Check whether --with-override-hotspot was given.
30476if test "${with_override_hotspot+set}" = set; then :
30477  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30478$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30479fi
30480
30481
30482
30483
30484# Check whether --with-override-nashorn was given.
30485if test "${with_override_nashorn+set}" = set; then :
30486  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30487$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30488fi
30489
30490
30491
30492
30493# Check whether --with-override-jdk was given.
30494if test "${with_override_jdk+set}" = set; then :
30495  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30496$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30497fi
30498
30499
30500
30501
30502  BUILD_OUTPUT="$OUTPUT_ROOT"
30503
30504
30505  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30506  BUILD_HOTSPOT=true
30507
30508
30509
30510# Check whether --with-import-hotspot was given.
30511if test "${with_import_hotspot+set}" = set; then :
30512  withval=$with_import_hotspot;
30513fi
30514
30515  if test "x$with_import_hotspot" != x; then
30516    CURDIR="$PWD"
30517    cd "$with_import_hotspot"
30518    HOTSPOT_DIST="`pwd`"
30519    cd "$CURDIR"
30520    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30521      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30522    fi
30523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30524$as_echo_n "checking if hotspot should be imported... " >&6; }
30525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30526$as_echo "yes from $HOTSPOT_DIST" >&6; }
30527    BUILD_HOTSPOT=false
30528  fi
30529
30530  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30531
30532
30533
30534
30535# Check whether --with-import-modules was given.
30536if test "${with_import_modules+set}" = set; then :
30537  withval=$with_import_modules;
30538fi
30539
30540
30541  if test "x$with_import_modules" != x \
30542      && test "x$with_import_modules" != "xno"; then
30543    if test -d "$with_import_modules"; then
30544      IMPORT_MODULES_TOPDIR="$with_import_modules"
30545
30546  # Only process if variable expands to non-empty
30547
30548  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30550
30551  # Input might be given as Windows format, start by converting to
30552  # unix format.
30553  path="$IMPORT_MODULES_TOPDIR"
30554  new_path=`$CYGPATH -u "$path"`
30555
30556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30559  # "foo.exe" is OK but "foo" is an error.
30560  #
30561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30562  # It is also a way to make sure we got the proper file name for the real test later on.
30563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30564  if test "x$test_shortpath" = x; then
30565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30566$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30567    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30568  fi
30569
30570  # Call helper function which possibly converts this using DOS-style short mode.
30571  # If so, the updated path is stored in $new_path.
30572
30573  input_path="$new_path"
30574  # Check if we need to convert this using DOS-style short mode. If the path
30575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30576  # take no chances and rewrite it.
30577  # Note: m4 eats our [], so we need to use [ and ] instead.
30578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30579  if test "x$has_forbidden_chars" != x; then
30580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30584      # Going to short mode and back again did indeed matter. Since short mode is
30585      # case insensitive, let's make it lowercase to improve readability.
30586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30587      # Now convert it back to Unix-style (cygpath)
30588      input_path=`$CYGPATH -u "$shortmode_path"`
30589      new_path="$input_path"
30590    fi
30591  fi
30592
30593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30594  if test "x$test_cygdrive_prefix" = x; then
30595    # As a simple fix, exclude /usr/bin since it's not a real path.
30596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30598      # a path prefixed by /cygdrive for fixpath to work.
30599      new_path="$CYGWIN_ROOT_PATH$input_path"
30600    fi
30601  fi
30602
30603
30604  if test "x$path" != "x$new_path"; then
30605    IMPORT_MODULES_TOPDIR="$new_path"
30606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30607$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30608  fi
30609
30610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30611
30612  path="$IMPORT_MODULES_TOPDIR"
30613  has_colon=`$ECHO $path | $GREP ^.:`
30614  new_path="$path"
30615  if test "x$has_colon" = x; then
30616    # Not in mixed or Windows style, start by that.
30617    new_path=`cmd //c echo $path`
30618  fi
30619
30620
30621  input_path="$new_path"
30622  # Check if we need to convert this using DOS-style short mode. If the path
30623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30624  # take no chances and rewrite it.
30625  # Note: m4 eats our [], so we need to use [ and ] instead.
30626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30627  if test "x$has_forbidden_chars" != x; then
30628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30630  fi
30631
30632
30633  windows_path="$new_path"
30634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30635    unix_path=`$CYGPATH -u "$windows_path"`
30636    new_path="$unix_path"
30637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30639    new_path="$unix_path"
30640  fi
30641
30642  if test "x$path" != "x$new_path"; then
30643    IMPORT_MODULES_TOPDIR="$new_path"
30644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30645$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30646  fi
30647
30648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30650
30651    else
30652      # We're on a unix platform. Hooray! :)
30653      path="$IMPORT_MODULES_TOPDIR"
30654      has_space=`$ECHO "$path" | $GREP " "`
30655      if test "x$has_space" != x; then
30656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30657$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30659      fi
30660
30661      # Use eval to expand a potential ~
30662      eval path="$path"
30663      if test ! -f "$path" && test ! -d "$path"; then
30664        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30665      fi
30666
30667      if test -d "$path"; then
30668        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30669      else
30670        dir="`$DIRNAME "$path"`"
30671        base="`$BASENAME "$path"`"
30672        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30673      fi
30674    fi
30675  fi
30676
30677    elif test -e "$with_import_modules"; then
30678      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30679      $RM -rf "$IMPORT_MODULES_TOPDIR"
30680      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30681      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30682        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30683      fi
30684    else
30685      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30686    fi
30687  fi
30688
30689  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30690    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30691  fi
30692  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30693    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30694  fi
30695  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30696    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30697  fi
30698  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30699    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30700  fi
30701  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30702    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30703  fi
30704  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30705    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30706  fi
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716###############################################################################
30717#
30718# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30719# native code.
30720#
30721###############################################################################
30722
30723# See if we are doing a complete static build or not
30724
30725  # Check whether --enable-static-build was given.
30726if test "${enable_static_build+set}" = set; then :
30727  enableval=$enable_static_build;
30728fi
30729
30730  STATIC_BUILD=false
30731  if test "x$enable_static_build" = "xyes"; then
30732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30733$as_echo_n "checking if static build is enabled... " >&6; }
30734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30735$as_echo "yes" >&6; }
30736    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30737      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30738    fi
30739    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30740    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30741    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30742    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30743    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30744    STATIC_BUILD=true
30745  elif test "x$enable_static_build" = "xno"; then
30746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30747$as_echo_n "checking if static build is enabled... " >&6; }
30748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30749$as_echo "no" >&6; }
30750  elif test "x$enable_static_build" != "x"; then
30751    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30752  fi
30753
30754
30755
30756
30757# First determine the toolchain type (compiler family)
30758
30759
30760# Check whether --with-toolchain-type was given.
30761if test "${with_toolchain_type+set}" = set; then :
30762  withval=$with_toolchain_type;
30763fi
30764
30765
30766  # Use indirect variable referencing
30767  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30768  VALID_TOOLCHAINS=${!toolchain_var_name}
30769
30770  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30771    if test -n "$XCODEBUILD"; then
30772      # On Mac OS X, default toolchain to clang after Xcode 5
30773      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30774      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30775      if test $? -ne 0; then
30776        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30777      fi
30778      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30779          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30780          $CUT -f 1 -d .`
30781      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30782$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30783      if test $XCODE_MAJOR_VERSION -ge 5; then
30784          DEFAULT_TOOLCHAIN="clang"
30785      else
30786          DEFAULT_TOOLCHAIN="gcc"
30787      fi
30788    else
30789      # If Xcode is not installed, but the command line tools are
30790      # then we can't run xcodebuild. On these systems we should
30791      # default to clang
30792      DEFAULT_TOOLCHAIN="clang"
30793    fi
30794  else
30795    # First toolchain type in the list is the default
30796    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30797  fi
30798
30799  if test "x$with_toolchain_type" = xlist; then
30800    # List all toolchains
30801    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30802$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30803    for toolchain in $VALID_TOOLCHAINS; do
30804      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30805      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30806      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30807    done
30808
30809    exit 0
30810  elif test "x$with_toolchain_type" != x; then
30811    # User override; check that it is valid
30812    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30813      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30814$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30815      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30816$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30817      as_fn_error $? "Cannot continue." "$LINENO" 5
30818    fi
30819    TOOLCHAIN_TYPE=$with_toolchain_type
30820  else
30821    # No flag given, use default
30822    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30823  fi
30824
30825
30826  TOOLCHAIN_CC_BINARY_clang="clang"
30827  TOOLCHAIN_CC_BINARY_gcc="gcc"
30828  TOOLCHAIN_CC_BINARY_microsoft="cl"
30829  TOOLCHAIN_CC_BINARY_solstudio="cc"
30830  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30831
30832  TOOLCHAIN_CXX_BINARY_clang="clang++"
30833  TOOLCHAIN_CXX_BINARY_gcc="g++"
30834  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30835  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30836  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30837
30838  # Use indirect variable referencing
30839  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30840  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30841  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30842  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30843  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30844  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30845  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30846  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30847
30848
30849  # Define filename patterns
30850  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30851    LIBRARY_PREFIX=
30852    SHARED_LIBRARY_SUFFIX='.dll'
30853    STATIC_LIBRARY_SUFFIX='.lib'
30854    SHARED_LIBRARY='$1.dll'
30855    STATIC_LIBRARY='$1.lib'
30856    OBJ_SUFFIX='.obj'
30857    EXE_SUFFIX='.exe'
30858  else
30859    LIBRARY_PREFIX=lib
30860    SHARED_LIBRARY_SUFFIX='.so'
30861    STATIC_LIBRARY_SUFFIX='.a'
30862    SHARED_LIBRARY='lib$1.so'
30863    STATIC_LIBRARY='lib$1.a'
30864    OBJ_SUFFIX='.o'
30865    EXE_SUFFIX=''
30866    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30867      # For full static builds, we're overloading the SHARED_LIBRARY
30868      # variables in order to limit the amount of changes required.
30869      # It would be better to remove SHARED and just use LIBRARY and
30870      # LIBRARY_SUFFIX for libraries that can be built either
30871      # shared or static and use STATIC_* for libraries that are
30872      # always built statically.
30873      if test "x$STATIC_BUILD" = xtrue; then
30874        SHARED_LIBRARY='lib$1.a'
30875        SHARED_LIBRARY_SUFFIX='.a'
30876      else
30877        SHARED_LIBRARY='lib$1.dylib'
30878        SHARED_LIBRARY_SUFFIX='.dylib'
30879      fi
30880    fi
30881  fi
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30893    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30894$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30895  else
30896    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30897$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30898  fi
30899
30900
30901# User supplied flags should be used when configure detects compilers
30902
30903  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30904    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30905$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30906  fi
30907
30908  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30909    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30910$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30911  fi
30912
30913  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30914    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30915$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30916  fi
30917
30918
30919# Check whether --with-extra-cflags was given.
30920if test "${with_extra_cflags+set}" = set; then :
30921  withval=$with_extra_cflags;
30922fi
30923
30924
30925
30926# Check whether --with-extra-cxxflags was given.
30927if test "${with_extra_cxxflags+set}" = set; then :
30928  withval=$with_extra_cxxflags;
30929fi
30930
30931
30932
30933# Check whether --with-extra-ldflags was given.
30934if test "${with_extra_ldflags+set}" = set; then :
30935  withval=$with_extra_ldflags;
30936fi
30937
30938
30939  EXTRA_CFLAGS="$with_extra_cflags"
30940  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30941  EXTRA_LDFLAGS="$with_extra_ldflags"
30942
30943  # Hotspot needs these set in their legacy form
30944  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30945  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30946  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956  # The global CFLAGS and LDLAGS variables are used by configure tests and
30957  # should include the extra parameters
30958  CFLAGS="$EXTRA_CFLAGS"
30959  CXXFLAGS="$EXTRA_CXXFLAGS"
30960  LDFLAGS="$EXTRA_LDFLAGS"
30961  CPPFLAGS=""
30962
30963# The sysroot cflags are needed for configure to be able to run the compilers
30964
30965  if test "x$SYSROOT" != "x"; then
30966    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30967      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30968        # Solaris Studio does not have a concept of sysroot. Instead we must
30969        # make sure the default include and lib dirs are appended to each
30970        # compile and link command line. Must also add -I-xbuiltin to enable
30971        # inlining of system functions and intrinsics.
30972        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30973        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30974            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30975            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30976      fi
30977    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30978      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30979      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30980    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30981      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30982      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30983    fi
30984    # Propagate the sysroot args to hotspot
30985    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30986    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30987    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30988    # The global CFLAGS and LDFLAGS variables need these for configure to function
30989    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30990    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30991    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30992    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30993  fi
30994
30995  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30996    # We also need -iframework<path>/System/Library/Frameworks
30997    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30998    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30999    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31000    # set this here so it doesn't have to be peppered throughout the forest
31001    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31002    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31003  fi
31004
31005
31006
31007
31008
31009# Then detect the actual binaries needed
31010
31011  # FIXME: Is this needed?
31012  ac_ext=cpp
31013ac_cpp='$CXXCPP $CPPFLAGS'
31014ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31015ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31016ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31017
31018
31019  # Store the CFLAGS etc passed to the configure script.
31020  ORG_CFLAGS="$CFLAGS"
31021  ORG_CXXFLAGS="$CXXFLAGS"
31022
31023  # autoconf magic only relies on PATH, so update it if tools dir is specified
31024  OLD_PATH="$PATH"
31025
31026  # On Windows, we need to detect the visual studio installation first.
31027  # This will change the PATH, but we need to keep that new PATH even
31028  # after toolchain detection is done, since the compiler (on x86) uses
31029  # it for DLL resolution in runtime.
31030  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31031      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31032
31033  # Store path to cygwin link.exe to help excluding it when searching for
31034  # VS linker. This must be done before changing the PATH when looking for VS.
31035  # Extract the first word of "link", so it can be a program name with args.
31036set dummy link; ac_word=$2
31037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31038$as_echo_n "checking for $ac_word... " >&6; }
31039if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31040  $as_echo_n "(cached) " >&6
31041else
31042  case $CYGWIN_LINK in
31043  [\\/]* | ?:[\\/]*)
31044  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31045  ;;
31046  *)
31047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31048for as_dir in $PATH
31049do
31050  IFS=$as_save_IFS
31051  test -z "$as_dir" && as_dir=.
31052    for ac_exec_ext in '' $ac_executable_extensions; do
31053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31054    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31056    break 2
31057  fi
31058done
31059  done
31060IFS=$as_save_IFS
31061
31062  ;;
31063esac
31064fi
31065CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31066if test -n "$CYGWIN_LINK"; then
31067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31068$as_echo "$CYGWIN_LINK" >&6; }
31069else
31070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31071$as_echo "no" >&6; }
31072fi
31073
31074
31075  if test "x$CYGWIN_LINK" != x; then
31076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31077$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31078    "$CYGWIN_LINK" --version > /dev/null
31079    if test $? -eq 0 ; then
31080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31081$as_echo "yes" >&6; }
31082    else
31083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31084$as_echo "no" >&6; }
31085      # This might be the VS linker. Don't exclude it later on.
31086      CYGWIN_LINK=""
31087    fi
31088  fi
31089
31090  # First-hand choice is to locate and run the vsvars bat file.
31091
31092
31093# Check whether --with-toolchain-version was given.
31094if test "${with_toolchain_version+set}" = set; then :
31095  withval=$with_toolchain_version;
31096fi
31097
31098
31099  if test "x$with_toolchain_version" = xlist; then
31100    # List all toolchains
31101    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31102$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31103    for version in $VALID_VS_VERSIONS; do
31104      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31105      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31106    done
31107
31108    exit 0
31109  elif test "x$DEVKIT_VS_VERSION" != x; then
31110    VS_VERSION=$DEVKIT_VS_VERSION
31111    TOOLCHAIN_VERSION=$VS_VERSION
31112    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31113    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31114    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31115    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31116    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31117    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31118
31119    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31120    # can still be exported as INCLUDE for compiler invocations without
31121    # SYSROOT_CFLAGS
31122    OLDIFS="$IFS"
31123    IFS=";"
31124    for i in $DEVKIT_VS_INCLUDE; do
31125      ipath=$i
31126
31127  unix_path="$ipath"
31128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31129    windows_path=`$CYGPATH -m "$unix_path"`
31130    ipath="$windows_path"
31131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31132    windows_path=`cmd //c echo $unix_path`
31133    ipath="$windows_path"
31134  fi
31135
31136      VS_INCLUDE="$VS_INCLUDE;$ipath"
31137    done
31138    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31139    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31140    for i in $DEVKIT_VS_LIB; do
31141      libpath=$i
31142
31143  unix_path="$libpath"
31144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31145    windows_path=`$CYGPATH -m "$unix_path"`
31146    libpath="$windows_path"
31147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31148    windows_path=`cmd //c echo $unix_path`
31149    libpath="$windows_path"
31150  fi
31151
31152      VS_LIB="$VS_LIB;$libpath"
31153    done
31154    IFS="$OLDIFS"
31155
31156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31157$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31158
31159  elif test "x$with_toolchain_version" != x; then
31160    # User override; check that it is valid
31161    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31162      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31163$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31164      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31165$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31166      as_fn_error $? "Cannot continue." "$LINENO" 5
31167    fi
31168    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31169  else
31170    # No flag given, use default
31171    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31172  fi
31173
31174  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31175
31176  VS_VERSION="$VS_VERSION"
31177  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31178  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31179  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31180  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31181
31182  # When using --with-tools-dir, assume it points to the correct and default
31183  # version of Visual Studio or that --with-toolchain-version was also set.
31184  if test "x$with_tools_dir" != x; then
31185
31186  if test "x$VS_ENV_CMD" = x; then
31187    VS_VERSION="${VS_VERSION}"
31188    VS_BASE="$with_tools_dir/../.."
31189    METHOD="--with-tools-dir"
31190
31191    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31192      VCVARSFILE="vc/bin/vcvars32.bat"
31193    else
31194      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31195    fi
31196
31197
31198  windows_path="$VS_BASE"
31199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31200    unix_path=`$CYGPATH -u "$windows_path"`
31201    VS_BASE="$unix_path"
31202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31204    VS_BASE="$unix_path"
31205  fi
31206
31207    if test -d "$VS_BASE"; then
31208      if test -f "$VS_BASE/$VCVARSFILE"; then
31209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31210$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31211        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31212        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31213        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31214        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31215      else
31216        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31217$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31218        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31219$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31220      fi
31221    fi
31222  fi
31223
31224
31225  if test "x$VS_ENV_CMD" = x; then
31226    VS_VERSION="${VS_VERSION}"
31227    VS_BASE="$with_tools_dir/../../.."
31228    METHOD="--with-tools-dir"
31229
31230    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31231      VCVARSFILE="vc/bin/vcvars32.bat"
31232    else
31233      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31234    fi
31235
31236
31237  windows_path="$VS_BASE"
31238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31239    unix_path=`$CYGPATH -u "$windows_path"`
31240    VS_BASE="$unix_path"
31241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31243    VS_BASE="$unix_path"
31244  fi
31245
31246    if test -d "$VS_BASE"; then
31247      if test -f "$VS_BASE/$VCVARSFILE"; then
31248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31249$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31250        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31251        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31252        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31253        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31254      else
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31256$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31257        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31258$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31259      fi
31260    fi
31261  fi
31262
31263    if test "x$VS_ENV_CMD" = x; then
31264      # Having specified an argument which is incorrect will produce an instant failure;
31265      # we should not go on looking
31266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31267$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31268      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31269$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31270      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31271$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31272      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31273    fi
31274  fi
31275
31276  VS_ENV_CMD=""
31277  VS_ENV_ARGS=""
31278
31279  if test "x$VS_COMNTOOLS" != x; then
31280
31281  if test "x$VS_ENV_CMD" = x; then
31282    VS_VERSION="${VS_VERSION}"
31283    VS_BASE="$VS_COMNTOOLS/../.."
31284    METHOD="$VS_COMNTOOLS_VAR variable"
31285
31286    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31287      VCVARSFILE="vc/bin/vcvars32.bat"
31288    else
31289      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31290    fi
31291
31292
31293  windows_path="$VS_BASE"
31294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31295    unix_path=`$CYGPATH -u "$windows_path"`
31296    VS_BASE="$unix_path"
31297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31299    VS_BASE="$unix_path"
31300  fi
31301
31302    if test -d "$VS_BASE"; then
31303      if test -f "$VS_BASE/$VCVARSFILE"; then
31304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31305$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31306        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31307        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31308        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31309        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31310      else
31311        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31312$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31313        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31314$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31315      fi
31316    fi
31317  fi
31318
31319  fi
31320  if test "x$PROGRAMFILES" != x; then
31321
31322  if test "x$VS_ENV_CMD" = x; then
31323    VS_VERSION="${VS_VERSION}"
31324    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31325    METHOD="well-known name"
31326
31327    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31328      VCVARSFILE="vc/bin/vcvars32.bat"
31329    else
31330      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31331    fi
31332
31333
31334  windows_path="$VS_BASE"
31335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31336    unix_path=`$CYGPATH -u "$windows_path"`
31337    VS_BASE="$unix_path"
31338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31340    VS_BASE="$unix_path"
31341  fi
31342
31343    if test -d "$VS_BASE"; then
31344      if test -f "$VS_BASE/$VCVARSFILE"; then
31345        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31346$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31347        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31348        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31349        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31350        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31351      else
31352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31353$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31354        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31355$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31356      fi
31357    fi
31358  fi
31359
31360  fi
31361  # Work around the insanely named ProgramFiles(x86) env variable
31362  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31363  if test "x$PROGRAMFILES_X86" != x; then
31364
31365  if test "x$VS_ENV_CMD" = x; then
31366    VS_VERSION="${VS_VERSION}"
31367    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31368    METHOD="well-known name"
31369
31370    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31371      VCVARSFILE="vc/bin/vcvars32.bat"
31372    else
31373      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31374    fi
31375
31376
31377  windows_path="$VS_BASE"
31378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31379    unix_path=`$CYGPATH -u "$windows_path"`
31380    VS_BASE="$unix_path"
31381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31383    VS_BASE="$unix_path"
31384  fi
31385
31386    if test -d "$VS_BASE"; then
31387      if test -f "$VS_BASE/$VCVARSFILE"; then
31388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31389$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31390        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31391        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31392        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31393        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31394      else
31395        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31396$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31397        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31398$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31399      fi
31400    fi
31401  fi
31402
31403  fi
31404
31405  if test "x$VS_ENV_CMD" = x; then
31406    VS_VERSION="${VS_VERSION}"
31407    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31408    METHOD="well-known name"
31409
31410    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31411      VCVARSFILE="vc/bin/vcvars32.bat"
31412    else
31413      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31414    fi
31415
31416
31417  windows_path="$VS_BASE"
31418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31419    unix_path=`$CYGPATH -u "$windows_path"`
31420    VS_BASE="$unix_path"
31421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31423    VS_BASE="$unix_path"
31424  fi
31425
31426    if test -d "$VS_BASE"; then
31427      if test -f "$VS_BASE/$VCVARSFILE"; then
31428        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31429$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31430        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31431        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31432        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31433        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31434      else
31435        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31436$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31437        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31438$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31439      fi
31440    fi
31441  fi
31442
31443
31444  if test "x$VS_ENV_CMD" = x; then
31445    VS_VERSION="${VS_VERSION}"
31446    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31447    METHOD="well-known name"
31448
31449    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31450      VCVARSFILE="vc/bin/vcvars32.bat"
31451    else
31452      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31453    fi
31454
31455
31456  windows_path="$VS_BASE"
31457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31458    unix_path=`$CYGPATH -u "$windows_path"`
31459    VS_BASE="$unix_path"
31460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31462    VS_BASE="$unix_path"
31463  fi
31464
31465    if test -d "$VS_BASE"; then
31466      if test -f "$VS_BASE/$VCVARSFILE"; then
31467        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31468$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31469        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31470        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31471        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31472        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31473      else
31474        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31475$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31476        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31477$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31478      fi
31479    fi
31480  fi
31481
31482
31483  if test "x$SDK_INSTALL_DIR" != x; then
31484    if test "x$ProgramW6432" != x; then
31485
31486  if test "x$VS_ENV_CMD" = x; then
31487    VS_VERSION="${VS_VERSION}"
31488    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31489    METHOD="well-known name"
31490
31491  windows_path="$WIN_SDK_BASE"
31492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31493    unix_path=`$CYGPATH -u "$windows_path"`
31494    WIN_SDK_BASE="$unix_path"
31495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31497    WIN_SDK_BASE="$unix_path"
31498  fi
31499
31500    if test -d "$WIN_SDK_BASE"; then
31501      # There have been cases of partial or broken SDK installations. A missing
31502      # lib dir is not going to work.
31503      if test ! -d "$WIN_SDK_BASE/lib"; then
31504        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31505$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31506        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31507$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31508      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31510$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31511        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31512        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31513          VS_ENV_ARGS="/x86"
31514        else
31515          VS_ENV_ARGS="/x64"
31516        fi
31517        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31518        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31519        # TODO: improve detection for other versions of SDK
31520        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31521      else
31522        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31523$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31524        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31525$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31526      fi
31527    fi
31528  fi
31529
31530    fi
31531    if test "x$PROGRAMW6432" != x; then
31532
31533  if test "x$VS_ENV_CMD" = x; then
31534    VS_VERSION="${VS_VERSION}"
31535    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31536    METHOD="well-known name"
31537
31538  windows_path="$WIN_SDK_BASE"
31539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31540    unix_path=`$CYGPATH -u "$windows_path"`
31541    WIN_SDK_BASE="$unix_path"
31542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31544    WIN_SDK_BASE="$unix_path"
31545  fi
31546
31547    if test -d "$WIN_SDK_BASE"; then
31548      # There have been cases of partial or broken SDK installations. A missing
31549      # lib dir is not going to work.
31550      if test ! -d "$WIN_SDK_BASE/lib"; then
31551        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31552$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31553        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31554$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31555      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31556        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31557$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31558        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31559        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31560          VS_ENV_ARGS="/x86"
31561        else
31562          VS_ENV_ARGS="/x64"
31563        fi
31564        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31565        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31566        # TODO: improve detection for other versions of SDK
31567        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31568      else
31569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31571        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31572$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31573      fi
31574    fi
31575  fi
31576
31577    fi
31578    if test "x$PROGRAMFILES" != x; then
31579
31580  if test "x$VS_ENV_CMD" = x; then
31581    VS_VERSION="${VS_VERSION}"
31582    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31583    METHOD="well-known name"
31584
31585  windows_path="$WIN_SDK_BASE"
31586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31587    unix_path=`$CYGPATH -u "$windows_path"`
31588    WIN_SDK_BASE="$unix_path"
31589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31591    WIN_SDK_BASE="$unix_path"
31592  fi
31593
31594    if test -d "$WIN_SDK_BASE"; then
31595      # There have been cases of partial or broken SDK installations. A missing
31596      # lib dir is not going to work.
31597      if test ! -d "$WIN_SDK_BASE/lib"; then
31598        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31599$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31600        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31601$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31602      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31603        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31604$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31605        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31606        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31607          VS_ENV_ARGS="/x86"
31608        else
31609          VS_ENV_ARGS="/x64"
31610        fi
31611        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31612        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31613        # TODO: improve detection for other versions of SDK
31614        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31615      else
31616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31617$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31618        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31619$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31620      fi
31621    fi
31622  fi
31623
31624    fi
31625
31626  if test "x$VS_ENV_CMD" = x; then
31627    VS_VERSION="${VS_VERSION}"
31628    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31629    METHOD="well-known name"
31630
31631  windows_path="$WIN_SDK_BASE"
31632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31633    unix_path=`$CYGPATH -u "$windows_path"`
31634    WIN_SDK_BASE="$unix_path"
31635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31637    WIN_SDK_BASE="$unix_path"
31638  fi
31639
31640    if test -d "$WIN_SDK_BASE"; then
31641      # There have been cases of partial or broken SDK installations. A missing
31642      # lib dir is not going to work.
31643      if test ! -d "$WIN_SDK_BASE/lib"; then
31644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31646        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31647$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31648      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31649        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31650$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31651        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31652        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31653          VS_ENV_ARGS="/x86"
31654        else
31655          VS_ENV_ARGS="/x64"
31656        fi
31657        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31658        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31659        # TODO: improve detection for other versions of SDK
31660        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31661      else
31662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31663$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31665$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31666      fi
31667    fi
31668  fi
31669
31670
31671  if test "x$VS_ENV_CMD" = x; then
31672    VS_VERSION="${VS_VERSION}"
31673    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31674    METHOD="well-known name"
31675
31676  windows_path="$WIN_SDK_BASE"
31677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31678    unix_path=`$CYGPATH -u "$windows_path"`
31679    WIN_SDK_BASE="$unix_path"
31680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31682    WIN_SDK_BASE="$unix_path"
31683  fi
31684
31685    if test -d "$WIN_SDK_BASE"; then
31686      # There have been cases of partial or broken SDK installations. A missing
31687      # lib dir is not going to work.
31688      if test ! -d "$WIN_SDK_BASE/lib"; then
31689        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31690$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31692$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31693      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31695$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31696        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31697        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31698          VS_ENV_ARGS="/x86"
31699        else
31700          VS_ENV_ARGS="/x64"
31701        fi
31702        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31703        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31704        # TODO: improve detection for other versions of SDK
31705        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31706      else
31707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31708$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31710$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31711      fi
31712    fi
31713  fi
31714
31715  fi
31716
31717    if test "x$VS_ENV_CMD" != x; then
31718      TOOLCHAIN_VERSION=$VS_VERSION
31719      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31720      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31721      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31722      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31723      # The rest of the variables are already evaled while probing
31724      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31725$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31726      break
31727    fi
31728  done
31729
31730
31731  # If we have a devkit, skip all of the below.
31732  if test "x$DEVKIT_VS_VERSION" = x; then
31733    if test "x$VS_ENV_CMD" != x; then
31734      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31735
31736  # Only process if variable expands to non-empty
31737
31738  if test "x$VS_ENV_CMD" != x; then
31739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31740
31741  # First separate the path from the arguments. This will split at the first
31742  # space.
31743  complete="$VS_ENV_CMD"
31744  path="${complete%% *}"
31745  tmp="$complete EOL"
31746  arguments="${tmp#* }"
31747
31748  # Input might be given as Windows format, start by converting to
31749  # unix format.
31750  new_path=`$CYGPATH -u "$path"`
31751
31752  # Now try to locate executable using which
31753  new_path=`$WHICH "$new_path" 2> /dev/null`
31754  # bat and cmd files are not always considered executable in cygwin causing which
31755  # to not find them
31756  if test "x$new_path" = x \
31757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31759    new_path=`$CYGPATH -u "$path"`
31760  fi
31761  if test "x$new_path" = x; then
31762    # Oops. Which didn't find the executable.
31763    # The splitting of arguments from the executable at a space might have been incorrect,
31764    # since paths with space are more likely in Windows. Give it another try with the whole
31765    # argument.
31766    path="$complete"
31767    arguments="EOL"
31768    new_path=`$CYGPATH -u "$path"`
31769    new_path=`$WHICH "$new_path" 2> /dev/null`
31770    # bat and cmd files are not always considered executable in cygwin causing which
31771    # to not find them
31772    if test "x$new_path" = x \
31773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31775      new_path=`$CYGPATH -u "$path"`
31776    fi
31777    if test "x$new_path" = x; then
31778      # It's still not found. Now this is an unrecoverable error.
31779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31780$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31781      has_space=`$ECHO "$complete" | $GREP " "`
31782      if test "x$has_space" != x; then
31783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31785      fi
31786      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31787    fi
31788  fi
31789
31790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31793  # "foo.exe" is OK but "foo" is an error.
31794  #
31795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31796  # It is also a way to make sure we got the proper file name for the real test later on.
31797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31798  if test "x$test_shortpath" = x; then
31799    # Short path failed, file does not exist as specified.
31800    # Try adding .exe or .cmd
31801    if test -f "${new_path}.exe"; then
31802      input_to_shortpath="${new_path}.exe"
31803    elif test -f "${new_path}.cmd"; then
31804      input_to_shortpath="${new_path}.cmd"
31805    else
31806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31807$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31810      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31811    fi
31812  else
31813    input_to_shortpath="$new_path"
31814  fi
31815
31816  # Call helper function which possibly converts this using DOS-style short mode.
31817  # If so, the updated path is stored in $new_path.
31818  new_path="$input_to_shortpath"
31819
31820  input_path="$input_to_shortpath"
31821  # Check if we need to convert this using DOS-style short mode. If the path
31822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31823  # take no chances and rewrite it.
31824  # Note: m4 eats our [], so we need to use [ and ] instead.
31825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31826  if test "x$has_forbidden_chars" != x; then
31827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31831      # Going to short mode and back again did indeed matter. Since short mode is
31832      # case insensitive, let's make it lowercase to improve readability.
31833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31834      # Now convert it back to Unix-style (cygpath)
31835      input_path=`$CYGPATH -u "$shortmode_path"`
31836      new_path="$input_path"
31837    fi
31838  fi
31839
31840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31841  if test "x$test_cygdrive_prefix" = x; then
31842    # As a simple fix, exclude /usr/bin since it's not a real path.
31843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31845      # a path prefixed by /cygdrive for fixpath to work.
31846      new_path="$CYGWIN_ROOT_PATH$input_path"
31847    fi
31848  fi
31849
31850  # remove trailing .exe if any
31851  new_path="${new_path/%.exe/}"
31852
31853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31854
31855  # First separate the path from the arguments. This will split at the first
31856  # space.
31857  complete="$VS_ENV_CMD"
31858  path="${complete%% *}"
31859  tmp="$complete EOL"
31860  arguments="${tmp#* }"
31861
31862  # Input might be given as Windows format, start by converting to
31863  # unix format.
31864  new_path="$path"
31865
31866  windows_path="$new_path"
31867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31868    unix_path=`$CYGPATH -u "$windows_path"`
31869    new_path="$unix_path"
31870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31872    new_path="$unix_path"
31873  fi
31874
31875
31876  # Now try to locate executable using which
31877  new_path=`$WHICH "$new_path" 2> /dev/null`
31878
31879  if test "x$new_path" = x; then
31880    # Oops. Which didn't find the executable.
31881    # The splitting of arguments from the executable at a space might have been incorrect,
31882    # since paths with space are more likely in Windows. Give it another try with the whole
31883    # argument.
31884    path="$complete"
31885    arguments="EOL"
31886    new_path="$path"
31887
31888  windows_path="$new_path"
31889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31890    unix_path=`$CYGPATH -u "$windows_path"`
31891    new_path="$unix_path"
31892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31894    new_path="$unix_path"
31895  fi
31896
31897
31898    new_path=`$WHICH "$new_path" 2> /dev/null`
31899    # bat and cmd files are not always considered executable in MSYS causing which
31900    # to not find them
31901    if test "x$new_path" = x \
31902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31904      new_path="$path"
31905
31906  windows_path="$new_path"
31907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31908    unix_path=`$CYGPATH -u "$windows_path"`
31909    new_path="$unix_path"
31910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31912    new_path="$unix_path"
31913  fi
31914
31915    fi
31916
31917    if test "x$new_path" = x; then
31918      # It's still not found. Now this is an unrecoverable error.
31919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31920$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31921      has_space=`$ECHO "$complete" | $GREP " "`
31922      if test "x$has_space" != x; then
31923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31925      fi
31926      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31927    fi
31928  fi
31929
31930  # Now new_path has a complete unix path to the binary
31931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31932    # Keep paths in /bin as-is, but remove trailing .exe if any
31933    new_path="${new_path/%.exe/}"
31934    # Do not save /bin paths to all_fixpath_prefixes!
31935  else
31936    # Not in mixed or Windows style, start by that.
31937    new_path=`cmd //c echo $new_path`
31938
31939  input_path="$new_path"
31940  # Check if we need to convert this using DOS-style short mode. If the path
31941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31942  # take no chances and rewrite it.
31943  # Note: m4 eats our [], so we need to use [ and ] instead.
31944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31945  if test "x$has_forbidden_chars" != x; then
31946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31948  fi
31949
31950    # Output is in $new_path
31951
31952  windows_path="$new_path"
31953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31954    unix_path=`$CYGPATH -u "$windows_path"`
31955    new_path="$unix_path"
31956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31958    new_path="$unix_path"
31959  fi
31960
31961    # remove trailing .exe if any
31962    new_path="${new_path/%.exe/}"
31963
31964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31966  fi
31967
31968    else
31969      # We're on a unix platform. Hooray! :)
31970      # First separate the path from the arguments. This will split at the first
31971      # space.
31972      complete="$VS_ENV_CMD"
31973      path="${complete%% *}"
31974      tmp="$complete EOL"
31975      arguments="${tmp#* }"
31976
31977      # Cannot rely on the command "which" here since it doesn't always work.
31978      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31979      if test -z "$is_absolute_path"; then
31980        # Path to executable is not absolute. Find it.
31981        IFS_save="$IFS"
31982        IFS=:
31983        for p in $PATH; do
31984          if test -f "$p/$path" && test -x "$p/$path"; then
31985            new_path="$p/$path"
31986            break
31987          fi
31988        done
31989        IFS="$IFS_save"
31990      else
31991        # This is an absolute path, we can use it without further modifications.
31992        new_path="$path"
31993      fi
31994
31995      if test "x$new_path" = x; then
31996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31997$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31998        has_space=`$ECHO "$complete" | $GREP " "`
31999        if test "x$has_space" != x; then
32000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32002        fi
32003        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32004      fi
32005    fi
32006
32007    # Now join together the path and the arguments once again
32008    if test "x$arguments" != xEOL; then
32009      new_complete="$new_path ${arguments% *}"
32010    else
32011      new_complete="$new_path"
32012    fi
32013
32014    if test "x$complete" != "x$new_complete"; then
32015      VS_ENV_CMD="$new_complete"
32016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32017$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32018    fi
32019  fi
32020
32021
32022      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32023      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32024$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32025
32026      # We need to create a couple of temporary files.
32027      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32028      $MKDIR -p $VS_ENV_TMP_DIR
32029
32030      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32031      # Instead create a shell script which will set the relevant variables when run.
32032      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32033
32034  unix_path="$WINPATH_VS_ENV_CMD"
32035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32036    windows_path=`$CYGPATH -m "$unix_path"`
32037    WINPATH_VS_ENV_CMD="$windows_path"
32038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32039    windows_path=`cmd //c echo $unix_path`
32040    WINPATH_VS_ENV_CMD="$windows_path"
32041  fi
32042
32043      WINPATH_BASH="$BASH"
32044
32045  unix_path="$WINPATH_BASH"
32046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32047    windows_path=`$CYGPATH -m "$unix_path"`
32048    WINPATH_BASH="$windows_path"
32049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32050    windows_path=`cmd //c echo $unix_path`
32051    WINPATH_BASH="$windows_path"
32052  fi
32053
32054
32055      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32056      # script (executable by bash) that will setup the important variables.
32057      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32058      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32059      # This will end up something like:
32060      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32061      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32062      # These will end up something like:
32063      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32064      # The trailing space for everyone except PATH is no typo, but is needed due
32065      # to trailing \ in the Windows paths. These will be stripped later.
32066      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32067          >> $EXTRACT_VC_ENV_BAT_FILE
32068      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32069          >> $EXTRACT_VC_ENV_BAT_FILE
32070      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32071          >> $EXTRACT_VC_ENV_BAT_FILE
32072      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32073          >> $EXTRACT_VC_ENV_BAT_FILE
32074      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32075          >> $EXTRACT_VC_ENV_BAT_FILE
32076      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32077          >> $EXTRACT_VC_ENV_BAT_FILE
32078
32079      # Now execute the newly created bat file.
32080      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32081      # Change directory so we don't need to mess with Windows paths in redirects.
32082      cd $VS_ENV_TMP_DIR
32083      cmd /c extract-vs-env.bat | $CAT
32084      cd $CURDIR
32085
32086      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32088$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32089        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32090$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32092$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32093        as_fn_error $? "Cannot continue" "$LINENO" 5
32094      fi
32095
32096      # Now set all paths and other env variables. This will allow the rest of
32097      # the configure script to find and run the compiler in the proper way.
32098      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32099$as_echo "$as_me: Setting extracted environment variables" >&6;}
32100      . $VS_ENV_TMP_DIR/set-vs-env.sh
32101      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32102      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32103    else
32104      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32105      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32106$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32107    fi
32108  fi
32109
32110  # At this point, we should have correct variables in the environment, or we can't continue.
32111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32112$as_echo_n "checking for Visual Studio variables... " >&6; }
32113
32114  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32115      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32116    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32117      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32118$as_echo "present but broken" >&6; }
32119      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32120    else
32121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32122$as_echo "ok" >&6; }
32123      # Remove any trailing "\" ";" and " " from the variables.
32124      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32125      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32126      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32127      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32128      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32129      # Remove any paths containing # (typically F#) as that messes up make. This
32130      # is needed if visual studio was installed with F# support.
32131      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32132
32133
32134
32135
32136
32137      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32138      OLDIFS="$IFS"
32139      IFS=";"
32140      for i in $VS_INCLUDE; do
32141        ipath=$i
32142        # Only process non-empty elements
32143        if test "x$ipath" != x; then
32144          IFS="$OLDIFS"
32145          # Check that directory exists before calling fixup_path
32146          testpath=$ipath
32147
32148  windows_path="$testpath"
32149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32150    unix_path=`$CYGPATH -u "$windows_path"`
32151    testpath="$unix_path"
32152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32154    testpath="$unix_path"
32155  fi
32156
32157          if test -d "$testpath"; then
32158
32159  # Only process if variable expands to non-empty
32160
32161  if test "x$ipath" != x; then
32162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32163
32164  # Input might be given as Windows format, start by converting to
32165  # unix format.
32166  path="$ipath"
32167  new_path=`$CYGPATH -u "$path"`
32168
32169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32172  # "foo.exe" is OK but "foo" is an error.
32173  #
32174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32175  # It is also a way to make sure we got the proper file name for the real test later on.
32176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32177  if test "x$test_shortpath" = x; then
32178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32179$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32180    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32181  fi
32182
32183  # Call helper function which possibly converts this using DOS-style short mode.
32184  # If so, the updated path is stored in $new_path.
32185
32186  input_path="$new_path"
32187  # Check if we need to convert this using DOS-style short mode. If the path
32188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32189  # take no chances and rewrite it.
32190  # Note: m4 eats our [], so we need to use [ and ] instead.
32191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32192  if test "x$has_forbidden_chars" != x; then
32193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32197      # Going to short mode and back again did indeed matter. Since short mode is
32198      # case insensitive, let's make it lowercase to improve readability.
32199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32200      # Now convert it back to Unix-style (cygpath)
32201      input_path=`$CYGPATH -u "$shortmode_path"`
32202      new_path="$input_path"
32203    fi
32204  fi
32205
32206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32207  if test "x$test_cygdrive_prefix" = x; then
32208    # As a simple fix, exclude /usr/bin since it's not a real path.
32209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32211      # a path prefixed by /cygdrive for fixpath to work.
32212      new_path="$CYGWIN_ROOT_PATH$input_path"
32213    fi
32214  fi
32215
32216
32217  if test "x$path" != "x$new_path"; then
32218    ipath="$new_path"
32219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32220$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32221  fi
32222
32223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32224
32225  path="$ipath"
32226  has_colon=`$ECHO $path | $GREP ^.:`
32227  new_path="$path"
32228  if test "x$has_colon" = x; then
32229    # Not in mixed or Windows style, start by that.
32230    new_path=`cmd //c echo $path`
32231  fi
32232
32233
32234  input_path="$new_path"
32235  # Check if we need to convert this using DOS-style short mode. If the path
32236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32237  # take no chances and rewrite it.
32238  # Note: m4 eats our [], so we need to use [ and ] instead.
32239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32240  if test "x$has_forbidden_chars" != x; then
32241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32243  fi
32244
32245
32246  windows_path="$new_path"
32247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32248    unix_path=`$CYGPATH -u "$windows_path"`
32249    new_path="$unix_path"
32250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32252    new_path="$unix_path"
32253  fi
32254
32255  if test "x$path" != "x$new_path"; then
32256    ipath="$new_path"
32257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32258$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32259  fi
32260
32261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32263
32264    else
32265      # We're on a unix platform. Hooray! :)
32266      path="$ipath"
32267      has_space=`$ECHO "$path" | $GREP " "`
32268      if test "x$has_space" != x; then
32269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32270$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32272      fi
32273
32274      # Use eval to expand a potential ~
32275      eval path="$path"
32276      if test ! -f "$path" && test ! -d "$path"; then
32277        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32278      fi
32279
32280      if test -d "$path"; then
32281        ipath="`cd "$path"; $THEPWDCMD -L`"
32282      else
32283        dir="`$DIRNAME "$path"`"
32284        base="`$BASENAME "$path"`"
32285        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32286      fi
32287    fi
32288  fi
32289
32290            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32291          fi
32292          IFS=";"
32293        fi
32294      done
32295      # Convert VS_LIB into SYSROOT_LDFLAGS
32296      for i in $VS_LIB; do
32297        libpath=$i
32298        # Only process non-empty elements
32299        if test "x$libpath" != x; then
32300          IFS="$OLDIFS"
32301          # Check that directory exists before calling fixup_path
32302          testpath=$libpath
32303
32304  windows_path="$testpath"
32305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32306    unix_path=`$CYGPATH -u "$windows_path"`
32307    testpath="$unix_path"
32308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32310    testpath="$unix_path"
32311  fi
32312
32313          if test -d "$testpath"; then
32314
32315  # Only process if variable expands to non-empty
32316
32317  if test "x$libpath" != x; then
32318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32319
32320  # Input might be given as Windows format, start by converting to
32321  # unix format.
32322  path="$libpath"
32323  new_path=`$CYGPATH -u "$path"`
32324
32325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32328  # "foo.exe" is OK but "foo" is an error.
32329  #
32330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32331  # It is also a way to make sure we got the proper file name for the real test later on.
32332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32333  if test "x$test_shortpath" = x; then
32334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32335$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32336    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32337  fi
32338
32339  # Call helper function which possibly converts this using DOS-style short mode.
32340  # If so, the updated path is stored in $new_path.
32341
32342  input_path="$new_path"
32343  # Check if we need to convert this using DOS-style short mode. If the path
32344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32345  # take no chances and rewrite it.
32346  # Note: m4 eats our [], so we need to use [ and ] instead.
32347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32348  if test "x$has_forbidden_chars" != x; then
32349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32353      # Going to short mode and back again did indeed matter. Since short mode is
32354      # case insensitive, let's make it lowercase to improve readability.
32355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32356      # Now convert it back to Unix-style (cygpath)
32357      input_path=`$CYGPATH -u "$shortmode_path"`
32358      new_path="$input_path"
32359    fi
32360  fi
32361
32362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32363  if test "x$test_cygdrive_prefix" = x; then
32364    # As a simple fix, exclude /usr/bin since it's not a real path.
32365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32367      # a path prefixed by /cygdrive for fixpath to work.
32368      new_path="$CYGWIN_ROOT_PATH$input_path"
32369    fi
32370  fi
32371
32372
32373  if test "x$path" != "x$new_path"; then
32374    libpath="$new_path"
32375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32376$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32377  fi
32378
32379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32380
32381  path="$libpath"
32382  has_colon=`$ECHO $path | $GREP ^.:`
32383  new_path="$path"
32384  if test "x$has_colon" = x; then
32385    # Not in mixed or Windows style, start by that.
32386    new_path=`cmd //c echo $path`
32387  fi
32388
32389
32390  input_path="$new_path"
32391  # Check if we need to convert this using DOS-style short mode. If the path
32392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32393  # take no chances and rewrite it.
32394  # Note: m4 eats our [], so we need to use [ and ] instead.
32395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32396  if test "x$has_forbidden_chars" != x; then
32397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32399  fi
32400
32401
32402  windows_path="$new_path"
32403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32404    unix_path=`$CYGPATH -u "$windows_path"`
32405    new_path="$unix_path"
32406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32408    new_path="$unix_path"
32409  fi
32410
32411  if test "x$path" != "x$new_path"; then
32412    libpath="$new_path"
32413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32414$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32415  fi
32416
32417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32419
32420    else
32421      # We're on a unix platform. Hooray! :)
32422      path="$libpath"
32423      has_space=`$ECHO "$path" | $GREP " "`
32424      if test "x$has_space" != x; then
32425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32426$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32428      fi
32429
32430      # Use eval to expand a potential ~
32431      eval path="$path"
32432      if test ! -f "$path" && test ! -d "$path"; then
32433        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32434      fi
32435
32436      if test -d "$path"; then
32437        libpath="`cd "$path"; $THEPWDCMD -L`"
32438      else
32439        dir="`$DIRNAME "$path"`"
32440        base="`$BASENAME "$path"`"
32441        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32442      fi
32443    fi
32444  fi
32445
32446            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32447          fi
32448          IFS=";"
32449        fi
32450      done
32451      IFS="$OLDIFS"
32452    fi
32453  else
32454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32455$as_echo "not found" >&6; }
32456
32457    if test "x$VS_ENV_CMD" = x; then
32458      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32459$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32460      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32461$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32462    else
32463      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32464$as_echo "$as_me: Running the extraction script failed." >&6;}
32465    fi
32466    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32467$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32468    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32469$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32470    as_fn_error $? "Cannot continue" "$LINENO" 5
32471  fi
32472
32473    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32474    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32475    PATH="$VS_PATH"
32476    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32477    export INCLUDE="$VS_INCLUDE"
32478    export LIB="$VS_LIB"
32479  else
32480    if test "x$XCODE_VERSION_OUTPUT" != x; then
32481      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32482      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32483      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32484    else
32485      # Currently we do not define this for other toolchains. This might change as the need arise.
32486      TOOLCHAIN_VERSION=
32487    fi
32488  fi
32489
32490
32491  # For solaris we really need solaris tools, and not the GNU equivalent.
32492  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32493  # so add that to path before starting to probe.
32494  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32495  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32496    PATH="/usr/ccs/bin:$PATH"
32497  fi
32498
32499  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32500  # override all other locations.
32501  if test "x$TOOLCHAIN_PATH" != x; then
32502    PATH=$TOOLCHAIN_PATH:$PATH
32503  fi
32504
32505
32506  #
32507  # Setup the compilers (CC and CXX)
32508  #
32509
32510  COMPILER_NAME=C
32511  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32512
32513  if test "x$CC" != x; then
32514    # User has supplied compiler name already, always let that override.
32515    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32516$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32517    if test "x`basename $CC`" = "x$CC"; then
32518      # A command without a complete path is provided, search $PATH.
32519
32520      for ac_prog in $CC
32521do
32522  # Extract the first word of "$ac_prog", so it can be a program name with args.
32523set dummy $ac_prog; ac_word=$2
32524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32525$as_echo_n "checking for $ac_word... " >&6; }
32526if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32527  $as_echo_n "(cached) " >&6
32528else
32529  case $POTENTIAL_CC in
32530  [\\/]* | ?:[\\/]*)
32531  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32532  ;;
32533  *)
32534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32535for as_dir in $PATH
32536do
32537  IFS=$as_save_IFS
32538  test -z "$as_dir" && as_dir=.
32539    for ac_exec_ext in '' $ac_executable_extensions; do
32540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32541    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32543    break 2
32544  fi
32545done
32546  done
32547IFS=$as_save_IFS
32548
32549  ;;
32550esac
32551fi
32552POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32553if test -n "$POTENTIAL_CC"; then
32554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32555$as_echo "$POTENTIAL_CC" >&6; }
32556else
32557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32558$as_echo "no" >&6; }
32559fi
32560
32561
32562  test -n "$POTENTIAL_CC" && break
32563done
32564
32565      if test "x$POTENTIAL_CC" != x; then
32566        CC=$POTENTIAL_CC
32567      else
32568        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32569      fi
32570    else
32571      # Otherwise it might already be a complete path
32572      if test ! -x "$CC"; then
32573        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32574      fi
32575    fi
32576  else
32577    # No user supplied value. Locate compiler ourselves.
32578
32579    # If we are cross compiling, assume cross compilation tools follows the
32580    # cross compilation standard where they are prefixed with the autoconf
32581    # standard name for the target. For example the binary
32582    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32583    # If we are not cross compiling, then the default compiler name will be
32584    # used.
32585
32586    CC=
32587    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32588    # before checking the rest of the PATH.
32589    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32590    # step, this should not be necessary.
32591    if test -n "$TOOLCHAIN_PATH"; then
32592      PATH_save="$PATH"
32593      PATH="$TOOLCHAIN_PATH"
32594      for ac_prog in $SEARCH_LIST
32595do
32596  # Extract the first word of "$ac_prog", so it can be a program name with args.
32597set dummy $ac_prog; ac_word=$2
32598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32599$as_echo_n "checking for $ac_word... " >&6; }
32600if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32601  $as_echo_n "(cached) " >&6
32602else
32603  case $TOOLCHAIN_PATH_CC in
32604  [\\/]* | ?:[\\/]*)
32605  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32606  ;;
32607  *)
32608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32609for as_dir in $PATH
32610do
32611  IFS=$as_save_IFS
32612  test -z "$as_dir" && as_dir=.
32613    for ac_exec_ext in '' $ac_executable_extensions; do
32614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32615    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32617    break 2
32618  fi
32619done
32620  done
32621IFS=$as_save_IFS
32622
32623  ;;
32624esac
32625fi
32626TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32627if test -n "$TOOLCHAIN_PATH_CC"; then
32628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32629$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32630else
32631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32632$as_echo "no" >&6; }
32633fi
32634
32635
32636  test -n "$TOOLCHAIN_PATH_CC" && break
32637done
32638
32639      CC=$TOOLCHAIN_PATH_CC
32640      PATH="$PATH_save"
32641    fi
32642
32643    # AC_PATH_PROGS can't be run multiple times with the same variable,
32644    # so create a new name for this run.
32645    if test "x$CC" = x; then
32646      for ac_prog in $SEARCH_LIST
32647do
32648  # Extract the first word of "$ac_prog", so it can be a program name with args.
32649set dummy $ac_prog; ac_word=$2
32650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32651$as_echo_n "checking for $ac_word... " >&6; }
32652if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32653  $as_echo_n "(cached) " >&6
32654else
32655  case $POTENTIAL_CC in
32656  [\\/]* | ?:[\\/]*)
32657  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32658  ;;
32659  *)
32660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32661for as_dir in $PATH
32662do
32663  IFS=$as_save_IFS
32664  test -z "$as_dir" && as_dir=.
32665    for ac_exec_ext in '' $ac_executable_extensions; do
32666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32667    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32669    break 2
32670  fi
32671done
32672  done
32673IFS=$as_save_IFS
32674
32675  ;;
32676esac
32677fi
32678POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32679if test -n "$POTENTIAL_CC"; then
32680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32681$as_echo "$POTENTIAL_CC" >&6; }
32682else
32683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32684$as_echo "no" >&6; }
32685fi
32686
32687
32688  test -n "$POTENTIAL_CC" && break
32689done
32690
32691      CC=$POTENTIAL_CC
32692    fi
32693
32694    if test "x$CC" = x; then
32695
32696  # Print a helpful message on how to acquire the necessary build dependency.
32697  # devkit is the help tag: freetype, cups, alsa etc
32698  MISSING_DEPENDENCY=devkit
32699
32700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32701    cygwin_help $MISSING_DEPENDENCY
32702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32703    msys_help $MISSING_DEPENDENCY
32704  else
32705    PKGHANDLER_COMMAND=
32706
32707    case $PKGHANDLER in
32708      apt-get)
32709        apt_help     $MISSING_DEPENDENCY ;;
32710      yum)
32711        yum_help     $MISSING_DEPENDENCY ;;
32712      port)
32713        port_help    $MISSING_DEPENDENCY ;;
32714      pkgutil)
32715        pkgutil_help $MISSING_DEPENDENCY ;;
32716      pkgadd)
32717        pkgadd_help  $MISSING_DEPENDENCY ;;
32718    esac
32719
32720    if test "x$PKGHANDLER_COMMAND" != x; then
32721      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32722    fi
32723  fi
32724
32725      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32726    fi
32727  fi
32728
32729  # Now we have a compiler binary in CC. Make sure it's okay.
32730
32731  # Only process if variable expands to non-empty
32732
32733  if test "x$CC" != x; then
32734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32735
32736  # First separate the path from the arguments. This will split at the first
32737  # space.
32738  complete="$CC"
32739  path="${complete%% *}"
32740  tmp="$complete EOL"
32741  arguments="${tmp#* }"
32742
32743  # Input might be given as Windows format, start by converting to
32744  # unix format.
32745  new_path=`$CYGPATH -u "$path"`
32746
32747  # Now try to locate executable using which
32748  new_path=`$WHICH "$new_path" 2> /dev/null`
32749  # bat and cmd files are not always considered executable in cygwin causing which
32750  # to not find them
32751  if test "x$new_path" = x \
32752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32754    new_path=`$CYGPATH -u "$path"`
32755  fi
32756  if test "x$new_path" = x; then
32757    # Oops. Which didn't find the executable.
32758    # The splitting of arguments from the executable at a space might have been incorrect,
32759    # since paths with space are more likely in Windows. Give it another try with the whole
32760    # argument.
32761    path="$complete"
32762    arguments="EOL"
32763    new_path=`$CYGPATH -u "$path"`
32764    new_path=`$WHICH "$new_path" 2> /dev/null`
32765    # bat and cmd files are not always considered executable in cygwin causing which
32766    # to not find them
32767    if test "x$new_path" = x \
32768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32770      new_path=`$CYGPATH -u "$path"`
32771    fi
32772    if test "x$new_path" = x; then
32773      # It's still not found. Now this is an unrecoverable error.
32774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32775$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32776      has_space=`$ECHO "$complete" | $GREP " "`
32777      if test "x$has_space" != x; then
32778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32780      fi
32781      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32782    fi
32783  fi
32784
32785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32788  # "foo.exe" is OK but "foo" is an error.
32789  #
32790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32791  # It is also a way to make sure we got the proper file name for the real test later on.
32792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32793  if test "x$test_shortpath" = x; then
32794    # Short path failed, file does not exist as specified.
32795    # Try adding .exe or .cmd
32796    if test -f "${new_path}.exe"; then
32797      input_to_shortpath="${new_path}.exe"
32798    elif test -f "${new_path}.cmd"; then
32799      input_to_shortpath="${new_path}.cmd"
32800    else
32801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32802$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32805      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32806    fi
32807  else
32808    input_to_shortpath="$new_path"
32809  fi
32810
32811  # Call helper function which possibly converts this using DOS-style short mode.
32812  # If so, the updated path is stored in $new_path.
32813  new_path="$input_to_shortpath"
32814
32815  input_path="$input_to_shortpath"
32816  # Check if we need to convert this using DOS-style short mode. If the path
32817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32818  # take no chances and rewrite it.
32819  # Note: m4 eats our [], so we need to use [ and ] instead.
32820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32821  if test "x$has_forbidden_chars" != x; then
32822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32826      # Going to short mode and back again did indeed matter. Since short mode is
32827      # case insensitive, let's make it lowercase to improve readability.
32828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32829      # Now convert it back to Unix-style (cygpath)
32830      input_path=`$CYGPATH -u "$shortmode_path"`
32831      new_path="$input_path"
32832    fi
32833  fi
32834
32835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32836  if test "x$test_cygdrive_prefix" = x; then
32837    # As a simple fix, exclude /usr/bin since it's not a real path.
32838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32840      # a path prefixed by /cygdrive for fixpath to work.
32841      new_path="$CYGWIN_ROOT_PATH$input_path"
32842    fi
32843  fi
32844
32845  # remove trailing .exe if any
32846  new_path="${new_path/%.exe/}"
32847
32848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32849
32850  # First separate the path from the arguments. This will split at the first
32851  # space.
32852  complete="$CC"
32853  path="${complete%% *}"
32854  tmp="$complete EOL"
32855  arguments="${tmp#* }"
32856
32857  # Input might be given as Windows format, start by converting to
32858  # unix format.
32859  new_path="$path"
32860
32861  windows_path="$new_path"
32862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863    unix_path=`$CYGPATH -u "$windows_path"`
32864    new_path="$unix_path"
32865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867    new_path="$unix_path"
32868  fi
32869
32870
32871  # Now try to locate executable using which
32872  new_path=`$WHICH "$new_path" 2> /dev/null`
32873
32874  if test "x$new_path" = x; then
32875    # Oops. Which didn't find the executable.
32876    # The splitting of arguments from the executable at a space might have been incorrect,
32877    # since paths with space are more likely in Windows. Give it another try with the whole
32878    # argument.
32879    path="$complete"
32880    arguments="EOL"
32881    new_path="$path"
32882
32883  windows_path="$new_path"
32884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32885    unix_path=`$CYGPATH -u "$windows_path"`
32886    new_path="$unix_path"
32887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32889    new_path="$unix_path"
32890  fi
32891
32892
32893    new_path=`$WHICH "$new_path" 2> /dev/null`
32894    # bat and cmd files are not always considered executable in MSYS causing which
32895    # to not find them
32896    if test "x$new_path" = x \
32897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32899      new_path="$path"
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    fi
32911
32912    if test "x$new_path" = x; then
32913      # It's still not found. Now this is an unrecoverable error.
32914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32915$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32916      has_space=`$ECHO "$complete" | $GREP " "`
32917      if test "x$has_space" != x; then
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32920      fi
32921      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32922    fi
32923  fi
32924
32925  # Now new_path has a complete unix path to the binary
32926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32927    # Keep paths in /bin as-is, but remove trailing .exe if any
32928    new_path="${new_path/%.exe/}"
32929    # Do not save /bin paths to all_fixpath_prefixes!
32930  else
32931    # Not in mixed or Windows style, start by that.
32932    new_path=`cmd //c echo $new_path`
32933
32934  input_path="$new_path"
32935  # Check if we need to convert this using DOS-style short mode. If the path
32936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32937  # take no chances and rewrite it.
32938  # Note: m4 eats our [], so we need to use [ and ] instead.
32939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32940  if test "x$has_forbidden_chars" != x; then
32941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32943  fi
32944
32945    # Output is in $new_path
32946
32947  windows_path="$new_path"
32948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32949    unix_path=`$CYGPATH -u "$windows_path"`
32950    new_path="$unix_path"
32951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32953    new_path="$unix_path"
32954  fi
32955
32956    # remove trailing .exe if any
32957    new_path="${new_path/%.exe/}"
32958
32959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32961  fi
32962
32963    else
32964      # We're on a unix platform. Hooray! :)
32965      # First separate the path from the arguments. This will split at the first
32966      # space.
32967      complete="$CC"
32968      path="${complete%% *}"
32969      tmp="$complete EOL"
32970      arguments="${tmp#* }"
32971
32972      # Cannot rely on the command "which" here since it doesn't always work.
32973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32974      if test -z "$is_absolute_path"; then
32975        # Path to executable is not absolute. Find it.
32976        IFS_save="$IFS"
32977        IFS=:
32978        for p in $PATH; do
32979          if test -f "$p/$path" && test -x "$p/$path"; then
32980            new_path="$p/$path"
32981            break
32982          fi
32983        done
32984        IFS="$IFS_save"
32985      else
32986        # This is an absolute path, we can use it without further modifications.
32987        new_path="$path"
32988      fi
32989
32990      if test "x$new_path" = x; then
32991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32992$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32993        has_space=`$ECHO "$complete" | $GREP " "`
32994        if test "x$has_space" != x; then
32995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32997        fi
32998        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32999      fi
33000    fi
33001
33002    # Now join together the path and the arguments once again
33003    if test "x$arguments" != xEOL; then
33004      new_complete="$new_path ${arguments% *}"
33005    else
33006      new_complete="$new_path"
33007    fi
33008
33009    if test "x$complete" != "x$new_complete"; then
33010      CC="$new_complete"
33011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33012$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33013    fi
33014  fi
33015
33016  TEST_COMPILER="$CC"
33017
33018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33019$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33020  SYMLINK_ORIGINAL="$TEST_COMPILER"
33021
33022  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33023    # Follow a chain of symbolic links. Use readlink
33024    # where it exists, else fall back to horribly
33025    # complicated shell code.
33026    if test "x$READLINK_TESTED" != yes; then
33027      # On MacOSX there is a readlink tool with a different
33028      # purpose than the GNU readlink tool. Check the found readlink.
33029      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33030      if test "x$ISGNU" = x; then
33031        # A readlink that we do not know how to use.
33032        # Are there other non-GNU readlinks out there?
33033        READLINK_TESTED=yes
33034        READLINK=
33035      fi
33036    fi
33037
33038    if test "x$READLINK" != x; then
33039      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33040    else
33041      # Save the current directory for restoring afterwards
33042      STARTDIR=$PWD
33043      COUNTER=0
33044      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33045      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33046      cd $sym_link_dir
33047      # Use -P flag to resolve symlinks in directories.
33048      cd `$THEPWDCMD -P`
33049      sym_link_dir=`$THEPWDCMD -P`
33050      # Resolve file symlinks
33051      while test $COUNTER -lt 20; do
33052        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33053        if test "x$ISLINK" == x; then
33054          # This is not a symbolic link! We are done!
33055          break
33056        fi
33057        # Again resolve directory symlinks since the target of the just found
33058        # link could be in a different directory
33059        cd `$DIRNAME $ISLINK`
33060        sym_link_dir=`$THEPWDCMD -P`
33061        sym_link_file=`$BASENAME $ISLINK`
33062        let COUNTER=COUNTER+1
33063      done
33064      cd $STARTDIR
33065      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33066    fi
33067  fi
33068
33069  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33071$as_echo "no symlink" >&6; }
33072  else
33073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33074$as_echo "$SYMLINK_ORIGINAL" >&6; }
33075
33076    # We can't handle ccache by gcc wrappers, since we need to know if we're
33077    # using ccache. Instead ccache usage must be controlled by a configure option.
33078    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33079    if test "x$COMPILER_BASENAME" = "xccache"; then
33080      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33081$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33082      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33083    fi
33084  fi
33085
33086
33087  COMPILER=$CC
33088  COMPILER_NAME=$COMPILER_NAME
33089
33090  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33091    # cc -V output typically looks like
33092    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33093    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33094    # Check that this is likely to be the Solaris Studio cc.
33095    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33096    if test $? -ne 0; then
33097      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33098      { $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
33099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33101$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33102      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33103$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33104      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33105    fi
33106    # Remove usage instructions (if present), and
33107    # collapse compiler output into a single line
33108    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33109        $SED -e 's/ *[Uu]sage:.*//'`
33110    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33111        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33112  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33113    # xlc -qversion output typically looks like
33114    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33115    #     Version: 11.01.0000.0015
33116    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33117    # Check that this is likely to be the IBM XL C compiler.
33118    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33119    if test $? -ne 0; then
33120      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33121      { $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
33122$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33123      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33124$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33125      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33126$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33127      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33128    fi
33129    # Collapse compiler output into a single line
33130    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33131    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33132        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33133  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33134    # There is no specific version flag, but all output starts with a version string.
33135    # First line typically looks something like:
33136    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33137    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33138    # Check that this is likely to be Microsoft CL.EXE.
33139    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33140    if test $? -ne 0; then
33141      { $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
33142$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33143      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33144$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33145      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33146    fi
33147    # Collapse compiler output into a single line
33148    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33150        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33151  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33152    # gcc --version output typically looks like
33153    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33154    #     Copyright (C) 2013 Free Software Foundation, Inc.
33155    #     This is free software; see the source for copying conditions.  There is NO
33156    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33157    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33158    # Check that this is likely to be GCC.
33159    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33160    if test $? -ne 0; then
33161      { $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
33162$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33163      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33164$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33165      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33166    fi
33167    # Remove Copyright and legalese from version string, and
33168    # collapse into a single line
33169    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33170        $SED -e 's/ *Copyright .*//'`
33171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33172        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33173  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33174    # clang --version output typically looks like
33175    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33176    #    clang version 3.3 (tags/RELEASE_33/final)
33177    # or
33178    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33179    #    Target: x86_64-pc-linux-gnu
33180    #    Thread model: posix
33181    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33182    # Check that this is likely to be clang
33183    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33184    if test $? -ne 0; then
33185      { $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
33186$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33187      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33188$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33189      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33190    fi
33191    # Collapse compiler output into a single line
33192    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33193    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33194        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33195  else
33196      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33197  fi
33198  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33199  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33200  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33201  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33202
33203  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33204$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33205
33206
33207  # Now that we have resolved CC ourself, let autoconf have its go at it
33208  ac_ext=c
33209ac_cpp='$CPP $CPPFLAGS'
33210ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33211ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33212ac_compiler_gnu=$ac_cv_c_compiler_gnu
33213if test -n "$ac_tool_prefix"; then
33214  for ac_prog in $CC
33215  do
33216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33219$as_echo_n "checking for $ac_word... " >&6; }
33220if ${ac_cv_prog_CC+:} false; then :
33221  $as_echo_n "(cached) " >&6
33222else
33223  if test -n "$CC"; then
33224  ac_cv_prog_CC="$CC" # Let the user override the test.
33225else
33226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33227for as_dir in $PATH
33228do
33229  IFS=$as_save_IFS
33230  test -z "$as_dir" && as_dir=.
33231    for ac_exec_ext in '' $ac_executable_extensions; do
33232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33233    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33235    break 2
33236  fi
33237done
33238  done
33239IFS=$as_save_IFS
33240
33241fi
33242fi
33243CC=$ac_cv_prog_CC
33244if test -n "$CC"; then
33245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33246$as_echo "$CC" >&6; }
33247else
33248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33249$as_echo "no" >&6; }
33250fi
33251
33252
33253    test -n "$CC" && break
33254  done
33255fi
33256if test -z "$CC"; then
33257  ac_ct_CC=$CC
33258  for ac_prog in $CC
33259do
33260  # Extract the first word of "$ac_prog", so it can be a program name with args.
33261set dummy $ac_prog; ac_word=$2
33262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33263$as_echo_n "checking for $ac_word... " >&6; }
33264if ${ac_cv_prog_ac_ct_CC+:} false; then :
33265  $as_echo_n "(cached) " >&6
33266else
33267  if test -n "$ac_ct_CC"; then
33268  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33269else
33270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33271for as_dir in $PATH
33272do
33273  IFS=$as_save_IFS
33274  test -z "$as_dir" && as_dir=.
33275    for ac_exec_ext in '' $ac_executable_extensions; do
33276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33277    ac_cv_prog_ac_ct_CC="$ac_prog"
33278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33279    break 2
33280  fi
33281done
33282  done
33283IFS=$as_save_IFS
33284
33285fi
33286fi
33287ac_ct_CC=$ac_cv_prog_ac_ct_CC
33288if test -n "$ac_ct_CC"; then
33289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33290$as_echo "$ac_ct_CC" >&6; }
33291else
33292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33293$as_echo "no" >&6; }
33294fi
33295
33296
33297  test -n "$ac_ct_CC" && break
33298done
33299
33300  if test "x$ac_ct_CC" = x; then
33301    CC=""
33302  else
33303    case $cross_compiling:$ac_tool_warned in
33304yes:)
33305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33307ac_tool_warned=yes ;;
33308esac
33309    CC=$ac_ct_CC
33310  fi
33311fi
33312
33313
33314test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33316as_fn_error $? "no acceptable C compiler found in \$PATH
33317See \`config.log' for more details" "$LINENO" 5; }
33318
33319# Provide some information about the compiler.
33320$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33321set X $ac_compile
33322ac_compiler=$2
33323for ac_option in --version -v -V -qversion; do
33324  { { ac_try="$ac_compiler $ac_option >&5"
33325case "(($ac_try" in
33326  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33327  *) ac_try_echo=$ac_try;;
33328esac
33329eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33330$as_echo "$ac_try_echo"; } >&5
33331  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33332  ac_status=$?
33333  if test -s conftest.err; then
33334    sed '10a\
33335... rest of stderr output deleted ...
33336         10q' conftest.err >conftest.er1
33337    cat conftest.er1 >&5
33338  fi
33339  rm -f conftest.er1 conftest.err
33340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33341  test $ac_status = 0; }
33342done
33343
33344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33345/* end confdefs.h.  */
33346
33347int
33348main ()
33349{
33350
33351  ;
33352  return 0;
33353}
33354_ACEOF
33355ac_clean_files_save=$ac_clean_files
33356ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33357# Try to create an executable without -o first, disregard a.out.
33358# It will help us diagnose broken compilers, and finding out an intuition
33359# of exeext.
33360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33361$as_echo_n "checking whether the C compiler works... " >&6; }
33362ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33363
33364# The possible output files:
33365ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33366
33367ac_rmfiles=
33368for ac_file in $ac_files
33369do
33370  case $ac_file in
33371    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33372    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33373  esac
33374done
33375rm -f $ac_rmfiles
33376
33377if { { ac_try="$ac_link_default"
33378case "(($ac_try" in
33379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33380  *) ac_try_echo=$ac_try;;
33381esac
33382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33383$as_echo "$ac_try_echo"; } >&5
33384  (eval "$ac_link_default") 2>&5
33385  ac_status=$?
33386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33387  test $ac_status = 0; }; then :
33388  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33389# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33390# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33391# so that the user can short-circuit this test for compilers unknown to
33392# Autoconf.
33393for ac_file in $ac_files ''
33394do
33395  test -f "$ac_file" || continue
33396  case $ac_file in
33397    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33398	;;
33399    [ab].out )
33400	# We found the default executable, but exeext='' is most
33401	# certainly right.
33402	break;;
33403    *.* )
33404	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33405	then :; else
33406	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33407	fi
33408	# We set ac_cv_exeext here because the later test for it is not
33409	# safe: cross compilers may not add the suffix if given an `-o'
33410	# argument, so we may need to know it at that point already.
33411	# Even if this section looks crufty: it has the advantage of
33412	# actually working.
33413	break;;
33414    * )
33415	break;;
33416  esac
33417done
33418test "$ac_cv_exeext" = no && ac_cv_exeext=
33419
33420else
33421  ac_file=''
33422fi
33423if test -z "$ac_file"; then :
33424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33425$as_echo "no" >&6; }
33426$as_echo "$as_me: failed program was:" >&5
33427sed 's/^/| /' conftest.$ac_ext >&5
33428
33429{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33431as_fn_error 77 "C compiler cannot create executables
33432See \`config.log' for more details" "$LINENO" 5; }
33433else
33434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33435$as_echo "yes" >&6; }
33436fi
33437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33438$as_echo_n "checking for C compiler default output file name... " >&6; }
33439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33440$as_echo "$ac_file" >&6; }
33441ac_exeext=$ac_cv_exeext
33442
33443rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33444ac_clean_files=$ac_clean_files_save
33445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33446$as_echo_n "checking for suffix of executables... " >&6; }
33447if { { ac_try="$ac_link"
33448case "(($ac_try" in
33449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33450  *) ac_try_echo=$ac_try;;
33451esac
33452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33453$as_echo "$ac_try_echo"; } >&5
33454  (eval "$ac_link") 2>&5
33455  ac_status=$?
33456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33457  test $ac_status = 0; }; then :
33458  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33459# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33460# work properly (i.e., refer to `conftest.exe'), while it won't with
33461# `rm'.
33462for ac_file in conftest.exe conftest conftest.*; do
33463  test -f "$ac_file" || continue
33464  case $ac_file in
33465    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33466    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33467	  break;;
33468    * ) break;;
33469  esac
33470done
33471else
33472  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33474as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33475See \`config.log' for more details" "$LINENO" 5; }
33476fi
33477rm -f conftest conftest$ac_cv_exeext
33478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33479$as_echo "$ac_cv_exeext" >&6; }
33480
33481rm -f conftest.$ac_ext
33482EXEEXT=$ac_cv_exeext
33483ac_exeext=$EXEEXT
33484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33485/* end confdefs.h.  */
33486#include <stdio.h>
33487int
33488main ()
33489{
33490FILE *f = fopen ("conftest.out", "w");
33491 return ferror (f) || fclose (f) != 0;
33492
33493  ;
33494  return 0;
33495}
33496_ACEOF
33497ac_clean_files="$ac_clean_files conftest.out"
33498# Check that the compiler produces executables we can run.  If not, either
33499# the compiler is broken, or we cross compile.
33500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33501$as_echo_n "checking whether we are cross compiling... " >&6; }
33502if test "$cross_compiling" != yes; then
33503  { { ac_try="$ac_link"
33504case "(($ac_try" in
33505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33506  *) ac_try_echo=$ac_try;;
33507esac
33508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33509$as_echo "$ac_try_echo"; } >&5
33510  (eval "$ac_link") 2>&5
33511  ac_status=$?
33512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33513  test $ac_status = 0; }
33514  if { ac_try='./conftest$ac_cv_exeext'
33515  { { case "(($ac_try" in
33516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33517  *) ac_try_echo=$ac_try;;
33518esac
33519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33520$as_echo "$ac_try_echo"; } >&5
33521  (eval "$ac_try") 2>&5
33522  ac_status=$?
33523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33524  test $ac_status = 0; }; }; then
33525    cross_compiling=no
33526  else
33527    if test "$cross_compiling" = maybe; then
33528	cross_compiling=yes
33529    else
33530	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33532as_fn_error $? "cannot run C compiled programs.
33533If you meant to cross compile, use \`--host'.
33534See \`config.log' for more details" "$LINENO" 5; }
33535    fi
33536  fi
33537fi
33538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33539$as_echo "$cross_compiling" >&6; }
33540
33541rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33542ac_clean_files=$ac_clean_files_save
33543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33544$as_echo_n "checking for suffix of object files... " >&6; }
33545if ${ac_cv_objext+:} false; then :
33546  $as_echo_n "(cached) " >&6
33547else
33548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33549/* end confdefs.h.  */
33550
33551int
33552main ()
33553{
33554
33555  ;
33556  return 0;
33557}
33558_ACEOF
33559rm -f conftest.o conftest.obj
33560if { { ac_try="$ac_compile"
33561case "(($ac_try" in
33562  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33563  *) ac_try_echo=$ac_try;;
33564esac
33565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33566$as_echo "$ac_try_echo"; } >&5
33567  (eval "$ac_compile") 2>&5
33568  ac_status=$?
33569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33570  test $ac_status = 0; }; then :
33571  for ac_file in conftest.o conftest.obj conftest.*; do
33572  test -f "$ac_file" || continue;
33573  case $ac_file in
33574    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33575    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33576       break;;
33577  esac
33578done
33579else
33580  $as_echo "$as_me: failed program was:" >&5
33581sed 's/^/| /' conftest.$ac_ext >&5
33582
33583{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33585as_fn_error $? "cannot compute suffix of object files: cannot compile
33586See \`config.log' for more details" "$LINENO" 5; }
33587fi
33588rm -f conftest.$ac_cv_objext conftest.$ac_ext
33589fi
33590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33591$as_echo "$ac_cv_objext" >&6; }
33592OBJEXT=$ac_cv_objext
33593ac_objext=$OBJEXT
33594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33595$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33596if ${ac_cv_c_compiler_gnu+:} false; then :
33597  $as_echo_n "(cached) " >&6
33598else
33599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33600/* end confdefs.h.  */
33601
33602int
33603main ()
33604{
33605#ifndef __GNUC__
33606       choke me
33607#endif
33608
33609  ;
33610  return 0;
33611}
33612_ACEOF
33613if ac_fn_c_try_compile "$LINENO"; then :
33614  ac_compiler_gnu=yes
33615else
33616  ac_compiler_gnu=no
33617fi
33618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33619ac_cv_c_compiler_gnu=$ac_compiler_gnu
33620
33621fi
33622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33623$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33624if test $ac_compiler_gnu = yes; then
33625  GCC=yes
33626else
33627  GCC=
33628fi
33629ac_test_CFLAGS=${CFLAGS+set}
33630ac_save_CFLAGS=$CFLAGS
33631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33632$as_echo_n "checking whether $CC accepts -g... " >&6; }
33633if ${ac_cv_prog_cc_g+:} false; then :
33634  $as_echo_n "(cached) " >&6
33635else
33636  ac_save_c_werror_flag=$ac_c_werror_flag
33637   ac_c_werror_flag=yes
33638   ac_cv_prog_cc_g=no
33639   CFLAGS="-g"
33640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33641/* end confdefs.h.  */
33642
33643int
33644main ()
33645{
33646
33647  ;
33648  return 0;
33649}
33650_ACEOF
33651if ac_fn_c_try_compile "$LINENO"; then :
33652  ac_cv_prog_cc_g=yes
33653else
33654  CFLAGS=""
33655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33656/* end confdefs.h.  */
33657
33658int
33659main ()
33660{
33661
33662  ;
33663  return 0;
33664}
33665_ACEOF
33666if ac_fn_c_try_compile "$LINENO"; then :
33667
33668else
33669  ac_c_werror_flag=$ac_save_c_werror_flag
33670	 CFLAGS="-g"
33671	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33672/* end confdefs.h.  */
33673
33674int
33675main ()
33676{
33677
33678  ;
33679  return 0;
33680}
33681_ACEOF
33682if ac_fn_c_try_compile "$LINENO"; then :
33683  ac_cv_prog_cc_g=yes
33684fi
33685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33686fi
33687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33688fi
33689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33690   ac_c_werror_flag=$ac_save_c_werror_flag
33691fi
33692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33693$as_echo "$ac_cv_prog_cc_g" >&6; }
33694if test "$ac_test_CFLAGS" = set; then
33695  CFLAGS=$ac_save_CFLAGS
33696elif test $ac_cv_prog_cc_g = yes; then
33697  if test "$GCC" = yes; then
33698    CFLAGS="-g -O2"
33699  else
33700    CFLAGS="-g"
33701  fi
33702else
33703  if test "$GCC" = yes; then
33704    CFLAGS="-O2"
33705  else
33706    CFLAGS=
33707  fi
33708fi
33709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33710$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33711if ${ac_cv_prog_cc_c89+:} false; then :
33712  $as_echo_n "(cached) " >&6
33713else
33714  ac_cv_prog_cc_c89=no
33715ac_save_CC=$CC
33716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33717/* end confdefs.h.  */
33718#include <stdarg.h>
33719#include <stdio.h>
33720struct stat;
33721/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33722struct buf { int x; };
33723FILE * (*rcsopen) (struct buf *, struct stat *, int);
33724static char *e (p, i)
33725     char **p;
33726     int i;
33727{
33728  return p[i];
33729}
33730static char *f (char * (*g) (char **, int), char **p, ...)
33731{
33732  char *s;
33733  va_list v;
33734  va_start (v,p);
33735  s = g (p, va_arg (v,int));
33736  va_end (v);
33737  return s;
33738}
33739
33740/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33741   function prototypes and stuff, but not '\xHH' hex character constants.
33742   These don't provoke an error unfortunately, instead are silently treated
33743   as 'x'.  The following induces an error, until -std is added to get
33744   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33745   array size at least.  It's necessary to write '\x00'==0 to get something
33746   that's true only with -std.  */
33747int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33748
33749/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33750   inside strings and character constants.  */
33751#define FOO(x) 'x'
33752int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33753
33754int test (int i, double x);
33755struct s1 {int (*f) (int a);};
33756struct s2 {int (*f) (double a);};
33757int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33758int argc;
33759char **argv;
33760int
33761main ()
33762{
33763return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33764  ;
33765  return 0;
33766}
33767_ACEOF
33768for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33769	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33770do
33771  CC="$ac_save_CC $ac_arg"
33772  if ac_fn_c_try_compile "$LINENO"; then :
33773  ac_cv_prog_cc_c89=$ac_arg
33774fi
33775rm -f core conftest.err conftest.$ac_objext
33776  test "x$ac_cv_prog_cc_c89" != "xno" && break
33777done
33778rm -f conftest.$ac_ext
33779CC=$ac_save_CC
33780
33781fi
33782# AC_CACHE_VAL
33783case "x$ac_cv_prog_cc_c89" in
33784  x)
33785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33786$as_echo "none needed" >&6; } ;;
33787  xno)
33788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33789$as_echo "unsupported" >&6; } ;;
33790  *)
33791    CC="$CC $ac_cv_prog_cc_c89"
33792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33793$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33794esac
33795if test "x$ac_cv_prog_cc_c89" != xno; then :
33796
33797fi
33798
33799ac_ext=cpp
33800ac_cpp='$CXXCPP $CPPFLAGS'
33801ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33802ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33803ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33804
33805
33806
33807  COMPILER_NAME=C++
33808  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33809
33810  if test "x$CXX" != x; then
33811    # User has supplied compiler name already, always let that override.
33812    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33813$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33814    if test "x`basename $CXX`" = "x$CXX"; then
33815      # A command without a complete path is provided, search $PATH.
33816
33817      for ac_prog in $CXX
33818do
33819  # Extract the first word of "$ac_prog", so it can be a program name with args.
33820set dummy $ac_prog; ac_word=$2
33821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33822$as_echo_n "checking for $ac_word... " >&6; }
33823if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33824  $as_echo_n "(cached) " >&6
33825else
33826  case $POTENTIAL_CXX in
33827  [\\/]* | ?:[\\/]*)
33828  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33829  ;;
33830  *)
33831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33832for as_dir in $PATH
33833do
33834  IFS=$as_save_IFS
33835  test -z "$as_dir" && as_dir=.
33836    for ac_exec_ext in '' $ac_executable_extensions; do
33837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33838    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33840    break 2
33841  fi
33842done
33843  done
33844IFS=$as_save_IFS
33845
33846  ;;
33847esac
33848fi
33849POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33850if test -n "$POTENTIAL_CXX"; then
33851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33852$as_echo "$POTENTIAL_CXX" >&6; }
33853else
33854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33855$as_echo "no" >&6; }
33856fi
33857
33858
33859  test -n "$POTENTIAL_CXX" && break
33860done
33861
33862      if test "x$POTENTIAL_CXX" != x; then
33863        CXX=$POTENTIAL_CXX
33864      else
33865        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33866      fi
33867    else
33868      # Otherwise it might already be a complete path
33869      if test ! -x "$CXX"; then
33870        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33871      fi
33872    fi
33873  else
33874    # No user supplied value. Locate compiler ourselves.
33875
33876    # If we are cross compiling, assume cross compilation tools follows the
33877    # cross compilation standard where they are prefixed with the autoconf
33878    # standard name for the target. For example the binary
33879    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33880    # If we are not cross compiling, then the default compiler name will be
33881    # used.
33882
33883    CXX=
33884    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33885    # before checking the rest of the PATH.
33886    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33887    # step, this should not be necessary.
33888    if test -n "$TOOLCHAIN_PATH"; then
33889      PATH_save="$PATH"
33890      PATH="$TOOLCHAIN_PATH"
33891      for ac_prog in $SEARCH_LIST
33892do
33893  # Extract the first word of "$ac_prog", so it can be a program name with args.
33894set dummy $ac_prog; ac_word=$2
33895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33896$as_echo_n "checking for $ac_word... " >&6; }
33897if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33898  $as_echo_n "(cached) " >&6
33899else
33900  case $TOOLCHAIN_PATH_CXX in
33901  [\\/]* | ?:[\\/]*)
33902  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33903  ;;
33904  *)
33905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33906for as_dir in $PATH
33907do
33908  IFS=$as_save_IFS
33909  test -z "$as_dir" && as_dir=.
33910    for ac_exec_ext in '' $ac_executable_extensions; do
33911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33912    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33914    break 2
33915  fi
33916done
33917  done
33918IFS=$as_save_IFS
33919
33920  ;;
33921esac
33922fi
33923TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33924if test -n "$TOOLCHAIN_PATH_CXX"; then
33925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33926$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33927else
33928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33929$as_echo "no" >&6; }
33930fi
33931
33932
33933  test -n "$TOOLCHAIN_PATH_CXX" && break
33934done
33935
33936      CXX=$TOOLCHAIN_PATH_CXX
33937      PATH="$PATH_save"
33938    fi
33939
33940    # AC_PATH_PROGS can't be run multiple times with the same variable,
33941    # so create a new name for this run.
33942    if test "x$CXX" = x; then
33943      for ac_prog in $SEARCH_LIST
33944do
33945  # Extract the first word of "$ac_prog", so it can be a program name with args.
33946set dummy $ac_prog; ac_word=$2
33947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33948$as_echo_n "checking for $ac_word... " >&6; }
33949if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33950  $as_echo_n "(cached) " >&6
33951else
33952  case $POTENTIAL_CXX in
33953  [\\/]* | ?:[\\/]*)
33954  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33955  ;;
33956  *)
33957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33958for as_dir in $PATH
33959do
33960  IFS=$as_save_IFS
33961  test -z "$as_dir" && as_dir=.
33962    for ac_exec_ext in '' $ac_executable_extensions; do
33963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33964    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33966    break 2
33967  fi
33968done
33969  done
33970IFS=$as_save_IFS
33971
33972  ;;
33973esac
33974fi
33975POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33976if test -n "$POTENTIAL_CXX"; then
33977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33978$as_echo "$POTENTIAL_CXX" >&6; }
33979else
33980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33981$as_echo "no" >&6; }
33982fi
33983
33984
33985  test -n "$POTENTIAL_CXX" && break
33986done
33987
33988      CXX=$POTENTIAL_CXX
33989    fi
33990
33991    if test "x$CXX" = x; then
33992
33993  # Print a helpful message on how to acquire the necessary build dependency.
33994  # devkit is the help tag: freetype, cups, alsa etc
33995  MISSING_DEPENDENCY=devkit
33996
33997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33998    cygwin_help $MISSING_DEPENDENCY
33999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34000    msys_help $MISSING_DEPENDENCY
34001  else
34002    PKGHANDLER_COMMAND=
34003
34004    case $PKGHANDLER in
34005      apt-get)
34006        apt_help     $MISSING_DEPENDENCY ;;
34007      yum)
34008        yum_help     $MISSING_DEPENDENCY ;;
34009      port)
34010        port_help    $MISSING_DEPENDENCY ;;
34011      pkgutil)
34012        pkgutil_help $MISSING_DEPENDENCY ;;
34013      pkgadd)
34014        pkgadd_help  $MISSING_DEPENDENCY ;;
34015    esac
34016
34017    if test "x$PKGHANDLER_COMMAND" != x; then
34018      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34019    fi
34020  fi
34021
34022      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34023    fi
34024  fi
34025
34026  # Now we have a compiler binary in CXX. Make sure it's okay.
34027
34028  # Only process if variable expands to non-empty
34029
34030  if test "x$CXX" != x; then
34031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34032
34033  # First separate the path from the arguments. This will split at the first
34034  # space.
34035  complete="$CXX"
34036  path="${complete%% *}"
34037  tmp="$complete EOL"
34038  arguments="${tmp#* }"
34039
34040  # Input might be given as Windows format, start by converting to
34041  # unix format.
34042  new_path=`$CYGPATH -u "$path"`
34043
34044  # Now try to locate executable using which
34045  new_path=`$WHICH "$new_path" 2> /dev/null`
34046  # bat and cmd files are not always considered executable in cygwin causing which
34047  # to not find them
34048  if test "x$new_path" = x \
34049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34051    new_path=`$CYGPATH -u "$path"`
34052  fi
34053  if test "x$new_path" = x; then
34054    # Oops. Which didn't find the executable.
34055    # The splitting of arguments from the executable at a space might have been incorrect,
34056    # since paths with space are more likely in Windows. Give it another try with the whole
34057    # argument.
34058    path="$complete"
34059    arguments="EOL"
34060    new_path=`$CYGPATH -u "$path"`
34061    new_path=`$WHICH "$new_path" 2> /dev/null`
34062    # bat and cmd files are not always considered executable in cygwin causing which
34063    # to not find them
34064    if test "x$new_path" = x \
34065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34067      new_path=`$CYGPATH -u "$path"`
34068    fi
34069    if test "x$new_path" = x; then
34070      # It's still not found. Now this is an unrecoverable error.
34071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34072$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34073      has_space=`$ECHO "$complete" | $GREP " "`
34074      if test "x$has_space" != x; then
34075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34077      fi
34078      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34079    fi
34080  fi
34081
34082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34085  # "foo.exe" is OK but "foo" is an error.
34086  #
34087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34088  # It is also a way to make sure we got the proper file name for the real test later on.
34089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34090  if test "x$test_shortpath" = x; then
34091    # Short path failed, file does not exist as specified.
34092    # Try adding .exe or .cmd
34093    if test -f "${new_path}.exe"; then
34094      input_to_shortpath="${new_path}.exe"
34095    elif test -f "${new_path}.cmd"; then
34096      input_to_shortpath="${new_path}.cmd"
34097    else
34098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34099$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34102      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34103    fi
34104  else
34105    input_to_shortpath="$new_path"
34106  fi
34107
34108  # Call helper function which possibly converts this using DOS-style short mode.
34109  # If so, the updated path is stored in $new_path.
34110  new_path="$input_to_shortpath"
34111
34112  input_path="$input_to_shortpath"
34113  # Check if we need to convert this using DOS-style short mode. If the path
34114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34115  # take no chances and rewrite it.
34116  # Note: m4 eats our [], so we need to use [ and ] instead.
34117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34118  if test "x$has_forbidden_chars" != x; then
34119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34123      # Going to short mode and back again did indeed matter. Since short mode is
34124      # case insensitive, let's make it lowercase to improve readability.
34125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34126      # Now convert it back to Unix-style (cygpath)
34127      input_path=`$CYGPATH -u "$shortmode_path"`
34128      new_path="$input_path"
34129    fi
34130  fi
34131
34132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34133  if test "x$test_cygdrive_prefix" = x; then
34134    # As a simple fix, exclude /usr/bin since it's not a real path.
34135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34137      # a path prefixed by /cygdrive for fixpath to work.
34138      new_path="$CYGWIN_ROOT_PATH$input_path"
34139    fi
34140  fi
34141
34142  # remove trailing .exe if any
34143  new_path="${new_path/%.exe/}"
34144
34145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34146
34147  # First separate the path from the arguments. This will split at the first
34148  # space.
34149  complete="$CXX"
34150  path="${complete%% *}"
34151  tmp="$complete EOL"
34152  arguments="${tmp#* }"
34153
34154  # Input might be given as Windows format, start by converting to
34155  # unix format.
34156  new_path="$path"
34157
34158  windows_path="$new_path"
34159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34160    unix_path=`$CYGPATH -u "$windows_path"`
34161    new_path="$unix_path"
34162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34164    new_path="$unix_path"
34165  fi
34166
34167
34168  # Now try to locate executable using which
34169  new_path=`$WHICH "$new_path" 2> /dev/null`
34170
34171  if test "x$new_path" = x; then
34172    # Oops. Which didn't find the executable.
34173    # The splitting of arguments from the executable at a space might have been incorrect,
34174    # since paths with space are more likely in Windows. Give it another try with the whole
34175    # argument.
34176    path="$complete"
34177    arguments="EOL"
34178    new_path="$path"
34179
34180  windows_path="$new_path"
34181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34182    unix_path=`$CYGPATH -u "$windows_path"`
34183    new_path="$unix_path"
34184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34186    new_path="$unix_path"
34187  fi
34188
34189
34190    new_path=`$WHICH "$new_path" 2> /dev/null`
34191    # bat and cmd files are not always considered executable in MSYS causing which
34192    # to not find them
34193    if test "x$new_path" = x \
34194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34196      new_path="$path"
34197
34198  windows_path="$new_path"
34199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34200    unix_path=`$CYGPATH -u "$windows_path"`
34201    new_path="$unix_path"
34202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34204    new_path="$unix_path"
34205  fi
34206
34207    fi
34208
34209    if test "x$new_path" = x; then
34210      # It's still not found. Now this is an unrecoverable error.
34211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34212$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34213      has_space=`$ECHO "$complete" | $GREP " "`
34214      if test "x$has_space" != x; then
34215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34217      fi
34218      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34219    fi
34220  fi
34221
34222  # Now new_path has a complete unix path to the binary
34223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34224    # Keep paths in /bin as-is, but remove trailing .exe if any
34225    new_path="${new_path/%.exe/}"
34226    # Do not save /bin paths to all_fixpath_prefixes!
34227  else
34228    # Not in mixed or Windows style, start by that.
34229    new_path=`cmd //c echo $new_path`
34230
34231  input_path="$new_path"
34232  # Check if we need to convert this using DOS-style short mode. If the path
34233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34234  # take no chances and rewrite it.
34235  # Note: m4 eats our [], so we need to use [ and ] instead.
34236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34237  if test "x$has_forbidden_chars" != x; then
34238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34240  fi
34241
34242    # Output is in $new_path
34243
34244  windows_path="$new_path"
34245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34246    unix_path=`$CYGPATH -u "$windows_path"`
34247    new_path="$unix_path"
34248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34250    new_path="$unix_path"
34251  fi
34252
34253    # remove trailing .exe if any
34254    new_path="${new_path/%.exe/}"
34255
34256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34258  fi
34259
34260    else
34261      # We're on a unix platform. Hooray! :)
34262      # First separate the path from the arguments. This will split at the first
34263      # space.
34264      complete="$CXX"
34265      path="${complete%% *}"
34266      tmp="$complete EOL"
34267      arguments="${tmp#* }"
34268
34269      # Cannot rely on the command "which" here since it doesn't always work.
34270      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34271      if test -z "$is_absolute_path"; then
34272        # Path to executable is not absolute. Find it.
34273        IFS_save="$IFS"
34274        IFS=:
34275        for p in $PATH; do
34276          if test -f "$p/$path" && test -x "$p/$path"; then
34277            new_path="$p/$path"
34278            break
34279          fi
34280        done
34281        IFS="$IFS_save"
34282      else
34283        # This is an absolute path, we can use it without further modifications.
34284        new_path="$path"
34285      fi
34286
34287      if test "x$new_path" = x; then
34288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34289$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34290        has_space=`$ECHO "$complete" | $GREP " "`
34291        if test "x$has_space" != x; then
34292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34294        fi
34295        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34296      fi
34297    fi
34298
34299    # Now join together the path and the arguments once again
34300    if test "x$arguments" != xEOL; then
34301      new_complete="$new_path ${arguments% *}"
34302    else
34303      new_complete="$new_path"
34304    fi
34305
34306    if test "x$complete" != "x$new_complete"; then
34307      CXX="$new_complete"
34308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34309$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34310    fi
34311  fi
34312
34313  TEST_COMPILER="$CXX"
34314
34315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34316$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34317  SYMLINK_ORIGINAL="$TEST_COMPILER"
34318
34319  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34320    # Follow a chain of symbolic links. Use readlink
34321    # where it exists, else fall back to horribly
34322    # complicated shell code.
34323    if test "x$READLINK_TESTED" != yes; then
34324      # On MacOSX there is a readlink tool with a different
34325      # purpose than the GNU readlink tool. Check the found readlink.
34326      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34327      if test "x$ISGNU" = x; then
34328        # A readlink that we do not know how to use.
34329        # Are there other non-GNU readlinks out there?
34330        READLINK_TESTED=yes
34331        READLINK=
34332      fi
34333    fi
34334
34335    if test "x$READLINK" != x; then
34336      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34337    else
34338      # Save the current directory for restoring afterwards
34339      STARTDIR=$PWD
34340      COUNTER=0
34341      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34342      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34343      cd $sym_link_dir
34344      # Use -P flag to resolve symlinks in directories.
34345      cd `$THEPWDCMD -P`
34346      sym_link_dir=`$THEPWDCMD -P`
34347      # Resolve file symlinks
34348      while test $COUNTER -lt 20; do
34349        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34350        if test "x$ISLINK" == x; then
34351          # This is not a symbolic link! We are done!
34352          break
34353        fi
34354        # Again resolve directory symlinks since the target of the just found
34355        # link could be in a different directory
34356        cd `$DIRNAME $ISLINK`
34357        sym_link_dir=`$THEPWDCMD -P`
34358        sym_link_file=`$BASENAME $ISLINK`
34359        let COUNTER=COUNTER+1
34360      done
34361      cd $STARTDIR
34362      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34363    fi
34364  fi
34365
34366  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34368$as_echo "no symlink" >&6; }
34369  else
34370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34371$as_echo "$SYMLINK_ORIGINAL" >&6; }
34372
34373    # We can't handle ccache by gcc wrappers, since we need to know if we're
34374    # using ccache. Instead ccache usage must be controlled by a configure option.
34375    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34376    if test "x$COMPILER_BASENAME" = "xccache"; then
34377      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34378$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34379      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34380    fi
34381  fi
34382
34383
34384  COMPILER=$CXX
34385  COMPILER_NAME=$COMPILER_NAME
34386
34387  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34388    # cc -V output typically looks like
34389    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34390    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34391    # Check that this is likely to be the Solaris Studio cc.
34392    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34393    if test $? -ne 0; then
34394      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34395      { $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
34396$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34397      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34398$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34399      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34400$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34401      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34402    fi
34403    # Remove usage instructions (if present), and
34404    # collapse compiler output into a single line
34405    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34406        $SED -e 's/ *[Uu]sage:.*//'`
34407    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34408        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34409  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34410    # xlc -qversion output typically looks like
34411    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34412    #     Version: 11.01.0000.0015
34413    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34414    # Check that this is likely to be the IBM XL C compiler.
34415    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34416    if test $? -ne 0; then
34417      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34418      { $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
34419$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34420      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34421$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34422      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34423$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34424      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34425    fi
34426    # Collapse compiler output into a single line
34427    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34428    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34429        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34430  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34431    # There is no specific version flag, but all output starts with a version string.
34432    # First line typically looks something like:
34433    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34434    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34435    # Check that this is likely to be Microsoft CL.EXE.
34436    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34437    if test $? -ne 0; then
34438      { $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
34439$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34440      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34441$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34442      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34443    fi
34444    # Collapse compiler output into a single line
34445    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34446    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34447        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34448  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34449    # gcc --version output typically looks like
34450    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34451    #     Copyright (C) 2013 Free Software Foundation, Inc.
34452    #     This is free software; see the source for copying conditions.  There is NO
34453    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34454    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34455    # Check that this is likely to be GCC.
34456    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34457    if test $? -ne 0; then
34458      { $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
34459$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34460      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34461$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34462      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34463    fi
34464    # Remove Copyright and legalese from version string, and
34465    # collapse into a single line
34466    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34467        $SED -e 's/ *Copyright .*//'`
34468    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34469        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34470  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34471    # clang --version output typically looks like
34472    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34473    #    clang version 3.3 (tags/RELEASE_33/final)
34474    # or
34475    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34476    #    Target: x86_64-pc-linux-gnu
34477    #    Thread model: posix
34478    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34479    # Check that this is likely to be clang
34480    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34481    if test $? -ne 0; then
34482      { $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
34483$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34484      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34485$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34486      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34487    fi
34488    # Collapse compiler output into a single line
34489    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34490    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34491        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34492  else
34493      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34494  fi
34495  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34496  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34497  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34498  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34499
34500  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34501$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34502
34503
34504  # Now that we have resolved CXX ourself, let autoconf have its go at it
34505  ac_ext=cpp
34506ac_cpp='$CXXCPP $CPPFLAGS'
34507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34510if test -z "$CXX"; then
34511  if test -n "$CCC"; then
34512    CXX=$CCC
34513  else
34514    if test -n "$ac_tool_prefix"; then
34515  for ac_prog in $CXX
34516  do
34517    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34518set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34520$as_echo_n "checking for $ac_word... " >&6; }
34521if ${ac_cv_prog_CXX+:} false; then :
34522  $as_echo_n "(cached) " >&6
34523else
34524  if test -n "$CXX"; then
34525  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34526else
34527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34528for as_dir in $PATH
34529do
34530  IFS=$as_save_IFS
34531  test -z "$as_dir" && as_dir=.
34532    for ac_exec_ext in '' $ac_executable_extensions; do
34533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34534    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34536    break 2
34537  fi
34538done
34539  done
34540IFS=$as_save_IFS
34541
34542fi
34543fi
34544CXX=$ac_cv_prog_CXX
34545if test -n "$CXX"; then
34546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34547$as_echo "$CXX" >&6; }
34548else
34549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34550$as_echo "no" >&6; }
34551fi
34552
34553
34554    test -n "$CXX" && break
34555  done
34556fi
34557if test -z "$CXX"; then
34558  ac_ct_CXX=$CXX
34559  for ac_prog in $CXX
34560do
34561  # Extract the first word of "$ac_prog", so it can be a program name with args.
34562set dummy $ac_prog; ac_word=$2
34563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34564$as_echo_n "checking for $ac_word... " >&6; }
34565if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34566  $as_echo_n "(cached) " >&6
34567else
34568  if test -n "$ac_ct_CXX"; then
34569  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34570else
34571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34572for as_dir in $PATH
34573do
34574  IFS=$as_save_IFS
34575  test -z "$as_dir" && as_dir=.
34576    for ac_exec_ext in '' $ac_executable_extensions; do
34577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34578    ac_cv_prog_ac_ct_CXX="$ac_prog"
34579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34580    break 2
34581  fi
34582done
34583  done
34584IFS=$as_save_IFS
34585
34586fi
34587fi
34588ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34589if test -n "$ac_ct_CXX"; then
34590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34591$as_echo "$ac_ct_CXX" >&6; }
34592else
34593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34594$as_echo "no" >&6; }
34595fi
34596
34597
34598  test -n "$ac_ct_CXX" && break
34599done
34600
34601  if test "x$ac_ct_CXX" = x; then
34602    CXX="g++"
34603  else
34604    case $cross_compiling:$ac_tool_warned in
34605yes:)
34606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34608ac_tool_warned=yes ;;
34609esac
34610    CXX=$ac_ct_CXX
34611  fi
34612fi
34613
34614  fi
34615fi
34616# Provide some information about the compiler.
34617$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34618set X $ac_compile
34619ac_compiler=$2
34620for ac_option in --version -v -V -qversion; do
34621  { { ac_try="$ac_compiler $ac_option >&5"
34622case "(($ac_try" in
34623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34624  *) ac_try_echo=$ac_try;;
34625esac
34626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34627$as_echo "$ac_try_echo"; } >&5
34628  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34629  ac_status=$?
34630  if test -s conftest.err; then
34631    sed '10a\
34632... rest of stderr output deleted ...
34633         10q' conftest.err >conftest.er1
34634    cat conftest.er1 >&5
34635  fi
34636  rm -f conftest.er1 conftest.err
34637  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34638  test $ac_status = 0; }
34639done
34640
34641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34642$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34643if ${ac_cv_cxx_compiler_gnu+:} false; then :
34644  $as_echo_n "(cached) " >&6
34645else
34646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34647/* end confdefs.h.  */
34648
34649int
34650main ()
34651{
34652#ifndef __GNUC__
34653       choke me
34654#endif
34655
34656  ;
34657  return 0;
34658}
34659_ACEOF
34660if ac_fn_cxx_try_compile "$LINENO"; then :
34661  ac_compiler_gnu=yes
34662else
34663  ac_compiler_gnu=no
34664fi
34665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34666ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34667
34668fi
34669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34670$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34671if test $ac_compiler_gnu = yes; then
34672  GXX=yes
34673else
34674  GXX=
34675fi
34676ac_test_CXXFLAGS=${CXXFLAGS+set}
34677ac_save_CXXFLAGS=$CXXFLAGS
34678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34679$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34680if ${ac_cv_prog_cxx_g+:} false; then :
34681  $as_echo_n "(cached) " >&6
34682else
34683  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34684   ac_cxx_werror_flag=yes
34685   ac_cv_prog_cxx_g=no
34686   CXXFLAGS="-g"
34687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34688/* end confdefs.h.  */
34689
34690int
34691main ()
34692{
34693
34694  ;
34695  return 0;
34696}
34697_ACEOF
34698if ac_fn_cxx_try_compile "$LINENO"; then :
34699  ac_cv_prog_cxx_g=yes
34700else
34701  CXXFLAGS=""
34702      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34703/* end confdefs.h.  */
34704
34705int
34706main ()
34707{
34708
34709  ;
34710  return 0;
34711}
34712_ACEOF
34713if ac_fn_cxx_try_compile "$LINENO"; then :
34714
34715else
34716  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34717	 CXXFLAGS="-g"
34718	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34719/* end confdefs.h.  */
34720
34721int
34722main ()
34723{
34724
34725  ;
34726  return 0;
34727}
34728_ACEOF
34729if ac_fn_cxx_try_compile "$LINENO"; then :
34730  ac_cv_prog_cxx_g=yes
34731fi
34732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34733fi
34734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34735fi
34736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34737   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34738fi
34739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34740$as_echo "$ac_cv_prog_cxx_g" >&6; }
34741if test "$ac_test_CXXFLAGS" = set; then
34742  CXXFLAGS=$ac_save_CXXFLAGS
34743elif test $ac_cv_prog_cxx_g = yes; then
34744  if test "$GXX" = yes; then
34745    CXXFLAGS="-g -O2"
34746  else
34747    CXXFLAGS="-g"
34748  fi
34749else
34750  if test "$GXX" = yes; then
34751    CXXFLAGS="-O2"
34752  else
34753    CXXFLAGS=
34754  fi
34755fi
34756ac_ext=cpp
34757ac_cpp='$CXXCPP $CPPFLAGS'
34758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34761
34762
34763  # This is the compiler version number on the form X.Y[.Z]
34764
34765
34766
34767
34768  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34769    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34770$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34771    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34772$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34773  fi
34774
34775  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34776  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34777    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34778$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34779  fi
34780
34781  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34782    { $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
34783$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34784  fi
34785
34786  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34787
34788
34789  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832    # Execute function body
34833
34834  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34835  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34836
34837  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34838    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34839  fi
34840
34841  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34842    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34843  fi
34844
34845  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34846  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34847
34848  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34849    :
34850
34851  else
34852    :
34853
34854          { $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
34855$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34856
34857
34858  fi
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871  fi
34872
34873  #
34874  # Setup the preprocessor (CPP and CXXCPP)
34875  #
34876  ac_ext=c
34877ac_cpp='$CPP $CPPFLAGS'
34878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34880ac_compiler_gnu=$ac_cv_c_compiler_gnu
34881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34882$as_echo_n "checking how to run the C preprocessor... " >&6; }
34883# On Suns, sometimes $CPP names a directory.
34884if test -n "$CPP" && test -d "$CPP"; then
34885  CPP=
34886fi
34887if test -z "$CPP"; then
34888  if ${ac_cv_prog_CPP+:} false; then :
34889  $as_echo_n "(cached) " >&6
34890else
34891      # Double quotes because CPP needs to be expanded
34892    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34893    do
34894      ac_preproc_ok=false
34895for ac_c_preproc_warn_flag in '' yes
34896do
34897  # Use a header file that comes with gcc, so configuring glibc
34898  # with a fresh cross-compiler works.
34899  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34900  # <limits.h> exists even on freestanding compilers.
34901  # On the NeXT, cc -E runs the code through the compiler's parser,
34902  # not just through cpp. "Syntax error" is here to catch this case.
34903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34904/* end confdefs.h.  */
34905#ifdef __STDC__
34906# include <limits.h>
34907#else
34908# include <assert.h>
34909#endif
34910		     Syntax error
34911_ACEOF
34912if ac_fn_c_try_cpp "$LINENO"; then :
34913
34914else
34915  # Broken: fails on valid input.
34916continue
34917fi
34918rm -f conftest.err conftest.i conftest.$ac_ext
34919
34920  # OK, works on sane cases.  Now check whether nonexistent headers
34921  # can be detected and how.
34922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34923/* end confdefs.h.  */
34924#include <ac_nonexistent.h>
34925_ACEOF
34926if ac_fn_c_try_cpp "$LINENO"; then :
34927  # Broken: success on invalid input.
34928continue
34929else
34930  # Passes both tests.
34931ac_preproc_ok=:
34932break
34933fi
34934rm -f conftest.err conftest.i conftest.$ac_ext
34935
34936done
34937# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34938rm -f conftest.i conftest.err conftest.$ac_ext
34939if $ac_preproc_ok; then :
34940  break
34941fi
34942
34943    done
34944    ac_cv_prog_CPP=$CPP
34945
34946fi
34947  CPP=$ac_cv_prog_CPP
34948else
34949  ac_cv_prog_CPP=$CPP
34950fi
34951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34952$as_echo "$CPP" >&6; }
34953ac_preproc_ok=false
34954for ac_c_preproc_warn_flag in '' yes
34955do
34956  # Use a header file that comes with gcc, so configuring glibc
34957  # with a fresh cross-compiler works.
34958  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34959  # <limits.h> exists even on freestanding compilers.
34960  # On the NeXT, cc -E runs the code through the compiler's parser,
34961  # not just through cpp. "Syntax error" is here to catch this case.
34962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34963/* end confdefs.h.  */
34964#ifdef __STDC__
34965# include <limits.h>
34966#else
34967# include <assert.h>
34968#endif
34969		     Syntax error
34970_ACEOF
34971if ac_fn_c_try_cpp "$LINENO"; then :
34972
34973else
34974  # Broken: fails on valid input.
34975continue
34976fi
34977rm -f conftest.err conftest.i conftest.$ac_ext
34978
34979  # OK, works on sane cases.  Now check whether nonexistent headers
34980  # can be detected and how.
34981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34982/* end confdefs.h.  */
34983#include <ac_nonexistent.h>
34984_ACEOF
34985if ac_fn_c_try_cpp "$LINENO"; then :
34986  # Broken: success on invalid input.
34987continue
34988else
34989  # Passes both tests.
34990ac_preproc_ok=:
34991break
34992fi
34993rm -f conftest.err conftest.i conftest.$ac_ext
34994
34995done
34996# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34997rm -f conftest.i conftest.err conftest.$ac_ext
34998if $ac_preproc_ok; then :
34999
35000else
35001  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35003as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35004See \`config.log' for more details" "$LINENO" 5; }
35005fi
35006
35007ac_ext=cpp
35008ac_cpp='$CXXCPP $CPPFLAGS'
35009ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35010ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35011ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35012
35013
35014  # Only process if variable expands to non-empty
35015
35016  if test "x$CPP" != x; then
35017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35018
35019  # First separate the path from the arguments. This will split at the first
35020  # space.
35021  complete="$CPP"
35022  path="${complete%% *}"
35023  tmp="$complete EOL"
35024  arguments="${tmp#* }"
35025
35026  # Input might be given as Windows format, start by converting to
35027  # unix format.
35028  new_path=`$CYGPATH -u "$path"`
35029
35030  # Now try to locate executable using which
35031  new_path=`$WHICH "$new_path" 2> /dev/null`
35032  # bat and cmd files are not always considered executable in cygwin causing which
35033  # to not find them
35034  if test "x$new_path" = x \
35035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35037    new_path=`$CYGPATH -u "$path"`
35038  fi
35039  if test "x$new_path" = x; then
35040    # Oops. Which didn't find the executable.
35041    # The splitting of arguments from the executable at a space might have been incorrect,
35042    # since paths with space are more likely in Windows. Give it another try with the whole
35043    # argument.
35044    path="$complete"
35045    arguments="EOL"
35046    new_path=`$CYGPATH -u "$path"`
35047    new_path=`$WHICH "$new_path" 2> /dev/null`
35048    # bat and cmd files are not always considered executable in cygwin causing which
35049    # to not find them
35050    if test "x$new_path" = x \
35051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35053      new_path=`$CYGPATH -u "$path"`
35054    fi
35055    if test "x$new_path" = x; then
35056      # It's still not found. Now this is an unrecoverable error.
35057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35058$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35059      has_space=`$ECHO "$complete" | $GREP " "`
35060      if test "x$has_space" != x; then
35061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35063      fi
35064      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35065    fi
35066  fi
35067
35068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35071  # "foo.exe" is OK but "foo" is an error.
35072  #
35073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35074  # It is also a way to make sure we got the proper file name for the real test later on.
35075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35076  if test "x$test_shortpath" = x; then
35077    # Short path failed, file does not exist as specified.
35078    # Try adding .exe or .cmd
35079    if test -f "${new_path}.exe"; then
35080      input_to_shortpath="${new_path}.exe"
35081    elif test -f "${new_path}.cmd"; then
35082      input_to_shortpath="${new_path}.cmd"
35083    else
35084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35085$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35088      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35089    fi
35090  else
35091    input_to_shortpath="$new_path"
35092  fi
35093
35094  # Call helper function which possibly converts this using DOS-style short mode.
35095  # If so, the updated path is stored in $new_path.
35096  new_path="$input_to_shortpath"
35097
35098  input_path="$input_to_shortpath"
35099  # Check if we need to convert this using DOS-style short mode. If the path
35100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35101  # take no chances and rewrite it.
35102  # Note: m4 eats our [], so we need to use [ and ] instead.
35103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35104  if test "x$has_forbidden_chars" != x; then
35105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35109      # Going to short mode and back again did indeed matter. Since short mode is
35110      # case insensitive, let's make it lowercase to improve readability.
35111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35112      # Now convert it back to Unix-style (cygpath)
35113      input_path=`$CYGPATH -u "$shortmode_path"`
35114      new_path="$input_path"
35115    fi
35116  fi
35117
35118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35119  if test "x$test_cygdrive_prefix" = x; then
35120    # As a simple fix, exclude /usr/bin since it's not a real path.
35121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35123      # a path prefixed by /cygdrive for fixpath to work.
35124      new_path="$CYGWIN_ROOT_PATH$input_path"
35125    fi
35126  fi
35127
35128  # remove trailing .exe if any
35129  new_path="${new_path/%.exe/}"
35130
35131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35132
35133  # First separate the path from the arguments. This will split at the first
35134  # space.
35135  complete="$CPP"
35136  path="${complete%% *}"
35137  tmp="$complete EOL"
35138  arguments="${tmp#* }"
35139
35140  # Input might be given as Windows format, start by converting to
35141  # unix format.
35142  new_path="$path"
35143
35144  windows_path="$new_path"
35145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35146    unix_path=`$CYGPATH -u "$windows_path"`
35147    new_path="$unix_path"
35148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35150    new_path="$unix_path"
35151  fi
35152
35153
35154  # Now try to locate executable using which
35155  new_path=`$WHICH "$new_path" 2> /dev/null`
35156
35157  if test "x$new_path" = x; then
35158    # Oops. Which didn't find the executable.
35159    # The splitting of arguments from the executable at a space might have been incorrect,
35160    # since paths with space are more likely in Windows. Give it another try with the whole
35161    # argument.
35162    path="$complete"
35163    arguments="EOL"
35164    new_path="$path"
35165
35166  windows_path="$new_path"
35167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35168    unix_path=`$CYGPATH -u "$windows_path"`
35169    new_path="$unix_path"
35170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35172    new_path="$unix_path"
35173  fi
35174
35175
35176    new_path=`$WHICH "$new_path" 2> /dev/null`
35177    # bat and cmd files are not always considered executable in MSYS causing which
35178    # to not find them
35179    if test "x$new_path" = x \
35180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35182      new_path="$path"
35183
35184  windows_path="$new_path"
35185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35186    unix_path=`$CYGPATH -u "$windows_path"`
35187    new_path="$unix_path"
35188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35190    new_path="$unix_path"
35191  fi
35192
35193    fi
35194
35195    if test "x$new_path" = x; then
35196      # It's still not found. Now this is an unrecoverable error.
35197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35198$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35199      has_space=`$ECHO "$complete" | $GREP " "`
35200      if test "x$has_space" != x; then
35201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35203      fi
35204      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35205    fi
35206  fi
35207
35208  # Now new_path has a complete unix path to the binary
35209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35210    # Keep paths in /bin as-is, but remove trailing .exe if any
35211    new_path="${new_path/%.exe/}"
35212    # Do not save /bin paths to all_fixpath_prefixes!
35213  else
35214    # Not in mixed or Windows style, start by that.
35215    new_path=`cmd //c echo $new_path`
35216
35217  input_path="$new_path"
35218  # Check if we need to convert this using DOS-style short mode. If the path
35219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35220  # take no chances and rewrite it.
35221  # Note: m4 eats our [], so we need to use [ and ] instead.
35222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35223  if test "x$has_forbidden_chars" != x; then
35224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35226  fi
35227
35228    # Output is in $new_path
35229
35230  windows_path="$new_path"
35231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35232    unix_path=`$CYGPATH -u "$windows_path"`
35233    new_path="$unix_path"
35234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35236    new_path="$unix_path"
35237  fi
35238
35239    # remove trailing .exe if any
35240    new_path="${new_path/%.exe/}"
35241
35242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35244  fi
35245
35246    else
35247      # We're on a unix platform. Hooray! :)
35248      # First separate the path from the arguments. This will split at the first
35249      # space.
35250      complete="$CPP"
35251      path="${complete%% *}"
35252      tmp="$complete EOL"
35253      arguments="${tmp#* }"
35254
35255      # Cannot rely on the command "which" here since it doesn't always work.
35256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35257      if test -z "$is_absolute_path"; then
35258        # Path to executable is not absolute. Find it.
35259        IFS_save="$IFS"
35260        IFS=:
35261        for p in $PATH; do
35262          if test -f "$p/$path" && test -x "$p/$path"; then
35263            new_path="$p/$path"
35264            break
35265          fi
35266        done
35267        IFS="$IFS_save"
35268      else
35269        # This is an absolute path, we can use it without further modifications.
35270        new_path="$path"
35271      fi
35272
35273      if test "x$new_path" = x; then
35274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35275$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35276        has_space=`$ECHO "$complete" | $GREP " "`
35277        if test "x$has_space" != x; then
35278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35280        fi
35281        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35282      fi
35283    fi
35284
35285    # Now join together the path and the arguments once again
35286    if test "x$arguments" != xEOL; then
35287      new_complete="$new_path ${arguments% *}"
35288    else
35289      new_complete="$new_path"
35290    fi
35291
35292    if test "x$complete" != "x$new_complete"; then
35293      CPP="$new_complete"
35294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35295$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35296    fi
35297  fi
35298
35299  ac_ext=cpp
35300ac_cpp='$CXXCPP $CPPFLAGS'
35301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35305$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35306if test -z "$CXXCPP"; then
35307  if ${ac_cv_prog_CXXCPP+:} false; then :
35308  $as_echo_n "(cached) " >&6
35309else
35310      # Double quotes because CXXCPP needs to be expanded
35311    for CXXCPP in "$CXX -E" "/lib/cpp"
35312    do
35313      ac_preproc_ok=false
35314for ac_cxx_preproc_warn_flag in '' yes
35315do
35316  # Use a header file that comes with gcc, so configuring glibc
35317  # with a fresh cross-compiler works.
35318  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35319  # <limits.h> exists even on freestanding compilers.
35320  # On the NeXT, cc -E runs the code through the compiler's parser,
35321  # not just through cpp. "Syntax error" is here to catch this case.
35322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35323/* end confdefs.h.  */
35324#ifdef __STDC__
35325# include <limits.h>
35326#else
35327# include <assert.h>
35328#endif
35329		     Syntax error
35330_ACEOF
35331if ac_fn_cxx_try_cpp "$LINENO"; then :
35332
35333else
35334  # Broken: fails on valid input.
35335continue
35336fi
35337rm -f conftest.err conftest.i conftest.$ac_ext
35338
35339  # OK, works on sane cases.  Now check whether nonexistent headers
35340  # can be detected and how.
35341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35342/* end confdefs.h.  */
35343#include <ac_nonexistent.h>
35344_ACEOF
35345if ac_fn_cxx_try_cpp "$LINENO"; then :
35346  # Broken: success on invalid input.
35347continue
35348else
35349  # Passes both tests.
35350ac_preproc_ok=:
35351break
35352fi
35353rm -f conftest.err conftest.i conftest.$ac_ext
35354
35355done
35356# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35357rm -f conftest.i conftest.err conftest.$ac_ext
35358if $ac_preproc_ok; then :
35359  break
35360fi
35361
35362    done
35363    ac_cv_prog_CXXCPP=$CXXCPP
35364
35365fi
35366  CXXCPP=$ac_cv_prog_CXXCPP
35367else
35368  ac_cv_prog_CXXCPP=$CXXCPP
35369fi
35370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35371$as_echo "$CXXCPP" >&6; }
35372ac_preproc_ok=false
35373for ac_cxx_preproc_warn_flag in '' yes
35374do
35375  # Use a header file that comes with gcc, so configuring glibc
35376  # with a fresh cross-compiler works.
35377  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35378  # <limits.h> exists even on freestanding compilers.
35379  # On the NeXT, cc -E runs the code through the compiler's parser,
35380  # not just through cpp. "Syntax error" is here to catch this case.
35381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35382/* end confdefs.h.  */
35383#ifdef __STDC__
35384# include <limits.h>
35385#else
35386# include <assert.h>
35387#endif
35388		     Syntax error
35389_ACEOF
35390if ac_fn_cxx_try_cpp "$LINENO"; then :
35391
35392else
35393  # Broken: fails on valid input.
35394continue
35395fi
35396rm -f conftest.err conftest.i conftest.$ac_ext
35397
35398  # OK, works on sane cases.  Now check whether nonexistent headers
35399  # can be detected and how.
35400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35401/* end confdefs.h.  */
35402#include <ac_nonexistent.h>
35403_ACEOF
35404if ac_fn_cxx_try_cpp "$LINENO"; then :
35405  # Broken: success on invalid input.
35406continue
35407else
35408  # Passes both tests.
35409ac_preproc_ok=:
35410break
35411fi
35412rm -f conftest.err conftest.i conftest.$ac_ext
35413
35414done
35415# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35416rm -f conftest.i conftest.err conftest.$ac_ext
35417if $ac_preproc_ok; then :
35418
35419else
35420  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35422as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35423See \`config.log' for more details" "$LINENO" 5; }
35424fi
35425
35426ac_ext=cpp
35427ac_cpp='$CXXCPP $CPPFLAGS'
35428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35431
35432
35433  # Only process if variable expands to non-empty
35434
35435  if test "x$CXXCPP" != x; then
35436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35437
35438  # First separate the path from the arguments. This will split at the first
35439  # space.
35440  complete="$CXXCPP"
35441  path="${complete%% *}"
35442  tmp="$complete EOL"
35443  arguments="${tmp#* }"
35444
35445  # Input might be given as Windows format, start by converting to
35446  # unix format.
35447  new_path=`$CYGPATH -u "$path"`
35448
35449  # Now try to locate executable using which
35450  new_path=`$WHICH "$new_path" 2> /dev/null`
35451  # bat and cmd files are not always considered executable in cygwin causing which
35452  # to not find them
35453  if test "x$new_path" = x \
35454      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35455      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35456    new_path=`$CYGPATH -u "$path"`
35457  fi
35458  if test "x$new_path" = x; then
35459    # Oops. Which didn't find the executable.
35460    # The splitting of arguments from the executable at a space might have been incorrect,
35461    # since paths with space are more likely in Windows. Give it another try with the whole
35462    # argument.
35463    path="$complete"
35464    arguments="EOL"
35465    new_path=`$CYGPATH -u "$path"`
35466    new_path=`$WHICH "$new_path" 2> /dev/null`
35467    # bat and cmd files are not always considered executable in cygwin causing which
35468    # to not find them
35469    if test "x$new_path" = x \
35470        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35471        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35472      new_path=`$CYGPATH -u "$path"`
35473    fi
35474    if test "x$new_path" = x; then
35475      # It's still not found. Now this is an unrecoverable error.
35476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35477$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35478      has_space=`$ECHO "$complete" | $GREP " "`
35479      if test "x$has_space" != x; then
35480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35482      fi
35483      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35484    fi
35485  fi
35486
35487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35490  # "foo.exe" is OK but "foo" is an error.
35491  #
35492  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35493  # It is also a way to make sure we got the proper file name for the real test later on.
35494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35495  if test "x$test_shortpath" = x; then
35496    # Short path failed, file does not exist as specified.
35497    # Try adding .exe or .cmd
35498    if test -f "${new_path}.exe"; then
35499      input_to_shortpath="${new_path}.exe"
35500    elif test -f "${new_path}.cmd"; then
35501      input_to_shortpath="${new_path}.cmd"
35502    else
35503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35504$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35505      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35506$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35507      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35508    fi
35509  else
35510    input_to_shortpath="$new_path"
35511  fi
35512
35513  # Call helper function which possibly converts this using DOS-style short mode.
35514  # If so, the updated path is stored in $new_path.
35515  new_path="$input_to_shortpath"
35516
35517  input_path="$input_to_shortpath"
35518  # Check if we need to convert this using DOS-style short mode. If the path
35519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35520  # take no chances and rewrite it.
35521  # Note: m4 eats our [], so we need to use [ and ] instead.
35522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35523  if test "x$has_forbidden_chars" != x; then
35524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35528      # Going to short mode and back again did indeed matter. Since short mode is
35529      # case insensitive, let's make it lowercase to improve readability.
35530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35531      # Now convert it back to Unix-style (cygpath)
35532      input_path=`$CYGPATH -u "$shortmode_path"`
35533      new_path="$input_path"
35534    fi
35535  fi
35536
35537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35538  if test "x$test_cygdrive_prefix" = x; then
35539    # As a simple fix, exclude /usr/bin since it's not a real path.
35540    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35542      # a path prefixed by /cygdrive for fixpath to work.
35543      new_path="$CYGWIN_ROOT_PATH$input_path"
35544    fi
35545  fi
35546
35547  # remove trailing .exe if any
35548  new_path="${new_path/%.exe/}"
35549
35550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35551
35552  # First separate the path from the arguments. This will split at the first
35553  # space.
35554  complete="$CXXCPP"
35555  path="${complete%% *}"
35556  tmp="$complete EOL"
35557  arguments="${tmp#* }"
35558
35559  # Input might be given as Windows format, start by converting to
35560  # unix format.
35561  new_path="$path"
35562
35563  windows_path="$new_path"
35564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35565    unix_path=`$CYGPATH -u "$windows_path"`
35566    new_path="$unix_path"
35567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35569    new_path="$unix_path"
35570  fi
35571
35572
35573  # Now try to locate executable using which
35574  new_path=`$WHICH "$new_path" 2> /dev/null`
35575
35576  if test "x$new_path" = x; then
35577    # Oops. Which didn't find the executable.
35578    # The splitting of arguments from the executable at a space might have been incorrect,
35579    # since paths with space are more likely in Windows. Give it another try with the whole
35580    # argument.
35581    path="$complete"
35582    arguments="EOL"
35583    new_path="$path"
35584
35585  windows_path="$new_path"
35586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35587    unix_path=`$CYGPATH -u "$windows_path"`
35588    new_path="$unix_path"
35589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35591    new_path="$unix_path"
35592  fi
35593
35594
35595    new_path=`$WHICH "$new_path" 2> /dev/null`
35596    # bat and cmd files are not always considered executable in MSYS causing which
35597    # to not find them
35598    if test "x$new_path" = x \
35599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35601      new_path="$path"
35602
35603  windows_path="$new_path"
35604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35605    unix_path=`$CYGPATH -u "$windows_path"`
35606    new_path="$unix_path"
35607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35609    new_path="$unix_path"
35610  fi
35611
35612    fi
35613
35614    if test "x$new_path" = x; then
35615      # It's still not found. Now this is an unrecoverable error.
35616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35617$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35618      has_space=`$ECHO "$complete" | $GREP " "`
35619      if test "x$has_space" != x; then
35620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35622      fi
35623      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35624    fi
35625  fi
35626
35627  # Now new_path has a complete unix path to the binary
35628  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35629    # Keep paths in /bin as-is, but remove trailing .exe if any
35630    new_path="${new_path/%.exe/}"
35631    # Do not save /bin paths to all_fixpath_prefixes!
35632  else
35633    # Not in mixed or Windows style, start by that.
35634    new_path=`cmd //c echo $new_path`
35635
35636  input_path="$new_path"
35637  # Check if we need to convert this using DOS-style short mode. If the path
35638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35639  # take no chances and rewrite it.
35640  # Note: m4 eats our [], so we need to use [ and ] instead.
35641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35642  if test "x$has_forbidden_chars" != x; then
35643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35645  fi
35646
35647    # Output is in $new_path
35648
35649  windows_path="$new_path"
35650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35651    unix_path=`$CYGPATH -u "$windows_path"`
35652    new_path="$unix_path"
35653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35655    new_path="$unix_path"
35656  fi
35657
35658    # remove trailing .exe if any
35659    new_path="${new_path/%.exe/}"
35660
35661    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35662    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35663  fi
35664
35665    else
35666      # We're on a unix platform. Hooray! :)
35667      # First separate the path from the arguments. This will split at the first
35668      # space.
35669      complete="$CXXCPP"
35670      path="${complete%% *}"
35671      tmp="$complete EOL"
35672      arguments="${tmp#* }"
35673
35674      # Cannot rely on the command "which" here since it doesn't always work.
35675      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35676      if test -z "$is_absolute_path"; then
35677        # Path to executable is not absolute. Find it.
35678        IFS_save="$IFS"
35679        IFS=:
35680        for p in $PATH; do
35681          if test -f "$p/$path" && test -x "$p/$path"; then
35682            new_path="$p/$path"
35683            break
35684          fi
35685        done
35686        IFS="$IFS_save"
35687      else
35688        # This is an absolute path, we can use it without further modifications.
35689        new_path="$path"
35690      fi
35691
35692      if test "x$new_path" = x; then
35693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35694$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35695        has_space=`$ECHO "$complete" | $GREP " "`
35696        if test "x$has_space" != x; then
35697          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35698$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35699        fi
35700        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35701      fi
35702    fi
35703
35704    # Now join together the path and the arguments once again
35705    if test "x$arguments" != xEOL; then
35706      new_complete="$new_path ${arguments% *}"
35707    else
35708      new_complete="$new_path"
35709    fi
35710
35711    if test "x$complete" != "x$new_complete"; then
35712      CXXCPP="$new_complete"
35713      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35714$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35715    fi
35716  fi
35717
35718
35719  #
35720  # Setup the linker (LD)
35721  #
35722  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35723    # In the Microsoft toolchain we have a separate LD command "link".
35724    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35725    # a cygwin program for something completely different.
35726    # Extract the first word of "link", so it can be a program name with args.
35727set dummy link; ac_word=$2
35728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35729$as_echo_n "checking for $ac_word... " >&6; }
35730if ${ac_cv_prog_LD+:} false; then :
35731  $as_echo_n "(cached) " >&6
35732else
35733  if test -n "$LD"; then
35734  ac_cv_prog_LD="$LD" # Let the user override the test.
35735else
35736  ac_prog_rejected=no
35737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35738for as_dir in $PATH
35739do
35740  IFS=$as_save_IFS
35741  test -z "$as_dir" && as_dir=.
35742    for ac_exec_ext in '' $ac_executable_extensions; do
35743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35744    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35745       ac_prog_rejected=yes
35746       continue
35747     fi
35748    ac_cv_prog_LD="link"
35749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35750    break 2
35751  fi
35752done
35753  done
35754IFS=$as_save_IFS
35755
35756if test $ac_prog_rejected = yes; then
35757  # We found a bogon in the path, so make sure we never use it.
35758  set dummy $ac_cv_prog_LD
35759  shift
35760  if test $# != 0; then
35761    # We chose a different compiler from the bogus one.
35762    # However, it has the same basename, so the bogon will be chosen
35763    # first if we set LD to just the basename; use the full file name.
35764    shift
35765    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35766  fi
35767fi
35768fi
35769fi
35770LD=$ac_cv_prog_LD
35771if test -n "$LD"; then
35772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35773$as_echo "$LD" >&6; }
35774else
35775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35776$as_echo "no" >&6; }
35777fi
35778
35779
35780
35781  # Only process if variable expands to non-empty
35782
35783  if test "x$LD" != x; then
35784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35785
35786  # First separate the path from the arguments. This will split at the first
35787  # space.
35788  complete="$LD"
35789  path="${complete%% *}"
35790  tmp="$complete EOL"
35791  arguments="${tmp#* }"
35792
35793  # Input might be given as Windows format, start by converting to
35794  # unix format.
35795  new_path=`$CYGPATH -u "$path"`
35796
35797  # Now try to locate executable using which
35798  new_path=`$WHICH "$new_path" 2> /dev/null`
35799  # bat and cmd files are not always considered executable in cygwin causing which
35800  # to not find them
35801  if test "x$new_path" = x \
35802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35804    new_path=`$CYGPATH -u "$path"`
35805  fi
35806  if test "x$new_path" = x; then
35807    # Oops. Which didn't find the executable.
35808    # The splitting of arguments from the executable at a space might have been incorrect,
35809    # since paths with space are more likely in Windows. Give it another try with the whole
35810    # argument.
35811    path="$complete"
35812    arguments="EOL"
35813    new_path=`$CYGPATH -u "$path"`
35814    new_path=`$WHICH "$new_path" 2> /dev/null`
35815    # bat and cmd files are not always considered executable in cygwin causing which
35816    # to not find them
35817    if test "x$new_path" = x \
35818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35820      new_path=`$CYGPATH -u "$path"`
35821    fi
35822    if test "x$new_path" = x; then
35823      # It's still not found. Now this is an unrecoverable error.
35824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35825$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35826      has_space=`$ECHO "$complete" | $GREP " "`
35827      if test "x$has_space" != x; then
35828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35830      fi
35831      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35832    fi
35833  fi
35834
35835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35838  # "foo.exe" is OK but "foo" is an error.
35839  #
35840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35841  # It is also a way to make sure we got the proper file name for the real test later on.
35842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35843  if test "x$test_shortpath" = x; then
35844    # Short path failed, file does not exist as specified.
35845    # Try adding .exe or .cmd
35846    if test -f "${new_path}.exe"; then
35847      input_to_shortpath="${new_path}.exe"
35848    elif test -f "${new_path}.cmd"; then
35849      input_to_shortpath="${new_path}.cmd"
35850    else
35851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35852$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35855      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35856    fi
35857  else
35858    input_to_shortpath="$new_path"
35859  fi
35860
35861  # Call helper function which possibly converts this using DOS-style short mode.
35862  # If so, the updated path is stored in $new_path.
35863  new_path="$input_to_shortpath"
35864
35865  input_path="$input_to_shortpath"
35866  # Check if we need to convert this using DOS-style short mode. If the path
35867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35868  # take no chances and rewrite it.
35869  # Note: m4 eats our [], so we need to use [ and ] instead.
35870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35871  if test "x$has_forbidden_chars" != x; then
35872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35876      # Going to short mode and back again did indeed matter. Since short mode is
35877      # case insensitive, let's make it lowercase to improve readability.
35878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35879      # Now convert it back to Unix-style (cygpath)
35880      input_path=`$CYGPATH -u "$shortmode_path"`
35881      new_path="$input_path"
35882    fi
35883  fi
35884
35885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35886  if test "x$test_cygdrive_prefix" = x; then
35887    # As a simple fix, exclude /usr/bin since it's not a real path.
35888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35890      # a path prefixed by /cygdrive for fixpath to work.
35891      new_path="$CYGWIN_ROOT_PATH$input_path"
35892    fi
35893  fi
35894
35895  # remove trailing .exe if any
35896  new_path="${new_path/%.exe/}"
35897
35898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35899
35900  # First separate the path from the arguments. This will split at the first
35901  # space.
35902  complete="$LD"
35903  path="${complete%% *}"
35904  tmp="$complete EOL"
35905  arguments="${tmp#* }"
35906
35907  # Input might be given as Windows format, start by converting to
35908  # unix format.
35909  new_path="$path"
35910
35911  windows_path="$new_path"
35912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35913    unix_path=`$CYGPATH -u "$windows_path"`
35914    new_path="$unix_path"
35915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35917    new_path="$unix_path"
35918  fi
35919
35920
35921  # Now try to locate executable using which
35922  new_path=`$WHICH "$new_path" 2> /dev/null`
35923
35924  if test "x$new_path" = x; then
35925    # Oops. Which didn't find the executable.
35926    # The splitting of arguments from the executable at a space might have been incorrect,
35927    # since paths with space are more likely in Windows. Give it another try with the whole
35928    # argument.
35929    path="$complete"
35930    arguments="EOL"
35931    new_path="$path"
35932
35933  windows_path="$new_path"
35934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35935    unix_path=`$CYGPATH -u "$windows_path"`
35936    new_path="$unix_path"
35937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35939    new_path="$unix_path"
35940  fi
35941
35942
35943    new_path=`$WHICH "$new_path" 2> /dev/null`
35944    # bat and cmd files are not always considered executable in MSYS causing which
35945    # to not find them
35946    if test "x$new_path" = x \
35947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35949      new_path="$path"
35950
35951  windows_path="$new_path"
35952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35953    unix_path=`$CYGPATH -u "$windows_path"`
35954    new_path="$unix_path"
35955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35957    new_path="$unix_path"
35958  fi
35959
35960    fi
35961
35962    if test "x$new_path" = x; then
35963      # It's still not found. Now this is an unrecoverable error.
35964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35965$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35966      has_space=`$ECHO "$complete" | $GREP " "`
35967      if test "x$has_space" != x; then
35968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35970      fi
35971      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35972    fi
35973  fi
35974
35975  # Now new_path has a complete unix path to the binary
35976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35977    # Keep paths in /bin as-is, but remove trailing .exe if any
35978    new_path="${new_path/%.exe/}"
35979    # Do not save /bin paths to all_fixpath_prefixes!
35980  else
35981    # Not in mixed or Windows style, start by that.
35982    new_path=`cmd //c echo $new_path`
35983
35984  input_path="$new_path"
35985  # Check if we need to convert this using DOS-style short mode. If the path
35986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35987  # take no chances and rewrite it.
35988  # Note: m4 eats our [], so we need to use [ and ] instead.
35989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35990  if test "x$has_forbidden_chars" != x; then
35991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35993  fi
35994
35995    # Output is in $new_path
35996
35997  windows_path="$new_path"
35998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35999    unix_path=`$CYGPATH -u "$windows_path"`
36000    new_path="$unix_path"
36001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36003    new_path="$unix_path"
36004  fi
36005
36006    # remove trailing .exe if any
36007    new_path="${new_path/%.exe/}"
36008
36009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36011  fi
36012
36013    else
36014      # We're on a unix platform. Hooray! :)
36015      # First separate the path from the arguments. This will split at the first
36016      # space.
36017      complete="$LD"
36018      path="${complete%% *}"
36019      tmp="$complete EOL"
36020      arguments="${tmp#* }"
36021
36022      # Cannot rely on the command "which" here since it doesn't always work.
36023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36024      if test -z "$is_absolute_path"; then
36025        # Path to executable is not absolute. Find it.
36026        IFS_save="$IFS"
36027        IFS=:
36028        for p in $PATH; do
36029          if test -f "$p/$path" && test -x "$p/$path"; then
36030            new_path="$p/$path"
36031            break
36032          fi
36033        done
36034        IFS="$IFS_save"
36035      else
36036        # This is an absolute path, we can use it without further modifications.
36037        new_path="$path"
36038      fi
36039
36040      if test "x$new_path" = x; then
36041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36042$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36043        has_space=`$ECHO "$complete" | $GREP " "`
36044        if test "x$has_space" != x; then
36045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36047        fi
36048        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36049      fi
36050    fi
36051
36052    # Now join together the path and the arguments once again
36053    if test "x$arguments" != xEOL; then
36054      new_complete="$new_path ${arguments% *}"
36055    else
36056      new_complete="$new_path"
36057    fi
36058
36059    if test "x$complete" != "x$new_complete"; then
36060      LD="$new_complete"
36061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36062$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36063    fi
36064  fi
36065
36066    # Verify that we indeed succeeded with this trick.
36067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36068$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36069    "$LD" --version > /dev/null
36070    if test $? -eq 0 ; then
36071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36072$as_echo "no" >&6; }
36073      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36074    else
36075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36076$as_echo "yes" >&6; }
36077    fi
36078    LDCXX="$LD"
36079  else
36080    # All other toolchains use the compiler to link.
36081    LD="$CC"
36082    LDCXX="$CXX"
36083  fi
36084
36085  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36086
36087
36088  #
36089  # Setup the assembler (AS)
36090  #
36091  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36092    # FIXME: should this really be solaris, or solstudio?
36093
36094
36095  # Publish this variable in the help.
36096
36097
36098  if [ -z "${AS+x}" ]; then
36099    # The variable is not set by user, try to locate tool using the code snippet
36100    for ac_prog in as
36101do
36102  # Extract the first word of "$ac_prog", so it can be a program name with args.
36103set dummy $ac_prog; ac_word=$2
36104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36105$as_echo_n "checking for $ac_word... " >&6; }
36106if ${ac_cv_path_AS+:} false; then :
36107  $as_echo_n "(cached) " >&6
36108else
36109  case $AS in
36110  [\\/]* | ?:[\\/]*)
36111  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36112  ;;
36113  *)
36114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36115for as_dir in $PATH
36116do
36117  IFS=$as_save_IFS
36118  test -z "$as_dir" && as_dir=.
36119    for ac_exec_ext in '' $ac_executable_extensions; do
36120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36121    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36123    break 2
36124  fi
36125done
36126  done
36127IFS=$as_save_IFS
36128
36129  ;;
36130esac
36131fi
36132AS=$ac_cv_path_AS
36133if test -n "$AS"; then
36134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36135$as_echo "$AS" >&6; }
36136else
36137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36138$as_echo "no" >&6; }
36139fi
36140
36141
36142  test -n "$AS" && break
36143done
36144
36145  else
36146    # The variable is set, but is it from the command line or the environment?
36147
36148    # Try to remove the string !AS! from our list.
36149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36151      # If it failed, the variable was not from the command line. Ignore it,
36152      # but warn the user (except for BASH, which is always set by the calling BASH).
36153      if test "xAS" != xBASH; then
36154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36155$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36156      fi
36157      # Try to locate tool using the code snippet
36158      for ac_prog in as
36159do
36160  # Extract the first word of "$ac_prog", so it can be a program name with args.
36161set dummy $ac_prog; ac_word=$2
36162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36163$as_echo_n "checking for $ac_word... " >&6; }
36164if ${ac_cv_path_AS+:} false; then :
36165  $as_echo_n "(cached) " >&6
36166else
36167  case $AS in
36168  [\\/]* | ?:[\\/]*)
36169  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36170  ;;
36171  *)
36172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36173for as_dir in $PATH
36174do
36175  IFS=$as_save_IFS
36176  test -z "$as_dir" && as_dir=.
36177    for ac_exec_ext in '' $ac_executable_extensions; do
36178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36179    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36181    break 2
36182  fi
36183done
36184  done
36185IFS=$as_save_IFS
36186
36187  ;;
36188esac
36189fi
36190AS=$ac_cv_path_AS
36191if test -n "$AS"; then
36192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36193$as_echo "$AS" >&6; }
36194else
36195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36196$as_echo "no" >&6; }
36197fi
36198
36199
36200  test -n "$AS" && break
36201done
36202
36203    else
36204      # If it succeeded, then it was overridden by the user. We will use it
36205      # for the tool.
36206
36207      # First remove it from the list of overridden variables, so we can test
36208      # for unknown variables in the end.
36209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36210
36211      # Check if we try to supply an empty value
36212      if test "x$AS" = x; then
36213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36214$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36216$as_echo_n "checking for AS... " >&6; }
36217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36218$as_echo "disabled" >&6; }
36219      else
36220        # Check if the provided tool contains a complete path.
36221        tool_specified="$AS"
36222        tool_basename="${tool_specified##*/}"
36223        if test "x$tool_basename" = "x$tool_specified"; then
36224          # A command without a complete path is provided, search $PATH.
36225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36226$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36227          # Extract the first word of "$tool_basename", so it can be a program name with args.
36228set dummy $tool_basename; ac_word=$2
36229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36230$as_echo_n "checking for $ac_word... " >&6; }
36231if ${ac_cv_path_AS+:} false; then :
36232  $as_echo_n "(cached) " >&6
36233else
36234  case $AS in
36235  [\\/]* | ?:[\\/]*)
36236  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36237  ;;
36238  *)
36239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36240for as_dir in $PATH
36241do
36242  IFS=$as_save_IFS
36243  test -z "$as_dir" && as_dir=.
36244    for ac_exec_ext in '' $ac_executable_extensions; do
36245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36246    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36248    break 2
36249  fi
36250done
36251  done
36252IFS=$as_save_IFS
36253
36254  ;;
36255esac
36256fi
36257AS=$ac_cv_path_AS
36258if test -n "$AS"; then
36259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36260$as_echo "$AS" >&6; }
36261else
36262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36263$as_echo "no" >&6; }
36264fi
36265
36266
36267          if test "x$AS" = x; then
36268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36269          fi
36270        else
36271          # Otherwise we believe it is a complete path. Use it as it is.
36272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36273$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36275$as_echo_n "checking for AS... " >&6; }
36276          if test ! -x "$tool_specified"; then
36277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36278$as_echo "not found" >&6; }
36279            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36280          fi
36281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36282$as_echo "$tool_specified" >&6; }
36283        fi
36284      fi
36285    fi
36286
36287  fi
36288
36289
36290
36291  # Only process if variable expands to non-empty
36292
36293  if test "x$AS" != x; then
36294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36295
36296  # First separate the path from the arguments. This will split at the first
36297  # space.
36298  complete="$AS"
36299  path="${complete%% *}"
36300  tmp="$complete EOL"
36301  arguments="${tmp#* }"
36302
36303  # Input might be given as Windows format, start by converting to
36304  # unix format.
36305  new_path=`$CYGPATH -u "$path"`
36306
36307  # Now try to locate executable using which
36308  new_path=`$WHICH "$new_path" 2> /dev/null`
36309  # bat and cmd files are not always considered executable in cygwin causing which
36310  # to not find them
36311  if test "x$new_path" = x \
36312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36314    new_path=`$CYGPATH -u "$path"`
36315  fi
36316  if test "x$new_path" = x; then
36317    # Oops. Which didn't find the executable.
36318    # The splitting of arguments from the executable at a space might have been incorrect,
36319    # since paths with space are more likely in Windows. Give it another try with the whole
36320    # argument.
36321    path="$complete"
36322    arguments="EOL"
36323    new_path=`$CYGPATH -u "$path"`
36324    new_path=`$WHICH "$new_path" 2> /dev/null`
36325    # bat and cmd files are not always considered executable in cygwin causing which
36326    # to not find them
36327    if test "x$new_path" = x \
36328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36330      new_path=`$CYGPATH -u "$path"`
36331    fi
36332    if test "x$new_path" = x; then
36333      # It's still not found. Now this is an unrecoverable error.
36334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36335$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36336      has_space=`$ECHO "$complete" | $GREP " "`
36337      if test "x$has_space" != x; then
36338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36340      fi
36341      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36342    fi
36343  fi
36344
36345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36348  # "foo.exe" is OK but "foo" is an error.
36349  #
36350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36351  # It is also a way to make sure we got the proper file name for the real test later on.
36352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36353  if test "x$test_shortpath" = x; then
36354    # Short path failed, file does not exist as specified.
36355    # Try adding .exe or .cmd
36356    if test -f "${new_path}.exe"; then
36357      input_to_shortpath="${new_path}.exe"
36358    elif test -f "${new_path}.cmd"; then
36359      input_to_shortpath="${new_path}.cmd"
36360    else
36361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36362$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36365      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36366    fi
36367  else
36368    input_to_shortpath="$new_path"
36369  fi
36370
36371  # Call helper function which possibly converts this using DOS-style short mode.
36372  # If so, the updated path is stored in $new_path.
36373  new_path="$input_to_shortpath"
36374
36375  input_path="$input_to_shortpath"
36376  # Check if we need to convert this using DOS-style short mode. If the path
36377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36378  # take no chances and rewrite it.
36379  # Note: m4 eats our [], so we need to use [ and ] instead.
36380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36381  if test "x$has_forbidden_chars" != x; then
36382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36386      # Going to short mode and back again did indeed matter. Since short mode is
36387      # case insensitive, let's make it lowercase to improve readability.
36388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36389      # Now convert it back to Unix-style (cygpath)
36390      input_path=`$CYGPATH -u "$shortmode_path"`
36391      new_path="$input_path"
36392    fi
36393  fi
36394
36395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36396  if test "x$test_cygdrive_prefix" = x; then
36397    # As a simple fix, exclude /usr/bin since it's not a real path.
36398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36400      # a path prefixed by /cygdrive for fixpath to work.
36401      new_path="$CYGWIN_ROOT_PATH$input_path"
36402    fi
36403  fi
36404
36405  # remove trailing .exe if any
36406  new_path="${new_path/%.exe/}"
36407
36408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36409
36410  # First separate the path from the arguments. This will split at the first
36411  # space.
36412  complete="$AS"
36413  path="${complete%% *}"
36414  tmp="$complete EOL"
36415  arguments="${tmp#* }"
36416
36417  # Input might be given as Windows format, start by converting to
36418  # unix format.
36419  new_path="$path"
36420
36421  windows_path="$new_path"
36422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36423    unix_path=`$CYGPATH -u "$windows_path"`
36424    new_path="$unix_path"
36425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36427    new_path="$unix_path"
36428  fi
36429
36430
36431  # Now try to locate executable using which
36432  new_path=`$WHICH "$new_path" 2> /dev/null`
36433
36434  if test "x$new_path" = x; then
36435    # Oops. Which didn't find the executable.
36436    # The splitting of arguments from the executable at a space might have been incorrect,
36437    # since paths with space are more likely in Windows. Give it another try with the whole
36438    # argument.
36439    path="$complete"
36440    arguments="EOL"
36441    new_path="$path"
36442
36443  windows_path="$new_path"
36444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36445    unix_path=`$CYGPATH -u "$windows_path"`
36446    new_path="$unix_path"
36447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36449    new_path="$unix_path"
36450  fi
36451
36452
36453    new_path=`$WHICH "$new_path" 2> /dev/null`
36454    # bat and cmd files are not always considered executable in MSYS causing which
36455    # to not find them
36456    if test "x$new_path" = x \
36457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36459      new_path="$path"
36460
36461  windows_path="$new_path"
36462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36463    unix_path=`$CYGPATH -u "$windows_path"`
36464    new_path="$unix_path"
36465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36467    new_path="$unix_path"
36468  fi
36469
36470    fi
36471
36472    if test "x$new_path" = x; then
36473      # It's still not found. Now this is an unrecoverable error.
36474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36475$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36476      has_space=`$ECHO "$complete" | $GREP " "`
36477      if test "x$has_space" != x; then
36478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36480      fi
36481      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36482    fi
36483  fi
36484
36485  # Now new_path has a complete unix path to the binary
36486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36487    # Keep paths in /bin as-is, but remove trailing .exe if any
36488    new_path="${new_path/%.exe/}"
36489    # Do not save /bin paths to all_fixpath_prefixes!
36490  else
36491    # Not in mixed or Windows style, start by that.
36492    new_path=`cmd //c echo $new_path`
36493
36494  input_path="$new_path"
36495  # Check if we need to convert this using DOS-style short mode. If the path
36496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36497  # take no chances and rewrite it.
36498  # Note: m4 eats our [], so we need to use [ and ] instead.
36499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36500  if test "x$has_forbidden_chars" != x; then
36501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36503  fi
36504
36505    # Output is in $new_path
36506
36507  windows_path="$new_path"
36508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36509    unix_path=`$CYGPATH -u "$windows_path"`
36510    new_path="$unix_path"
36511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36513    new_path="$unix_path"
36514  fi
36515
36516    # remove trailing .exe if any
36517    new_path="${new_path/%.exe/}"
36518
36519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36521  fi
36522
36523    else
36524      # We're on a unix platform. Hooray! :)
36525      # First separate the path from the arguments. This will split at the first
36526      # space.
36527      complete="$AS"
36528      path="${complete%% *}"
36529      tmp="$complete EOL"
36530      arguments="${tmp#* }"
36531
36532      # Cannot rely on the command "which" here since it doesn't always work.
36533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36534      if test -z "$is_absolute_path"; then
36535        # Path to executable is not absolute. Find it.
36536        IFS_save="$IFS"
36537        IFS=:
36538        for p in $PATH; do
36539          if test -f "$p/$path" && test -x "$p/$path"; then
36540            new_path="$p/$path"
36541            break
36542          fi
36543        done
36544        IFS="$IFS_save"
36545      else
36546        # This is an absolute path, we can use it without further modifications.
36547        new_path="$path"
36548      fi
36549
36550      if test "x$new_path" = x; then
36551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36552$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36553        has_space=`$ECHO "$complete" | $GREP " "`
36554        if test "x$has_space" != x; then
36555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36557        fi
36558        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36559      fi
36560    fi
36561
36562    # Now join together the path and the arguments once again
36563    if test "x$arguments" != xEOL; then
36564      new_complete="$new_path ${arguments% *}"
36565    else
36566      new_complete="$new_path"
36567    fi
36568
36569    if test "x$complete" != "x$new_complete"; then
36570      AS="$new_complete"
36571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36572$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36573    fi
36574  fi
36575
36576  else
36577    # FIXME: is this correct for microsoft?
36578    AS="$CC -c"
36579  fi
36580
36581
36582  #
36583  # Setup the archiver (AR)
36584  #
36585  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36586    # The corresponding ar tool is lib.exe (used to create static libraries)
36587    # Extract the first word of "lib", so it can be a program name with args.
36588set dummy lib; ac_word=$2
36589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36590$as_echo_n "checking for $ac_word... " >&6; }
36591if ${ac_cv_prog_AR+:} false; then :
36592  $as_echo_n "(cached) " >&6
36593else
36594  if test -n "$AR"; then
36595  ac_cv_prog_AR="$AR" # Let the user override the test.
36596else
36597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36598for as_dir in $PATH
36599do
36600  IFS=$as_save_IFS
36601  test -z "$as_dir" && as_dir=.
36602    for ac_exec_ext in '' $ac_executable_extensions; do
36603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36604    ac_cv_prog_AR="lib"
36605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36606    break 2
36607  fi
36608done
36609  done
36610IFS=$as_save_IFS
36611
36612fi
36613fi
36614AR=$ac_cv_prog_AR
36615if test -n "$AR"; then
36616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36617$as_echo "$AR" >&6; }
36618else
36619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36620$as_echo "no" >&6; }
36621fi
36622
36623
36624  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36625
36626
36627  # Publish this variable in the help.
36628
36629
36630  if [ -z "${AR+x}" ]; then
36631    # The variable is not set by user, try to locate tool using the code snippet
36632    if test -n "$ac_tool_prefix"; then
36633  for ac_prog in ar gcc-ar
36634  do
36635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36638$as_echo_n "checking for $ac_word... " >&6; }
36639if ${ac_cv_prog_AR+:} false; then :
36640  $as_echo_n "(cached) " >&6
36641else
36642  if test -n "$AR"; then
36643  ac_cv_prog_AR="$AR" # Let the user override the test.
36644else
36645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36646for as_dir in $PATH
36647do
36648  IFS=$as_save_IFS
36649  test -z "$as_dir" && as_dir=.
36650    for ac_exec_ext in '' $ac_executable_extensions; do
36651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36652    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36654    break 2
36655  fi
36656done
36657  done
36658IFS=$as_save_IFS
36659
36660fi
36661fi
36662AR=$ac_cv_prog_AR
36663if test -n "$AR"; then
36664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36665$as_echo "$AR" >&6; }
36666else
36667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36668$as_echo "no" >&6; }
36669fi
36670
36671
36672    test -n "$AR" && break
36673  done
36674fi
36675if test -z "$AR"; then
36676  ac_ct_AR=$AR
36677  for ac_prog in ar gcc-ar
36678do
36679  # Extract the first word of "$ac_prog", so it can be a program name with args.
36680set dummy $ac_prog; ac_word=$2
36681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36682$as_echo_n "checking for $ac_word... " >&6; }
36683if ${ac_cv_prog_ac_ct_AR+:} false; then :
36684  $as_echo_n "(cached) " >&6
36685else
36686  if test -n "$ac_ct_AR"; then
36687  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36688else
36689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36690for as_dir in $PATH
36691do
36692  IFS=$as_save_IFS
36693  test -z "$as_dir" && as_dir=.
36694    for ac_exec_ext in '' $ac_executable_extensions; do
36695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36696    ac_cv_prog_ac_ct_AR="$ac_prog"
36697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36698    break 2
36699  fi
36700done
36701  done
36702IFS=$as_save_IFS
36703
36704fi
36705fi
36706ac_ct_AR=$ac_cv_prog_ac_ct_AR
36707if test -n "$ac_ct_AR"; then
36708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36709$as_echo "$ac_ct_AR" >&6; }
36710else
36711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36712$as_echo "no" >&6; }
36713fi
36714
36715
36716  test -n "$ac_ct_AR" && break
36717done
36718
36719  if test "x$ac_ct_AR" = x; then
36720    AR=""
36721  else
36722    case $cross_compiling:$ac_tool_warned in
36723yes:)
36724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36726ac_tool_warned=yes ;;
36727esac
36728    AR=$ac_ct_AR
36729  fi
36730fi
36731
36732  else
36733    # The variable is set, but is it from the command line or the environment?
36734
36735    # Try to remove the string !AR! from our list.
36736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36738      # If it failed, the variable was not from the command line. Ignore it,
36739      # but warn the user (except for BASH, which is always set by the calling BASH).
36740      if test "xAR" != xBASH; then
36741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36742$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36743      fi
36744      # Try to locate tool using the code snippet
36745      if test -n "$ac_tool_prefix"; then
36746  for ac_prog in ar gcc-ar
36747  do
36748    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36749set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36751$as_echo_n "checking for $ac_word... " >&6; }
36752if ${ac_cv_prog_AR+:} false; then :
36753  $as_echo_n "(cached) " >&6
36754else
36755  if test -n "$AR"; then
36756  ac_cv_prog_AR="$AR" # Let the user override the test.
36757else
36758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36759for as_dir in $PATH
36760do
36761  IFS=$as_save_IFS
36762  test -z "$as_dir" && as_dir=.
36763    for ac_exec_ext in '' $ac_executable_extensions; do
36764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36765    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36767    break 2
36768  fi
36769done
36770  done
36771IFS=$as_save_IFS
36772
36773fi
36774fi
36775AR=$ac_cv_prog_AR
36776if test -n "$AR"; then
36777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36778$as_echo "$AR" >&6; }
36779else
36780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36781$as_echo "no" >&6; }
36782fi
36783
36784
36785    test -n "$AR" && break
36786  done
36787fi
36788if test -z "$AR"; then
36789  ac_ct_AR=$AR
36790  for ac_prog in ar gcc-ar
36791do
36792  # Extract the first word of "$ac_prog", so it can be a program name with args.
36793set dummy $ac_prog; ac_word=$2
36794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36795$as_echo_n "checking for $ac_word... " >&6; }
36796if ${ac_cv_prog_ac_ct_AR+:} false; then :
36797  $as_echo_n "(cached) " >&6
36798else
36799  if test -n "$ac_ct_AR"; then
36800  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36801else
36802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36803for as_dir in $PATH
36804do
36805  IFS=$as_save_IFS
36806  test -z "$as_dir" && as_dir=.
36807    for ac_exec_ext in '' $ac_executable_extensions; do
36808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36809    ac_cv_prog_ac_ct_AR="$ac_prog"
36810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36811    break 2
36812  fi
36813done
36814  done
36815IFS=$as_save_IFS
36816
36817fi
36818fi
36819ac_ct_AR=$ac_cv_prog_ac_ct_AR
36820if test -n "$ac_ct_AR"; then
36821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36822$as_echo "$ac_ct_AR" >&6; }
36823else
36824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36825$as_echo "no" >&6; }
36826fi
36827
36828
36829  test -n "$ac_ct_AR" && break
36830done
36831
36832  if test "x$ac_ct_AR" = x; then
36833    AR=""
36834  else
36835    case $cross_compiling:$ac_tool_warned in
36836yes:)
36837{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36838$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36839ac_tool_warned=yes ;;
36840esac
36841    AR=$ac_ct_AR
36842  fi
36843fi
36844
36845    else
36846      # If it succeeded, then it was overridden by the user. We will use it
36847      # for the tool.
36848
36849      # First remove it from the list of overridden variables, so we can test
36850      # for unknown variables in the end.
36851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36852
36853      # Check if we try to supply an empty value
36854      if test "x$AR" = x; then
36855        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36856$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36858$as_echo_n "checking for AR... " >&6; }
36859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36860$as_echo "disabled" >&6; }
36861      else
36862        # Check if the provided tool contains a complete path.
36863        tool_specified="$AR"
36864        tool_basename="${tool_specified##*/}"
36865        if test "x$tool_basename" = "x$tool_specified"; then
36866          # A command without a complete path is provided, search $PATH.
36867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36868$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36869          # Extract the first word of "$tool_basename", so it can be a program name with args.
36870set dummy $tool_basename; ac_word=$2
36871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36872$as_echo_n "checking for $ac_word... " >&6; }
36873if ${ac_cv_path_AR+:} false; then :
36874  $as_echo_n "(cached) " >&6
36875else
36876  case $AR in
36877  [\\/]* | ?:[\\/]*)
36878  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36879  ;;
36880  *)
36881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36882for as_dir in $PATH
36883do
36884  IFS=$as_save_IFS
36885  test -z "$as_dir" && as_dir=.
36886    for ac_exec_ext in '' $ac_executable_extensions; do
36887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36888    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36890    break 2
36891  fi
36892done
36893  done
36894IFS=$as_save_IFS
36895
36896  ;;
36897esac
36898fi
36899AR=$ac_cv_path_AR
36900if test -n "$AR"; then
36901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36902$as_echo "$AR" >&6; }
36903else
36904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36905$as_echo "no" >&6; }
36906fi
36907
36908
36909          if test "x$AR" = x; then
36910            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36911          fi
36912        else
36913          # Otherwise we believe it is a complete path. Use it as it is.
36914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36915$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36916          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36917$as_echo_n "checking for AR... " >&6; }
36918          if test ! -x "$tool_specified"; then
36919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36920$as_echo "not found" >&6; }
36921            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36922          fi
36923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36924$as_echo "$tool_specified" >&6; }
36925        fi
36926      fi
36927    fi
36928
36929  fi
36930
36931
36932  else
36933
36934
36935  # Publish this variable in the help.
36936
36937
36938  if [ -z "${AR+x}" ]; then
36939    # The variable is not set by user, try to locate tool using the code snippet
36940    if test -n "$ac_tool_prefix"; then
36941  for ac_prog in ar
36942  do
36943    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36946$as_echo_n "checking for $ac_word... " >&6; }
36947if ${ac_cv_prog_AR+:} false; then :
36948  $as_echo_n "(cached) " >&6
36949else
36950  if test -n "$AR"; then
36951  ac_cv_prog_AR="$AR" # Let the user override the test.
36952else
36953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36954for as_dir in $PATH
36955do
36956  IFS=$as_save_IFS
36957  test -z "$as_dir" && as_dir=.
36958    for ac_exec_ext in '' $ac_executable_extensions; do
36959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36960    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36962    break 2
36963  fi
36964done
36965  done
36966IFS=$as_save_IFS
36967
36968fi
36969fi
36970AR=$ac_cv_prog_AR
36971if test -n "$AR"; then
36972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36973$as_echo "$AR" >&6; }
36974else
36975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36976$as_echo "no" >&6; }
36977fi
36978
36979
36980    test -n "$AR" && break
36981  done
36982fi
36983if test -z "$AR"; then
36984  ac_ct_AR=$AR
36985  for ac_prog in ar
36986do
36987  # Extract the first word of "$ac_prog", so it can be a program name with args.
36988set dummy $ac_prog; ac_word=$2
36989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36990$as_echo_n "checking for $ac_word... " >&6; }
36991if ${ac_cv_prog_ac_ct_AR+:} false; then :
36992  $as_echo_n "(cached) " >&6
36993else
36994  if test -n "$ac_ct_AR"; then
36995  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36996else
36997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36998for as_dir in $PATH
36999do
37000  IFS=$as_save_IFS
37001  test -z "$as_dir" && as_dir=.
37002    for ac_exec_ext in '' $ac_executable_extensions; do
37003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37004    ac_cv_prog_ac_ct_AR="$ac_prog"
37005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37006    break 2
37007  fi
37008done
37009  done
37010IFS=$as_save_IFS
37011
37012fi
37013fi
37014ac_ct_AR=$ac_cv_prog_ac_ct_AR
37015if test -n "$ac_ct_AR"; then
37016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37017$as_echo "$ac_ct_AR" >&6; }
37018else
37019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37020$as_echo "no" >&6; }
37021fi
37022
37023
37024  test -n "$ac_ct_AR" && break
37025done
37026
37027  if test "x$ac_ct_AR" = x; then
37028    AR=""
37029  else
37030    case $cross_compiling:$ac_tool_warned in
37031yes:)
37032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37034ac_tool_warned=yes ;;
37035esac
37036    AR=$ac_ct_AR
37037  fi
37038fi
37039
37040  else
37041    # The variable is set, but is it from the command line or the environment?
37042
37043    # Try to remove the string !AR! from our list.
37044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37046      # If it failed, the variable was not from the command line. Ignore it,
37047      # but warn the user (except for BASH, which is always set by the calling BASH).
37048      if test "xAR" != xBASH; then
37049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37050$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37051      fi
37052      # Try to locate tool using the code snippet
37053      if test -n "$ac_tool_prefix"; then
37054  for ac_prog in ar
37055  do
37056    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37057set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37059$as_echo_n "checking for $ac_word... " >&6; }
37060if ${ac_cv_prog_AR+:} false; then :
37061  $as_echo_n "(cached) " >&6
37062else
37063  if test -n "$AR"; then
37064  ac_cv_prog_AR="$AR" # Let the user override the test.
37065else
37066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37067for as_dir in $PATH
37068do
37069  IFS=$as_save_IFS
37070  test -z "$as_dir" && as_dir=.
37071    for ac_exec_ext in '' $ac_executable_extensions; do
37072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37073    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37075    break 2
37076  fi
37077done
37078  done
37079IFS=$as_save_IFS
37080
37081fi
37082fi
37083AR=$ac_cv_prog_AR
37084if test -n "$AR"; then
37085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37086$as_echo "$AR" >&6; }
37087else
37088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37089$as_echo "no" >&6; }
37090fi
37091
37092
37093    test -n "$AR" && break
37094  done
37095fi
37096if test -z "$AR"; then
37097  ac_ct_AR=$AR
37098  for ac_prog in ar
37099do
37100  # Extract the first word of "$ac_prog", so it can be a program name with args.
37101set dummy $ac_prog; ac_word=$2
37102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37103$as_echo_n "checking for $ac_word... " >&6; }
37104if ${ac_cv_prog_ac_ct_AR+:} false; then :
37105  $as_echo_n "(cached) " >&6
37106else
37107  if test -n "$ac_ct_AR"; then
37108  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37109else
37110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37111for as_dir in $PATH
37112do
37113  IFS=$as_save_IFS
37114  test -z "$as_dir" && as_dir=.
37115    for ac_exec_ext in '' $ac_executable_extensions; do
37116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37117    ac_cv_prog_ac_ct_AR="$ac_prog"
37118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37119    break 2
37120  fi
37121done
37122  done
37123IFS=$as_save_IFS
37124
37125fi
37126fi
37127ac_ct_AR=$ac_cv_prog_ac_ct_AR
37128if test -n "$ac_ct_AR"; then
37129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37130$as_echo "$ac_ct_AR" >&6; }
37131else
37132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37133$as_echo "no" >&6; }
37134fi
37135
37136
37137  test -n "$ac_ct_AR" && break
37138done
37139
37140  if test "x$ac_ct_AR" = x; then
37141    AR=""
37142  else
37143    case $cross_compiling:$ac_tool_warned in
37144yes:)
37145{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37146$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37147ac_tool_warned=yes ;;
37148esac
37149    AR=$ac_ct_AR
37150  fi
37151fi
37152
37153    else
37154      # If it succeeded, then it was overridden by the user. We will use it
37155      # for the tool.
37156
37157      # First remove it from the list of overridden variables, so we can test
37158      # for unknown variables in the end.
37159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37160
37161      # Check if we try to supply an empty value
37162      if test "x$AR" = x; then
37163        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37164$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37166$as_echo_n "checking for AR... " >&6; }
37167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37168$as_echo "disabled" >&6; }
37169      else
37170        # Check if the provided tool contains a complete path.
37171        tool_specified="$AR"
37172        tool_basename="${tool_specified##*/}"
37173        if test "x$tool_basename" = "x$tool_specified"; then
37174          # A command without a complete path is provided, search $PATH.
37175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37176$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37177          # Extract the first word of "$tool_basename", so it can be a program name with args.
37178set dummy $tool_basename; ac_word=$2
37179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180$as_echo_n "checking for $ac_word... " >&6; }
37181if ${ac_cv_path_AR+:} false; then :
37182  $as_echo_n "(cached) " >&6
37183else
37184  case $AR in
37185  [\\/]* | ?:[\\/]*)
37186  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37187  ;;
37188  *)
37189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37190for as_dir in $PATH
37191do
37192  IFS=$as_save_IFS
37193  test -z "$as_dir" && as_dir=.
37194    for ac_exec_ext in '' $ac_executable_extensions; do
37195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37196    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198    break 2
37199  fi
37200done
37201  done
37202IFS=$as_save_IFS
37203
37204  ;;
37205esac
37206fi
37207AR=$ac_cv_path_AR
37208if test -n "$AR"; then
37209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37210$as_echo "$AR" >&6; }
37211else
37212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37213$as_echo "no" >&6; }
37214fi
37215
37216
37217          if test "x$AR" = x; then
37218            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37219          fi
37220        else
37221          # Otherwise we believe it is a complete path. Use it as it is.
37222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37223$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37224          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37225$as_echo_n "checking for AR... " >&6; }
37226          if test ! -x "$tool_specified"; then
37227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37228$as_echo "not found" >&6; }
37229            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37230          fi
37231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37232$as_echo "$tool_specified" >&6; }
37233        fi
37234      fi
37235    fi
37236
37237  fi
37238
37239
37240  fi
37241
37242  # Only process if variable expands to non-empty
37243
37244  if test "x$AR" != x; then
37245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37246
37247  # First separate the path from the arguments. This will split at the first
37248  # space.
37249  complete="$AR"
37250  path="${complete%% *}"
37251  tmp="$complete EOL"
37252  arguments="${tmp#* }"
37253
37254  # Input might be given as Windows format, start by converting to
37255  # unix format.
37256  new_path=`$CYGPATH -u "$path"`
37257
37258  # Now try to locate executable using which
37259  new_path=`$WHICH "$new_path" 2> /dev/null`
37260  # bat and cmd files are not always considered executable in cygwin causing which
37261  # to not find them
37262  if test "x$new_path" = x \
37263      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37264      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37265    new_path=`$CYGPATH -u "$path"`
37266  fi
37267  if test "x$new_path" = x; then
37268    # Oops. Which didn't find the executable.
37269    # The splitting of arguments from the executable at a space might have been incorrect,
37270    # since paths with space are more likely in Windows. Give it another try with the whole
37271    # argument.
37272    path="$complete"
37273    arguments="EOL"
37274    new_path=`$CYGPATH -u "$path"`
37275    new_path=`$WHICH "$new_path" 2> /dev/null`
37276    # bat and cmd files are not always considered executable in cygwin causing which
37277    # to not find them
37278    if test "x$new_path" = x \
37279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37281      new_path=`$CYGPATH -u "$path"`
37282    fi
37283    if test "x$new_path" = x; then
37284      # It's still not found. Now this is an unrecoverable error.
37285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37286$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37287      has_space=`$ECHO "$complete" | $GREP " "`
37288      if test "x$has_space" != x; then
37289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37291      fi
37292      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37293    fi
37294  fi
37295
37296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37299  # "foo.exe" is OK but "foo" is an error.
37300  #
37301  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37302  # It is also a way to make sure we got the proper file name for the real test later on.
37303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37304  if test "x$test_shortpath" = x; then
37305    # Short path failed, file does not exist as specified.
37306    # Try adding .exe or .cmd
37307    if test -f "${new_path}.exe"; then
37308      input_to_shortpath="${new_path}.exe"
37309    elif test -f "${new_path}.cmd"; then
37310      input_to_shortpath="${new_path}.cmd"
37311    else
37312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37313$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37316      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37317    fi
37318  else
37319    input_to_shortpath="$new_path"
37320  fi
37321
37322  # Call helper function which possibly converts this using DOS-style short mode.
37323  # If so, the updated path is stored in $new_path.
37324  new_path="$input_to_shortpath"
37325
37326  input_path="$input_to_shortpath"
37327  # Check if we need to convert this using DOS-style short mode. If the path
37328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37329  # take no chances and rewrite it.
37330  # Note: m4 eats our [], so we need to use [ and ] instead.
37331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37332  if test "x$has_forbidden_chars" != x; then
37333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37337      # Going to short mode and back again did indeed matter. Since short mode is
37338      # case insensitive, let's make it lowercase to improve readability.
37339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37340      # Now convert it back to Unix-style (cygpath)
37341      input_path=`$CYGPATH -u "$shortmode_path"`
37342      new_path="$input_path"
37343    fi
37344  fi
37345
37346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37347  if test "x$test_cygdrive_prefix" = x; then
37348    # As a simple fix, exclude /usr/bin since it's not a real path.
37349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37351      # a path prefixed by /cygdrive for fixpath to work.
37352      new_path="$CYGWIN_ROOT_PATH$input_path"
37353    fi
37354  fi
37355
37356  # remove trailing .exe if any
37357  new_path="${new_path/%.exe/}"
37358
37359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37360
37361  # First separate the path from the arguments. This will split at the first
37362  # space.
37363  complete="$AR"
37364  path="${complete%% *}"
37365  tmp="$complete EOL"
37366  arguments="${tmp#* }"
37367
37368  # Input might be given as Windows format, start by converting to
37369  # unix format.
37370  new_path="$path"
37371
37372  windows_path="$new_path"
37373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37374    unix_path=`$CYGPATH -u "$windows_path"`
37375    new_path="$unix_path"
37376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37378    new_path="$unix_path"
37379  fi
37380
37381
37382  # Now try to locate executable using which
37383  new_path=`$WHICH "$new_path" 2> /dev/null`
37384
37385  if test "x$new_path" = x; then
37386    # Oops. Which didn't find the executable.
37387    # The splitting of arguments from the executable at a space might have been incorrect,
37388    # since paths with space are more likely in Windows. Give it another try with the whole
37389    # argument.
37390    path="$complete"
37391    arguments="EOL"
37392    new_path="$path"
37393
37394  windows_path="$new_path"
37395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37396    unix_path=`$CYGPATH -u "$windows_path"`
37397    new_path="$unix_path"
37398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37400    new_path="$unix_path"
37401  fi
37402
37403
37404    new_path=`$WHICH "$new_path" 2> /dev/null`
37405    # bat and cmd files are not always considered executable in MSYS causing which
37406    # to not find them
37407    if test "x$new_path" = x \
37408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37410      new_path="$path"
37411
37412  windows_path="$new_path"
37413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37414    unix_path=`$CYGPATH -u "$windows_path"`
37415    new_path="$unix_path"
37416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37418    new_path="$unix_path"
37419  fi
37420
37421    fi
37422
37423    if test "x$new_path" = x; then
37424      # It's still not found. Now this is an unrecoverable error.
37425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37426$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37427      has_space=`$ECHO "$complete" | $GREP " "`
37428      if test "x$has_space" != x; then
37429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37431      fi
37432      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37433    fi
37434  fi
37435
37436  # Now new_path has a complete unix path to the binary
37437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37438    # Keep paths in /bin as-is, but remove trailing .exe if any
37439    new_path="${new_path/%.exe/}"
37440    # Do not save /bin paths to all_fixpath_prefixes!
37441  else
37442    # Not in mixed or Windows style, start by that.
37443    new_path=`cmd //c echo $new_path`
37444
37445  input_path="$new_path"
37446  # Check if we need to convert this using DOS-style short mode. If the path
37447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37448  # take no chances and rewrite it.
37449  # Note: m4 eats our [], so we need to use [ and ] instead.
37450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37451  if test "x$has_forbidden_chars" != x; then
37452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37454  fi
37455
37456    # Output is in $new_path
37457
37458  windows_path="$new_path"
37459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37460    unix_path=`$CYGPATH -u "$windows_path"`
37461    new_path="$unix_path"
37462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37464    new_path="$unix_path"
37465  fi
37466
37467    # remove trailing .exe if any
37468    new_path="${new_path/%.exe/}"
37469
37470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37472  fi
37473
37474    else
37475      # We're on a unix platform. Hooray! :)
37476      # First separate the path from the arguments. This will split at the first
37477      # space.
37478      complete="$AR"
37479      path="${complete%% *}"
37480      tmp="$complete EOL"
37481      arguments="${tmp#* }"
37482
37483      # Cannot rely on the command "which" here since it doesn't always work.
37484      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37485      if test -z "$is_absolute_path"; then
37486        # Path to executable is not absolute. Find it.
37487        IFS_save="$IFS"
37488        IFS=:
37489        for p in $PATH; do
37490          if test -f "$p/$path" && test -x "$p/$path"; then
37491            new_path="$p/$path"
37492            break
37493          fi
37494        done
37495        IFS="$IFS_save"
37496      else
37497        # This is an absolute path, we can use it without further modifications.
37498        new_path="$path"
37499      fi
37500
37501      if test "x$new_path" = x; then
37502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37503$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37504        has_space=`$ECHO "$complete" | $GREP " "`
37505        if test "x$has_space" != x; then
37506          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37508        fi
37509        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37510      fi
37511    fi
37512
37513    # Now join together the path and the arguments once again
37514    if test "x$arguments" != xEOL; then
37515      new_complete="$new_path ${arguments% *}"
37516    else
37517      new_complete="$new_path"
37518    fi
37519
37520    if test "x$complete" != "x$new_complete"; then
37521      AR="$new_complete"
37522      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37523$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37524    fi
37525  fi
37526
37527
37528
37529  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37530
37531
37532  # Publish this variable in the help.
37533
37534
37535  if [ -z "${LIPO+x}" ]; then
37536    # The variable is not set by user, try to locate tool using the code snippet
37537    for ac_prog in lipo
37538do
37539  # Extract the first word of "$ac_prog", so it can be a program name with args.
37540set dummy $ac_prog; ac_word=$2
37541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37542$as_echo_n "checking for $ac_word... " >&6; }
37543if ${ac_cv_path_LIPO+:} false; then :
37544  $as_echo_n "(cached) " >&6
37545else
37546  case $LIPO in
37547  [\\/]* | ?:[\\/]*)
37548  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37549  ;;
37550  *)
37551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37552for as_dir in $PATH
37553do
37554  IFS=$as_save_IFS
37555  test -z "$as_dir" && as_dir=.
37556    for ac_exec_ext in '' $ac_executable_extensions; do
37557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37558    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37560    break 2
37561  fi
37562done
37563  done
37564IFS=$as_save_IFS
37565
37566  ;;
37567esac
37568fi
37569LIPO=$ac_cv_path_LIPO
37570if test -n "$LIPO"; then
37571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37572$as_echo "$LIPO" >&6; }
37573else
37574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37575$as_echo "no" >&6; }
37576fi
37577
37578
37579  test -n "$LIPO" && break
37580done
37581
37582  else
37583    # The variable is set, but is it from the command line or the environment?
37584
37585    # Try to remove the string !LIPO! from our list.
37586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37588      # If it failed, the variable was not from the command line. Ignore it,
37589      # but warn the user (except for BASH, which is always set by the calling BASH).
37590      if test "xLIPO" != xBASH; then
37591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37592$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37593      fi
37594      # Try to locate tool using the code snippet
37595      for ac_prog in lipo
37596do
37597  # Extract the first word of "$ac_prog", so it can be a program name with args.
37598set dummy $ac_prog; ac_word=$2
37599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37600$as_echo_n "checking for $ac_word... " >&6; }
37601if ${ac_cv_path_LIPO+:} false; then :
37602  $as_echo_n "(cached) " >&6
37603else
37604  case $LIPO in
37605  [\\/]* | ?:[\\/]*)
37606  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37607  ;;
37608  *)
37609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37610for as_dir in $PATH
37611do
37612  IFS=$as_save_IFS
37613  test -z "$as_dir" && as_dir=.
37614    for ac_exec_ext in '' $ac_executable_extensions; do
37615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37616    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37618    break 2
37619  fi
37620done
37621  done
37622IFS=$as_save_IFS
37623
37624  ;;
37625esac
37626fi
37627LIPO=$ac_cv_path_LIPO
37628if test -n "$LIPO"; then
37629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37630$as_echo "$LIPO" >&6; }
37631else
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37633$as_echo "no" >&6; }
37634fi
37635
37636
37637  test -n "$LIPO" && break
37638done
37639
37640    else
37641      # If it succeeded, then it was overridden by the user. We will use it
37642      # for the tool.
37643
37644      # First remove it from the list of overridden variables, so we can test
37645      # for unknown variables in the end.
37646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37647
37648      # Check if we try to supply an empty value
37649      if test "x$LIPO" = x; then
37650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37651$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37653$as_echo_n "checking for LIPO... " >&6; }
37654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37655$as_echo "disabled" >&6; }
37656      else
37657        # Check if the provided tool contains a complete path.
37658        tool_specified="$LIPO"
37659        tool_basename="${tool_specified##*/}"
37660        if test "x$tool_basename" = "x$tool_specified"; then
37661          # A command without a complete path is provided, search $PATH.
37662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37663$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37664          # Extract the first word of "$tool_basename", so it can be a program name with args.
37665set dummy $tool_basename; ac_word=$2
37666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37667$as_echo_n "checking for $ac_word... " >&6; }
37668if ${ac_cv_path_LIPO+:} false; then :
37669  $as_echo_n "(cached) " >&6
37670else
37671  case $LIPO in
37672  [\\/]* | ?:[\\/]*)
37673  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37674  ;;
37675  *)
37676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37677for as_dir in $PATH
37678do
37679  IFS=$as_save_IFS
37680  test -z "$as_dir" && as_dir=.
37681    for ac_exec_ext in '' $ac_executable_extensions; do
37682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37683    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37685    break 2
37686  fi
37687done
37688  done
37689IFS=$as_save_IFS
37690
37691  ;;
37692esac
37693fi
37694LIPO=$ac_cv_path_LIPO
37695if test -n "$LIPO"; then
37696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37697$as_echo "$LIPO" >&6; }
37698else
37699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37700$as_echo "no" >&6; }
37701fi
37702
37703
37704          if test "x$LIPO" = x; then
37705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37706          fi
37707        else
37708          # Otherwise we believe it is a complete path. Use it as it is.
37709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37710$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37712$as_echo_n "checking for LIPO... " >&6; }
37713          if test ! -x "$tool_specified"; then
37714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37715$as_echo "not found" >&6; }
37716            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37717          fi
37718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37719$as_echo "$tool_specified" >&6; }
37720        fi
37721      fi
37722    fi
37723
37724  fi
37725
37726
37727
37728  # Only process if variable expands to non-empty
37729
37730  if test "x$LIPO" != x; then
37731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37732
37733  # First separate the path from the arguments. This will split at the first
37734  # space.
37735  complete="$LIPO"
37736  path="${complete%% *}"
37737  tmp="$complete EOL"
37738  arguments="${tmp#* }"
37739
37740  # Input might be given as Windows format, start by converting to
37741  # unix format.
37742  new_path=`$CYGPATH -u "$path"`
37743
37744  # Now try to locate executable using which
37745  new_path=`$WHICH "$new_path" 2> /dev/null`
37746  # bat and cmd files are not always considered executable in cygwin causing which
37747  # to not find them
37748  if test "x$new_path" = x \
37749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37751    new_path=`$CYGPATH -u "$path"`
37752  fi
37753  if test "x$new_path" = x; then
37754    # Oops. Which didn't find the executable.
37755    # The splitting of arguments from the executable at a space might have been incorrect,
37756    # since paths with space are more likely in Windows. Give it another try with the whole
37757    # argument.
37758    path="$complete"
37759    arguments="EOL"
37760    new_path=`$CYGPATH -u "$path"`
37761    new_path=`$WHICH "$new_path" 2> /dev/null`
37762    # bat and cmd files are not always considered executable in cygwin causing which
37763    # to not find them
37764    if test "x$new_path" = x \
37765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37767      new_path=`$CYGPATH -u "$path"`
37768    fi
37769    if test "x$new_path" = x; then
37770      # It's still not found. Now this is an unrecoverable error.
37771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37772$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37773      has_space=`$ECHO "$complete" | $GREP " "`
37774      if test "x$has_space" != x; then
37775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37777      fi
37778      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37779    fi
37780  fi
37781
37782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37785  # "foo.exe" is OK but "foo" is an error.
37786  #
37787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37788  # It is also a way to make sure we got the proper file name for the real test later on.
37789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37790  if test "x$test_shortpath" = x; then
37791    # Short path failed, file does not exist as specified.
37792    # Try adding .exe or .cmd
37793    if test -f "${new_path}.exe"; then
37794      input_to_shortpath="${new_path}.exe"
37795    elif test -f "${new_path}.cmd"; then
37796      input_to_shortpath="${new_path}.cmd"
37797    else
37798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37799$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37802      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37803    fi
37804  else
37805    input_to_shortpath="$new_path"
37806  fi
37807
37808  # Call helper function which possibly converts this using DOS-style short mode.
37809  # If so, the updated path is stored in $new_path.
37810  new_path="$input_to_shortpath"
37811
37812  input_path="$input_to_shortpath"
37813  # Check if we need to convert this using DOS-style short mode. If the path
37814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37815  # take no chances and rewrite it.
37816  # Note: m4 eats our [], so we need to use [ and ] instead.
37817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37818  if test "x$has_forbidden_chars" != x; then
37819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37823      # Going to short mode and back again did indeed matter. Since short mode is
37824      # case insensitive, let's make it lowercase to improve readability.
37825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37826      # Now convert it back to Unix-style (cygpath)
37827      input_path=`$CYGPATH -u "$shortmode_path"`
37828      new_path="$input_path"
37829    fi
37830  fi
37831
37832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37833  if test "x$test_cygdrive_prefix" = x; then
37834    # As a simple fix, exclude /usr/bin since it's not a real path.
37835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37837      # a path prefixed by /cygdrive for fixpath to work.
37838      new_path="$CYGWIN_ROOT_PATH$input_path"
37839    fi
37840  fi
37841
37842  # remove trailing .exe if any
37843  new_path="${new_path/%.exe/}"
37844
37845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37846
37847  # First separate the path from the arguments. This will split at the first
37848  # space.
37849  complete="$LIPO"
37850  path="${complete%% *}"
37851  tmp="$complete EOL"
37852  arguments="${tmp#* }"
37853
37854  # Input might be given as Windows format, start by converting to
37855  # unix format.
37856  new_path="$path"
37857
37858  windows_path="$new_path"
37859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37860    unix_path=`$CYGPATH -u "$windows_path"`
37861    new_path="$unix_path"
37862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37864    new_path="$unix_path"
37865  fi
37866
37867
37868  # Now try to locate executable using which
37869  new_path=`$WHICH "$new_path" 2> /dev/null`
37870
37871  if test "x$new_path" = x; then
37872    # Oops. Which didn't find the executable.
37873    # The splitting of arguments from the executable at a space might have been incorrect,
37874    # since paths with space are more likely in Windows. Give it another try with the whole
37875    # argument.
37876    path="$complete"
37877    arguments="EOL"
37878    new_path="$path"
37879
37880  windows_path="$new_path"
37881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37882    unix_path=`$CYGPATH -u "$windows_path"`
37883    new_path="$unix_path"
37884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37886    new_path="$unix_path"
37887  fi
37888
37889
37890    new_path=`$WHICH "$new_path" 2> /dev/null`
37891    # bat and cmd files are not always considered executable in MSYS causing which
37892    # to not find them
37893    if test "x$new_path" = x \
37894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37896      new_path="$path"
37897
37898  windows_path="$new_path"
37899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37900    unix_path=`$CYGPATH -u "$windows_path"`
37901    new_path="$unix_path"
37902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37904    new_path="$unix_path"
37905  fi
37906
37907    fi
37908
37909    if test "x$new_path" = x; then
37910      # It's still not found. Now this is an unrecoverable error.
37911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37912$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37913      has_space=`$ECHO "$complete" | $GREP " "`
37914      if test "x$has_space" != x; then
37915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37917      fi
37918      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37919    fi
37920  fi
37921
37922  # Now new_path has a complete unix path to the binary
37923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37924    # Keep paths in /bin as-is, but remove trailing .exe if any
37925    new_path="${new_path/%.exe/}"
37926    # Do not save /bin paths to all_fixpath_prefixes!
37927  else
37928    # Not in mixed or Windows style, start by that.
37929    new_path=`cmd //c echo $new_path`
37930
37931  input_path="$new_path"
37932  # Check if we need to convert this using DOS-style short mode. If the path
37933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37934  # take no chances and rewrite it.
37935  # Note: m4 eats our [], so we need to use [ and ] instead.
37936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37937  if test "x$has_forbidden_chars" != x; then
37938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37940  fi
37941
37942    # Output is in $new_path
37943
37944  windows_path="$new_path"
37945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37946    unix_path=`$CYGPATH -u "$windows_path"`
37947    new_path="$unix_path"
37948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37950    new_path="$unix_path"
37951  fi
37952
37953    # remove trailing .exe if any
37954    new_path="${new_path/%.exe/}"
37955
37956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37958  fi
37959
37960    else
37961      # We're on a unix platform. Hooray! :)
37962      # First separate the path from the arguments. This will split at the first
37963      # space.
37964      complete="$LIPO"
37965      path="${complete%% *}"
37966      tmp="$complete EOL"
37967      arguments="${tmp#* }"
37968
37969      # Cannot rely on the command "which" here since it doesn't always work.
37970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37971      if test -z "$is_absolute_path"; then
37972        # Path to executable is not absolute. Find it.
37973        IFS_save="$IFS"
37974        IFS=:
37975        for p in $PATH; do
37976          if test -f "$p/$path" && test -x "$p/$path"; then
37977            new_path="$p/$path"
37978            break
37979          fi
37980        done
37981        IFS="$IFS_save"
37982      else
37983        # This is an absolute path, we can use it without further modifications.
37984        new_path="$path"
37985      fi
37986
37987      if test "x$new_path" = x; then
37988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37989$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37990        has_space=`$ECHO "$complete" | $GREP " "`
37991        if test "x$has_space" != x; then
37992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37994        fi
37995        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37996      fi
37997    fi
37998
37999    # Now join together the path and the arguments once again
38000    if test "x$arguments" != xEOL; then
38001      new_complete="$new_path ${arguments% *}"
38002    else
38003      new_complete="$new_path"
38004    fi
38005
38006    if test "x$complete" != "x$new_complete"; then
38007      LIPO="$new_complete"
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38009$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38010    fi
38011  fi
38012
38013  fi
38014
38015  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38016    # Extract the first word of "mt", so it can be a program name with args.
38017set dummy mt; ac_word=$2
38018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38019$as_echo_n "checking for $ac_word... " >&6; }
38020if ${ac_cv_prog_MT+:} false; then :
38021  $as_echo_n "(cached) " >&6
38022else
38023  if test -n "$MT"; then
38024  ac_cv_prog_MT="$MT" # Let the user override the test.
38025else
38026  ac_prog_rejected=no
38027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38028for as_dir in $PATH
38029do
38030  IFS=$as_save_IFS
38031  test -z "$as_dir" && as_dir=.
38032    for ac_exec_ext in '' $ac_executable_extensions; do
38033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38034    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38035       ac_prog_rejected=yes
38036       continue
38037     fi
38038    ac_cv_prog_MT="mt"
38039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38040    break 2
38041  fi
38042done
38043  done
38044IFS=$as_save_IFS
38045
38046if test $ac_prog_rejected = yes; then
38047  # We found a bogon in the path, so make sure we never use it.
38048  set dummy $ac_cv_prog_MT
38049  shift
38050  if test $# != 0; then
38051    # We chose a different compiler from the bogus one.
38052    # However, it has the same basename, so the bogon will be chosen
38053    # first if we set MT to just the basename; use the full file name.
38054    shift
38055    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38056  fi
38057fi
38058fi
38059fi
38060MT=$ac_cv_prog_MT
38061if test -n "$MT"; then
38062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38063$as_echo "$MT" >&6; }
38064else
38065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38066$as_echo "no" >&6; }
38067fi
38068
38069
38070
38071  # Only process if variable expands to non-empty
38072
38073  if test "x$MT" != x; then
38074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38075
38076  # First separate the path from the arguments. This will split at the first
38077  # space.
38078  complete="$MT"
38079  path="${complete%% *}"
38080  tmp="$complete EOL"
38081  arguments="${tmp#* }"
38082
38083  # Input might be given as Windows format, start by converting to
38084  # unix format.
38085  new_path=`$CYGPATH -u "$path"`
38086
38087  # Now try to locate executable using which
38088  new_path=`$WHICH "$new_path" 2> /dev/null`
38089  # bat and cmd files are not always considered executable in cygwin causing which
38090  # to not find them
38091  if test "x$new_path" = x \
38092      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38093      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38094    new_path=`$CYGPATH -u "$path"`
38095  fi
38096  if test "x$new_path" = x; then
38097    # Oops. Which didn't find the executable.
38098    # The splitting of arguments from the executable at a space might have been incorrect,
38099    # since paths with space are more likely in Windows. Give it another try with the whole
38100    # argument.
38101    path="$complete"
38102    arguments="EOL"
38103    new_path=`$CYGPATH -u "$path"`
38104    new_path=`$WHICH "$new_path" 2> /dev/null`
38105    # bat and cmd files are not always considered executable in cygwin causing which
38106    # to not find them
38107    if test "x$new_path" = x \
38108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38110      new_path=`$CYGPATH -u "$path"`
38111    fi
38112    if test "x$new_path" = x; then
38113      # It's still not found. Now this is an unrecoverable error.
38114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38115$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38116      has_space=`$ECHO "$complete" | $GREP " "`
38117      if test "x$has_space" != x; then
38118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38120      fi
38121      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38122    fi
38123  fi
38124
38125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38128  # "foo.exe" is OK but "foo" is an error.
38129  #
38130  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38131  # It is also a way to make sure we got the proper file name for the real test later on.
38132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38133  if test "x$test_shortpath" = x; then
38134    # Short path failed, file does not exist as specified.
38135    # Try adding .exe or .cmd
38136    if test -f "${new_path}.exe"; then
38137      input_to_shortpath="${new_path}.exe"
38138    elif test -f "${new_path}.cmd"; then
38139      input_to_shortpath="${new_path}.cmd"
38140    else
38141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38142$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38143      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38144$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38145      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38146    fi
38147  else
38148    input_to_shortpath="$new_path"
38149  fi
38150
38151  # Call helper function which possibly converts this using DOS-style short mode.
38152  # If so, the updated path is stored in $new_path.
38153  new_path="$input_to_shortpath"
38154
38155  input_path="$input_to_shortpath"
38156  # Check if we need to convert this using DOS-style short mode. If the path
38157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38158  # take no chances and rewrite it.
38159  # Note: m4 eats our [], so we need to use [ and ] instead.
38160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38161  if test "x$has_forbidden_chars" != x; then
38162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38166      # Going to short mode and back again did indeed matter. Since short mode is
38167      # case insensitive, let's make it lowercase to improve readability.
38168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38169      # Now convert it back to Unix-style (cygpath)
38170      input_path=`$CYGPATH -u "$shortmode_path"`
38171      new_path="$input_path"
38172    fi
38173  fi
38174
38175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38176  if test "x$test_cygdrive_prefix" = x; then
38177    # As a simple fix, exclude /usr/bin since it's not a real path.
38178    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38180      # a path prefixed by /cygdrive for fixpath to work.
38181      new_path="$CYGWIN_ROOT_PATH$input_path"
38182    fi
38183  fi
38184
38185  # remove trailing .exe if any
38186  new_path="${new_path/%.exe/}"
38187
38188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38189
38190  # First separate the path from the arguments. This will split at the first
38191  # space.
38192  complete="$MT"
38193  path="${complete%% *}"
38194  tmp="$complete EOL"
38195  arguments="${tmp#* }"
38196
38197  # Input might be given as Windows format, start by converting to
38198  # unix format.
38199  new_path="$path"
38200
38201  windows_path="$new_path"
38202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38203    unix_path=`$CYGPATH -u "$windows_path"`
38204    new_path="$unix_path"
38205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38207    new_path="$unix_path"
38208  fi
38209
38210
38211  # Now try to locate executable using which
38212  new_path=`$WHICH "$new_path" 2> /dev/null`
38213
38214  if test "x$new_path" = x; then
38215    # Oops. Which didn't find the executable.
38216    # The splitting of arguments from the executable at a space might have been incorrect,
38217    # since paths with space are more likely in Windows. Give it another try with the whole
38218    # argument.
38219    path="$complete"
38220    arguments="EOL"
38221    new_path="$path"
38222
38223  windows_path="$new_path"
38224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38225    unix_path=`$CYGPATH -u "$windows_path"`
38226    new_path="$unix_path"
38227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38229    new_path="$unix_path"
38230  fi
38231
38232
38233    new_path=`$WHICH "$new_path" 2> /dev/null`
38234    # bat and cmd files are not always considered executable in MSYS causing which
38235    # to not find them
38236    if test "x$new_path" = x \
38237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38239      new_path="$path"
38240
38241  windows_path="$new_path"
38242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38243    unix_path=`$CYGPATH -u "$windows_path"`
38244    new_path="$unix_path"
38245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38247    new_path="$unix_path"
38248  fi
38249
38250    fi
38251
38252    if test "x$new_path" = x; then
38253      # It's still not found. Now this is an unrecoverable error.
38254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38255$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38256      has_space=`$ECHO "$complete" | $GREP " "`
38257      if test "x$has_space" != x; then
38258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38260      fi
38261      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38262    fi
38263  fi
38264
38265  # Now new_path has a complete unix path to the binary
38266  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38267    # Keep paths in /bin as-is, but remove trailing .exe if any
38268    new_path="${new_path/%.exe/}"
38269    # Do not save /bin paths to all_fixpath_prefixes!
38270  else
38271    # Not in mixed or Windows style, start by that.
38272    new_path=`cmd //c echo $new_path`
38273
38274  input_path="$new_path"
38275  # Check if we need to convert this using DOS-style short mode. If the path
38276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38277  # take no chances and rewrite it.
38278  # Note: m4 eats our [], so we need to use [ and ] instead.
38279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38280  if test "x$has_forbidden_chars" != x; then
38281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38283  fi
38284
38285    # Output is in $new_path
38286
38287  windows_path="$new_path"
38288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38289    unix_path=`$CYGPATH -u "$windows_path"`
38290    new_path="$unix_path"
38291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38293    new_path="$unix_path"
38294  fi
38295
38296    # remove trailing .exe if any
38297    new_path="${new_path/%.exe/}"
38298
38299    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38300    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38301  fi
38302
38303    else
38304      # We're on a unix platform. Hooray! :)
38305      # First separate the path from the arguments. This will split at the first
38306      # space.
38307      complete="$MT"
38308      path="${complete%% *}"
38309      tmp="$complete EOL"
38310      arguments="${tmp#* }"
38311
38312      # Cannot rely on the command "which" here since it doesn't always work.
38313      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38314      if test -z "$is_absolute_path"; then
38315        # Path to executable is not absolute. Find it.
38316        IFS_save="$IFS"
38317        IFS=:
38318        for p in $PATH; do
38319          if test -f "$p/$path" && test -x "$p/$path"; then
38320            new_path="$p/$path"
38321            break
38322          fi
38323        done
38324        IFS="$IFS_save"
38325      else
38326        # This is an absolute path, we can use it without further modifications.
38327        new_path="$path"
38328      fi
38329
38330      if test "x$new_path" = x; then
38331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38332$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38333        has_space=`$ECHO "$complete" | $GREP " "`
38334        if test "x$has_space" != x; then
38335          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38336$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38337        fi
38338        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38339      fi
38340    fi
38341
38342    # Now join together the path and the arguments once again
38343    if test "x$arguments" != xEOL; then
38344      new_complete="$new_path ${arguments% *}"
38345    else
38346      new_complete="$new_path"
38347    fi
38348
38349    if test "x$complete" != "x$new_complete"; then
38350      MT="$new_complete"
38351      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38352$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38353    fi
38354  fi
38355
38356    # Setup the resource compiler (RC)
38357    # Extract the first word of "rc", so it can be a program name with args.
38358set dummy rc; ac_word=$2
38359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38360$as_echo_n "checking for $ac_word... " >&6; }
38361if ${ac_cv_prog_RC+:} false; then :
38362  $as_echo_n "(cached) " >&6
38363else
38364  if test -n "$RC"; then
38365  ac_cv_prog_RC="$RC" # Let the user override the test.
38366else
38367  ac_prog_rejected=no
38368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38369for as_dir in $PATH
38370do
38371  IFS=$as_save_IFS
38372  test -z "$as_dir" && as_dir=.
38373    for ac_exec_ext in '' $ac_executable_extensions; do
38374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38375    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38376       ac_prog_rejected=yes
38377       continue
38378     fi
38379    ac_cv_prog_RC="rc"
38380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38381    break 2
38382  fi
38383done
38384  done
38385IFS=$as_save_IFS
38386
38387if test $ac_prog_rejected = yes; then
38388  # We found a bogon in the path, so make sure we never use it.
38389  set dummy $ac_cv_prog_RC
38390  shift
38391  if test $# != 0; then
38392    # We chose a different compiler from the bogus one.
38393    # However, it has the same basename, so the bogon will be chosen
38394    # first if we set RC to just the basename; use the full file name.
38395    shift
38396    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38397  fi
38398fi
38399fi
38400fi
38401RC=$ac_cv_prog_RC
38402if test -n "$RC"; then
38403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38404$as_echo "$RC" >&6; }
38405else
38406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38407$as_echo "no" >&6; }
38408fi
38409
38410
38411
38412  # Only process if variable expands to non-empty
38413
38414  if test "x$RC" != x; then
38415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38416
38417  # First separate the path from the arguments. This will split at the first
38418  # space.
38419  complete="$RC"
38420  path="${complete%% *}"
38421  tmp="$complete EOL"
38422  arguments="${tmp#* }"
38423
38424  # Input might be given as Windows format, start by converting to
38425  # unix format.
38426  new_path=`$CYGPATH -u "$path"`
38427
38428  # Now try to locate executable using which
38429  new_path=`$WHICH "$new_path" 2> /dev/null`
38430  # bat and cmd files are not always considered executable in cygwin causing which
38431  # to not find them
38432  if test "x$new_path" = x \
38433      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38434      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38435    new_path=`$CYGPATH -u "$path"`
38436  fi
38437  if test "x$new_path" = x; then
38438    # Oops. Which didn't find the executable.
38439    # The splitting of arguments from the executable at a space might have been incorrect,
38440    # since paths with space are more likely in Windows. Give it another try with the whole
38441    # argument.
38442    path="$complete"
38443    arguments="EOL"
38444    new_path=`$CYGPATH -u "$path"`
38445    new_path=`$WHICH "$new_path" 2> /dev/null`
38446    # bat and cmd files are not always considered executable in cygwin causing which
38447    # to not find them
38448    if test "x$new_path" = x \
38449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38451      new_path=`$CYGPATH -u "$path"`
38452    fi
38453    if test "x$new_path" = x; then
38454      # It's still not found. Now this is an unrecoverable error.
38455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38456$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38457      has_space=`$ECHO "$complete" | $GREP " "`
38458      if test "x$has_space" != x; then
38459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38461      fi
38462      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38463    fi
38464  fi
38465
38466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38469  # "foo.exe" is OK but "foo" is an error.
38470  #
38471  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38472  # It is also a way to make sure we got the proper file name for the real test later on.
38473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38474  if test "x$test_shortpath" = x; then
38475    # Short path failed, file does not exist as specified.
38476    # Try adding .exe or .cmd
38477    if test -f "${new_path}.exe"; then
38478      input_to_shortpath="${new_path}.exe"
38479    elif test -f "${new_path}.cmd"; then
38480      input_to_shortpath="${new_path}.cmd"
38481    else
38482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38483$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38486      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38487    fi
38488  else
38489    input_to_shortpath="$new_path"
38490  fi
38491
38492  # Call helper function which possibly converts this using DOS-style short mode.
38493  # If so, the updated path is stored in $new_path.
38494  new_path="$input_to_shortpath"
38495
38496  input_path="$input_to_shortpath"
38497  # Check if we need to convert this using DOS-style short mode. If the path
38498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38499  # take no chances and rewrite it.
38500  # Note: m4 eats our [], so we need to use [ and ] instead.
38501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38502  if test "x$has_forbidden_chars" != x; then
38503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38507      # Going to short mode and back again did indeed matter. Since short mode is
38508      # case insensitive, let's make it lowercase to improve readability.
38509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38510      # Now convert it back to Unix-style (cygpath)
38511      input_path=`$CYGPATH -u "$shortmode_path"`
38512      new_path="$input_path"
38513    fi
38514  fi
38515
38516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38517  if test "x$test_cygdrive_prefix" = x; then
38518    # As a simple fix, exclude /usr/bin since it's not a real path.
38519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38521      # a path prefixed by /cygdrive for fixpath to work.
38522      new_path="$CYGWIN_ROOT_PATH$input_path"
38523    fi
38524  fi
38525
38526  # remove trailing .exe if any
38527  new_path="${new_path/%.exe/}"
38528
38529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38530
38531  # First separate the path from the arguments. This will split at the first
38532  # space.
38533  complete="$RC"
38534  path="${complete%% *}"
38535  tmp="$complete EOL"
38536  arguments="${tmp#* }"
38537
38538  # Input might be given as Windows format, start by converting to
38539  # unix format.
38540  new_path="$path"
38541
38542  windows_path="$new_path"
38543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38544    unix_path=`$CYGPATH -u "$windows_path"`
38545    new_path="$unix_path"
38546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38548    new_path="$unix_path"
38549  fi
38550
38551
38552  # Now try to locate executable using which
38553  new_path=`$WHICH "$new_path" 2> /dev/null`
38554
38555  if test "x$new_path" = x; then
38556    # Oops. Which didn't find the executable.
38557    # The splitting of arguments from the executable at a space might have been incorrect,
38558    # since paths with space are more likely in Windows. Give it another try with the whole
38559    # argument.
38560    path="$complete"
38561    arguments="EOL"
38562    new_path="$path"
38563
38564  windows_path="$new_path"
38565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38566    unix_path=`$CYGPATH -u "$windows_path"`
38567    new_path="$unix_path"
38568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38570    new_path="$unix_path"
38571  fi
38572
38573
38574    new_path=`$WHICH "$new_path" 2> /dev/null`
38575    # bat and cmd files are not always considered executable in MSYS causing which
38576    # to not find them
38577    if test "x$new_path" = x \
38578        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38579        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38580      new_path="$path"
38581
38582  windows_path="$new_path"
38583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38584    unix_path=`$CYGPATH -u "$windows_path"`
38585    new_path="$unix_path"
38586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38588    new_path="$unix_path"
38589  fi
38590
38591    fi
38592
38593    if test "x$new_path" = x; then
38594      # It's still not found. Now this is an unrecoverable error.
38595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38596$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38597      has_space=`$ECHO "$complete" | $GREP " "`
38598      if test "x$has_space" != x; then
38599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38601      fi
38602      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38603    fi
38604  fi
38605
38606  # Now new_path has a complete unix path to the binary
38607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38608    # Keep paths in /bin as-is, but remove trailing .exe if any
38609    new_path="${new_path/%.exe/}"
38610    # Do not save /bin paths to all_fixpath_prefixes!
38611  else
38612    # Not in mixed or Windows style, start by that.
38613    new_path=`cmd //c echo $new_path`
38614
38615  input_path="$new_path"
38616  # Check if we need to convert this using DOS-style short mode. If the path
38617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38618  # take no chances and rewrite it.
38619  # Note: m4 eats our [], so we need to use [ and ] instead.
38620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38621  if test "x$has_forbidden_chars" != x; then
38622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38624  fi
38625
38626    # Output is in $new_path
38627
38628  windows_path="$new_path"
38629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38630    unix_path=`$CYGPATH -u "$windows_path"`
38631    new_path="$unix_path"
38632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38634    new_path="$unix_path"
38635  fi
38636
38637    # remove trailing .exe if any
38638    new_path="${new_path/%.exe/}"
38639
38640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38642  fi
38643
38644    else
38645      # We're on a unix platform. Hooray! :)
38646      # First separate the path from the arguments. This will split at the first
38647      # space.
38648      complete="$RC"
38649      path="${complete%% *}"
38650      tmp="$complete EOL"
38651      arguments="${tmp#* }"
38652
38653      # Cannot rely on the command "which" here since it doesn't always work.
38654      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38655      if test -z "$is_absolute_path"; then
38656        # Path to executable is not absolute. Find it.
38657        IFS_save="$IFS"
38658        IFS=:
38659        for p in $PATH; do
38660          if test -f "$p/$path" && test -x "$p/$path"; then
38661            new_path="$p/$path"
38662            break
38663          fi
38664        done
38665        IFS="$IFS_save"
38666      else
38667        # This is an absolute path, we can use it without further modifications.
38668        new_path="$path"
38669      fi
38670
38671      if test "x$new_path" = x; then
38672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38673$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38674        has_space=`$ECHO "$complete" | $GREP " "`
38675        if test "x$has_space" != x; then
38676          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38678        fi
38679        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38680      fi
38681    fi
38682
38683    # Now join together the path and the arguments once again
38684    if test "x$arguments" != xEOL; then
38685      new_complete="$new_path ${arguments% *}"
38686    else
38687      new_complete="$new_path"
38688    fi
38689
38690    if test "x$complete" != "x$new_complete"; then
38691      RC="$new_complete"
38692      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38693$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38694    fi
38695  fi
38696
38697    # Extract the first word of "dumpbin", so it can be a program name with args.
38698set dummy dumpbin; ac_word=$2
38699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38700$as_echo_n "checking for $ac_word... " >&6; }
38701if ${ac_cv_prog_DUMPBIN+:} false; then :
38702  $as_echo_n "(cached) " >&6
38703else
38704  if test -n "$DUMPBIN"; then
38705  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38706else
38707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38708for as_dir in $PATH
38709do
38710  IFS=$as_save_IFS
38711  test -z "$as_dir" && as_dir=.
38712    for ac_exec_ext in '' $ac_executable_extensions; do
38713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38714    ac_cv_prog_DUMPBIN="dumpbin"
38715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38716    break 2
38717  fi
38718done
38719  done
38720IFS=$as_save_IFS
38721
38722fi
38723fi
38724DUMPBIN=$ac_cv_prog_DUMPBIN
38725if test -n "$DUMPBIN"; then
38726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38727$as_echo "$DUMPBIN" >&6; }
38728else
38729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38730$as_echo "no" >&6; }
38731fi
38732
38733
38734
38735  # Only process if variable expands to non-empty
38736
38737  if test "x$DUMPBIN" != x; then
38738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38739
38740  # First separate the path from the arguments. This will split at the first
38741  # space.
38742  complete="$DUMPBIN"
38743  path="${complete%% *}"
38744  tmp="$complete EOL"
38745  arguments="${tmp#* }"
38746
38747  # Input might be given as Windows format, start by converting to
38748  # unix format.
38749  new_path=`$CYGPATH -u "$path"`
38750
38751  # Now try to locate executable using which
38752  new_path=`$WHICH "$new_path" 2> /dev/null`
38753  # bat and cmd files are not always considered executable in cygwin causing which
38754  # to not find them
38755  if test "x$new_path" = x \
38756      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38757      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38758    new_path=`$CYGPATH -u "$path"`
38759  fi
38760  if test "x$new_path" = x; then
38761    # Oops. Which didn't find the executable.
38762    # The splitting of arguments from the executable at a space might have been incorrect,
38763    # since paths with space are more likely in Windows. Give it another try with the whole
38764    # argument.
38765    path="$complete"
38766    arguments="EOL"
38767    new_path=`$CYGPATH -u "$path"`
38768    new_path=`$WHICH "$new_path" 2> /dev/null`
38769    # bat and cmd files are not always considered executable in cygwin causing which
38770    # to not find them
38771    if test "x$new_path" = x \
38772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38774      new_path=`$CYGPATH -u "$path"`
38775    fi
38776    if test "x$new_path" = x; then
38777      # It's still not found. Now this is an unrecoverable error.
38778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38779$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38780      has_space=`$ECHO "$complete" | $GREP " "`
38781      if test "x$has_space" != x; then
38782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38784      fi
38785      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38786    fi
38787  fi
38788
38789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38792  # "foo.exe" is OK but "foo" is an error.
38793  #
38794  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38795  # It is also a way to make sure we got the proper file name for the real test later on.
38796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38797  if test "x$test_shortpath" = x; then
38798    # Short path failed, file does not exist as specified.
38799    # Try adding .exe or .cmd
38800    if test -f "${new_path}.exe"; then
38801      input_to_shortpath="${new_path}.exe"
38802    elif test -f "${new_path}.cmd"; then
38803      input_to_shortpath="${new_path}.cmd"
38804    else
38805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38806$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38807      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38808$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38809      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38810    fi
38811  else
38812    input_to_shortpath="$new_path"
38813  fi
38814
38815  # Call helper function which possibly converts this using DOS-style short mode.
38816  # If so, the updated path is stored in $new_path.
38817  new_path="$input_to_shortpath"
38818
38819  input_path="$input_to_shortpath"
38820  # Check if we need to convert this using DOS-style short mode. If the path
38821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38822  # take no chances and rewrite it.
38823  # Note: m4 eats our [], so we need to use [ and ] instead.
38824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38825  if test "x$has_forbidden_chars" != x; then
38826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38830      # Going to short mode and back again did indeed matter. Since short mode is
38831      # case insensitive, let's make it lowercase to improve readability.
38832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38833      # Now convert it back to Unix-style (cygpath)
38834      input_path=`$CYGPATH -u "$shortmode_path"`
38835      new_path="$input_path"
38836    fi
38837  fi
38838
38839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38840  if test "x$test_cygdrive_prefix" = x; then
38841    # As a simple fix, exclude /usr/bin since it's not a real path.
38842    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38844      # a path prefixed by /cygdrive for fixpath to work.
38845      new_path="$CYGWIN_ROOT_PATH$input_path"
38846    fi
38847  fi
38848
38849  # remove trailing .exe if any
38850  new_path="${new_path/%.exe/}"
38851
38852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38853
38854  # First separate the path from the arguments. This will split at the first
38855  # space.
38856  complete="$DUMPBIN"
38857  path="${complete%% *}"
38858  tmp="$complete EOL"
38859  arguments="${tmp#* }"
38860
38861  # Input might be given as Windows format, start by converting to
38862  # unix format.
38863  new_path="$path"
38864
38865  windows_path="$new_path"
38866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38867    unix_path=`$CYGPATH -u "$windows_path"`
38868    new_path="$unix_path"
38869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38871    new_path="$unix_path"
38872  fi
38873
38874
38875  # Now try to locate executable using which
38876  new_path=`$WHICH "$new_path" 2> /dev/null`
38877
38878  if test "x$new_path" = x; then
38879    # Oops. Which didn't find the executable.
38880    # The splitting of arguments from the executable at a space might have been incorrect,
38881    # since paths with space are more likely in Windows. Give it another try with the whole
38882    # argument.
38883    path="$complete"
38884    arguments="EOL"
38885    new_path="$path"
38886
38887  windows_path="$new_path"
38888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38889    unix_path=`$CYGPATH -u "$windows_path"`
38890    new_path="$unix_path"
38891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38893    new_path="$unix_path"
38894  fi
38895
38896
38897    new_path=`$WHICH "$new_path" 2> /dev/null`
38898    # bat and cmd files are not always considered executable in MSYS causing which
38899    # to not find them
38900    if test "x$new_path" = x \
38901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38903      new_path="$path"
38904
38905  windows_path="$new_path"
38906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38907    unix_path=`$CYGPATH -u "$windows_path"`
38908    new_path="$unix_path"
38909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38911    new_path="$unix_path"
38912  fi
38913
38914    fi
38915
38916    if test "x$new_path" = x; then
38917      # It's still not found. Now this is an unrecoverable error.
38918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38919$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38920      has_space=`$ECHO "$complete" | $GREP " "`
38921      if test "x$has_space" != x; then
38922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38924      fi
38925      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38926    fi
38927  fi
38928
38929  # Now new_path has a complete unix path to the binary
38930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38931    # Keep paths in /bin as-is, but remove trailing .exe if any
38932    new_path="${new_path/%.exe/}"
38933    # Do not save /bin paths to all_fixpath_prefixes!
38934  else
38935    # Not in mixed or Windows style, start by that.
38936    new_path=`cmd //c echo $new_path`
38937
38938  input_path="$new_path"
38939  # Check if we need to convert this using DOS-style short mode. If the path
38940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38941  # take no chances and rewrite it.
38942  # Note: m4 eats our [], so we need to use [ and ] instead.
38943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38944  if test "x$has_forbidden_chars" != x; then
38945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38947  fi
38948
38949    # Output is in $new_path
38950
38951  windows_path="$new_path"
38952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38953    unix_path=`$CYGPATH -u "$windows_path"`
38954    new_path="$unix_path"
38955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38957    new_path="$unix_path"
38958  fi
38959
38960    # remove trailing .exe if any
38961    new_path="${new_path/%.exe/}"
38962
38963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38965  fi
38966
38967    else
38968      # We're on a unix platform. Hooray! :)
38969      # First separate the path from the arguments. This will split at the first
38970      # space.
38971      complete="$DUMPBIN"
38972      path="${complete%% *}"
38973      tmp="$complete EOL"
38974      arguments="${tmp#* }"
38975
38976      # Cannot rely on the command "which" here since it doesn't always work.
38977      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38978      if test -z "$is_absolute_path"; then
38979        # Path to executable is not absolute. Find it.
38980        IFS_save="$IFS"
38981        IFS=:
38982        for p in $PATH; do
38983          if test -f "$p/$path" && test -x "$p/$path"; then
38984            new_path="$p/$path"
38985            break
38986          fi
38987        done
38988        IFS="$IFS_save"
38989      else
38990        # This is an absolute path, we can use it without further modifications.
38991        new_path="$path"
38992      fi
38993
38994      if test "x$new_path" = x; then
38995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38996$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38997        has_space=`$ECHO "$complete" | $GREP " "`
38998        if test "x$has_space" != x; then
38999          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39000$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39001        fi
39002        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39003      fi
39004    fi
39005
39006    # Now join together the path and the arguments once again
39007    if test "x$arguments" != xEOL; then
39008      new_complete="$new_path ${arguments% *}"
39009    else
39010      new_complete="$new_path"
39011    fi
39012
39013    if test "x$complete" != "x$new_complete"; then
39014      DUMPBIN="$new_complete"
39015      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39016$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39017    fi
39018  fi
39019
39020    # We need to check for 'msbuild.exe' because at the place where we expect to
39021    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39022    # won't find the 'msbuild.exe' executable in that case (and the
39023    # 'ac_executable_extensions' is unusable due to performance reasons).
39024    # Notice that we intentionally don't fix up the path to MSBUILD because we
39025    # will call it in a DOS shell during freetype detection on Windows (see
39026    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39027    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39028set dummy msbuild.exe; ac_word=$2
39029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39030$as_echo_n "checking for $ac_word... " >&6; }
39031if ${ac_cv_prog_MSBUILD+:} false; then :
39032  $as_echo_n "(cached) " >&6
39033else
39034  if test -n "$MSBUILD"; then
39035  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39036else
39037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39038for as_dir in $PATH
39039do
39040  IFS=$as_save_IFS
39041  test -z "$as_dir" && as_dir=.
39042    for ac_exec_ext in '' $ac_executable_extensions; do
39043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39044    ac_cv_prog_MSBUILD="msbuild.exe"
39045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39046    break 2
39047  fi
39048done
39049  done
39050IFS=$as_save_IFS
39051
39052fi
39053fi
39054MSBUILD=$ac_cv_prog_MSBUILD
39055if test -n "$MSBUILD"; then
39056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39057$as_echo "$MSBUILD" >&6; }
39058else
39059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39060$as_echo "no" >&6; }
39061fi
39062
39063
39064  fi
39065
39066  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39067
39068
39069  # Publish this variable in the help.
39070
39071
39072  if [ -z "${STRIP+x}" ]; then
39073    # The variable is not set by user, try to locate tool using the code snippet
39074    for ac_prog in strip
39075do
39076  # Extract the first word of "$ac_prog", so it can be a program name with args.
39077set dummy $ac_prog; ac_word=$2
39078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39079$as_echo_n "checking for $ac_word... " >&6; }
39080if ${ac_cv_path_STRIP+:} false; then :
39081  $as_echo_n "(cached) " >&6
39082else
39083  case $STRIP in
39084  [\\/]* | ?:[\\/]*)
39085  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39086  ;;
39087  *)
39088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39089for as_dir in $PATH
39090do
39091  IFS=$as_save_IFS
39092  test -z "$as_dir" && as_dir=.
39093    for ac_exec_ext in '' $ac_executable_extensions; do
39094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39095    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39097    break 2
39098  fi
39099done
39100  done
39101IFS=$as_save_IFS
39102
39103  ;;
39104esac
39105fi
39106STRIP=$ac_cv_path_STRIP
39107if test -n "$STRIP"; then
39108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39109$as_echo "$STRIP" >&6; }
39110else
39111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39112$as_echo "no" >&6; }
39113fi
39114
39115
39116  test -n "$STRIP" && break
39117done
39118
39119  else
39120    # The variable is set, but is it from the command line or the environment?
39121
39122    # Try to remove the string !STRIP! from our list.
39123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39125      # If it failed, the variable was not from the command line. Ignore it,
39126      # but warn the user (except for BASH, which is always set by the calling BASH).
39127      if test "xSTRIP" != xBASH; then
39128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39129$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39130      fi
39131      # Try to locate tool using the code snippet
39132      for ac_prog in strip
39133do
39134  # Extract the first word of "$ac_prog", so it can be a program name with args.
39135set dummy $ac_prog; ac_word=$2
39136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39137$as_echo_n "checking for $ac_word... " >&6; }
39138if ${ac_cv_path_STRIP+:} false; then :
39139  $as_echo_n "(cached) " >&6
39140else
39141  case $STRIP in
39142  [\\/]* | ?:[\\/]*)
39143  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39144  ;;
39145  *)
39146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39147for as_dir in $PATH
39148do
39149  IFS=$as_save_IFS
39150  test -z "$as_dir" && as_dir=.
39151    for ac_exec_ext in '' $ac_executable_extensions; do
39152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39153    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39155    break 2
39156  fi
39157done
39158  done
39159IFS=$as_save_IFS
39160
39161  ;;
39162esac
39163fi
39164STRIP=$ac_cv_path_STRIP
39165if test -n "$STRIP"; then
39166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39167$as_echo "$STRIP" >&6; }
39168else
39169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39170$as_echo "no" >&6; }
39171fi
39172
39173
39174  test -n "$STRIP" && break
39175done
39176
39177    else
39178      # If it succeeded, then it was overridden by the user. We will use it
39179      # for the tool.
39180
39181      # First remove it from the list of overridden variables, so we can test
39182      # for unknown variables in the end.
39183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39184
39185      # Check if we try to supply an empty value
39186      if test "x$STRIP" = x; then
39187        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39188$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39190$as_echo_n "checking for STRIP... " >&6; }
39191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39192$as_echo "disabled" >&6; }
39193      else
39194        # Check if the provided tool contains a complete path.
39195        tool_specified="$STRIP"
39196        tool_basename="${tool_specified##*/}"
39197        if test "x$tool_basename" = "x$tool_specified"; then
39198          # A command without a complete path is provided, search $PATH.
39199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39200$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39201          # Extract the first word of "$tool_basename", so it can be a program name with args.
39202set dummy $tool_basename; ac_word=$2
39203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39204$as_echo_n "checking for $ac_word... " >&6; }
39205if ${ac_cv_path_STRIP+:} false; then :
39206  $as_echo_n "(cached) " >&6
39207else
39208  case $STRIP in
39209  [\\/]* | ?:[\\/]*)
39210  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39211  ;;
39212  *)
39213  as_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_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
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
39228  ;;
39229esac
39230fi
39231STRIP=$ac_cv_path_STRIP
39232if test -n "$STRIP"; then
39233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39234$as_echo "$STRIP" >&6; }
39235else
39236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39237$as_echo "no" >&6; }
39238fi
39239
39240
39241          if test "x$STRIP" = x; then
39242            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39243          fi
39244        else
39245          # Otherwise we believe it is a complete path. Use it as it is.
39246          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39247$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39248          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39249$as_echo_n "checking for STRIP... " >&6; }
39250          if test ! -x "$tool_specified"; then
39251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39252$as_echo "not found" >&6; }
39253            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39254          fi
39255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39256$as_echo "$tool_specified" >&6; }
39257        fi
39258      fi
39259    fi
39260
39261  fi
39262
39263
39264
39265  # Only process if variable expands to non-empty
39266
39267  if test "x$STRIP" != x; then
39268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39269
39270  # First separate the path from the arguments. This will split at the first
39271  # space.
39272  complete="$STRIP"
39273  path="${complete%% *}"
39274  tmp="$complete EOL"
39275  arguments="${tmp#* }"
39276
39277  # Input might be given as Windows format, start by converting to
39278  # unix format.
39279  new_path=`$CYGPATH -u "$path"`
39280
39281  # Now try to locate executable using which
39282  new_path=`$WHICH "$new_path" 2> /dev/null`
39283  # bat and cmd files are not always considered executable in cygwin causing which
39284  # to not find them
39285  if test "x$new_path" = x \
39286      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39287      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39288    new_path=`$CYGPATH -u "$path"`
39289  fi
39290  if test "x$new_path" = x; then
39291    # Oops. Which didn't find the executable.
39292    # The splitting of arguments from the executable at a space might have been incorrect,
39293    # since paths with space are more likely in Windows. Give it another try with the whole
39294    # argument.
39295    path="$complete"
39296    arguments="EOL"
39297    new_path=`$CYGPATH -u "$path"`
39298    new_path=`$WHICH "$new_path" 2> /dev/null`
39299    # bat and cmd files are not always considered executable in cygwin causing which
39300    # to not find them
39301    if test "x$new_path" = x \
39302        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39303        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39304      new_path=`$CYGPATH -u "$path"`
39305    fi
39306    if test "x$new_path" = x; then
39307      # It's still not found. Now this is an unrecoverable error.
39308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39309$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39310      has_space=`$ECHO "$complete" | $GREP " "`
39311      if test "x$has_space" != x; then
39312        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39314      fi
39315      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39316    fi
39317  fi
39318
39319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39322  # "foo.exe" is OK but "foo" is an error.
39323  #
39324  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39325  # It is also a way to make sure we got the proper file name for the real test later on.
39326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39327  if test "x$test_shortpath" = x; then
39328    # Short path failed, file does not exist as specified.
39329    # Try adding .exe or .cmd
39330    if test -f "${new_path}.exe"; then
39331      input_to_shortpath="${new_path}.exe"
39332    elif test -f "${new_path}.cmd"; then
39333      input_to_shortpath="${new_path}.cmd"
39334    else
39335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39336$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39337      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39338$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39339      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39340    fi
39341  else
39342    input_to_shortpath="$new_path"
39343  fi
39344
39345  # Call helper function which possibly converts this using DOS-style short mode.
39346  # If so, the updated path is stored in $new_path.
39347  new_path="$input_to_shortpath"
39348
39349  input_path="$input_to_shortpath"
39350  # Check if we need to convert this using DOS-style short mode. If the path
39351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39352  # take no chances and rewrite it.
39353  # Note: m4 eats our [], so we need to use [ and ] instead.
39354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39355  if test "x$has_forbidden_chars" != x; then
39356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39360      # Going to short mode and back again did indeed matter. Since short mode is
39361      # case insensitive, let's make it lowercase to improve readability.
39362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39363      # Now convert it back to Unix-style (cygpath)
39364      input_path=`$CYGPATH -u "$shortmode_path"`
39365      new_path="$input_path"
39366    fi
39367  fi
39368
39369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39370  if test "x$test_cygdrive_prefix" = x; then
39371    # As a simple fix, exclude /usr/bin since it's not a real path.
39372    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39374      # a path prefixed by /cygdrive for fixpath to work.
39375      new_path="$CYGWIN_ROOT_PATH$input_path"
39376    fi
39377  fi
39378
39379  # remove trailing .exe if any
39380  new_path="${new_path/%.exe/}"
39381
39382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39383
39384  # First separate the path from the arguments. This will split at the first
39385  # space.
39386  complete="$STRIP"
39387  path="${complete%% *}"
39388  tmp="$complete EOL"
39389  arguments="${tmp#* }"
39390
39391  # Input might be given as Windows format, start by converting to
39392  # unix format.
39393  new_path="$path"
39394
39395  windows_path="$new_path"
39396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39397    unix_path=`$CYGPATH -u "$windows_path"`
39398    new_path="$unix_path"
39399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39401    new_path="$unix_path"
39402  fi
39403
39404
39405  # Now try to locate executable using which
39406  new_path=`$WHICH "$new_path" 2> /dev/null`
39407
39408  if test "x$new_path" = x; then
39409    # Oops. Which didn't find the executable.
39410    # The splitting of arguments from the executable at a space might have been incorrect,
39411    # since paths with space are more likely in Windows. Give it another try with the whole
39412    # argument.
39413    path="$complete"
39414    arguments="EOL"
39415    new_path="$path"
39416
39417  windows_path="$new_path"
39418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39419    unix_path=`$CYGPATH -u "$windows_path"`
39420    new_path="$unix_path"
39421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39423    new_path="$unix_path"
39424  fi
39425
39426
39427    new_path=`$WHICH "$new_path" 2> /dev/null`
39428    # bat and cmd files are not always considered executable in MSYS causing which
39429    # to not find them
39430    if test "x$new_path" = x \
39431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39433      new_path="$path"
39434
39435  windows_path="$new_path"
39436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39437    unix_path=`$CYGPATH -u "$windows_path"`
39438    new_path="$unix_path"
39439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39441    new_path="$unix_path"
39442  fi
39443
39444    fi
39445
39446    if test "x$new_path" = x; then
39447      # It's still not found. Now this is an unrecoverable error.
39448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39449$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39450      has_space=`$ECHO "$complete" | $GREP " "`
39451      if test "x$has_space" != x; then
39452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39454      fi
39455      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39456    fi
39457  fi
39458
39459  # Now new_path has a complete unix path to the binary
39460  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39461    # Keep paths in /bin as-is, but remove trailing .exe if any
39462    new_path="${new_path/%.exe/}"
39463    # Do not save /bin paths to all_fixpath_prefixes!
39464  else
39465    # Not in mixed or Windows style, start by that.
39466    new_path=`cmd //c echo $new_path`
39467
39468  input_path="$new_path"
39469  # Check if we need to convert this using DOS-style short mode. If the path
39470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39471  # take no chances and rewrite it.
39472  # Note: m4 eats our [], so we need to use [ and ] instead.
39473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39474  if test "x$has_forbidden_chars" != x; then
39475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39477  fi
39478
39479    # Output is in $new_path
39480
39481  windows_path="$new_path"
39482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39483    unix_path=`$CYGPATH -u "$windows_path"`
39484    new_path="$unix_path"
39485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39487    new_path="$unix_path"
39488  fi
39489
39490    # remove trailing .exe if any
39491    new_path="${new_path/%.exe/}"
39492
39493    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39494    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39495  fi
39496
39497    else
39498      # We're on a unix platform. Hooray! :)
39499      # First separate the path from the arguments. This will split at the first
39500      # space.
39501      complete="$STRIP"
39502      path="${complete%% *}"
39503      tmp="$complete EOL"
39504      arguments="${tmp#* }"
39505
39506      # Cannot rely on the command "which" here since it doesn't always work.
39507      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39508      if test -z "$is_absolute_path"; then
39509        # Path to executable is not absolute. Find it.
39510        IFS_save="$IFS"
39511        IFS=:
39512        for p in $PATH; do
39513          if test -f "$p/$path" && test -x "$p/$path"; then
39514            new_path="$p/$path"
39515            break
39516          fi
39517        done
39518        IFS="$IFS_save"
39519      else
39520        # This is an absolute path, we can use it without further modifications.
39521        new_path="$path"
39522      fi
39523
39524      if test "x$new_path" = x; then
39525        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39526$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39527        has_space=`$ECHO "$complete" | $GREP " "`
39528        if test "x$has_space" != x; then
39529          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39530$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39531        fi
39532        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39533      fi
39534    fi
39535
39536    # Now join together the path and the arguments once again
39537    if test "x$arguments" != xEOL; then
39538      new_complete="$new_path ${arguments% *}"
39539    else
39540      new_complete="$new_path"
39541    fi
39542
39543    if test "x$complete" != "x$new_complete"; then
39544      STRIP="$new_complete"
39545      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39546$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39547    fi
39548  fi
39549
39550
39551
39552  # Publish this variable in the help.
39553
39554
39555  if [ -z "${NM+x}" ]; then
39556    # The variable is not set by user, try to locate tool using the code snippet
39557    for ac_prog in nm
39558do
39559  # Extract the first word of "$ac_prog", so it can be a program name with args.
39560set dummy $ac_prog; ac_word=$2
39561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39562$as_echo_n "checking for $ac_word... " >&6; }
39563if ${ac_cv_path_NM+:} false; then :
39564  $as_echo_n "(cached) " >&6
39565else
39566  case $NM in
39567  [\\/]* | ?:[\\/]*)
39568  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39569  ;;
39570  *)
39571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39572for as_dir in $PATH
39573do
39574  IFS=$as_save_IFS
39575  test -z "$as_dir" && as_dir=.
39576    for ac_exec_ext in '' $ac_executable_extensions; do
39577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39578    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39580    break 2
39581  fi
39582done
39583  done
39584IFS=$as_save_IFS
39585
39586  ;;
39587esac
39588fi
39589NM=$ac_cv_path_NM
39590if test -n "$NM"; then
39591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39592$as_echo "$NM" >&6; }
39593else
39594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39595$as_echo "no" >&6; }
39596fi
39597
39598
39599  test -n "$NM" && break
39600done
39601
39602  else
39603    # The variable is set, but is it from the command line or the environment?
39604
39605    # Try to remove the string !NM! from our list.
39606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39608      # If it failed, the variable was not from the command line. Ignore it,
39609      # but warn the user (except for BASH, which is always set by the calling BASH).
39610      if test "xNM" != xBASH; then
39611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39612$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39613      fi
39614      # Try to locate tool using the code snippet
39615      for ac_prog in nm
39616do
39617  # Extract the first word of "$ac_prog", so it can be a program name with args.
39618set dummy $ac_prog; ac_word=$2
39619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39620$as_echo_n "checking for $ac_word... " >&6; }
39621if ${ac_cv_path_NM+:} false; then :
39622  $as_echo_n "(cached) " >&6
39623else
39624  case $NM in
39625  [\\/]* | ?:[\\/]*)
39626  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39627  ;;
39628  *)
39629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39630for as_dir in $PATH
39631do
39632  IFS=$as_save_IFS
39633  test -z "$as_dir" && as_dir=.
39634    for ac_exec_ext in '' $ac_executable_extensions; do
39635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39636    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39638    break 2
39639  fi
39640done
39641  done
39642IFS=$as_save_IFS
39643
39644  ;;
39645esac
39646fi
39647NM=$ac_cv_path_NM
39648if test -n "$NM"; then
39649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39650$as_echo "$NM" >&6; }
39651else
39652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39653$as_echo "no" >&6; }
39654fi
39655
39656
39657  test -n "$NM" && break
39658done
39659
39660    else
39661      # If it succeeded, then it was overridden by the user. We will use it
39662      # for the tool.
39663
39664      # First remove it from the list of overridden variables, so we can test
39665      # for unknown variables in the end.
39666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39667
39668      # Check if we try to supply an empty value
39669      if test "x$NM" = x; then
39670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39671$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39673$as_echo_n "checking for NM... " >&6; }
39674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39675$as_echo "disabled" >&6; }
39676      else
39677        # Check if the provided tool contains a complete path.
39678        tool_specified="$NM"
39679        tool_basename="${tool_specified##*/}"
39680        if test "x$tool_basename" = "x$tool_specified"; then
39681          # A command without a complete path is provided, search $PATH.
39682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39683$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39684          # Extract the first word of "$tool_basename", so it can be a program name with args.
39685set dummy $tool_basename; ac_word=$2
39686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39687$as_echo_n "checking for $ac_word... " >&6; }
39688if ${ac_cv_path_NM+:} false; then :
39689  $as_echo_n "(cached) " >&6
39690else
39691  case $NM in
39692  [\\/]* | ?:[\\/]*)
39693  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39694  ;;
39695  *)
39696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39697for as_dir in $PATH
39698do
39699  IFS=$as_save_IFS
39700  test -z "$as_dir" && as_dir=.
39701    for ac_exec_ext in '' $ac_executable_extensions; do
39702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39703    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39705    break 2
39706  fi
39707done
39708  done
39709IFS=$as_save_IFS
39710
39711  ;;
39712esac
39713fi
39714NM=$ac_cv_path_NM
39715if test -n "$NM"; then
39716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39717$as_echo "$NM" >&6; }
39718else
39719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39720$as_echo "no" >&6; }
39721fi
39722
39723
39724          if test "x$NM" = x; then
39725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39726          fi
39727        else
39728          # Otherwise we believe it is a complete path. Use it as it is.
39729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39730$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39732$as_echo_n "checking for NM... " >&6; }
39733          if test ! -x "$tool_specified"; then
39734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39735$as_echo "not found" >&6; }
39736            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39737          fi
39738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39739$as_echo "$tool_specified" >&6; }
39740        fi
39741      fi
39742    fi
39743
39744  fi
39745
39746
39747
39748  # Only process if variable expands to non-empty
39749
39750  if test "x$NM" != x; then
39751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752
39753  # First separate the path from the arguments. This will split at the first
39754  # space.
39755  complete="$NM"
39756  path="${complete%% *}"
39757  tmp="$complete EOL"
39758  arguments="${tmp#* }"
39759
39760  # Input might be given as Windows format, start by converting to
39761  # unix format.
39762  new_path=`$CYGPATH -u "$path"`
39763
39764  # Now try to locate executable using which
39765  new_path=`$WHICH "$new_path" 2> /dev/null`
39766  # bat and cmd files are not always considered executable in cygwin causing which
39767  # to not find them
39768  if test "x$new_path" = x \
39769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39771    new_path=`$CYGPATH -u "$path"`
39772  fi
39773  if test "x$new_path" = x; then
39774    # Oops. Which didn't find the executable.
39775    # The splitting of arguments from the executable at a space might have been incorrect,
39776    # since paths with space are more likely in Windows. Give it another try with the whole
39777    # argument.
39778    path="$complete"
39779    arguments="EOL"
39780    new_path=`$CYGPATH -u "$path"`
39781    new_path=`$WHICH "$new_path" 2> /dev/null`
39782    # bat and cmd files are not always considered executable in cygwin causing which
39783    # to not find them
39784    if test "x$new_path" = x \
39785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39787      new_path=`$CYGPATH -u "$path"`
39788    fi
39789    if test "x$new_path" = x; then
39790      # It's still not found. Now this is an unrecoverable error.
39791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39792$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39793      has_space=`$ECHO "$complete" | $GREP " "`
39794      if test "x$has_space" != x; then
39795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39797      fi
39798      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39799    fi
39800  fi
39801
39802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39805  # "foo.exe" is OK but "foo" is an error.
39806  #
39807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39808  # It is also a way to make sure we got the proper file name for the real test later on.
39809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39810  if test "x$test_shortpath" = x; then
39811    # Short path failed, file does not exist as specified.
39812    # Try adding .exe or .cmd
39813    if test -f "${new_path}.exe"; then
39814      input_to_shortpath="${new_path}.exe"
39815    elif test -f "${new_path}.cmd"; then
39816      input_to_shortpath="${new_path}.cmd"
39817    else
39818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39819$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39822      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39823    fi
39824  else
39825    input_to_shortpath="$new_path"
39826  fi
39827
39828  # Call helper function which possibly converts this using DOS-style short mode.
39829  # If so, the updated path is stored in $new_path.
39830  new_path="$input_to_shortpath"
39831
39832  input_path="$input_to_shortpath"
39833  # Check if we need to convert this using DOS-style short mode. If the path
39834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39835  # take no chances and rewrite it.
39836  # Note: m4 eats our [], so we need to use [ and ] instead.
39837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39838  if test "x$has_forbidden_chars" != x; then
39839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39843      # Going to short mode and back again did indeed matter. Since short mode is
39844      # case insensitive, let's make it lowercase to improve readability.
39845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39846      # Now convert it back to Unix-style (cygpath)
39847      input_path=`$CYGPATH -u "$shortmode_path"`
39848      new_path="$input_path"
39849    fi
39850  fi
39851
39852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39853  if test "x$test_cygdrive_prefix" = x; then
39854    # As a simple fix, exclude /usr/bin since it's not a real path.
39855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39857      # a path prefixed by /cygdrive for fixpath to work.
39858      new_path="$CYGWIN_ROOT_PATH$input_path"
39859    fi
39860  fi
39861
39862  # remove trailing .exe if any
39863  new_path="${new_path/%.exe/}"
39864
39865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39866
39867  # First separate the path from the arguments. This will split at the first
39868  # space.
39869  complete="$NM"
39870  path="${complete%% *}"
39871  tmp="$complete EOL"
39872  arguments="${tmp#* }"
39873
39874  # Input might be given as Windows format, start by converting to
39875  # unix format.
39876  new_path="$path"
39877
39878  windows_path="$new_path"
39879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39880    unix_path=`$CYGPATH -u "$windows_path"`
39881    new_path="$unix_path"
39882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39884    new_path="$unix_path"
39885  fi
39886
39887
39888  # Now try to locate executable using which
39889  new_path=`$WHICH "$new_path" 2> /dev/null`
39890
39891  if test "x$new_path" = x; then
39892    # Oops. Which didn't find the executable.
39893    # The splitting of arguments from the executable at a space might have been incorrect,
39894    # since paths with space are more likely in Windows. Give it another try with the whole
39895    # argument.
39896    path="$complete"
39897    arguments="EOL"
39898    new_path="$path"
39899
39900  windows_path="$new_path"
39901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39902    unix_path=`$CYGPATH -u "$windows_path"`
39903    new_path="$unix_path"
39904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39906    new_path="$unix_path"
39907  fi
39908
39909
39910    new_path=`$WHICH "$new_path" 2> /dev/null`
39911    # bat and cmd files are not always considered executable in MSYS causing which
39912    # to not find them
39913    if test "x$new_path" = x \
39914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39916      new_path="$path"
39917
39918  windows_path="$new_path"
39919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39920    unix_path=`$CYGPATH -u "$windows_path"`
39921    new_path="$unix_path"
39922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39924    new_path="$unix_path"
39925  fi
39926
39927    fi
39928
39929    if test "x$new_path" = x; then
39930      # It's still not found. Now this is an unrecoverable error.
39931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39932$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39933      has_space=`$ECHO "$complete" | $GREP " "`
39934      if test "x$has_space" != x; then
39935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39937      fi
39938      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39939    fi
39940  fi
39941
39942  # Now new_path has a complete unix path to the binary
39943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39944    # Keep paths in /bin as-is, but remove trailing .exe if any
39945    new_path="${new_path/%.exe/}"
39946    # Do not save /bin paths to all_fixpath_prefixes!
39947  else
39948    # Not in mixed or Windows style, start by that.
39949    new_path=`cmd //c echo $new_path`
39950
39951  input_path="$new_path"
39952  # Check if we need to convert this using DOS-style short mode. If the path
39953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39954  # take no chances and rewrite it.
39955  # Note: m4 eats our [], so we need to use [ and ] instead.
39956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39957  if test "x$has_forbidden_chars" != x; then
39958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39960  fi
39961
39962    # Output is in $new_path
39963
39964  windows_path="$new_path"
39965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39966    unix_path=`$CYGPATH -u "$windows_path"`
39967    new_path="$unix_path"
39968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39970    new_path="$unix_path"
39971  fi
39972
39973    # remove trailing .exe if any
39974    new_path="${new_path/%.exe/}"
39975
39976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39978  fi
39979
39980    else
39981      # We're on a unix platform. Hooray! :)
39982      # First separate the path from the arguments. This will split at the first
39983      # space.
39984      complete="$NM"
39985      path="${complete%% *}"
39986      tmp="$complete EOL"
39987      arguments="${tmp#* }"
39988
39989      # Cannot rely on the command "which" here since it doesn't always work.
39990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39991      if test -z "$is_absolute_path"; then
39992        # Path to executable is not absolute. Find it.
39993        IFS_save="$IFS"
39994        IFS=:
39995        for p in $PATH; do
39996          if test -f "$p/$path" && test -x "$p/$path"; then
39997            new_path="$p/$path"
39998            break
39999          fi
40000        done
40001        IFS="$IFS_save"
40002      else
40003        # This is an absolute path, we can use it without further modifications.
40004        new_path="$path"
40005      fi
40006
40007      if test "x$new_path" = x; then
40008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40009$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40010        has_space=`$ECHO "$complete" | $GREP " "`
40011        if test "x$has_space" != x; then
40012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40014        fi
40015        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40016      fi
40017    fi
40018
40019    # Now join together the path and the arguments once again
40020    if test "x$arguments" != xEOL; then
40021      new_complete="$new_path ${arguments% *}"
40022    else
40023      new_complete="$new_path"
40024    fi
40025
40026    if test "x$complete" != "x$new_complete"; then
40027      NM="$new_complete"
40028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40029$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40030    fi
40031  fi
40032
40033
40034
40035  # Publish this variable in the help.
40036
40037
40038  if [ -z "${GNM+x}" ]; then
40039    # The variable is not set by user, try to locate tool using the code snippet
40040    for ac_prog in gnm
40041do
40042  # Extract the first word of "$ac_prog", so it can be a program name with args.
40043set dummy $ac_prog; ac_word=$2
40044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40045$as_echo_n "checking for $ac_word... " >&6; }
40046if ${ac_cv_path_GNM+:} false; then :
40047  $as_echo_n "(cached) " >&6
40048else
40049  case $GNM in
40050  [\\/]* | ?:[\\/]*)
40051  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40052  ;;
40053  *)
40054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40055for as_dir in $PATH
40056do
40057  IFS=$as_save_IFS
40058  test -z "$as_dir" && as_dir=.
40059    for ac_exec_ext in '' $ac_executable_extensions; do
40060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40061    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40063    break 2
40064  fi
40065done
40066  done
40067IFS=$as_save_IFS
40068
40069  ;;
40070esac
40071fi
40072GNM=$ac_cv_path_GNM
40073if test -n "$GNM"; then
40074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40075$as_echo "$GNM" >&6; }
40076else
40077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40078$as_echo "no" >&6; }
40079fi
40080
40081
40082  test -n "$GNM" && break
40083done
40084
40085  else
40086    # The variable is set, but is it from the command line or the environment?
40087
40088    # Try to remove the string !GNM! from our list.
40089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40091      # If it failed, the variable was not from the command line. Ignore it,
40092      # but warn the user (except for BASH, which is always set by the calling BASH).
40093      if test "xGNM" != xBASH; then
40094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40095$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40096      fi
40097      # Try to locate tool using the code snippet
40098      for ac_prog in gnm
40099do
40100  # Extract the first word of "$ac_prog", so it can be a program name with args.
40101set dummy $ac_prog; ac_word=$2
40102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40103$as_echo_n "checking for $ac_word... " >&6; }
40104if ${ac_cv_path_GNM+:} false; then :
40105  $as_echo_n "(cached) " >&6
40106else
40107  case $GNM in
40108  [\\/]* | ?:[\\/]*)
40109  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40110  ;;
40111  *)
40112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40113for as_dir in $PATH
40114do
40115  IFS=$as_save_IFS
40116  test -z "$as_dir" && as_dir=.
40117    for ac_exec_ext in '' $ac_executable_extensions; do
40118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40119    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40121    break 2
40122  fi
40123done
40124  done
40125IFS=$as_save_IFS
40126
40127  ;;
40128esac
40129fi
40130GNM=$ac_cv_path_GNM
40131if test -n "$GNM"; then
40132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40133$as_echo "$GNM" >&6; }
40134else
40135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40136$as_echo "no" >&6; }
40137fi
40138
40139
40140  test -n "$GNM" && break
40141done
40142
40143    else
40144      # If it succeeded, then it was overridden by the user. We will use it
40145      # for the tool.
40146
40147      # First remove it from the list of overridden variables, so we can test
40148      # for unknown variables in the end.
40149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40150
40151      # Check if we try to supply an empty value
40152      if test "x$GNM" = x; then
40153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40154$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40156$as_echo_n "checking for GNM... " >&6; }
40157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40158$as_echo "disabled" >&6; }
40159      else
40160        # Check if the provided tool contains a complete path.
40161        tool_specified="$GNM"
40162        tool_basename="${tool_specified##*/}"
40163        if test "x$tool_basename" = "x$tool_specified"; then
40164          # A command without a complete path is provided, search $PATH.
40165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40166$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40167          # Extract the first word of "$tool_basename", so it can be a program name with args.
40168set dummy $tool_basename; ac_word=$2
40169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40170$as_echo_n "checking for $ac_word... " >&6; }
40171if ${ac_cv_path_GNM+:} false; then :
40172  $as_echo_n "(cached) " >&6
40173else
40174  case $GNM in
40175  [\\/]* | ?:[\\/]*)
40176  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40177  ;;
40178  *)
40179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40180for as_dir in $PATH
40181do
40182  IFS=$as_save_IFS
40183  test -z "$as_dir" && as_dir=.
40184    for ac_exec_ext in '' $ac_executable_extensions; do
40185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40186    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40188    break 2
40189  fi
40190done
40191  done
40192IFS=$as_save_IFS
40193
40194  ;;
40195esac
40196fi
40197GNM=$ac_cv_path_GNM
40198if test -n "$GNM"; then
40199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40200$as_echo "$GNM" >&6; }
40201else
40202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40203$as_echo "no" >&6; }
40204fi
40205
40206
40207          if test "x$GNM" = x; then
40208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40209          fi
40210        else
40211          # Otherwise we believe it is a complete path. Use it as it is.
40212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40213$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40215$as_echo_n "checking for GNM... " >&6; }
40216          if test ! -x "$tool_specified"; then
40217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40218$as_echo "not found" >&6; }
40219            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40220          fi
40221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40222$as_echo "$tool_specified" >&6; }
40223        fi
40224      fi
40225    fi
40226
40227  fi
40228
40229
40230
40231  # Only process if variable expands to non-empty
40232
40233  if test "x$GNM" != x; then
40234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40235
40236  # First separate the path from the arguments. This will split at the first
40237  # space.
40238  complete="$GNM"
40239  path="${complete%% *}"
40240  tmp="$complete EOL"
40241  arguments="${tmp#* }"
40242
40243  # Input might be given as Windows format, start by converting to
40244  # unix format.
40245  new_path=`$CYGPATH -u "$path"`
40246
40247  # Now try to locate executable using which
40248  new_path=`$WHICH "$new_path" 2> /dev/null`
40249  # bat and cmd files are not always considered executable in cygwin causing which
40250  # to not find them
40251  if test "x$new_path" = x \
40252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40254    new_path=`$CYGPATH -u "$path"`
40255  fi
40256  if test "x$new_path" = x; then
40257    # Oops. Which didn't find the executable.
40258    # The splitting of arguments from the executable at a space might have been incorrect,
40259    # since paths with space are more likely in Windows. Give it another try with the whole
40260    # argument.
40261    path="$complete"
40262    arguments="EOL"
40263    new_path=`$CYGPATH -u "$path"`
40264    new_path=`$WHICH "$new_path" 2> /dev/null`
40265    # bat and cmd files are not always considered executable in cygwin causing which
40266    # to not find them
40267    if test "x$new_path" = x \
40268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40270      new_path=`$CYGPATH -u "$path"`
40271    fi
40272    if test "x$new_path" = x; then
40273      # It's still not found. Now this is an unrecoverable error.
40274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40275$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40276      has_space=`$ECHO "$complete" | $GREP " "`
40277      if test "x$has_space" != x; then
40278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40280      fi
40281      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40282    fi
40283  fi
40284
40285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40288  # "foo.exe" is OK but "foo" is an error.
40289  #
40290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40291  # It is also a way to make sure we got the proper file name for the real test later on.
40292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40293  if test "x$test_shortpath" = x; then
40294    # Short path failed, file does not exist as specified.
40295    # Try adding .exe or .cmd
40296    if test -f "${new_path}.exe"; then
40297      input_to_shortpath="${new_path}.exe"
40298    elif test -f "${new_path}.cmd"; then
40299      input_to_shortpath="${new_path}.cmd"
40300    else
40301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40302$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40305      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40306    fi
40307  else
40308    input_to_shortpath="$new_path"
40309  fi
40310
40311  # Call helper function which possibly converts this using DOS-style short mode.
40312  # If so, the updated path is stored in $new_path.
40313  new_path="$input_to_shortpath"
40314
40315  input_path="$input_to_shortpath"
40316  # Check if we need to convert this using DOS-style short mode. If the path
40317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40318  # take no chances and rewrite it.
40319  # Note: m4 eats our [], so we need to use [ and ] instead.
40320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40321  if test "x$has_forbidden_chars" != x; then
40322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40326      # Going to short mode and back again did indeed matter. Since short mode is
40327      # case insensitive, let's make it lowercase to improve readability.
40328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40329      # Now convert it back to Unix-style (cygpath)
40330      input_path=`$CYGPATH -u "$shortmode_path"`
40331      new_path="$input_path"
40332    fi
40333  fi
40334
40335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40336  if test "x$test_cygdrive_prefix" = x; then
40337    # As a simple fix, exclude /usr/bin since it's not a real path.
40338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40340      # a path prefixed by /cygdrive for fixpath to work.
40341      new_path="$CYGWIN_ROOT_PATH$input_path"
40342    fi
40343  fi
40344
40345  # remove trailing .exe if any
40346  new_path="${new_path/%.exe/}"
40347
40348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40349
40350  # First separate the path from the arguments. This will split at the first
40351  # space.
40352  complete="$GNM"
40353  path="${complete%% *}"
40354  tmp="$complete EOL"
40355  arguments="${tmp#* }"
40356
40357  # Input might be given as Windows format, start by converting to
40358  # unix format.
40359  new_path="$path"
40360
40361  windows_path="$new_path"
40362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40363    unix_path=`$CYGPATH -u "$windows_path"`
40364    new_path="$unix_path"
40365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40367    new_path="$unix_path"
40368  fi
40369
40370
40371  # Now try to locate executable using which
40372  new_path=`$WHICH "$new_path" 2> /dev/null`
40373
40374  if test "x$new_path" = x; then
40375    # Oops. Which didn't find the executable.
40376    # The splitting of arguments from the executable at a space might have been incorrect,
40377    # since paths with space are more likely in Windows. Give it another try with the whole
40378    # argument.
40379    path="$complete"
40380    arguments="EOL"
40381    new_path="$path"
40382
40383  windows_path="$new_path"
40384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40385    unix_path=`$CYGPATH -u "$windows_path"`
40386    new_path="$unix_path"
40387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40389    new_path="$unix_path"
40390  fi
40391
40392
40393    new_path=`$WHICH "$new_path" 2> /dev/null`
40394    # bat and cmd files are not always considered executable in MSYS causing which
40395    # to not find them
40396    if test "x$new_path" = x \
40397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40399      new_path="$path"
40400
40401  windows_path="$new_path"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    unix_path=`$CYGPATH -u "$windows_path"`
40404    new_path="$unix_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40407    new_path="$unix_path"
40408  fi
40409
40410    fi
40411
40412    if test "x$new_path" = x; then
40413      # It's still not found. Now this is an unrecoverable error.
40414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40415$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40416      has_space=`$ECHO "$complete" | $GREP " "`
40417      if test "x$has_space" != x; then
40418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40420      fi
40421      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40422    fi
40423  fi
40424
40425  # Now new_path has a complete unix path to the binary
40426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40427    # Keep paths in /bin as-is, but remove trailing .exe if any
40428    new_path="${new_path/%.exe/}"
40429    # Do not save /bin paths to all_fixpath_prefixes!
40430  else
40431    # Not in mixed or Windows style, start by that.
40432    new_path=`cmd //c echo $new_path`
40433
40434  input_path="$new_path"
40435  # Check if we need to convert this using DOS-style short mode. If the path
40436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40437  # take no chances and rewrite it.
40438  # Note: m4 eats our [], so we need to use [ and ] instead.
40439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40440  if test "x$has_forbidden_chars" != x; then
40441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40443  fi
40444
40445    # Output is in $new_path
40446
40447  windows_path="$new_path"
40448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40449    unix_path=`$CYGPATH -u "$windows_path"`
40450    new_path="$unix_path"
40451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40453    new_path="$unix_path"
40454  fi
40455
40456    # remove trailing .exe if any
40457    new_path="${new_path/%.exe/}"
40458
40459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40461  fi
40462
40463    else
40464      # We're on a unix platform. Hooray! :)
40465      # First separate the path from the arguments. This will split at the first
40466      # space.
40467      complete="$GNM"
40468      path="${complete%% *}"
40469      tmp="$complete EOL"
40470      arguments="${tmp#* }"
40471
40472      # Cannot rely on the command "which" here since it doesn't always work.
40473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40474      if test -z "$is_absolute_path"; then
40475        # Path to executable is not absolute. Find it.
40476        IFS_save="$IFS"
40477        IFS=:
40478        for p in $PATH; do
40479          if test -f "$p/$path" && test -x "$p/$path"; then
40480            new_path="$p/$path"
40481            break
40482          fi
40483        done
40484        IFS="$IFS_save"
40485      else
40486        # This is an absolute path, we can use it without further modifications.
40487        new_path="$path"
40488      fi
40489
40490      if test "x$new_path" = x; then
40491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40492$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40493        has_space=`$ECHO "$complete" | $GREP " "`
40494        if test "x$has_space" != x; then
40495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40497        fi
40498        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40499      fi
40500    fi
40501
40502    # Now join together the path and the arguments once again
40503    if test "x$arguments" != xEOL; then
40504      new_complete="$new_path ${arguments% *}"
40505    else
40506      new_complete="$new_path"
40507    fi
40508
40509    if test "x$complete" != "x$new_complete"; then
40510      GNM="$new_complete"
40511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40512$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40513    fi
40514  fi
40515
40516  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40517    # FIXME: we should unify this with the solaris case above.
40518
40519
40520  # Publish this variable in the help.
40521
40522
40523  if [ -z "${STRIP+x}" ]; then
40524    # The variable is not set by user, try to locate tool using the code snippet
40525    if test -n "$ac_tool_prefix"; then
40526  for ac_prog in strip
40527  do
40528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40531$as_echo_n "checking for $ac_word... " >&6; }
40532if ${ac_cv_prog_STRIP+:} false; then :
40533  $as_echo_n "(cached) " >&6
40534else
40535  if test -n "$STRIP"; then
40536  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40537else
40538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40539for as_dir in $PATH
40540do
40541  IFS=$as_save_IFS
40542  test -z "$as_dir" && as_dir=.
40543    for ac_exec_ext in '' $ac_executable_extensions; do
40544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40545    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40547    break 2
40548  fi
40549done
40550  done
40551IFS=$as_save_IFS
40552
40553fi
40554fi
40555STRIP=$ac_cv_prog_STRIP
40556if test -n "$STRIP"; then
40557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40558$as_echo "$STRIP" >&6; }
40559else
40560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40561$as_echo "no" >&6; }
40562fi
40563
40564
40565    test -n "$STRIP" && break
40566  done
40567fi
40568if test -z "$STRIP"; then
40569  ac_ct_STRIP=$STRIP
40570  for ac_prog in strip
40571do
40572  # Extract the first word of "$ac_prog", so it can be a program name with args.
40573set dummy $ac_prog; ac_word=$2
40574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40575$as_echo_n "checking for $ac_word... " >&6; }
40576if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40577  $as_echo_n "(cached) " >&6
40578else
40579  if test -n "$ac_ct_STRIP"; then
40580  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40581else
40582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40583for as_dir in $PATH
40584do
40585  IFS=$as_save_IFS
40586  test -z "$as_dir" && as_dir=.
40587    for ac_exec_ext in '' $ac_executable_extensions; do
40588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40589    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40591    break 2
40592  fi
40593done
40594  done
40595IFS=$as_save_IFS
40596
40597fi
40598fi
40599ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40600if test -n "$ac_ct_STRIP"; then
40601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40602$as_echo "$ac_ct_STRIP" >&6; }
40603else
40604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40605$as_echo "no" >&6; }
40606fi
40607
40608
40609  test -n "$ac_ct_STRIP" && break
40610done
40611
40612  if test "x$ac_ct_STRIP" = x; then
40613    STRIP=""
40614  else
40615    case $cross_compiling:$ac_tool_warned in
40616yes:)
40617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40619ac_tool_warned=yes ;;
40620esac
40621    STRIP=$ac_ct_STRIP
40622  fi
40623fi
40624
40625  else
40626    # The variable is set, but is it from the command line or the environment?
40627
40628    # Try to remove the string !STRIP! from our list.
40629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40631      # If it failed, the variable was not from the command line. Ignore it,
40632      # but warn the user (except for BASH, which is always set by the calling BASH).
40633      if test "xSTRIP" != xBASH; then
40634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40635$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40636      fi
40637      # Try to locate tool using the code snippet
40638      if test -n "$ac_tool_prefix"; then
40639  for ac_prog in strip
40640  do
40641    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40644$as_echo_n "checking for $ac_word... " >&6; }
40645if ${ac_cv_prog_STRIP+:} false; then :
40646  $as_echo_n "(cached) " >&6
40647else
40648  if test -n "$STRIP"; then
40649  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40650else
40651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40652for as_dir in $PATH
40653do
40654  IFS=$as_save_IFS
40655  test -z "$as_dir" && as_dir=.
40656    for ac_exec_ext in '' $ac_executable_extensions; do
40657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40658    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40660    break 2
40661  fi
40662done
40663  done
40664IFS=$as_save_IFS
40665
40666fi
40667fi
40668STRIP=$ac_cv_prog_STRIP
40669if test -n "$STRIP"; then
40670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40671$as_echo "$STRIP" >&6; }
40672else
40673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40674$as_echo "no" >&6; }
40675fi
40676
40677
40678    test -n "$STRIP" && break
40679  done
40680fi
40681if test -z "$STRIP"; then
40682  ac_ct_STRIP=$STRIP
40683  for ac_prog in strip
40684do
40685  # Extract the first word of "$ac_prog", so it can be a program name with args.
40686set dummy $ac_prog; ac_word=$2
40687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40688$as_echo_n "checking for $ac_word... " >&6; }
40689if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40690  $as_echo_n "(cached) " >&6
40691else
40692  if test -n "$ac_ct_STRIP"; then
40693  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40694else
40695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40696for as_dir in $PATH
40697do
40698  IFS=$as_save_IFS
40699  test -z "$as_dir" && as_dir=.
40700    for ac_exec_ext in '' $ac_executable_extensions; do
40701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40702    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40704    break 2
40705  fi
40706done
40707  done
40708IFS=$as_save_IFS
40709
40710fi
40711fi
40712ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40713if test -n "$ac_ct_STRIP"; then
40714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40715$as_echo "$ac_ct_STRIP" >&6; }
40716else
40717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40718$as_echo "no" >&6; }
40719fi
40720
40721
40722  test -n "$ac_ct_STRIP" && break
40723done
40724
40725  if test "x$ac_ct_STRIP" = x; then
40726    STRIP=""
40727  else
40728    case $cross_compiling:$ac_tool_warned in
40729yes:)
40730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40732ac_tool_warned=yes ;;
40733esac
40734    STRIP=$ac_ct_STRIP
40735  fi
40736fi
40737
40738    else
40739      # If it succeeded, then it was overridden by the user. We will use it
40740      # for the tool.
40741
40742      # First remove it from the list of overridden variables, so we can test
40743      # for unknown variables in the end.
40744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40745
40746      # Check if we try to supply an empty value
40747      if test "x$STRIP" = x; then
40748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40749$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40751$as_echo_n "checking for STRIP... " >&6; }
40752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40753$as_echo "disabled" >&6; }
40754      else
40755        # Check if the provided tool contains a complete path.
40756        tool_specified="$STRIP"
40757        tool_basename="${tool_specified##*/}"
40758        if test "x$tool_basename" = "x$tool_specified"; then
40759          # A command without a complete path is provided, search $PATH.
40760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40761$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40762          # Extract the first word of "$tool_basename", so it can be a program name with args.
40763set dummy $tool_basename; ac_word=$2
40764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40765$as_echo_n "checking for $ac_word... " >&6; }
40766if ${ac_cv_path_STRIP+:} false; then :
40767  $as_echo_n "(cached) " >&6
40768else
40769  case $STRIP in
40770  [\\/]* | ?:[\\/]*)
40771  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40772  ;;
40773  *)
40774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40775for as_dir in $PATH
40776do
40777  IFS=$as_save_IFS
40778  test -z "$as_dir" && as_dir=.
40779    for ac_exec_ext in '' $ac_executable_extensions; do
40780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40781    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40783    break 2
40784  fi
40785done
40786  done
40787IFS=$as_save_IFS
40788
40789  ;;
40790esac
40791fi
40792STRIP=$ac_cv_path_STRIP
40793if test -n "$STRIP"; then
40794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40795$as_echo "$STRIP" >&6; }
40796else
40797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40798$as_echo "no" >&6; }
40799fi
40800
40801
40802          if test "x$STRIP" = x; then
40803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40804          fi
40805        else
40806          # Otherwise we believe it is a complete path. Use it as it is.
40807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40808$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40810$as_echo_n "checking for STRIP... " >&6; }
40811          if test ! -x "$tool_specified"; then
40812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40813$as_echo "not found" >&6; }
40814            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40815          fi
40816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40817$as_echo "$tool_specified" >&6; }
40818        fi
40819      fi
40820    fi
40821
40822  fi
40823
40824
40825
40826  # Only process if variable expands to non-empty
40827
40828  if test "x$STRIP" != x; then
40829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40830
40831  # First separate the path from the arguments. This will split at the first
40832  # space.
40833  complete="$STRIP"
40834  path="${complete%% *}"
40835  tmp="$complete EOL"
40836  arguments="${tmp#* }"
40837
40838  # Input might be given as Windows format, start by converting to
40839  # unix format.
40840  new_path=`$CYGPATH -u "$path"`
40841
40842  # Now try to locate executable using which
40843  new_path=`$WHICH "$new_path" 2> /dev/null`
40844  # bat and cmd files are not always considered executable in cygwin causing which
40845  # to not find them
40846  if test "x$new_path" = x \
40847      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40848      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40849    new_path=`$CYGPATH -u "$path"`
40850  fi
40851  if test "x$new_path" = x; then
40852    # Oops. Which didn't find the executable.
40853    # The splitting of arguments from the executable at a space might have been incorrect,
40854    # since paths with space are more likely in Windows. Give it another try with the whole
40855    # argument.
40856    path="$complete"
40857    arguments="EOL"
40858    new_path=`$CYGPATH -u "$path"`
40859    new_path=`$WHICH "$new_path" 2> /dev/null`
40860    # bat and cmd files are not always considered executable in cygwin causing which
40861    # to not find them
40862    if test "x$new_path" = x \
40863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40865      new_path=`$CYGPATH -u "$path"`
40866    fi
40867    if test "x$new_path" = x; then
40868      # It's still not found. Now this is an unrecoverable error.
40869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40870$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40871      has_space=`$ECHO "$complete" | $GREP " "`
40872      if test "x$has_space" != x; then
40873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40875      fi
40876      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40877    fi
40878  fi
40879
40880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40883  # "foo.exe" is OK but "foo" is an error.
40884  #
40885  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40886  # It is also a way to make sure we got the proper file name for the real test later on.
40887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40888  if test "x$test_shortpath" = x; then
40889    # Short path failed, file does not exist as specified.
40890    # Try adding .exe or .cmd
40891    if test -f "${new_path}.exe"; then
40892      input_to_shortpath="${new_path}.exe"
40893    elif test -f "${new_path}.cmd"; then
40894      input_to_shortpath="${new_path}.cmd"
40895    else
40896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40897$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40898      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40899$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40900      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40901    fi
40902  else
40903    input_to_shortpath="$new_path"
40904  fi
40905
40906  # Call helper function which possibly converts this using DOS-style short mode.
40907  # If so, the updated path is stored in $new_path.
40908  new_path="$input_to_shortpath"
40909
40910  input_path="$input_to_shortpath"
40911  # Check if we need to convert this using DOS-style short mode. If the path
40912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40913  # take no chances and rewrite it.
40914  # Note: m4 eats our [], so we need to use [ and ] instead.
40915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40916  if test "x$has_forbidden_chars" != x; then
40917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40921      # Going to short mode and back again did indeed matter. Since short mode is
40922      # case insensitive, let's make it lowercase to improve readability.
40923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40924      # Now convert it back to Unix-style (cygpath)
40925      input_path=`$CYGPATH -u "$shortmode_path"`
40926      new_path="$input_path"
40927    fi
40928  fi
40929
40930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40931  if test "x$test_cygdrive_prefix" = x; then
40932    # As a simple fix, exclude /usr/bin since it's not a real path.
40933    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40935      # a path prefixed by /cygdrive for fixpath to work.
40936      new_path="$CYGWIN_ROOT_PATH$input_path"
40937    fi
40938  fi
40939
40940  # remove trailing .exe if any
40941  new_path="${new_path/%.exe/}"
40942
40943    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40944
40945  # First separate the path from the arguments. This will split at the first
40946  # space.
40947  complete="$STRIP"
40948  path="${complete%% *}"
40949  tmp="$complete EOL"
40950  arguments="${tmp#* }"
40951
40952  # Input might be given as Windows format, start by converting to
40953  # unix format.
40954  new_path="$path"
40955
40956  windows_path="$new_path"
40957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40958    unix_path=`$CYGPATH -u "$windows_path"`
40959    new_path="$unix_path"
40960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40962    new_path="$unix_path"
40963  fi
40964
40965
40966  # Now try to locate executable using which
40967  new_path=`$WHICH "$new_path" 2> /dev/null`
40968
40969  if test "x$new_path" = x; then
40970    # Oops. Which didn't find the executable.
40971    # The splitting of arguments from the executable at a space might have been incorrect,
40972    # since paths with space are more likely in Windows. Give it another try with the whole
40973    # argument.
40974    path="$complete"
40975    arguments="EOL"
40976    new_path="$path"
40977
40978  windows_path="$new_path"
40979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40980    unix_path=`$CYGPATH -u "$windows_path"`
40981    new_path="$unix_path"
40982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40984    new_path="$unix_path"
40985  fi
40986
40987
40988    new_path=`$WHICH "$new_path" 2> /dev/null`
40989    # bat and cmd files are not always considered executable in MSYS causing which
40990    # to not find them
40991    if test "x$new_path" = x \
40992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40994      new_path="$path"
40995
40996  windows_path="$new_path"
40997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40998    unix_path=`$CYGPATH -u "$windows_path"`
40999    new_path="$unix_path"
41000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41002    new_path="$unix_path"
41003  fi
41004
41005    fi
41006
41007    if test "x$new_path" = x; then
41008      # It's still not found. Now this is an unrecoverable error.
41009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41010$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41011      has_space=`$ECHO "$complete" | $GREP " "`
41012      if test "x$has_space" != x; then
41013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41015      fi
41016      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41017    fi
41018  fi
41019
41020  # Now new_path has a complete unix path to the binary
41021  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41022    # Keep paths in /bin as-is, but remove trailing .exe if any
41023    new_path="${new_path/%.exe/}"
41024    # Do not save /bin paths to all_fixpath_prefixes!
41025  else
41026    # Not in mixed or Windows style, start by that.
41027    new_path=`cmd //c echo $new_path`
41028
41029  input_path="$new_path"
41030  # Check if we need to convert this using DOS-style short mode. If the path
41031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41032  # take no chances and rewrite it.
41033  # Note: m4 eats our [], so we need to use [ and ] instead.
41034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41035  if test "x$has_forbidden_chars" != x; then
41036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41038  fi
41039
41040    # Output is in $new_path
41041
41042  windows_path="$new_path"
41043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41044    unix_path=`$CYGPATH -u "$windows_path"`
41045    new_path="$unix_path"
41046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41048    new_path="$unix_path"
41049  fi
41050
41051    # remove trailing .exe if any
41052    new_path="${new_path/%.exe/}"
41053
41054    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41055    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41056  fi
41057
41058    else
41059      # We're on a unix platform. Hooray! :)
41060      # First separate the path from the arguments. This will split at the first
41061      # space.
41062      complete="$STRIP"
41063      path="${complete%% *}"
41064      tmp="$complete EOL"
41065      arguments="${tmp#* }"
41066
41067      # Cannot rely on the command "which" here since it doesn't always work.
41068      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41069      if test -z "$is_absolute_path"; then
41070        # Path to executable is not absolute. Find it.
41071        IFS_save="$IFS"
41072        IFS=:
41073        for p in $PATH; do
41074          if test -f "$p/$path" && test -x "$p/$path"; then
41075            new_path="$p/$path"
41076            break
41077          fi
41078        done
41079        IFS="$IFS_save"
41080      else
41081        # This is an absolute path, we can use it without further modifications.
41082        new_path="$path"
41083      fi
41084
41085      if test "x$new_path" = x; then
41086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41087$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41088        has_space=`$ECHO "$complete" | $GREP " "`
41089        if test "x$has_space" != x; then
41090          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41091$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41092        fi
41093        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41094      fi
41095    fi
41096
41097    # Now join together the path and the arguments once again
41098    if test "x$arguments" != xEOL; then
41099      new_complete="$new_path ${arguments% *}"
41100    else
41101      new_complete="$new_path"
41102    fi
41103
41104    if test "x$complete" != "x$new_complete"; then
41105      STRIP="$new_complete"
41106      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41107$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41108    fi
41109  fi
41110
41111    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41112
41113
41114  # Publish this variable in the help.
41115
41116
41117  if [ -z "${NM+x}" ]; then
41118    # The variable is not set by user, try to locate tool using the code snippet
41119    if test -n "$ac_tool_prefix"; then
41120  for ac_prog in nm gcc-nm
41121  do
41122    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41125$as_echo_n "checking for $ac_word... " >&6; }
41126if ${ac_cv_prog_NM+:} false; then :
41127  $as_echo_n "(cached) " >&6
41128else
41129  if test -n "$NM"; then
41130  ac_cv_prog_NM="$NM" # Let the user override the test.
41131else
41132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41133for as_dir in $PATH
41134do
41135  IFS=$as_save_IFS
41136  test -z "$as_dir" && as_dir=.
41137    for ac_exec_ext in '' $ac_executable_extensions; do
41138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41139    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41141    break 2
41142  fi
41143done
41144  done
41145IFS=$as_save_IFS
41146
41147fi
41148fi
41149NM=$ac_cv_prog_NM
41150if test -n "$NM"; then
41151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41152$as_echo "$NM" >&6; }
41153else
41154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41155$as_echo "no" >&6; }
41156fi
41157
41158
41159    test -n "$NM" && break
41160  done
41161fi
41162if test -z "$NM"; then
41163  ac_ct_NM=$NM
41164  for ac_prog in nm gcc-nm
41165do
41166  # Extract the first word of "$ac_prog", so it can be a program name with args.
41167set dummy $ac_prog; ac_word=$2
41168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41169$as_echo_n "checking for $ac_word... " >&6; }
41170if ${ac_cv_prog_ac_ct_NM+:} false; then :
41171  $as_echo_n "(cached) " >&6
41172else
41173  if test -n "$ac_ct_NM"; then
41174  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41175else
41176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41177for as_dir in $PATH
41178do
41179  IFS=$as_save_IFS
41180  test -z "$as_dir" && as_dir=.
41181    for ac_exec_ext in '' $ac_executable_extensions; do
41182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41183    ac_cv_prog_ac_ct_NM="$ac_prog"
41184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41185    break 2
41186  fi
41187done
41188  done
41189IFS=$as_save_IFS
41190
41191fi
41192fi
41193ac_ct_NM=$ac_cv_prog_ac_ct_NM
41194if test -n "$ac_ct_NM"; then
41195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41196$as_echo "$ac_ct_NM" >&6; }
41197else
41198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41199$as_echo "no" >&6; }
41200fi
41201
41202
41203  test -n "$ac_ct_NM" && break
41204done
41205
41206  if test "x$ac_ct_NM" = x; then
41207    NM=""
41208  else
41209    case $cross_compiling:$ac_tool_warned in
41210yes:)
41211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41213ac_tool_warned=yes ;;
41214esac
41215    NM=$ac_ct_NM
41216  fi
41217fi
41218
41219  else
41220    # The variable is set, but is it from the command line or the environment?
41221
41222    # Try to remove the string !NM! from our list.
41223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41225      # If it failed, the variable was not from the command line. Ignore it,
41226      # but warn the user (except for BASH, which is always set by the calling BASH).
41227      if test "xNM" != xBASH; then
41228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41229$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41230      fi
41231      # Try to locate tool using the code snippet
41232      if test -n "$ac_tool_prefix"; then
41233  for ac_prog in nm gcc-nm
41234  do
41235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41238$as_echo_n "checking for $ac_word... " >&6; }
41239if ${ac_cv_prog_NM+:} false; then :
41240  $as_echo_n "(cached) " >&6
41241else
41242  if test -n "$NM"; then
41243  ac_cv_prog_NM="$NM" # Let the user override the test.
41244else
41245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41246for as_dir in $PATH
41247do
41248  IFS=$as_save_IFS
41249  test -z "$as_dir" && as_dir=.
41250    for ac_exec_ext in '' $ac_executable_extensions; do
41251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41252    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41254    break 2
41255  fi
41256done
41257  done
41258IFS=$as_save_IFS
41259
41260fi
41261fi
41262NM=$ac_cv_prog_NM
41263if test -n "$NM"; then
41264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41265$as_echo "$NM" >&6; }
41266else
41267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41268$as_echo "no" >&6; }
41269fi
41270
41271
41272    test -n "$NM" && break
41273  done
41274fi
41275if test -z "$NM"; then
41276  ac_ct_NM=$NM
41277  for ac_prog in nm gcc-nm
41278do
41279  # Extract the first word of "$ac_prog", so it can be a program name with args.
41280set dummy $ac_prog; ac_word=$2
41281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41282$as_echo_n "checking for $ac_word... " >&6; }
41283if ${ac_cv_prog_ac_ct_NM+:} false; then :
41284  $as_echo_n "(cached) " >&6
41285else
41286  if test -n "$ac_ct_NM"; then
41287  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41288else
41289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41290for as_dir in $PATH
41291do
41292  IFS=$as_save_IFS
41293  test -z "$as_dir" && as_dir=.
41294    for ac_exec_ext in '' $ac_executable_extensions; do
41295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41296    ac_cv_prog_ac_ct_NM="$ac_prog"
41297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41298    break 2
41299  fi
41300done
41301  done
41302IFS=$as_save_IFS
41303
41304fi
41305fi
41306ac_ct_NM=$ac_cv_prog_ac_ct_NM
41307if test -n "$ac_ct_NM"; then
41308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41309$as_echo "$ac_ct_NM" >&6; }
41310else
41311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41312$as_echo "no" >&6; }
41313fi
41314
41315
41316  test -n "$ac_ct_NM" && break
41317done
41318
41319  if test "x$ac_ct_NM" = x; then
41320    NM=""
41321  else
41322    case $cross_compiling:$ac_tool_warned in
41323yes:)
41324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41326ac_tool_warned=yes ;;
41327esac
41328    NM=$ac_ct_NM
41329  fi
41330fi
41331
41332    else
41333      # If it succeeded, then it was overridden by the user. We will use it
41334      # for the tool.
41335
41336      # First remove it from the list of overridden variables, so we can test
41337      # for unknown variables in the end.
41338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41339
41340      # Check if we try to supply an empty value
41341      if test "x$NM" = x; then
41342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41343$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41345$as_echo_n "checking for NM... " >&6; }
41346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41347$as_echo "disabled" >&6; }
41348      else
41349        # Check if the provided tool contains a complete path.
41350        tool_specified="$NM"
41351        tool_basename="${tool_specified##*/}"
41352        if test "x$tool_basename" = "x$tool_specified"; then
41353          # A command without a complete path is provided, search $PATH.
41354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41355$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41356          # Extract the first word of "$tool_basename", so it can be a program name with args.
41357set dummy $tool_basename; ac_word=$2
41358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41359$as_echo_n "checking for $ac_word... " >&6; }
41360if ${ac_cv_path_NM+:} false; then :
41361  $as_echo_n "(cached) " >&6
41362else
41363  case $NM in
41364  [\\/]* | ?:[\\/]*)
41365  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41366  ;;
41367  *)
41368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41369for as_dir in $PATH
41370do
41371  IFS=$as_save_IFS
41372  test -z "$as_dir" && as_dir=.
41373    for ac_exec_ext in '' $ac_executable_extensions; do
41374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41375    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41377    break 2
41378  fi
41379done
41380  done
41381IFS=$as_save_IFS
41382
41383  ;;
41384esac
41385fi
41386NM=$ac_cv_path_NM
41387if test -n "$NM"; then
41388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41389$as_echo "$NM" >&6; }
41390else
41391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41392$as_echo "no" >&6; }
41393fi
41394
41395
41396          if test "x$NM" = x; then
41397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41398          fi
41399        else
41400          # Otherwise we believe it is a complete path. Use it as it is.
41401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41402$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41404$as_echo_n "checking for NM... " >&6; }
41405          if test ! -x "$tool_specified"; then
41406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41407$as_echo "not found" >&6; }
41408            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41409          fi
41410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41411$as_echo "$tool_specified" >&6; }
41412        fi
41413      fi
41414    fi
41415
41416  fi
41417
41418
41419    else
41420
41421
41422  # Publish this variable in the help.
41423
41424
41425  if [ -z "${NM+x}" ]; then
41426    # The variable is not set by user, try to locate tool using the code snippet
41427    if test -n "$ac_tool_prefix"; then
41428  for ac_prog in nm
41429  do
41430    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41431set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41433$as_echo_n "checking for $ac_word... " >&6; }
41434if ${ac_cv_prog_NM+:} false; then :
41435  $as_echo_n "(cached) " >&6
41436else
41437  if test -n "$NM"; then
41438  ac_cv_prog_NM="$NM" # Let the user override the test.
41439else
41440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41441for as_dir in $PATH
41442do
41443  IFS=$as_save_IFS
41444  test -z "$as_dir" && as_dir=.
41445    for ac_exec_ext in '' $ac_executable_extensions; do
41446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41447    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41449    break 2
41450  fi
41451done
41452  done
41453IFS=$as_save_IFS
41454
41455fi
41456fi
41457NM=$ac_cv_prog_NM
41458if test -n "$NM"; then
41459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41460$as_echo "$NM" >&6; }
41461else
41462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41463$as_echo "no" >&6; }
41464fi
41465
41466
41467    test -n "$NM" && break
41468  done
41469fi
41470if test -z "$NM"; then
41471  ac_ct_NM=$NM
41472  for ac_prog in nm
41473do
41474  # Extract the first word of "$ac_prog", so it can be a program name with args.
41475set dummy $ac_prog; ac_word=$2
41476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41477$as_echo_n "checking for $ac_word... " >&6; }
41478if ${ac_cv_prog_ac_ct_NM+:} false; then :
41479  $as_echo_n "(cached) " >&6
41480else
41481  if test -n "$ac_ct_NM"; then
41482  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41483else
41484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41485for as_dir in $PATH
41486do
41487  IFS=$as_save_IFS
41488  test -z "$as_dir" && as_dir=.
41489    for ac_exec_ext in '' $ac_executable_extensions; do
41490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41491    ac_cv_prog_ac_ct_NM="$ac_prog"
41492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41493    break 2
41494  fi
41495done
41496  done
41497IFS=$as_save_IFS
41498
41499fi
41500fi
41501ac_ct_NM=$ac_cv_prog_ac_ct_NM
41502if test -n "$ac_ct_NM"; then
41503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41504$as_echo "$ac_ct_NM" >&6; }
41505else
41506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41507$as_echo "no" >&6; }
41508fi
41509
41510
41511  test -n "$ac_ct_NM" && break
41512done
41513
41514  if test "x$ac_ct_NM" = x; then
41515    NM=""
41516  else
41517    case $cross_compiling:$ac_tool_warned in
41518yes:)
41519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41521ac_tool_warned=yes ;;
41522esac
41523    NM=$ac_ct_NM
41524  fi
41525fi
41526
41527  else
41528    # The variable is set, but is it from the command line or the environment?
41529
41530    # Try to remove the string !NM! from our list.
41531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41533      # If it failed, the variable was not from the command line. Ignore it,
41534      # but warn the user (except for BASH, which is always set by the calling BASH).
41535      if test "xNM" != xBASH; then
41536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41537$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41538      fi
41539      # Try to locate tool using the code snippet
41540      if test -n "$ac_tool_prefix"; then
41541  for ac_prog in nm
41542  do
41543    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41544set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41546$as_echo_n "checking for $ac_word... " >&6; }
41547if ${ac_cv_prog_NM+:} false; then :
41548  $as_echo_n "(cached) " >&6
41549else
41550  if test -n "$NM"; then
41551  ac_cv_prog_NM="$NM" # Let the user override the test.
41552else
41553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41554for as_dir in $PATH
41555do
41556  IFS=$as_save_IFS
41557  test -z "$as_dir" && as_dir=.
41558    for ac_exec_ext in '' $ac_executable_extensions; do
41559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41560    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41562    break 2
41563  fi
41564done
41565  done
41566IFS=$as_save_IFS
41567
41568fi
41569fi
41570NM=$ac_cv_prog_NM
41571if test -n "$NM"; then
41572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41573$as_echo "$NM" >&6; }
41574else
41575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41576$as_echo "no" >&6; }
41577fi
41578
41579
41580    test -n "$NM" && break
41581  done
41582fi
41583if test -z "$NM"; then
41584  ac_ct_NM=$NM
41585  for ac_prog in nm
41586do
41587  # Extract the first word of "$ac_prog", so it can be a program name with args.
41588set dummy $ac_prog; ac_word=$2
41589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41590$as_echo_n "checking for $ac_word... " >&6; }
41591if ${ac_cv_prog_ac_ct_NM+:} false; then :
41592  $as_echo_n "(cached) " >&6
41593else
41594  if test -n "$ac_ct_NM"; then
41595  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41596else
41597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41598for as_dir in $PATH
41599do
41600  IFS=$as_save_IFS
41601  test -z "$as_dir" && as_dir=.
41602    for ac_exec_ext in '' $ac_executable_extensions; do
41603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41604    ac_cv_prog_ac_ct_NM="$ac_prog"
41605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41606    break 2
41607  fi
41608done
41609  done
41610IFS=$as_save_IFS
41611
41612fi
41613fi
41614ac_ct_NM=$ac_cv_prog_ac_ct_NM
41615if test -n "$ac_ct_NM"; then
41616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41617$as_echo "$ac_ct_NM" >&6; }
41618else
41619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41620$as_echo "no" >&6; }
41621fi
41622
41623
41624  test -n "$ac_ct_NM" && break
41625done
41626
41627  if test "x$ac_ct_NM" = x; then
41628    NM=""
41629  else
41630    case $cross_compiling:$ac_tool_warned in
41631yes:)
41632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41634ac_tool_warned=yes ;;
41635esac
41636    NM=$ac_ct_NM
41637  fi
41638fi
41639
41640    else
41641      # If it succeeded, then it was overridden by the user. We will use it
41642      # for the tool.
41643
41644      # First remove it from the list of overridden variables, so we can test
41645      # for unknown variables in the end.
41646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41647
41648      # Check if we try to supply an empty value
41649      if test "x$NM" = x; then
41650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41651$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41653$as_echo_n "checking for NM... " >&6; }
41654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41655$as_echo "disabled" >&6; }
41656      else
41657        # Check if the provided tool contains a complete path.
41658        tool_specified="$NM"
41659        tool_basename="${tool_specified##*/}"
41660        if test "x$tool_basename" = "x$tool_specified"; then
41661          # A command without a complete path is provided, search $PATH.
41662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41663$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41664          # Extract the first word of "$tool_basename", so it can be a program name with args.
41665set dummy $tool_basename; ac_word=$2
41666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41667$as_echo_n "checking for $ac_word... " >&6; }
41668if ${ac_cv_path_NM+:} false; then :
41669  $as_echo_n "(cached) " >&6
41670else
41671  case $NM in
41672  [\\/]* | ?:[\\/]*)
41673  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41674  ;;
41675  *)
41676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41677for as_dir in $PATH
41678do
41679  IFS=$as_save_IFS
41680  test -z "$as_dir" && as_dir=.
41681    for ac_exec_ext in '' $ac_executable_extensions; do
41682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41683    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41685    break 2
41686  fi
41687done
41688  done
41689IFS=$as_save_IFS
41690
41691  ;;
41692esac
41693fi
41694NM=$ac_cv_path_NM
41695if test -n "$NM"; then
41696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41697$as_echo "$NM" >&6; }
41698else
41699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41700$as_echo "no" >&6; }
41701fi
41702
41703
41704          if test "x$NM" = x; then
41705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41706          fi
41707        else
41708          # Otherwise we believe it is a complete path. Use it as it is.
41709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41710$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41712$as_echo_n "checking for NM... " >&6; }
41713          if test ! -x "$tool_specified"; then
41714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41715$as_echo "not found" >&6; }
41716            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41717          fi
41718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41719$as_echo "$tool_specified" >&6; }
41720        fi
41721      fi
41722    fi
41723
41724  fi
41725
41726
41727    fi
41728
41729  # Only process if variable expands to non-empty
41730
41731  if test "x$NM" != x; then
41732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41733
41734  # First separate the path from the arguments. This will split at the first
41735  # space.
41736  complete="$NM"
41737  path="${complete%% *}"
41738  tmp="$complete EOL"
41739  arguments="${tmp#* }"
41740
41741  # Input might be given as Windows format, start by converting to
41742  # unix format.
41743  new_path=`$CYGPATH -u "$path"`
41744
41745  # Now try to locate executable using which
41746  new_path=`$WHICH "$new_path" 2> /dev/null`
41747  # bat and cmd files are not always considered executable in cygwin causing which
41748  # to not find them
41749  if test "x$new_path" = x \
41750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41752    new_path=`$CYGPATH -u "$path"`
41753  fi
41754  if test "x$new_path" = x; then
41755    # Oops. Which didn't find the executable.
41756    # The splitting of arguments from the executable at a space might have been incorrect,
41757    # since paths with space are more likely in Windows. Give it another try with the whole
41758    # argument.
41759    path="$complete"
41760    arguments="EOL"
41761    new_path=`$CYGPATH -u "$path"`
41762    new_path=`$WHICH "$new_path" 2> /dev/null`
41763    # bat and cmd files are not always considered executable in cygwin causing which
41764    # to not find them
41765    if test "x$new_path" = x \
41766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41768      new_path=`$CYGPATH -u "$path"`
41769    fi
41770    if test "x$new_path" = x; then
41771      # It's still not found. Now this is an unrecoverable error.
41772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41773$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41774      has_space=`$ECHO "$complete" | $GREP " "`
41775      if test "x$has_space" != x; then
41776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41778      fi
41779      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41780    fi
41781  fi
41782
41783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41786  # "foo.exe" is OK but "foo" is an error.
41787  #
41788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41789  # It is also a way to make sure we got the proper file name for the real test later on.
41790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41791  if test "x$test_shortpath" = x; then
41792    # Short path failed, file does not exist as specified.
41793    # Try adding .exe or .cmd
41794    if test -f "${new_path}.exe"; then
41795      input_to_shortpath="${new_path}.exe"
41796    elif test -f "${new_path}.cmd"; then
41797      input_to_shortpath="${new_path}.cmd"
41798    else
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41800$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41803      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41804    fi
41805  else
41806    input_to_shortpath="$new_path"
41807  fi
41808
41809  # Call helper function which possibly converts this using DOS-style short mode.
41810  # If so, the updated path is stored in $new_path.
41811  new_path="$input_to_shortpath"
41812
41813  input_path="$input_to_shortpath"
41814  # Check if we need to convert this using DOS-style short mode. If the path
41815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41816  # take no chances and rewrite it.
41817  # Note: m4 eats our [], so we need to use [ and ] instead.
41818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41819  if test "x$has_forbidden_chars" != x; then
41820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41824      # Going to short mode and back again did indeed matter. Since short mode is
41825      # case insensitive, let's make it lowercase to improve readability.
41826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41827      # Now convert it back to Unix-style (cygpath)
41828      input_path=`$CYGPATH -u "$shortmode_path"`
41829      new_path="$input_path"
41830    fi
41831  fi
41832
41833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41834  if test "x$test_cygdrive_prefix" = x; then
41835    # As a simple fix, exclude /usr/bin since it's not a real path.
41836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41838      # a path prefixed by /cygdrive for fixpath to work.
41839      new_path="$CYGWIN_ROOT_PATH$input_path"
41840    fi
41841  fi
41842
41843  # remove trailing .exe if any
41844  new_path="${new_path/%.exe/}"
41845
41846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41847
41848  # First separate the path from the arguments. This will split at the first
41849  # space.
41850  complete="$NM"
41851  path="${complete%% *}"
41852  tmp="$complete EOL"
41853  arguments="${tmp#* }"
41854
41855  # Input might be given as Windows format, start by converting to
41856  # unix format.
41857  new_path="$path"
41858
41859  windows_path="$new_path"
41860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41861    unix_path=`$CYGPATH -u "$windows_path"`
41862    new_path="$unix_path"
41863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41865    new_path="$unix_path"
41866  fi
41867
41868
41869  # Now try to locate executable using which
41870  new_path=`$WHICH "$new_path" 2> /dev/null`
41871
41872  if test "x$new_path" = x; then
41873    # Oops. Which didn't find the executable.
41874    # The splitting of arguments from the executable at a space might have been incorrect,
41875    # since paths with space are more likely in Windows. Give it another try with the whole
41876    # argument.
41877    path="$complete"
41878    arguments="EOL"
41879    new_path="$path"
41880
41881  windows_path="$new_path"
41882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41883    unix_path=`$CYGPATH -u "$windows_path"`
41884    new_path="$unix_path"
41885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41887    new_path="$unix_path"
41888  fi
41889
41890
41891    new_path=`$WHICH "$new_path" 2> /dev/null`
41892    # bat and cmd files are not always considered executable in MSYS causing which
41893    # to not find them
41894    if test "x$new_path" = x \
41895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41897      new_path="$path"
41898
41899  windows_path="$new_path"
41900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41901    unix_path=`$CYGPATH -u "$windows_path"`
41902    new_path="$unix_path"
41903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41905    new_path="$unix_path"
41906  fi
41907
41908    fi
41909
41910    if test "x$new_path" = x; then
41911      # It's still not found. Now this is an unrecoverable error.
41912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41913$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41914      has_space=`$ECHO "$complete" | $GREP " "`
41915      if test "x$has_space" != x; then
41916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41918      fi
41919      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41920    fi
41921  fi
41922
41923  # Now new_path has a complete unix path to the binary
41924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41925    # Keep paths in /bin as-is, but remove trailing .exe if any
41926    new_path="${new_path/%.exe/}"
41927    # Do not save /bin paths to all_fixpath_prefixes!
41928  else
41929    # Not in mixed or Windows style, start by that.
41930    new_path=`cmd //c echo $new_path`
41931
41932  input_path="$new_path"
41933  # Check if we need to convert this using DOS-style short mode. If the path
41934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41935  # take no chances and rewrite it.
41936  # Note: m4 eats our [], so we need to use [ and ] instead.
41937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41938  if test "x$has_forbidden_chars" != x; then
41939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41941  fi
41942
41943    # Output is in $new_path
41944
41945  windows_path="$new_path"
41946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41947    unix_path=`$CYGPATH -u "$windows_path"`
41948    new_path="$unix_path"
41949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41951    new_path="$unix_path"
41952  fi
41953
41954    # remove trailing .exe if any
41955    new_path="${new_path/%.exe/}"
41956
41957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41959  fi
41960
41961    else
41962      # We're on a unix platform. Hooray! :)
41963      # First separate the path from the arguments. This will split at the first
41964      # space.
41965      complete="$NM"
41966      path="${complete%% *}"
41967      tmp="$complete EOL"
41968      arguments="${tmp#* }"
41969
41970      # Cannot rely on the command "which" here since it doesn't always work.
41971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41972      if test -z "$is_absolute_path"; then
41973        # Path to executable is not absolute. Find it.
41974        IFS_save="$IFS"
41975        IFS=:
41976        for p in $PATH; do
41977          if test -f "$p/$path" && test -x "$p/$path"; then
41978            new_path="$p/$path"
41979            break
41980          fi
41981        done
41982        IFS="$IFS_save"
41983      else
41984        # This is an absolute path, we can use it without further modifications.
41985        new_path="$path"
41986      fi
41987
41988      if test "x$new_path" = x; then
41989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41990$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41991        has_space=`$ECHO "$complete" | $GREP " "`
41992        if test "x$has_space" != x; then
41993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41995        fi
41996        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41997      fi
41998    fi
41999
42000    # Now join together the path and the arguments once again
42001    if test "x$arguments" != xEOL; then
42002      new_complete="$new_path ${arguments% *}"
42003    else
42004      new_complete="$new_path"
42005    fi
42006
42007    if test "x$complete" != "x$new_complete"; then
42008      NM="$new_complete"
42009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42010$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42011    fi
42012  fi
42013
42014    GNM="$NM"
42015
42016  fi
42017
42018  # objcopy is used for moving debug symbols to separate files when
42019  # full debug symbols are enabled.
42020  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42021
42022
42023  # Publish this variable in the help.
42024
42025
42026  if [ -z "${OBJCOPY+x}" ]; then
42027    # The variable is not set by user, try to locate tool using the code snippet
42028    if test -n "$ac_tool_prefix"; then
42029  for ac_prog in gobjcopy objcopy
42030  do
42031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42034$as_echo_n "checking for $ac_word... " >&6; }
42035if ${ac_cv_prog_OBJCOPY+:} false; then :
42036  $as_echo_n "(cached) " >&6
42037else
42038  if test -n "$OBJCOPY"; then
42039  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42040else
42041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42042for as_dir in $PATH
42043do
42044  IFS=$as_save_IFS
42045  test -z "$as_dir" && as_dir=.
42046    for ac_exec_ext in '' $ac_executable_extensions; do
42047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42048    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42050    break 2
42051  fi
42052done
42053  done
42054IFS=$as_save_IFS
42055
42056fi
42057fi
42058OBJCOPY=$ac_cv_prog_OBJCOPY
42059if test -n "$OBJCOPY"; then
42060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42061$as_echo "$OBJCOPY" >&6; }
42062else
42063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42064$as_echo "no" >&6; }
42065fi
42066
42067
42068    test -n "$OBJCOPY" && break
42069  done
42070fi
42071if test -z "$OBJCOPY"; then
42072  ac_ct_OBJCOPY=$OBJCOPY
42073  for ac_prog in gobjcopy objcopy
42074do
42075  # Extract the first word of "$ac_prog", so it can be a program name with args.
42076set dummy $ac_prog; ac_word=$2
42077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42078$as_echo_n "checking for $ac_word... " >&6; }
42079if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42080  $as_echo_n "(cached) " >&6
42081else
42082  if test -n "$ac_ct_OBJCOPY"; then
42083  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42084else
42085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42086for as_dir in $PATH
42087do
42088  IFS=$as_save_IFS
42089  test -z "$as_dir" && as_dir=.
42090    for ac_exec_ext in '' $ac_executable_extensions; do
42091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42092    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42094    break 2
42095  fi
42096done
42097  done
42098IFS=$as_save_IFS
42099
42100fi
42101fi
42102ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42103if test -n "$ac_ct_OBJCOPY"; then
42104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42105$as_echo "$ac_ct_OBJCOPY" >&6; }
42106else
42107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42108$as_echo "no" >&6; }
42109fi
42110
42111
42112  test -n "$ac_ct_OBJCOPY" && break
42113done
42114
42115  if test "x$ac_ct_OBJCOPY" = x; then
42116    OBJCOPY=""
42117  else
42118    case $cross_compiling:$ac_tool_warned in
42119yes:)
42120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42122ac_tool_warned=yes ;;
42123esac
42124    OBJCOPY=$ac_ct_OBJCOPY
42125  fi
42126fi
42127
42128  else
42129    # The variable is set, but is it from the command line or the environment?
42130
42131    # Try to remove the string !OBJCOPY! from our list.
42132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42134      # If it failed, the variable was not from the command line. Ignore it,
42135      # but warn the user (except for BASH, which is always set by the calling BASH).
42136      if test "xOBJCOPY" != xBASH; then
42137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42138$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42139      fi
42140      # Try to locate tool using the code snippet
42141      if test -n "$ac_tool_prefix"; then
42142  for ac_prog in gobjcopy objcopy
42143  do
42144    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42145set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42147$as_echo_n "checking for $ac_word... " >&6; }
42148if ${ac_cv_prog_OBJCOPY+:} false; then :
42149  $as_echo_n "(cached) " >&6
42150else
42151  if test -n "$OBJCOPY"; then
42152  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42153else
42154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42155for as_dir in $PATH
42156do
42157  IFS=$as_save_IFS
42158  test -z "$as_dir" && as_dir=.
42159    for ac_exec_ext in '' $ac_executable_extensions; do
42160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42161    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42163    break 2
42164  fi
42165done
42166  done
42167IFS=$as_save_IFS
42168
42169fi
42170fi
42171OBJCOPY=$ac_cv_prog_OBJCOPY
42172if test -n "$OBJCOPY"; then
42173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42174$as_echo "$OBJCOPY" >&6; }
42175else
42176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42177$as_echo "no" >&6; }
42178fi
42179
42180
42181    test -n "$OBJCOPY" && break
42182  done
42183fi
42184if test -z "$OBJCOPY"; then
42185  ac_ct_OBJCOPY=$OBJCOPY
42186  for ac_prog in gobjcopy objcopy
42187do
42188  # Extract the first word of "$ac_prog", so it can be a program name with args.
42189set dummy $ac_prog; ac_word=$2
42190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42191$as_echo_n "checking for $ac_word... " >&6; }
42192if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42193  $as_echo_n "(cached) " >&6
42194else
42195  if test -n "$ac_ct_OBJCOPY"; then
42196  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42197else
42198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42199for as_dir in $PATH
42200do
42201  IFS=$as_save_IFS
42202  test -z "$as_dir" && as_dir=.
42203    for ac_exec_ext in '' $ac_executable_extensions; do
42204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42205    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42207    break 2
42208  fi
42209done
42210  done
42211IFS=$as_save_IFS
42212
42213fi
42214fi
42215ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42216if test -n "$ac_ct_OBJCOPY"; then
42217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42218$as_echo "$ac_ct_OBJCOPY" >&6; }
42219else
42220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42221$as_echo "no" >&6; }
42222fi
42223
42224
42225  test -n "$ac_ct_OBJCOPY" && break
42226done
42227
42228  if test "x$ac_ct_OBJCOPY" = x; then
42229    OBJCOPY=""
42230  else
42231    case $cross_compiling:$ac_tool_warned in
42232yes:)
42233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42235ac_tool_warned=yes ;;
42236esac
42237    OBJCOPY=$ac_ct_OBJCOPY
42238  fi
42239fi
42240
42241    else
42242      # If it succeeded, then it was overridden by the user. We will use it
42243      # for the tool.
42244
42245      # First remove it from the list of overridden variables, so we can test
42246      # for unknown variables in the end.
42247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42248
42249      # Check if we try to supply an empty value
42250      if test "x$OBJCOPY" = x; then
42251        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42252$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42254$as_echo_n "checking for OBJCOPY... " >&6; }
42255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42256$as_echo "disabled" >&6; }
42257      else
42258        # Check if the provided tool contains a complete path.
42259        tool_specified="$OBJCOPY"
42260        tool_basename="${tool_specified##*/}"
42261        if test "x$tool_basename" = "x$tool_specified"; then
42262          # A command without a complete path is provided, search $PATH.
42263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42264$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42265          # Extract the first word of "$tool_basename", so it can be a program name with args.
42266set dummy $tool_basename; ac_word=$2
42267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42268$as_echo_n "checking for $ac_word... " >&6; }
42269if ${ac_cv_path_OBJCOPY+:} false; then :
42270  $as_echo_n "(cached) " >&6
42271else
42272  case $OBJCOPY in
42273  [\\/]* | ?:[\\/]*)
42274  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42275  ;;
42276  *)
42277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42278for as_dir in $PATH
42279do
42280  IFS=$as_save_IFS
42281  test -z "$as_dir" && as_dir=.
42282    for ac_exec_ext in '' $ac_executable_extensions; do
42283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42284    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42286    break 2
42287  fi
42288done
42289  done
42290IFS=$as_save_IFS
42291
42292  ;;
42293esac
42294fi
42295OBJCOPY=$ac_cv_path_OBJCOPY
42296if test -n "$OBJCOPY"; then
42297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42298$as_echo "$OBJCOPY" >&6; }
42299else
42300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42301$as_echo "no" >&6; }
42302fi
42303
42304
42305          if test "x$OBJCOPY" = x; then
42306            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42307          fi
42308        else
42309          # Otherwise we believe it is a complete path. Use it as it is.
42310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42311$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42313$as_echo_n "checking for OBJCOPY... " >&6; }
42314          if test ! -x "$tool_specified"; then
42315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42316$as_echo "not found" >&6; }
42317            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42318          fi
42319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42320$as_echo "$tool_specified" >&6; }
42321        fi
42322      fi
42323    fi
42324
42325  fi
42326
42327
42328    # Only call fixup if objcopy was found.
42329    if test -n "$OBJCOPY"; then
42330
42331  # Only process if variable expands to non-empty
42332
42333  if test "x$OBJCOPY" != x; then
42334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42335
42336  # First separate the path from the arguments. This will split at the first
42337  # space.
42338  complete="$OBJCOPY"
42339  path="${complete%% *}"
42340  tmp="$complete EOL"
42341  arguments="${tmp#* }"
42342
42343  # Input might be given as Windows format, start by converting to
42344  # unix format.
42345  new_path=`$CYGPATH -u "$path"`
42346
42347  # Now try to locate executable using which
42348  new_path=`$WHICH "$new_path" 2> /dev/null`
42349  # bat and cmd files are not always considered executable in cygwin causing which
42350  # to not find them
42351  if test "x$new_path" = x \
42352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42354    new_path=`$CYGPATH -u "$path"`
42355  fi
42356  if test "x$new_path" = x; then
42357    # Oops. Which didn't find the executable.
42358    # The splitting of arguments from the executable at a space might have been incorrect,
42359    # since paths with space are more likely in Windows. Give it another try with the whole
42360    # argument.
42361    path="$complete"
42362    arguments="EOL"
42363    new_path=`$CYGPATH -u "$path"`
42364    new_path=`$WHICH "$new_path" 2> /dev/null`
42365    # bat and cmd files are not always considered executable in cygwin causing which
42366    # to not find them
42367    if test "x$new_path" = x \
42368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42370      new_path=`$CYGPATH -u "$path"`
42371    fi
42372    if test "x$new_path" = x; then
42373      # It's still not found. Now this is an unrecoverable error.
42374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42375$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42376      has_space=`$ECHO "$complete" | $GREP " "`
42377      if test "x$has_space" != x; then
42378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42380      fi
42381      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42382    fi
42383  fi
42384
42385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42388  # "foo.exe" is OK but "foo" is an error.
42389  #
42390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42391  # It is also a way to make sure we got the proper file name for the real test later on.
42392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42393  if test "x$test_shortpath" = x; then
42394    # Short path failed, file does not exist as specified.
42395    # Try adding .exe or .cmd
42396    if test -f "${new_path}.exe"; then
42397      input_to_shortpath="${new_path}.exe"
42398    elif test -f "${new_path}.cmd"; then
42399      input_to_shortpath="${new_path}.cmd"
42400    else
42401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42402$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42405      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42406    fi
42407  else
42408    input_to_shortpath="$new_path"
42409  fi
42410
42411  # Call helper function which possibly converts this using DOS-style short mode.
42412  # If so, the updated path is stored in $new_path.
42413  new_path="$input_to_shortpath"
42414
42415  input_path="$input_to_shortpath"
42416  # Check if we need to convert this using DOS-style short mode. If the path
42417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42418  # take no chances and rewrite it.
42419  # Note: m4 eats our [], so we need to use [ and ] instead.
42420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42421  if test "x$has_forbidden_chars" != x; then
42422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42426      # Going to short mode and back again did indeed matter. Since short mode is
42427      # case insensitive, let's make it lowercase to improve readability.
42428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42429      # Now convert it back to Unix-style (cygpath)
42430      input_path=`$CYGPATH -u "$shortmode_path"`
42431      new_path="$input_path"
42432    fi
42433  fi
42434
42435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42436  if test "x$test_cygdrive_prefix" = x; then
42437    # As a simple fix, exclude /usr/bin since it's not a real path.
42438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42440      # a path prefixed by /cygdrive for fixpath to work.
42441      new_path="$CYGWIN_ROOT_PATH$input_path"
42442    fi
42443  fi
42444
42445  # remove trailing .exe if any
42446  new_path="${new_path/%.exe/}"
42447
42448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42449
42450  # First separate the path from the arguments. This will split at the first
42451  # space.
42452  complete="$OBJCOPY"
42453  path="${complete%% *}"
42454  tmp="$complete EOL"
42455  arguments="${tmp#* }"
42456
42457  # Input might be given as Windows format, start by converting to
42458  # unix format.
42459  new_path="$path"
42460
42461  windows_path="$new_path"
42462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42463    unix_path=`$CYGPATH -u "$windows_path"`
42464    new_path="$unix_path"
42465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42467    new_path="$unix_path"
42468  fi
42469
42470
42471  # Now try to locate executable using which
42472  new_path=`$WHICH "$new_path" 2> /dev/null`
42473
42474  if test "x$new_path" = x; then
42475    # Oops. Which didn't find the executable.
42476    # The splitting of arguments from the executable at a space might have been incorrect,
42477    # since paths with space are more likely in Windows. Give it another try with the whole
42478    # argument.
42479    path="$complete"
42480    arguments="EOL"
42481    new_path="$path"
42482
42483  windows_path="$new_path"
42484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42485    unix_path=`$CYGPATH -u "$windows_path"`
42486    new_path="$unix_path"
42487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42489    new_path="$unix_path"
42490  fi
42491
42492
42493    new_path=`$WHICH "$new_path" 2> /dev/null`
42494    # bat and cmd files are not always considered executable in MSYS causing which
42495    # to not find them
42496    if test "x$new_path" = x \
42497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42499      new_path="$path"
42500
42501  windows_path="$new_path"
42502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42503    unix_path=`$CYGPATH -u "$windows_path"`
42504    new_path="$unix_path"
42505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42507    new_path="$unix_path"
42508  fi
42509
42510    fi
42511
42512    if test "x$new_path" = x; then
42513      # It's still not found. Now this is an unrecoverable error.
42514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42515$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42516      has_space=`$ECHO "$complete" | $GREP " "`
42517      if test "x$has_space" != x; then
42518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42520      fi
42521      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42522    fi
42523  fi
42524
42525  # Now new_path has a complete unix path to the binary
42526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42527    # Keep paths in /bin as-is, but remove trailing .exe if any
42528    new_path="${new_path/%.exe/}"
42529    # Do not save /bin paths to all_fixpath_prefixes!
42530  else
42531    # Not in mixed or Windows style, start by that.
42532    new_path=`cmd //c echo $new_path`
42533
42534  input_path="$new_path"
42535  # Check if we need to convert this using DOS-style short mode. If the path
42536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42537  # take no chances and rewrite it.
42538  # Note: m4 eats our [], so we need to use [ and ] instead.
42539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42540  if test "x$has_forbidden_chars" != x; then
42541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42543  fi
42544
42545    # Output is in $new_path
42546
42547  windows_path="$new_path"
42548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42549    unix_path=`$CYGPATH -u "$windows_path"`
42550    new_path="$unix_path"
42551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42553    new_path="$unix_path"
42554  fi
42555
42556    # remove trailing .exe if any
42557    new_path="${new_path/%.exe/}"
42558
42559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42561  fi
42562
42563    else
42564      # We're on a unix platform. Hooray! :)
42565      # First separate the path from the arguments. This will split at the first
42566      # space.
42567      complete="$OBJCOPY"
42568      path="${complete%% *}"
42569      tmp="$complete EOL"
42570      arguments="${tmp#* }"
42571
42572      # Cannot rely on the command "which" here since it doesn't always work.
42573      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42574      if test -z "$is_absolute_path"; then
42575        # Path to executable is not absolute. Find it.
42576        IFS_save="$IFS"
42577        IFS=:
42578        for p in $PATH; do
42579          if test -f "$p/$path" && test -x "$p/$path"; then
42580            new_path="$p/$path"
42581            break
42582          fi
42583        done
42584        IFS="$IFS_save"
42585      else
42586        # This is an absolute path, we can use it without further modifications.
42587        new_path="$path"
42588      fi
42589
42590      if test "x$new_path" = x; then
42591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42592$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42593        has_space=`$ECHO "$complete" | $GREP " "`
42594        if test "x$has_space" != x; then
42595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42597        fi
42598        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42599      fi
42600    fi
42601
42602    # Now join together the path and the arguments once again
42603    if test "x$arguments" != xEOL; then
42604      new_complete="$new_path ${arguments% *}"
42605    else
42606      new_complete="$new_path"
42607    fi
42608
42609    if test "x$complete" != "x$new_complete"; then
42610      OBJCOPY="$new_complete"
42611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42612$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42613    fi
42614  fi
42615
42616      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42617        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42618        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42619        # - version number is last blank separate word on first line
42620        # - version number formats that have been seen:
42621        #   - <major>.<minor>
42622        #   - <major>.<minor>.<micro>
42623        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42624        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42625         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42626              -e 's/.* //' \
42627              -e '/^[01]\./b bad' \
42628              -e '/^2\./{' \
42629              -e '  s/^2\.//' \
42630              -e '  /^[0-9]$/b bad' \
42631              -e '  /^[0-9]\./b bad' \
42632              -e '  /^1[0-9]$/b bad' \
42633              -e '  /^1[0-9]\./b bad' \
42634              -e '  /^20\./b bad' \
42635              -e '  /^21\.0$/b bad' \
42636              -e '  /^21\.0\./b bad' \
42637              -e '}' \
42638              -e ':good' \
42639              -e 's/.*/VALID_VERSION/p' \
42640              -e 'q' \
42641              -e ':bad' \
42642              -e 's/.*/BAD_VERSION/p' \
42643              -e 'q'`
42644        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42645          OBJCOPY=
42646          { $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
42647$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42648          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42649$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42650          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42651$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42652          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42653$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42654          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42655$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42656        fi
42657      fi
42658    fi
42659  fi
42660
42661
42662
42663  # Publish this variable in the help.
42664
42665
42666  if [ -z "${OBJDUMP+x}" ]; then
42667    # The variable is not set by user, try to locate tool using the code snippet
42668    if test -n "$ac_tool_prefix"; then
42669  for ac_prog in gobjdump objdump
42670  do
42671    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42672set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42674$as_echo_n "checking for $ac_word... " >&6; }
42675if ${ac_cv_prog_OBJDUMP+:} false; then :
42676  $as_echo_n "(cached) " >&6
42677else
42678  if test -n "$OBJDUMP"; then
42679  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42680else
42681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42682for as_dir in $PATH
42683do
42684  IFS=$as_save_IFS
42685  test -z "$as_dir" && as_dir=.
42686    for ac_exec_ext in '' $ac_executable_extensions; do
42687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42688    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42690    break 2
42691  fi
42692done
42693  done
42694IFS=$as_save_IFS
42695
42696fi
42697fi
42698OBJDUMP=$ac_cv_prog_OBJDUMP
42699if test -n "$OBJDUMP"; then
42700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42701$as_echo "$OBJDUMP" >&6; }
42702else
42703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42704$as_echo "no" >&6; }
42705fi
42706
42707
42708    test -n "$OBJDUMP" && break
42709  done
42710fi
42711if test -z "$OBJDUMP"; then
42712  ac_ct_OBJDUMP=$OBJDUMP
42713  for ac_prog in gobjdump objdump
42714do
42715  # Extract the first word of "$ac_prog", so it can be a program name with args.
42716set dummy $ac_prog; ac_word=$2
42717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42718$as_echo_n "checking for $ac_word... " >&6; }
42719if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42720  $as_echo_n "(cached) " >&6
42721else
42722  if test -n "$ac_ct_OBJDUMP"; then
42723  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42724else
42725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42726for as_dir in $PATH
42727do
42728  IFS=$as_save_IFS
42729  test -z "$as_dir" && as_dir=.
42730    for ac_exec_ext in '' $ac_executable_extensions; do
42731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42732    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42734    break 2
42735  fi
42736done
42737  done
42738IFS=$as_save_IFS
42739
42740fi
42741fi
42742ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42743if test -n "$ac_ct_OBJDUMP"; then
42744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42745$as_echo "$ac_ct_OBJDUMP" >&6; }
42746else
42747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42748$as_echo "no" >&6; }
42749fi
42750
42751
42752  test -n "$ac_ct_OBJDUMP" && break
42753done
42754
42755  if test "x$ac_ct_OBJDUMP" = x; then
42756    OBJDUMP=""
42757  else
42758    case $cross_compiling:$ac_tool_warned in
42759yes:)
42760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42762ac_tool_warned=yes ;;
42763esac
42764    OBJDUMP=$ac_ct_OBJDUMP
42765  fi
42766fi
42767
42768  else
42769    # The variable is set, but is it from the command line or the environment?
42770
42771    # Try to remove the string !OBJDUMP! from our list.
42772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42774      # If it failed, the variable was not from the command line. Ignore it,
42775      # but warn the user (except for BASH, which is always set by the calling BASH).
42776      if test "xOBJDUMP" != xBASH; then
42777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42778$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42779      fi
42780      # Try to locate tool using the code snippet
42781      if test -n "$ac_tool_prefix"; then
42782  for ac_prog in gobjdump objdump
42783  do
42784    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42787$as_echo_n "checking for $ac_word... " >&6; }
42788if ${ac_cv_prog_OBJDUMP+:} false; then :
42789  $as_echo_n "(cached) " >&6
42790else
42791  if test -n "$OBJDUMP"; then
42792  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42793else
42794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42795for as_dir in $PATH
42796do
42797  IFS=$as_save_IFS
42798  test -z "$as_dir" && as_dir=.
42799    for ac_exec_ext in '' $ac_executable_extensions; do
42800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42801    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42803    break 2
42804  fi
42805done
42806  done
42807IFS=$as_save_IFS
42808
42809fi
42810fi
42811OBJDUMP=$ac_cv_prog_OBJDUMP
42812if test -n "$OBJDUMP"; then
42813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42814$as_echo "$OBJDUMP" >&6; }
42815else
42816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42817$as_echo "no" >&6; }
42818fi
42819
42820
42821    test -n "$OBJDUMP" && break
42822  done
42823fi
42824if test -z "$OBJDUMP"; then
42825  ac_ct_OBJDUMP=$OBJDUMP
42826  for ac_prog in gobjdump objdump
42827do
42828  # Extract the first word of "$ac_prog", so it can be a program name with args.
42829set dummy $ac_prog; ac_word=$2
42830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42831$as_echo_n "checking for $ac_word... " >&6; }
42832if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42833  $as_echo_n "(cached) " >&6
42834else
42835  if test -n "$ac_ct_OBJDUMP"; then
42836  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42837else
42838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42839for as_dir in $PATH
42840do
42841  IFS=$as_save_IFS
42842  test -z "$as_dir" && as_dir=.
42843    for ac_exec_ext in '' $ac_executable_extensions; do
42844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42845    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42847    break 2
42848  fi
42849done
42850  done
42851IFS=$as_save_IFS
42852
42853fi
42854fi
42855ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42856if test -n "$ac_ct_OBJDUMP"; then
42857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42858$as_echo "$ac_ct_OBJDUMP" >&6; }
42859else
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42861$as_echo "no" >&6; }
42862fi
42863
42864
42865  test -n "$ac_ct_OBJDUMP" && break
42866done
42867
42868  if test "x$ac_ct_OBJDUMP" = x; then
42869    OBJDUMP=""
42870  else
42871    case $cross_compiling:$ac_tool_warned in
42872yes:)
42873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42875ac_tool_warned=yes ;;
42876esac
42877    OBJDUMP=$ac_ct_OBJDUMP
42878  fi
42879fi
42880
42881    else
42882      # If it succeeded, then it was overridden by the user. We will use it
42883      # for the tool.
42884
42885      # First remove it from the list of overridden variables, so we can test
42886      # for unknown variables in the end.
42887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42888
42889      # Check if we try to supply an empty value
42890      if test "x$OBJDUMP" = x; then
42891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42892$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42894$as_echo_n "checking for OBJDUMP... " >&6; }
42895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42896$as_echo "disabled" >&6; }
42897      else
42898        # Check if the provided tool contains a complete path.
42899        tool_specified="$OBJDUMP"
42900        tool_basename="${tool_specified##*/}"
42901        if test "x$tool_basename" = "x$tool_specified"; then
42902          # A command without a complete path is provided, search $PATH.
42903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42904$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42905          # Extract the first word of "$tool_basename", so it can be a program name with args.
42906set dummy $tool_basename; ac_word=$2
42907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42908$as_echo_n "checking for $ac_word... " >&6; }
42909if ${ac_cv_path_OBJDUMP+:} false; then :
42910  $as_echo_n "(cached) " >&6
42911else
42912  case $OBJDUMP in
42913  [\\/]* | ?:[\\/]*)
42914  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42915  ;;
42916  *)
42917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42918for as_dir in $PATH
42919do
42920  IFS=$as_save_IFS
42921  test -z "$as_dir" && as_dir=.
42922    for ac_exec_ext in '' $ac_executable_extensions; do
42923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42924    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42926    break 2
42927  fi
42928done
42929  done
42930IFS=$as_save_IFS
42931
42932  ;;
42933esac
42934fi
42935OBJDUMP=$ac_cv_path_OBJDUMP
42936if test -n "$OBJDUMP"; then
42937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42938$as_echo "$OBJDUMP" >&6; }
42939else
42940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42941$as_echo "no" >&6; }
42942fi
42943
42944
42945          if test "x$OBJDUMP" = x; then
42946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42947          fi
42948        else
42949          # Otherwise we believe it is a complete path. Use it as it is.
42950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42951$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42953$as_echo_n "checking for OBJDUMP... " >&6; }
42954          if test ! -x "$tool_specified"; then
42955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42956$as_echo "not found" >&6; }
42957            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42958          fi
42959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42960$as_echo "$tool_specified" >&6; }
42961        fi
42962      fi
42963    fi
42964
42965  fi
42966
42967
42968  if test "x$OBJDUMP" != x; then
42969    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42970    # bails if argument is missing.
42971
42972  # Only process if variable expands to non-empty
42973
42974  if test "x$OBJDUMP" != x; then
42975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42976
42977  # First separate the path from the arguments. This will split at the first
42978  # space.
42979  complete="$OBJDUMP"
42980  path="${complete%% *}"
42981  tmp="$complete EOL"
42982  arguments="${tmp#* }"
42983
42984  # Input might be given as Windows format, start by converting to
42985  # unix format.
42986  new_path=`$CYGPATH -u "$path"`
42987
42988  # Now try to locate executable using which
42989  new_path=`$WHICH "$new_path" 2> /dev/null`
42990  # bat and cmd files are not always considered executable in cygwin causing which
42991  # to not find them
42992  if test "x$new_path" = x \
42993      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42994      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42995    new_path=`$CYGPATH -u "$path"`
42996  fi
42997  if test "x$new_path" = x; then
42998    # Oops. Which didn't find the executable.
42999    # The splitting of arguments from the executable at a space might have been incorrect,
43000    # since paths with space are more likely in Windows. Give it another try with the whole
43001    # argument.
43002    path="$complete"
43003    arguments="EOL"
43004    new_path=`$CYGPATH -u "$path"`
43005    new_path=`$WHICH "$new_path" 2> /dev/null`
43006    # bat and cmd files are not always considered executable in cygwin causing which
43007    # to not find them
43008    if test "x$new_path" = x \
43009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43011      new_path=`$CYGPATH -u "$path"`
43012    fi
43013    if test "x$new_path" = x; then
43014      # It's still not found. Now this is an unrecoverable error.
43015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43016$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43017      has_space=`$ECHO "$complete" | $GREP " "`
43018      if test "x$has_space" != x; then
43019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43021      fi
43022      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43023    fi
43024  fi
43025
43026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43029  # "foo.exe" is OK but "foo" is an error.
43030  #
43031  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43032  # It is also a way to make sure we got the proper file name for the real test later on.
43033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43034  if test "x$test_shortpath" = x; then
43035    # Short path failed, file does not exist as specified.
43036    # Try adding .exe or .cmd
43037    if test -f "${new_path}.exe"; then
43038      input_to_shortpath="${new_path}.exe"
43039    elif test -f "${new_path}.cmd"; then
43040      input_to_shortpath="${new_path}.cmd"
43041    else
43042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43043$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43046      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43047    fi
43048  else
43049    input_to_shortpath="$new_path"
43050  fi
43051
43052  # Call helper function which possibly converts this using DOS-style short mode.
43053  # If so, the updated path is stored in $new_path.
43054  new_path="$input_to_shortpath"
43055
43056  input_path="$input_to_shortpath"
43057  # Check if we need to convert this using DOS-style short mode. If the path
43058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43059  # take no chances and rewrite it.
43060  # Note: m4 eats our [], so we need to use [ and ] instead.
43061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43062  if test "x$has_forbidden_chars" != x; then
43063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43067      # Going to short mode and back again did indeed matter. Since short mode is
43068      # case insensitive, let's make it lowercase to improve readability.
43069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43070      # Now convert it back to Unix-style (cygpath)
43071      input_path=`$CYGPATH -u "$shortmode_path"`
43072      new_path="$input_path"
43073    fi
43074  fi
43075
43076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43077  if test "x$test_cygdrive_prefix" = x; then
43078    # As a simple fix, exclude /usr/bin since it's not a real path.
43079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43081      # a path prefixed by /cygdrive for fixpath to work.
43082      new_path="$CYGWIN_ROOT_PATH$input_path"
43083    fi
43084  fi
43085
43086  # remove trailing .exe if any
43087  new_path="${new_path/%.exe/}"
43088
43089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43090
43091  # First separate the path from the arguments. This will split at the first
43092  # space.
43093  complete="$OBJDUMP"
43094  path="${complete%% *}"
43095  tmp="$complete EOL"
43096  arguments="${tmp#* }"
43097
43098  # Input might be given as Windows format, start by converting to
43099  # unix format.
43100  new_path="$path"
43101
43102  windows_path="$new_path"
43103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43104    unix_path=`$CYGPATH -u "$windows_path"`
43105    new_path="$unix_path"
43106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43108    new_path="$unix_path"
43109  fi
43110
43111
43112  # Now try to locate executable using which
43113  new_path=`$WHICH "$new_path" 2> /dev/null`
43114
43115  if test "x$new_path" = x; then
43116    # Oops. Which didn't find the executable.
43117    # The splitting of arguments from the executable at a space might have been incorrect,
43118    # since paths with space are more likely in Windows. Give it another try with the whole
43119    # argument.
43120    path="$complete"
43121    arguments="EOL"
43122    new_path="$path"
43123
43124  windows_path="$new_path"
43125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43126    unix_path=`$CYGPATH -u "$windows_path"`
43127    new_path="$unix_path"
43128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43130    new_path="$unix_path"
43131  fi
43132
43133
43134    new_path=`$WHICH "$new_path" 2> /dev/null`
43135    # bat and cmd files are not always considered executable in MSYS causing which
43136    # to not find them
43137    if test "x$new_path" = x \
43138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43140      new_path="$path"
43141
43142  windows_path="$new_path"
43143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43144    unix_path=`$CYGPATH -u "$windows_path"`
43145    new_path="$unix_path"
43146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43148    new_path="$unix_path"
43149  fi
43150
43151    fi
43152
43153    if test "x$new_path" = x; then
43154      # It's still not found. Now this is an unrecoverable error.
43155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43156$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43157      has_space=`$ECHO "$complete" | $GREP " "`
43158      if test "x$has_space" != x; then
43159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43161      fi
43162      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43163    fi
43164  fi
43165
43166  # Now new_path has a complete unix path to the binary
43167  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43168    # Keep paths in /bin as-is, but remove trailing .exe if any
43169    new_path="${new_path/%.exe/}"
43170    # Do not save /bin paths to all_fixpath_prefixes!
43171  else
43172    # Not in mixed or Windows style, start by that.
43173    new_path=`cmd //c echo $new_path`
43174
43175  input_path="$new_path"
43176  # Check if we need to convert this using DOS-style short mode. If the path
43177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43178  # take no chances and rewrite it.
43179  # Note: m4 eats our [], so we need to use [ and ] instead.
43180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43181  if test "x$has_forbidden_chars" != x; then
43182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43184  fi
43185
43186    # Output is in $new_path
43187
43188  windows_path="$new_path"
43189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43190    unix_path=`$CYGPATH -u "$windows_path"`
43191    new_path="$unix_path"
43192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43194    new_path="$unix_path"
43195  fi
43196
43197    # remove trailing .exe if any
43198    new_path="${new_path/%.exe/}"
43199
43200    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43201    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43202  fi
43203
43204    else
43205      # We're on a unix platform. Hooray! :)
43206      # First separate the path from the arguments. This will split at the first
43207      # space.
43208      complete="$OBJDUMP"
43209      path="${complete%% *}"
43210      tmp="$complete EOL"
43211      arguments="${tmp#* }"
43212
43213      # Cannot rely on the command "which" here since it doesn't always work.
43214      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43215      if test -z "$is_absolute_path"; then
43216        # Path to executable is not absolute. Find it.
43217        IFS_save="$IFS"
43218        IFS=:
43219        for p in $PATH; do
43220          if test -f "$p/$path" && test -x "$p/$path"; then
43221            new_path="$p/$path"
43222            break
43223          fi
43224        done
43225        IFS="$IFS_save"
43226      else
43227        # This is an absolute path, we can use it without further modifications.
43228        new_path="$path"
43229      fi
43230
43231      if test "x$new_path" = x; then
43232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43233$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43234        has_space=`$ECHO "$complete" | $GREP " "`
43235        if test "x$has_space" != x; then
43236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43238        fi
43239        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43240      fi
43241    fi
43242
43243    # Now join together the path and the arguments once again
43244    if test "x$arguments" != xEOL; then
43245      new_complete="$new_path ${arguments% *}"
43246    else
43247      new_complete="$new_path"
43248    fi
43249
43250    if test "x$complete" != "x$new_complete"; then
43251      OBJDUMP="$new_complete"
43252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43253$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43254    fi
43255  fi
43256
43257  fi
43258
43259
43260  # Restore old path.
43261  PATH="$OLD_PATH"
43262
43263  # Restore the flags to the user specified values.
43264  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43265  CFLAGS="$ORG_CFLAGS"
43266  CXXFLAGS="$ORG_CXXFLAGS"
43267
43268
43269# Finally do some processing after the detection phase
43270
43271  if test "x$COMPILE_TYPE" = "xcross"; then
43272    # Now we need to find a C/C++ compiler that can build executables for the
43273    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43274    # used once. Also, we need to do this without adding a tools dir to the
43275    # path, otherwise we might pick up cross-compilers which don't use standard
43276    # naming.
43277
43278    OLDPATH="$PATH"
43279
43280
43281# Check whether --with-build-devkit was given.
43282if test "${with_build_devkit+set}" = set; then :
43283  withval=$with_build_devkit;
43284fi
43285
43286    if test "x$with_build_devkit" = "xyes"; then
43287      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43288    elif test -n "$with_build_devkit"; then
43289      if test ! -d "$with_build_devkit"; then
43290        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43291      else
43292
43293  # Only process if variable expands to non-empty
43294
43295  if test "x$with_build_devkit" != x; then
43296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43297
43298  # Input might be given as Windows format, start by converting to
43299  # unix format.
43300  path="$with_build_devkit"
43301  new_path=`$CYGPATH -u "$path"`
43302
43303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43306  # "foo.exe" is OK but "foo" is an error.
43307  #
43308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43309  # It is also a way to make sure we got the proper file name for the real test later on.
43310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43311  if test "x$test_shortpath" = x; then
43312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43313$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43314    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43315  fi
43316
43317  # Call helper function which possibly converts this using DOS-style short mode.
43318  # If so, the updated path is stored in $new_path.
43319
43320  input_path="$new_path"
43321  # Check if we need to convert this using DOS-style short mode. If the path
43322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43323  # take no chances and rewrite it.
43324  # Note: m4 eats our [], so we need to use [ and ] instead.
43325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43326  if test "x$has_forbidden_chars" != x; then
43327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43331      # Going to short mode and back again did indeed matter. Since short mode is
43332      # case insensitive, let's make it lowercase to improve readability.
43333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43334      # Now convert it back to Unix-style (cygpath)
43335      input_path=`$CYGPATH -u "$shortmode_path"`
43336      new_path="$input_path"
43337    fi
43338  fi
43339
43340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43341  if test "x$test_cygdrive_prefix" = x; then
43342    # As a simple fix, exclude /usr/bin since it's not a real path.
43343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43345      # a path prefixed by /cygdrive for fixpath to work.
43346      new_path="$CYGWIN_ROOT_PATH$input_path"
43347    fi
43348  fi
43349
43350
43351  if test "x$path" != "x$new_path"; then
43352    with_build_devkit="$new_path"
43353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43354$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43355  fi
43356
43357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43358
43359  path="$with_build_devkit"
43360  has_colon=`$ECHO $path | $GREP ^.:`
43361  new_path="$path"
43362  if test "x$has_colon" = x; then
43363    # Not in mixed or Windows style, start by that.
43364    new_path=`cmd //c echo $path`
43365  fi
43366
43367
43368  input_path="$new_path"
43369  # Check if we need to convert this using DOS-style short mode. If the path
43370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43371  # take no chances and rewrite it.
43372  # Note: m4 eats our [], so we need to use [ and ] instead.
43373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43374  if test "x$has_forbidden_chars" != x; then
43375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43377  fi
43378
43379
43380  windows_path="$new_path"
43381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43382    unix_path=`$CYGPATH -u "$windows_path"`
43383    new_path="$unix_path"
43384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43386    new_path="$unix_path"
43387  fi
43388
43389  if test "x$path" != "x$new_path"; then
43390    with_build_devkit="$new_path"
43391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43392$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43393  fi
43394
43395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43397
43398    else
43399      # We're on a unix platform. Hooray! :)
43400      path="$with_build_devkit"
43401      has_space=`$ECHO "$path" | $GREP " "`
43402      if test "x$has_space" != x; then
43403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43404$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43406      fi
43407
43408      # Use eval to expand a potential ~
43409      eval path="$path"
43410      if test ! -f "$path" && test ! -d "$path"; then
43411        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43412      fi
43413
43414      if test -d "$path"; then
43415        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43416      else
43417        dir="`$DIRNAME "$path"`"
43418        base="`$BASENAME "$path"`"
43419        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43420      fi
43421    fi
43422  fi
43423
43424        BUILD_DEVKIT_ROOT="$with_build_devkit"
43425        # Check for a meta data info file in the root of the devkit
43426        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43427          # Process devkit.info so that existing devkit variables are not
43428          # modified by this
43429          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43430              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43431              -e "s/\$host/\$build/g" \
43432              $BUILD_DEVKIT_ROOT/devkit.info \
43433              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43434          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43435          # This potentially sets the following:
43436          # A descriptive name of the devkit
43437
43438  if test "x$BUILD_DEVKIT_NAME" = x; then
43439    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43440  fi
43441
43442          # Corresponds to --with-extra-path
43443
43444  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43445    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43446  fi
43447
43448          # Corresponds to --with-toolchain-path
43449
43450  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43451    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43452  fi
43453
43454          # Corresponds to --with-sysroot
43455
43456  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43457    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43458  fi
43459
43460          # Skip the Window specific parts
43461        fi
43462
43463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43464$as_echo_n "checking for build platform devkit... " >&6; }
43465        if test "x$BUILD_DEVKIT_NAME" != x; then
43466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43467$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43468        else
43469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43470$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43471        fi
43472
43473        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43474
43475  if test "x$BUILD_SYSROOT" != "x"; then
43476    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43477      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43478        # Solaris Studio does not have a concept of sysroot. Instead we must
43479        # make sure the default include and lib dirs are appended to each
43480        # compile and link command line. Must also add -I-xbuiltin to enable
43481        # inlining of system functions and intrinsics.
43482        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43483        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43484            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43485            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43486      fi
43487    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43488      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43489      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43490    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43491      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43492      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43493    fi
43494    # Propagate the sysroot args to hotspot
43495    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43496    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43497    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43498    # The global CFLAGS and LDFLAGS variables need these for configure to function
43499    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43500    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43501    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43502    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43503  fi
43504
43505  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43506    # We also need -iframework<path>/System/Library/Frameworks
43507    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43508    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43509    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43510    # set this here so it doesn't have to be peppered throughout the forest
43511    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43512    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43513  fi
43514
43515
43516
43517
43518
43519         # Fallback default of just /bin if DEVKIT_PATH is not defined
43520        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43521          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43522        fi
43523        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43524      fi
43525    fi
43526
43527    # FIXME: we should list the discovered compilers as an exclude pattern!
43528    # If we do that, we can do this detection before POST_DETECTION, and still
43529    # find the build compilers in the tools dir, if needed.
43530
43531
43532
43533  # Publish this variable in the help.
43534
43535
43536  if [ -z "${BUILD_CC+x}" ]; then
43537    # The variable is not set by user, try to locate tool using the code snippet
43538    for ac_prog in cl cc gcc
43539do
43540  # Extract the first word of "$ac_prog", so it can be a program name with args.
43541set dummy $ac_prog; ac_word=$2
43542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43543$as_echo_n "checking for $ac_word... " >&6; }
43544if ${ac_cv_path_BUILD_CC+:} false; then :
43545  $as_echo_n "(cached) " >&6
43546else
43547  case $BUILD_CC in
43548  [\\/]* | ?:[\\/]*)
43549  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43550  ;;
43551  *)
43552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43553for as_dir in $PATH
43554do
43555  IFS=$as_save_IFS
43556  test -z "$as_dir" && as_dir=.
43557    for ac_exec_ext in '' $ac_executable_extensions; do
43558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43559    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43561    break 2
43562  fi
43563done
43564  done
43565IFS=$as_save_IFS
43566
43567  ;;
43568esac
43569fi
43570BUILD_CC=$ac_cv_path_BUILD_CC
43571if test -n "$BUILD_CC"; then
43572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43573$as_echo "$BUILD_CC" >&6; }
43574else
43575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43576$as_echo "no" >&6; }
43577fi
43578
43579
43580  test -n "$BUILD_CC" && break
43581done
43582
43583  else
43584    # The variable is set, but is it from the command line or the environment?
43585
43586    # Try to remove the string !BUILD_CC! from our list.
43587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43589      # If it failed, the variable was not from the command line. Ignore it,
43590      # but warn the user (except for BASH, which is always set by the calling BASH).
43591      if test "xBUILD_CC" != xBASH; then
43592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43593$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43594      fi
43595      # Try to locate tool using the code snippet
43596      for ac_prog in cl cc gcc
43597do
43598  # Extract the first word of "$ac_prog", so it can be a program name with args.
43599set dummy $ac_prog; ac_word=$2
43600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43601$as_echo_n "checking for $ac_word... " >&6; }
43602if ${ac_cv_path_BUILD_CC+:} false; then :
43603  $as_echo_n "(cached) " >&6
43604else
43605  case $BUILD_CC in
43606  [\\/]* | ?:[\\/]*)
43607  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43608  ;;
43609  *)
43610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43611for as_dir in $PATH
43612do
43613  IFS=$as_save_IFS
43614  test -z "$as_dir" && as_dir=.
43615    for ac_exec_ext in '' $ac_executable_extensions; do
43616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43617    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43619    break 2
43620  fi
43621done
43622  done
43623IFS=$as_save_IFS
43624
43625  ;;
43626esac
43627fi
43628BUILD_CC=$ac_cv_path_BUILD_CC
43629if test -n "$BUILD_CC"; then
43630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43631$as_echo "$BUILD_CC" >&6; }
43632else
43633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43634$as_echo "no" >&6; }
43635fi
43636
43637
43638  test -n "$BUILD_CC" && break
43639done
43640
43641    else
43642      # If it succeeded, then it was overridden by the user. We will use it
43643      # for the tool.
43644
43645      # First remove it from the list of overridden variables, so we can test
43646      # for unknown variables in the end.
43647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43648
43649      # Check if we try to supply an empty value
43650      if test "x$BUILD_CC" = x; then
43651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43652$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43654$as_echo_n "checking for BUILD_CC... " >&6; }
43655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43656$as_echo "disabled" >&6; }
43657      else
43658        # Check if the provided tool contains a complete path.
43659        tool_specified="$BUILD_CC"
43660        tool_basename="${tool_specified##*/}"
43661        if test "x$tool_basename" = "x$tool_specified"; then
43662          # A command without a complete path is provided, search $PATH.
43663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43664$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43665          # Extract the first word of "$tool_basename", so it can be a program name with args.
43666set dummy $tool_basename; ac_word=$2
43667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43668$as_echo_n "checking for $ac_word... " >&6; }
43669if ${ac_cv_path_BUILD_CC+:} false; then :
43670  $as_echo_n "(cached) " >&6
43671else
43672  case $BUILD_CC in
43673  [\\/]* | ?:[\\/]*)
43674  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43675  ;;
43676  *)
43677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43678for as_dir in $PATH
43679do
43680  IFS=$as_save_IFS
43681  test -z "$as_dir" && as_dir=.
43682    for ac_exec_ext in '' $ac_executable_extensions; do
43683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43684    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43686    break 2
43687  fi
43688done
43689  done
43690IFS=$as_save_IFS
43691
43692  ;;
43693esac
43694fi
43695BUILD_CC=$ac_cv_path_BUILD_CC
43696if test -n "$BUILD_CC"; then
43697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43698$as_echo "$BUILD_CC" >&6; }
43699else
43700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43701$as_echo "no" >&6; }
43702fi
43703
43704
43705          if test "x$BUILD_CC" = x; then
43706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43707          fi
43708        else
43709          # Otherwise we believe it is a complete path. Use it as it is.
43710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43711$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43713$as_echo_n "checking for BUILD_CC... " >&6; }
43714          if test ! -x "$tool_specified"; then
43715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43716$as_echo "not found" >&6; }
43717            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43718          fi
43719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43720$as_echo "$tool_specified" >&6; }
43721        fi
43722      fi
43723    fi
43724
43725  fi
43726
43727
43728
43729  if test "x$BUILD_CC" = x; then
43730    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43731  fi
43732
43733
43734
43735  # Only process if variable expands to non-empty
43736
43737  if test "x$BUILD_CC" != x; then
43738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43739
43740  # First separate the path from the arguments. This will split at the first
43741  # space.
43742  complete="$BUILD_CC"
43743  path="${complete%% *}"
43744  tmp="$complete EOL"
43745  arguments="${tmp#* }"
43746
43747  # Input might be given as Windows format, start by converting to
43748  # unix format.
43749  new_path=`$CYGPATH -u "$path"`
43750
43751  # Now try to locate executable using which
43752  new_path=`$WHICH "$new_path" 2> /dev/null`
43753  # bat and cmd files are not always considered executable in cygwin causing which
43754  # to not find them
43755  if test "x$new_path" = x \
43756      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43757      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43758    new_path=`$CYGPATH -u "$path"`
43759  fi
43760  if test "x$new_path" = x; then
43761    # Oops. Which didn't find the executable.
43762    # The splitting of arguments from the executable at a space might have been incorrect,
43763    # since paths with space are more likely in Windows. Give it another try with the whole
43764    # argument.
43765    path="$complete"
43766    arguments="EOL"
43767    new_path=`$CYGPATH -u "$path"`
43768    new_path=`$WHICH "$new_path" 2> /dev/null`
43769    # bat and cmd files are not always considered executable in cygwin causing which
43770    # to not find them
43771    if test "x$new_path" = x \
43772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43774      new_path=`$CYGPATH -u "$path"`
43775    fi
43776    if test "x$new_path" = x; then
43777      # It's still not found. Now this is an unrecoverable error.
43778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43779$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43780      has_space=`$ECHO "$complete" | $GREP " "`
43781      if test "x$has_space" != x; then
43782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43784      fi
43785      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43786    fi
43787  fi
43788
43789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43792  # "foo.exe" is OK but "foo" is an error.
43793  #
43794  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43795  # It is also a way to make sure we got the proper file name for the real test later on.
43796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43797  if test "x$test_shortpath" = x; then
43798    # Short path failed, file does not exist as specified.
43799    # Try adding .exe or .cmd
43800    if test -f "${new_path}.exe"; then
43801      input_to_shortpath="${new_path}.exe"
43802    elif test -f "${new_path}.cmd"; then
43803      input_to_shortpath="${new_path}.cmd"
43804    else
43805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43806$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43807      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43808$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43809      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43810    fi
43811  else
43812    input_to_shortpath="$new_path"
43813  fi
43814
43815  # Call helper function which possibly converts this using DOS-style short mode.
43816  # If so, the updated path is stored in $new_path.
43817  new_path="$input_to_shortpath"
43818
43819  input_path="$input_to_shortpath"
43820  # Check if we need to convert this using DOS-style short mode. If the path
43821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43822  # take no chances and rewrite it.
43823  # Note: m4 eats our [], so we need to use [ and ] instead.
43824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43825  if test "x$has_forbidden_chars" != x; then
43826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43830      # Going to short mode and back again did indeed matter. Since short mode is
43831      # case insensitive, let's make it lowercase to improve readability.
43832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43833      # Now convert it back to Unix-style (cygpath)
43834      input_path=`$CYGPATH -u "$shortmode_path"`
43835      new_path="$input_path"
43836    fi
43837  fi
43838
43839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43840  if test "x$test_cygdrive_prefix" = x; then
43841    # As a simple fix, exclude /usr/bin since it's not a real path.
43842    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43844      # a path prefixed by /cygdrive for fixpath to work.
43845      new_path="$CYGWIN_ROOT_PATH$input_path"
43846    fi
43847  fi
43848
43849  # remove trailing .exe if any
43850  new_path="${new_path/%.exe/}"
43851
43852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43853
43854  # First separate the path from the arguments. This will split at the first
43855  # space.
43856  complete="$BUILD_CC"
43857  path="${complete%% *}"
43858  tmp="$complete EOL"
43859  arguments="${tmp#* }"
43860
43861  # Input might be given as Windows format, start by converting to
43862  # unix format.
43863  new_path="$path"
43864
43865  windows_path="$new_path"
43866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43867    unix_path=`$CYGPATH -u "$windows_path"`
43868    new_path="$unix_path"
43869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43871    new_path="$unix_path"
43872  fi
43873
43874
43875  # Now try to locate executable using which
43876  new_path=`$WHICH "$new_path" 2> /dev/null`
43877
43878  if test "x$new_path" = x; then
43879    # Oops. Which didn't find the executable.
43880    # The splitting of arguments from the executable at a space might have been incorrect,
43881    # since paths with space are more likely in Windows. Give it another try with the whole
43882    # argument.
43883    path="$complete"
43884    arguments="EOL"
43885    new_path="$path"
43886
43887  windows_path="$new_path"
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889    unix_path=`$CYGPATH -u "$windows_path"`
43890    new_path="$unix_path"
43891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43893    new_path="$unix_path"
43894  fi
43895
43896
43897    new_path=`$WHICH "$new_path" 2> /dev/null`
43898    # bat and cmd files are not always considered executable in MSYS causing which
43899    # to not find them
43900    if test "x$new_path" = x \
43901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43903      new_path="$path"
43904
43905  windows_path="$new_path"
43906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43907    unix_path=`$CYGPATH -u "$windows_path"`
43908    new_path="$unix_path"
43909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43911    new_path="$unix_path"
43912  fi
43913
43914    fi
43915
43916    if test "x$new_path" = x; then
43917      # It's still not found. Now this is an unrecoverable error.
43918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43919$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43920      has_space=`$ECHO "$complete" | $GREP " "`
43921      if test "x$has_space" != x; then
43922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43924      fi
43925      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43926    fi
43927  fi
43928
43929  # Now new_path has a complete unix path to the binary
43930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43931    # Keep paths in /bin as-is, but remove trailing .exe if any
43932    new_path="${new_path/%.exe/}"
43933    # Do not save /bin paths to all_fixpath_prefixes!
43934  else
43935    # Not in mixed or Windows style, start by that.
43936    new_path=`cmd //c echo $new_path`
43937
43938  input_path="$new_path"
43939  # Check if we need to convert this using DOS-style short mode. If the path
43940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43941  # take no chances and rewrite it.
43942  # Note: m4 eats our [], so we need to use [ and ] instead.
43943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43944  if test "x$has_forbidden_chars" != x; then
43945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43947  fi
43948
43949    # Output is in $new_path
43950
43951  windows_path="$new_path"
43952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43953    unix_path=`$CYGPATH -u "$windows_path"`
43954    new_path="$unix_path"
43955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43957    new_path="$unix_path"
43958  fi
43959
43960    # remove trailing .exe if any
43961    new_path="${new_path/%.exe/}"
43962
43963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43965  fi
43966
43967    else
43968      # We're on a unix platform. Hooray! :)
43969      # First separate the path from the arguments. This will split at the first
43970      # space.
43971      complete="$BUILD_CC"
43972      path="${complete%% *}"
43973      tmp="$complete EOL"
43974      arguments="${tmp#* }"
43975
43976      # Cannot rely on the command "which" here since it doesn't always work.
43977      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43978      if test -z "$is_absolute_path"; then
43979        # Path to executable is not absolute. Find it.
43980        IFS_save="$IFS"
43981        IFS=:
43982        for p in $PATH; do
43983          if test -f "$p/$path" && test -x "$p/$path"; then
43984            new_path="$p/$path"
43985            break
43986          fi
43987        done
43988        IFS="$IFS_save"
43989      else
43990        # This is an absolute path, we can use it without further modifications.
43991        new_path="$path"
43992      fi
43993
43994      if test "x$new_path" = x; then
43995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43996$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43997        has_space=`$ECHO "$complete" | $GREP " "`
43998        if test "x$has_space" != x; then
43999          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44000$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44001        fi
44002        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44003      fi
44004    fi
44005
44006    # Now join together the path and the arguments once again
44007    if test "x$arguments" != xEOL; then
44008      new_complete="$new_path ${arguments% *}"
44009    else
44010      new_complete="$new_path"
44011    fi
44012
44013    if test "x$complete" != "x$new_complete"; then
44014      BUILD_CC="$new_complete"
44015      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44016$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44017    fi
44018  fi
44019
44020
44021
44022
44023  # Publish this variable in the help.
44024
44025
44026  if [ -z "${BUILD_CXX+x}" ]; then
44027    # The variable is not set by user, try to locate tool using the code snippet
44028    for ac_prog in cl CC g++
44029do
44030  # Extract the first word of "$ac_prog", so it can be a program name with args.
44031set dummy $ac_prog; ac_word=$2
44032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44033$as_echo_n "checking for $ac_word... " >&6; }
44034if ${ac_cv_path_BUILD_CXX+:} false; then :
44035  $as_echo_n "(cached) " >&6
44036else
44037  case $BUILD_CXX in
44038  [\\/]* | ?:[\\/]*)
44039  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44040  ;;
44041  *)
44042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44043for as_dir in $PATH
44044do
44045  IFS=$as_save_IFS
44046  test -z "$as_dir" && as_dir=.
44047    for ac_exec_ext in '' $ac_executable_extensions; do
44048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44049    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44051    break 2
44052  fi
44053done
44054  done
44055IFS=$as_save_IFS
44056
44057  ;;
44058esac
44059fi
44060BUILD_CXX=$ac_cv_path_BUILD_CXX
44061if test -n "$BUILD_CXX"; then
44062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44063$as_echo "$BUILD_CXX" >&6; }
44064else
44065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44066$as_echo "no" >&6; }
44067fi
44068
44069
44070  test -n "$BUILD_CXX" && break
44071done
44072
44073  else
44074    # The variable is set, but is it from the command line or the environment?
44075
44076    # Try to remove the string !BUILD_CXX! from our list.
44077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44079      # If it failed, the variable was not from the command line. Ignore it,
44080      # but warn the user (except for BASH, which is always set by the calling BASH).
44081      if test "xBUILD_CXX" != xBASH; then
44082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44083$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44084      fi
44085      # Try to locate tool using the code snippet
44086      for ac_prog in cl CC g++
44087do
44088  # Extract the first word of "$ac_prog", so it can be a program name with args.
44089set dummy $ac_prog; ac_word=$2
44090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44091$as_echo_n "checking for $ac_word... " >&6; }
44092if ${ac_cv_path_BUILD_CXX+:} false; then :
44093  $as_echo_n "(cached) " >&6
44094else
44095  case $BUILD_CXX in
44096  [\\/]* | ?:[\\/]*)
44097  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44098  ;;
44099  *)
44100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44101for as_dir in $PATH
44102do
44103  IFS=$as_save_IFS
44104  test -z "$as_dir" && as_dir=.
44105    for ac_exec_ext in '' $ac_executable_extensions; do
44106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44107    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44109    break 2
44110  fi
44111done
44112  done
44113IFS=$as_save_IFS
44114
44115  ;;
44116esac
44117fi
44118BUILD_CXX=$ac_cv_path_BUILD_CXX
44119if test -n "$BUILD_CXX"; then
44120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44121$as_echo "$BUILD_CXX" >&6; }
44122else
44123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44124$as_echo "no" >&6; }
44125fi
44126
44127
44128  test -n "$BUILD_CXX" && break
44129done
44130
44131    else
44132      # If it succeeded, then it was overridden by the user. We will use it
44133      # for the tool.
44134
44135      # First remove it from the list of overridden variables, so we can test
44136      # for unknown variables in the end.
44137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44138
44139      # Check if we try to supply an empty value
44140      if test "x$BUILD_CXX" = x; then
44141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44142$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44144$as_echo_n "checking for BUILD_CXX... " >&6; }
44145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44146$as_echo "disabled" >&6; }
44147      else
44148        # Check if the provided tool contains a complete path.
44149        tool_specified="$BUILD_CXX"
44150        tool_basename="${tool_specified##*/}"
44151        if test "x$tool_basename" = "x$tool_specified"; then
44152          # A command without a complete path is provided, search $PATH.
44153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44154$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44155          # Extract the first word of "$tool_basename", so it can be a program name with args.
44156set dummy $tool_basename; ac_word=$2
44157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44158$as_echo_n "checking for $ac_word... " >&6; }
44159if ${ac_cv_path_BUILD_CXX+:} false; then :
44160  $as_echo_n "(cached) " >&6
44161else
44162  case $BUILD_CXX in
44163  [\\/]* | ?:[\\/]*)
44164  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44165  ;;
44166  *)
44167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44168for as_dir in $PATH
44169do
44170  IFS=$as_save_IFS
44171  test -z "$as_dir" && as_dir=.
44172    for ac_exec_ext in '' $ac_executable_extensions; do
44173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44174    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44176    break 2
44177  fi
44178done
44179  done
44180IFS=$as_save_IFS
44181
44182  ;;
44183esac
44184fi
44185BUILD_CXX=$ac_cv_path_BUILD_CXX
44186if test -n "$BUILD_CXX"; then
44187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44188$as_echo "$BUILD_CXX" >&6; }
44189else
44190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44191$as_echo "no" >&6; }
44192fi
44193
44194
44195          if test "x$BUILD_CXX" = x; then
44196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44197          fi
44198        else
44199          # Otherwise we believe it is a complete path. Use it as it is.
44200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44201$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44203$as_echo_n "checking for BUILD_CXX... " >&6; }
44204          if test ! -x "$tool_specified"; then
44205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44206$as_echo "not found" >&6; }
44207            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44208          fi
44209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44210$as_echo "$tool_specified" >&6; }
44211        fi
44212      fi
44213    fi
44214
44215  fi
44216
44217
44218
44219  if test "x$BUILD_CXX" = x; then
44220    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44221  fi
44222
44223
44224
44225  # Only process if variable expands to non-empty
44226
44227  if test "x$BUILD_CXX" != x; then
44228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44229
44230  # First separate the path from the arguments. This will split at the first
44231  # space.
44232  complete="$BUILD_CXX"
44233  path="${complete%% *}"
44234  tmp="$complete EOL"
44235  arguments="${tmp#* }"
44236
44237  # Input might be given as Windows format, start by converting to
44238  # unix format.
44239  new_path=`$CYGPATH -u "$path"`
44240
44241  # Now try to locate executable using which
44242  new_path=`$WHICH "$new_path" 2> /dev/null`
44243  # bat and cmd files are not always considered executable in cygwin causing which
44244  # to not find them
44245  if test "x$new_path" = x \
44246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44248    new_path=`$CYGPATH -u "$path"`
44249  fi
44250  if test "x$new_path" = x; then
44251    # Oops. Which didn't find the executable.
44252    # The splitting of arguments from the executable at a space might have been incorrect,
44253    # since paths with space are more likely in Windows. Give it another try with the whole
44254    # argument.
44255    path="$complete"
44256    arguments="EOL"
44257    new_path=`$CYGPATH -u "$path"`
44258    new_path=`$WHICH "$new_path" 2> /dev/null`
44259    # bat and cmd files are not always considered executable in cygwin causing which
44260    # to not find them
44261    if test "x$new_path" = x \
44262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44264      new_path=`$CYGPATH -u "$path"`
44265    fi
44266    if test "x$new_path" = x; then
44267      # It's still not found. Now this is an unrecoverable error.
44268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44269$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44270      has_space=`$ECHO "$complete" | $GREP " "`
44271      if test "x$has_space" != x; then
44272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44274      fi
44275      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44276    fi
44277  fi
44278
44279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44282  # "foo.exe" is OK but "foo" is an error.
44283  #
44284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44285  # It is also a way to make sure we got the proper file name for the real test later on.
44286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44287  if test "x$test_shortpath" = x; then
44288    # Short path failed, file does not exist as specified.
44289    # Try adding .exe or .cmd
44290    if test -f "${new_path}.exe"; then
44291      input_to_shortpath="${new_path}.exe"
44292    elif test -f "${new_path}.cmd"; then
44293      input_to_shortpath="${new_path}.cmd"
44294    else
44295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44296$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44299      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44300    fi
44301  else
44302    input_to_shortpath="$new_path"
44303  fi
44304
44305  # Call helper function which possibly converts this using DOS-style short mode.
44306  # If so, the updated path is stored in $new_path.
44307  new_path="$input_to_shortpath"
44308
44309  input_path="$input_to_shortpath"
44310  # Check if we need to convert this using DOS-style short mode. If the path
44311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44312  # take no chances and rewrite it.
44313  # Note: m4 eats our [], so we need to use [ and ] instead.
44314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44315  if test "x$has_forbidden_chars" != x; then
44316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44320      # Going to short mode and back again did indeed matter. Since short mode is
44321      # case insensitive, let's make it lowercase to improve readability.
44322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44323      # Now convert it back to Unix-style (cygpath)
44324      input_path=`$CYGPATH -u "$shortmode_path"`
44325      new_path="$input_path"
44326    fi
44327  fi
44328
44329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44330  if test "x$test_cygdrive_prefix" = x; then
44331    # As a simple fix, exclude /usr/bin since it's not a real path.
44332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44334      # a path prefixed by /cygdrive for fixpath to work.
44335      new_path="$CYGWIN_ROOT_PATH$input_path"
44336    fi
44337  fi
44338
44339  # remove trailing .exe if any
44340  new_path="${new_path/%.exe/}"
44341
44342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44343
44344  # First separate the path from the arguments. This will split at the first
44345  # space.
44346  complete="$BUILD_CXX"
44347  path="${complete%% *}"
44348  tmp="$complete EOL"
44349  arguments="${tmp#* }"
44350
44351  # Input might be given as Windows format, start by converting to
44352  # unix format.
44353  new_path="$path"
44354
44355  windows_path="$new_path"
44356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44357    unix_path=`$CYGPATH -u "$windows_path"`
44358    new_path="$unix_path"
44359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44361    new_path="$unix_path"
44362  fi
44363
44364
44365  # Now try to locate executable using which
44366  new_path=`$WHICH "$new_path" 2> /dev/null`
44367
44368  if test "x$new_path" = x; then
44369    # Oops. Which didn't find the executable.
44370    # The splitting of arguments from the executable at a space might have been incorrect,
44371    # since paths with space are more likely in Windows. Give it another try with the whole
44372    # argument.
44373    path="$complete"
44374    arguments="EOL"
44375    new_path="$path"
44376
44377  windows_path="$new_path"
44378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44379    unix_path=`$CYGPATH -u "$windows_path"`
44380    new_path="$unix_path"
44381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44383    new_path="$unix_path"
44384  fi
44385
44386
44387    new_path=`$WHICH "$new_path" 2> /dev/null`
44388    # bat and cmd files are not always considered executable in MSYS causing which
44389    # to not find them
44390    if test "x$new_path" = x \
44391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44393      new_path="$path"
44394
44395  windows_path="$new_path"
44396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44397    unix_path=`$CYGPATH -u "$windows_path"`
44398    new_path="$unix_path"
44399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44401    new_path="$unix_path"
44402  fi
44403
44404    fi
44405
44406    if test "x$new_path" = x; then
44407      # It's still not found. Now this is an unrecoverable error.
44408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44409$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44410      has_space=`$ECHO "$complete" | $GREP " "`
44411      if test "x$has_space" != x; then
44412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44414      fi
44415      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44416    fi
44417  fi
44418
44419  # Now new_path has a complete unix path to the binary
44420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44421    # Keep paths in /bin as-is, but remove trailing .exe if any
44422    new_path="${new_path/%.exe/}"
44423    # Do not save /bin paths to all_fixpath_prefixes!
44424  else
44425    # Not in mixed or Windows style, start by that.
44426    new_path=`cmd //c echo $new_path`
44427
44428  input_path="$new_path"
44429  # Check if we need to convert this using DOS-style short mode. If the path
44430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44431  # take no chances and rewrite it.
44432  # Note: m4 eats our [], so we need to use [ and ] instead.
44433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44434  if test "x$has_forbidden_chars" != x; then
44435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44437  fi
44438
44439    # Output is in $new_path
44440
44441  windows_path="$new_path"
44442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44443    unix_path=`$CYGPATH -u "$windows_path"`
44444    new_path="$unix_path"
44445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44447    new_path="$unix_path"
44448  fi
44449
44450    # remove trailing .exe if any
44451    new_path="${new_path/%.exe/}"
44452
44453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44455  fi
44456
44457    else
44458      # We're on a unix platform. Hooray! :)
44459      # First separate the path from the arguments. This will split at the first
44460      # space.
44461      complete="$BUILD_CXX"
44462      path="${complete%% *}"
44463      tmp="$complete EOL"
44464      arguments="${tmp#* }"
44465
44466      # Cannot rely on the command "which" here since it doesn't always work.
44467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44468      if test -z "$is_absolute_path"; then
44469        # Path to executable is not absolute. Find it.
44470        IFS_save="$IFS"
44471        IFS=:
44472        for p in $PATH; do
44473          if test -f "$p/$path" && test -x "$p/$path"; then
44474            new_path="$p/$path"
44475            break
44476          fi
44477        done
44478        IFS="$IFS_save"
44479      else
44480        # This is an absolute path, we can use it without further modifications.
44481        new_path="$path"
44482      fi
44483
44484      if test "x$new_path" = x; then
44485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44486$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44487        has_space=`$ECHO "$complete" | $GREP " "`
44488        if test "x$has_space" != x; then
44489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44491        fi
44492        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44493      fi
44494    fi
44495
44496    # Now join together the path and the arguments once again
44497    if test "x$arguments" != xEOL; then
44498      new_complete="$new_path ${arguments% *}"
44499    else
44500      new_complete="$new_path"
44501    fi
44502
44503    if test "x$complete" != "x$new_complete"; then
44504      BUILD_CXX="$new_complete"
44505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44506$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44507    fi
44508  fi
44509
44510
44511
44512  # Publish this variable in the help.
44513
44514
44515  if [ -z "${BUILD_NM+x}" ]; then
44516    # The variable is not set by user, try to locate tool using the code snippet
44517    for ac_prog in nm gcc-nm
44518do
44519  # Extract the first word of "$ac_prog", so it can be a program name with args.
44520set dummy $ac_prog; ac_word=$2
44521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44522$as_echo_n "checking for $ac_word... " >&6; }
44523if ${ac_cv_path_BUILD_NM+:} false; then :
44524  $as_echo_n "(cached) " >&6
44525else
44526  case $BUILD_NM in
44527  [\\/]* | ?:[\\/]*)
44528  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44529  ;;
44530  *)
44531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44532for as_dir in $PATH
44533do
44534  IFS=$as_save_IFS
44535  test -z "$as_dir" && as_dir=.
44536    for ac_exec_ext in '' $ac_executable_extensions; do
44537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44538    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44540    break 2
44541  fi
44542done
44543  done
44544IFS=$as_save_IFS
44545
44546  ;;
44547esac
44548fi
44549BUILD_NM=$ac_cv_path_BUILD_NM
44550if test -n "$BUILD_NM"; then
44551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44552$as_echo "$BUILD_NM" >&6; }
44553else
44554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44555$as_echo "no" >&6; }
44556fi
44557
44558
44559  test -n "$BUILD_NM" && break
44560done
44561
44562  else
44563    # The variable is set, but is it from the command line or the environment?
44564
44565    # Try to remove the string !BUILD_NM! from our list.
44566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44568      # If it failed, the variable was not from the command line. Ignore it,
44569      # but warn the user (except for BASH, which is always set by the calling BASH).
44570      if test "xBUILD_NM" != xBASH; then
44571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44572$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44573      fi
44574      # Try to locate tool using the code snippet
44575      for ac_prog in nm gcc-nm
44576do
44577  # Extract the first word of "$ac_prog", so it can be a program name with args.
44578set dummy $ac_prog; ac_word=$2
44579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44580$as_echo_n "checking for $ac_word... " >&6; }
44581if ${ac_cv_path_BUILD_NM+:} false; then :
44582  $as_echo_n "(cached) " >&6
44583else
44584  case $BUILD_NM in
44585  [\\/]* | ?:[\\/]*)
44586  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44587  ;;
44588  *)
44589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44590for as_dir in $PATH
44591do
44592  IFS=$as_save_IFS
44593  test -z "$as_dir" && as_dir=.
44594    for ac_exec_ext in '' $ac_executable_extensions; do
44595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44596    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44598    break 2
44599  fi
44600done
44601  done
44602IFS=$as_save_IFS
44603
44604  ;;
44605esac
44606fi
44607BUILD_NM=$ac_cv_path_BUILD_NM
44608if test -n "$BUILD_NM"; then
44609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44610$as_echo "$BUILD_NM" >&6; }
44611else
44612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44613$as_echo "no" >&6; }
44614fi
44615
44616
44617  test -n "$BUILD_NM" && break
44618done
44619
44620    else
44621      # If it succeeded, then it was overridden by the user. We will use it
44622      # for the tool.
44623
44624      # First remove it from the list of overridden variables, so we can test
44625      # for unknown variables in the end.
44626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44627
44628      # Check if we try to supply an empty value
44629      if test "x$BUILD_NM" = x; then
44630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44631$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44633$as_echo_n "checking for BUILD_NM... " >&6; }
44634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44635$as_echo "disabled" >&6; }
44636      else
44637        # Check if the provided tool contains a complete path.
44638        tool_specified="$BUILD_NM"
44639        tool_basename="${tool_specified##*/}"
44640        if test "x$tool_basename" = "x$tool_specified"; then
44641          # A command without a complete path is provided, search $PATH.
44642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44643$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44644          # Extract the first word of "$tool_basename", so it can be a program name with args.
44645set dummy $tool_basename; ac_word=$2
44646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44647$as_echo_n "checking for $ac_word... " >&6; }
44648if ${ac_cv_path_BUILD_NM+:} false; then :
44649  $as_echo_n "(cached) " >&6
44650else
44651  case $BUILD_NM in
44652  [\\/]* | ?:[\\/]*)
44653  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44654  ;;
44655  *)
44656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44657for as_dir in $PATH
44658do
44659  IFS=$as_save_IFS
44660  test -z "$as_dir" && as_dir=.
44661    for ac_exec_ext in '' $ac_executable_extensions; do
44662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44663    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44665    break 2
44666  fi
44667done
44668  done
44669IFS=$as_save_IFS
44670
44671  ;;
44672esac
44673fi
44674BUILD_NM=$ac_cv_path_BUILD_NM
44675if test -n "$BUILD_NM"; then
44676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44677$as_echo "$BUILD_NM" >&6; }
44678else
44679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44680$as_echo "no" >&6; }
44681fi
44682
44683
44684          if test "x$BUILD_NM" = x; then
44685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44686          fi
44687        else
44688          # Otherwise we believe it is a complete path. Use it as it is.
44689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44690$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44692$as_echo_n "checking for BUILD_NM... " >&6; }
44693          if test ! -x "$tool_specified"; then
44694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44695$as_echo "not found" >&6; }
44696            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44697          fi
44698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44699$as_echo "$tool_specified" >&6; }
44700        fi
44701      fi
44702    fi
44703
44704  fi
44705
44706
44707
44708  # Only process if variable expands to non-empty
44709
44710  if test "x$BUILD_NM" != x; then
44711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44712
44713  # First separate the path from the arguments. This will split at the first
44714  # space.
44715  complete="$BUILD_NM"
44716  path="${complete%% *}"
44717  tmp="$complete EOL"
44718  arguments="${tmp#* }"
44719
44720  # Input might be given as Windows format, start by converting to
44721  # unix format.
44722  new_path=`$CYGPATH -u "$path"`
44723
44724  # Now try to locate executable using which
44725  new_path=`$WHICH "$new_path" 2> /dev/null`
44726  # bat and cmd files are not always considered executable in cygwin causing which
44727  # to not find them
44728  if test "x$new_path" = x \
44729      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44730      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44731    new_path=`$CYGPATH -u "$path"`
44732  fi
44733  if test "x$new_path" = x; then
44734    # Oops. Which didn't find the executable.
44735    # The splitting of arguments from the executable at a space might have been incorrect,
44736    # since paths with space are more likely in Windows. Give it another try with the whole
44737    # argument.
44738    path="$complete"
44739    arguments="EOL"
44740    new_path=`$CYGPATH -u "$path"`
44741    new_path=`$WHICH "$new_path" 2> /dev/null`
44742    # bat and cmd files are not always considered executable in cygwin causing which
44743    # to not find them
44744    if test "x$new_path" = x \
44745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44747      new_path=`$CYGPATH -u "$path"`
44748    fi
44749    if test "x$new_path" = x; then
44750      # It's still not found. Now this is an unrecoverable error.
44751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44752$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44753      has_space=`$ECHO "$complete" | $GREP " "`
44754      if test "x$has_space" != x; then
44755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44757      fi
44758      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44759    fi
44760  fi
44761
44762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44765  # "foo.exe" is OK but "foo" is an error.
44766  #
44767  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44768  # It is also a way to make sure we got the proper file name for the real test later on.
44769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44770  if test "x$test_shortpath" = x; then
44771    # Short path failed, file does not exist as specified.
44772    # Try adding .exe or .cmd
44773    if test -f "${new_path}.exe"; then
44774      input_to_shortpath="${new_path}.exe"
44775    elif test -f "${new_path}.cmd"; then
44776      input_to_shortpath="${new_path}.cmd"
44777    else
44778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44779$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44780      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44781$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44782      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44783    fi
44784  else
44785    input_to_shortpath="$new_path"
44786  fi
44787
44788  # Call helper function which possibly converts this using DOS-style short mode.
44789  # If so, the updated path is stored in $new_path.
44790  new_path="$input_to_shortpath"
44791
44792  input_path="$input_to_shortpath"
44793  # Check if we need to convert this using DOS-style short mode. If the path
44794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44795  # take no chances and rewrite it.
44796  # Note: m4 eats our [], so we need to use [ and ] instead.
44797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44798  if test "x$has_forbidden_chars" != x; then
44799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44803      # Going to short mode and back again did indeed matter. Since short mode is
44804      # case insensitive, let's make it lowercase to improve readability.
44805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44806      # Now convert it back to Unix-style (cygpath)
44807      input_path=`$CYGPATH -u "$shortmode_path"`
44808      new_path="$input_path"
44809    fi
44810  fi
44811
44812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44813  if test "x$test_cygdrive_prefix" = x; then
44814    # As a simple fix, exclude /usr/bin since it's not a real path.
44815    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44817      # a path prefixed by /cygdrive for fixpath to work.
44818      new_path="$CYGWIN_ROOT_PATH$input_path"
44819    fi
44820  fi
44821
44822  # remove trailing .exe if any
44823  new_path="${new_path/%.exe/}"
44824
44825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44826
44827  # First separate the path from the arguments. This will split at the first
44828  # space.
44829  complete="$BUILD_NM"
44830  path="${complete%% *}"
44831  tmp="$complete EOL"
44832  arguments="${tmp#* }"
44833
44834  # Input might be given as Windows format, start by converting to
44835  # unix format.
44836  new_path="$path"
44837
44838  windows_path="$new_path"
44839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44840    unix_path=`$CYGPATH -u "$windows_path"`
44841    new_path="$unix_path"
44842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44844    new_path="$unix_path"
44845  fi
44846
44847
44848  # Now try to locate executable using which
44849  new_path=`$WHICH "$new_path" 2> /dev/null`
44850
44851  if test "x$new_path" = x; then
44852    # Oops. Which didn't find the executable.
44853    # The splitting of arguments from the executable at a space might have been incorrect,
44854    # since paths with space are more likely in Windows. Give it another try with the whole
44855    # argument.
44856    path="$complete"
44857    arguments="EOL"
44858    new_path="$path"
44859
44860  windows_path="$new_path"
44861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44862    unix_path=`$CYGPATH -u "$windows_path"`
44863    new_path="$unix_path"
44864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44866    new_path="$unix_path"
44867  fi
44868
44869
44870    new_path=`$WHICH "$new_path" 2> /dev/null`
44871    # bat and cmd files are not always considered executable in MSYS causing which
44872    # to not find them
44873    if test "x$new_path" = x \
44874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44876      new_path="$path"
44877
44878  windows_path="$new_path"
44879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44880    unix_path=`$CYGPATH -u "$windows_path"`
44881    new_path="$unix_path"
44882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44884    new_path="$unix_path"
44885  fi
44886
44887    fi
44888
44889    if test "x$new_path" = x; then
44890      # It's still not found. Now this is an unrecoverable error.
44891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44892$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44893      has_space=`$ECHO "$complete" | $GREP " "`
44894      if test "x$has_space" != x; then
44895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44897      fi
44898      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44899    fi
44900  fi
44901
44902  # Now new_path has a complete unix path to the binary
44903  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44904    # Keep paths in /bin as-is, but remove trailing .exe if any
44905    new_path="${new_path/%.exe/}"
44906    # Do not save /bin paths to all_fixpath_prefixes!
44907  else
44908    # Not in mixed or Windows style, start by that.
44909    new_path=`cmd //c echo $new_path`
44910
44911  input_path="$new_path"
44912  # Check if we need to convert this using DOS-style short mode. If the path
44913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44914  # take no chances and rewrite it.
44915  # Note: m4 eats our [], so we need to use [ and ] instead.
44916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44917  if test "x$has_forbidden_chars" != x; then
44918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44920  fi
44921
44922    # Output is in $new_path
44923
44924  windows_path="$new_path"
44925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44926    unix_path=`$CYGPATH -u "$windows_path"`
44927    new_path="$unix_path"
44928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44930    new_path="$unix_path"
44931  fi
44932
44933    # remove trailing .exe if any
44934    new_path="${new_path/%.exe/}"
44935
44936    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44937    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44938  fi
44939
44940    else
44941      # We're on a unix platform. Hooray! :)
44942      # First separate the path from the arguments. This will split at the first
44943      # space.
44944      complete="$BUILD_NM"
44945      path="${complete%% *}"
44946      tmp="$complete EOL"
44947      arguments="${tmp#* }"
44948
44949      # Cannot rely on the command "which" here since it doesn't always work.
44950      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44951      if test -z "$is_absolute_path"; then
44952        # Path to executable is not absolute. Find it.
44953        IFS_save="$IFS"
44954        IFS=:
44955        for p in $PATH; do
44956          if test -f "$p/$path" && test -x "$p/$path"; then
44957            new_path="$p/$path"
44958            break
44959          fi
44960        done
44961        IFS="$IFS_save"
44962      else
44963        # This is an absolute path, we can use it without further modifications.
44964        new_path="$path"
44965      fi
44966
44967      if test "x$new_path" = x; then
44968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44969$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44970        has_space=`$ECHO "$complete" | $GREP " "`
44971        if test "x$has_space" != x; then
44972          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44973$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44974        fi
44975        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44976      fi
44977    fi
44978
44979    # Now join together the path and the arguments once again
44980    if test "x$arguments" != xEOL; then
44981      new_complete="$new_path ${arguments% *}"
44982    else
44983      new_complete="$new_path"
44984    fi
44985
44986    if test "x$complete" != "x$new_complete"; then
44987      BUILD_NM="$new_complete"
44988      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44989$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44990    fi
44991  fi
44992
44993
44994
44995  # Publish this variable in the help.
44996
44997
44998  if [ -z "${BUILD_AR+x}" ]; then
44999    # The variable is not set by user, try to locate tool using the code snippet
45000    for ac_prog in ar gcc-ar
45001do
45002  # Extract the first word of "$ac_prog", so it can be a program name with args.
45003set dummy $ac_prog; ac_word=$2
45004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45005$as_echo_n "checking for $ac_word... " >&6; }
45006if ${ac_cv_path_BUILD_AR+:} false; then :
45007  $as_echo_n "(cached) " >&6
45008else
45009  case $BUILD_AR in
45010  [\\/]* | ?:[\\/]*)
45011  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45012  ;;
45013  *)
45014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45015for as_dir in $PATH
45016do
45017  IFS=$as_save_IFS
45018  test -z "$as_dir" && as_dir=.
45019    for ac_exec_ext in '' $ac_executable_extensions; do
45020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45021    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45023    break 2
45024  fi
45025done
45026  done
45027IFS=$as_save_IFS
45028
45029  ;;
45030esac
45031fi
45032BUILD_AR=$ac_cv_path_BUILD_AR
45033if test -n "$BUILD_AR"; then
45034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45035$as_echo "$BUILD_AR" >&6; }
45036else
45037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45038$as_echo "no" >&6; }
45039fi
45040
45041
45042  test -n "$BUILD_AR" && break
45043done
45044
45045  else
45046    # The variable is set, but is it from the command line or the environment?
45047
45048    # Try to remove the string !BUILD_AR! from our list.
45049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45051      # If it failed, the variable was not from the command line. Ignore it,
45052      # but warn the user (except for BASH, which is always set by the calling BASH).
45053      if test "xBUILD_AR" != xBASH; then
45054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45055$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45056      fi
45057      # Try to locate tool using the code snippet
45058      for ac_prog in ar gcc-ar
45059do
45060  # Extract the first word of "$ac_prog", so it can be a program name with args.
45061set dummy $ac_prog; ac_word=$2
45062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45063$as_echo_n "checking for $ac_word... " >&6; }
45064if ${ac_cv_path_BUILD_AR+:} false; then :
45065  $as_echo_n "(cached) " >&6
45066else
45067  case $BUILD_AR in
45068  [\\/]* | ?:[\\/]*)
45069  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45070  ;;
45071  *)
45072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45073for as_dir in $PATH
45074do
45075  IFS=$as_save_IFS
45076  test -z "$as_dir" && as_dir=.
45077    for ac_exec_ext in '' $ac_executable_extensions; do
45078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45079    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45081    break 2
45082  fi
45083done
45084  done
45085IFS=$as_save_IFS
45086
45087  ;;
45088esac
45089fi
45090BUILD_AR=$ac_cv_path_BUILD_AR
45091if test -n "$BUILD_AR"; then
45092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45093$as_echo "$BUILD_AR" >&6; }
45094else
45095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45096$as_echo "no" >&6; }
45097fi
45098
45099
45100  test -n "$BUILD_AR" && break
45101done
45102
45103    else
45104      # If it succeeded, then it was overridden by the user. We will use it
45105      # for the tool.
45106
45107      # First remove it from the list of overridden variables, so we can test
45108      # for unknown variables in the end.
45109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45110
45111      # Check if we try to supply an empty value
45112      if test "x$BUILD_AR" = x; then
45113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45114$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45116$as_echo_n "checking for BUILD_AR... " >&6; }
45117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45118$as_echo "disabled" >&6; }
45119      else
45120        # Check if the provided tool contains a complete path.
45121        tool_specified="$BUILD_AR"
45122        tool_basename="${tool_specified##*/}"
45123        if test "x$tool_basename" = "x$tool_specified"; then
45124          # A command without a complete path is provided, search $PATH.
45125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45126$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45127          # Extract the first word of "$tool_basename", so it can be a program name with args.
45128set dummy $tool_basename; ac_word=$2
45129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45130$as_echo_n "checking for $ac_word... " >&6; }
45131if ${ac_cv_path_BUILD_AR+:} false; then :
45132  $as_echo_n "(cached) " >&6
45133else
45134  case $BUILD_AR in
45135  [\\/]* | ?:[\\/]*)
45136  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45137  ;;
45138  *)
45139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45140for as_dir in $PATH
45141do
45142  IFS=$as_save_IFS
45143  test -z "$as_dir" && as_dir=.
45144    for ac_exec_ext in '' $ac_executable_extensions; do
45145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45146    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45148    break 2
45149  fi
45150done
45151  done
45152IFS=$as_save_IFS
45153
45154  ;;
45155esac
45156fi
45157BUILD_AR=$ac_cv_path_BUILD_AR
45158if test -n "$BUILD_AR"; then
45159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45160$as_echo "$BUILD_AR" >&6; }
45161else
45162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45163$as_echo "no" >&6; }
45164fi
45165
45166
45167          if test "x$BUILD_AR" = x; then
45168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45169          fi
45170        else
45171          # Otherwise we believe it is a complete path. Use it as it is.
45172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45173$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45175$as_echo_n "checking for BUILD_AR... " >&6; }
45176          if test ! -x "$tool_specified"; then
45177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45178$as_echo "not found" >&6; }
45179            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45180          fi
45181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45182$as_echo "$tool_specified" >&6; }
45183        fi
45184      fi
45185    fi
45186
45187  fi
45188
45189
45190
45191  # Only process if variable expands to non-empty
45192
45193  if test "x$BUILD_AR" != x; then
45194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45195
45196  # First separate the path from the arguments. This will split at the first
45197  # space.
45198  complete="$BUILD_AR"
45199  path="${complete%% *}"
45200  tmp="$complete EOL"
45201  arguments="${tmp#* }"
45202
45203  # Input might be given as Windows format, start by converting to
45204  # unix format.
45205  new_path=`$CYGPATH -u "$path"`
45206
45207  # Now try to locate executable using which
45208  new_path=`$WHICH "$new_path" 2> /dev/null`
45209  # bat and cmd files are not always considered executable in cygwin causing which
45210  # to not find them
45211  if test "x$new_path" = x \
45212      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45213      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45214    new_path=`$CYGPATH -u "$path"`
45215  fi
45216  if test "x$new_path" = x; then
45217    # Oops. Which didn't find the executable.
45218    # The splitting of arguments from the executable at a space might have been incorrect,
45219    # since paths with space are more likely in Windows. Give it another try with the whole
45220    # argument.
45221    path="$complete"
45222    arguments="EOL"
45223    new_path=`$CYGPATH -u "$path"`
45224    new_path=`$WHICH "$new_path" 2> /dev/null`
45225    # bat and cmd files are not always considered executable in cygwin causing which
45226    # to not find them
45227    if test "x$new_path" = x \
45228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45230      new_path=`$CYGPATH -u "$path"`
45231    fi
45232    if test "x$new_path" = x; then
45233      # It's still not found. Now this is an unrecoverable error.
45234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45235$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45236      has_space=`$ECHO "$complete" | $GREP " "`
45237      if test "x$has_space" != x; then
45238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45240      fi
45241      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45242    fi
45243  fi
45244
45245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45248  # "foo.exe" is OK but "foo" is an error.
45249  #
45250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45251  # It is also a way to make sure we got the proper file name for the real test later on.
45252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45253  if test "x$test_shortpath" = x; then
45254    # Short path failed, file does not exist as specified.
45255    # Try adding .exe or .cmd
45256    if test -f "${new_path}.exe"; then
45257      input_to_shortpath="${new_path}.exe"
45258    elif test -f "${new_path}.cmd"; then
45259      input_to_shortpath="${new_path}.cmd"
45260    else
45261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45262$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45265      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45266    fi
45267  else
45268    input_to_shortpath="$new_path"
45269  fi
45270
45271  # Call helper function which possibly converts this using DOS-style short mode.
45272  # If so, the updated path is stored in $new_path.
45273  new_path="$input_to_shortpath"
45274
45275  input_path="$input_to_shortpath"
45276  # Check if we need to convert this using DOS-style short mode. If the path
45277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45278  # take no chances and rewrite it.
45279  # Note: m4 eats our [], so we need to use [ and ] instead.
45280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45281  if test "x$has_forbidden_chars" != x; then
45282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45286      # Going to short mode and back again did indeed matter. Since short mode is
45287      # case insensitive, let's make it lowercase to improve readability.
45288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45289      # Now convert it back to Unix-style (cygpath)
45290      input_path=`$CYGPATH -u "$shortmode_path"`
45291      new_path="$input_path"
45292    fi
45293  fi
45294
45295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45296  if test "x$test_cygdrive_prefix" = x; then
45297    # As a simple fix, exclude /usr/bin since it's not a real path.
45298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45300      # a path prefixed by /cygdrive for fixpath to work.
45301      new_path="$CYGWIN_ROOT_PATH$input_path"
45302    fi
45303  fi
45304
45305  # remove trailing .exe if any
45306  new_path="${new_path/%.exe/}"
45307
45308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45309
45310  # First separate the path from the arguments. This will split at the first
45311  # space.
45312  complete="$BUILD_AR"
45313  path="${complete%% *}"
45314  tmp="$complete EOL"
45315  arguments="${tmp#* }"
45316
45317  # Input might be given as Windows format, start by converting to
45318  # unix format.
45319  new_path="$path"
45320
45321  windows_path="$new_path"
45322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45323    unix_path=`$CYGPATH -u "$windows_path"`
45324    new_path="$unix_path"
45325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45327    new_path="$unix_path"
45328  fi
45329
45330
45331  # Now try to locate executable using which
45332  new_path=`$WHICH "$new_path" 2> /dev/null`
45333
45334  if test "x$new_path" = x; then
45335    # Oops. Which didn't find the executable.
45336    # The splitting of arguments from the executable at a space might have been incorrect,
45337    # since paths with space are more likely in Windows. Give it another try with the whole
45338    # argument.
45339    path="$complete"
45340    arguments="EOL"
45341    new_path="$path"
45342
45343  windows_path="$new_path"
45344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45345    unix_path=`$CYGPATH -u "$windows_path"`
45346    new_path="$unix_path"
45347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45349    new_path="$unix_path"
45350  fi
45351
45352
45353    new_path=`$WHICH "$new_path" 2> /dev/null`
45354    # bat and cmd files are not always considered executable in MSYS causing which
45355    # to not find them
45356    if test "x$new_path" = x \
45357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45359      new_path="$path"
45360
45361  windows_path="$new_path"
45362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45363    unix_path=`$CYGPATH -u "$windows_path"`
45364    new_path="$unix_path"
45365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45367    new_path="$unix_path"
45368  fi
45369
45370    fi
45371
45372    if test "x$new_path" = x; then
45373      # It's still not found. Now this is an unrecoverable error.
45374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45375$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45376      has_space=`$ECHO "$complete" | $GREP " "`
45377      if test "x$has_space" != x; then
45378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45380      fi
45381      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45382    fi
45383  fi
45384
45385  # Now new_path has a complete unix path to the binary
45386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45387    # Keep paths in /bin as-is, but remove trailing .exe if any
45388    new_path="${new_path/%.exe/}"
45389    # Do not save /bin paths to all_fixpath_prefixes!
45390  else
45391    # Not in mixed or Windows style, start by that.
45392    new_path=`cmd //c echo $new_path`
45393
45394  input_path="$new_path"
45395  # Check if we need to convert this using DOS-style short mode. If the path
45396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45397  # take no chances and rewrite it.
45398  # Note: m4 eats our [], so we need to use [ and ] instead.
45399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45400  if test "x$has_forbidden_chars" != x; then
45401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45403  fi
45404
45405    # Output is in $new_path
45406
45407  windows_path="$new_path"
45408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45409    unix_path=`$CYGPATH -u "$windows_path"`
45410    new_path="$unix_path"
45411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45413    new_path="$unix_path"
45414  fi
45415
45416    # remove trailing .exe if any
45417    new_path="${new_path/%.exe/}"
45418
45419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45421  fi
45422
45423    else
45424      # We're on a unix platform. Hooray! :)
45425      # First separate the path from the arguments. This will split at the first
45426      # space.
45427      complete="$BUILD_AR"
45428      path="${complete%% *}"
45429      tmp="$complete EOL"
45430      arguments="${tmp#* }"
45431
45432      # Cannot rely on the command "which" here since it doesn't always work.
45433      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45434      if test -z "$is_absolute_path"; then
45435        # Path to executable is not absolute. Find it.
45436        IFS_save="$IFS"
45437        IFS=:
45438        for p in $PATH; do
45439          if test -f "$p/$path" && test -x "$p/$path"; then
45440            new_path="$p/$path"
45441            break
45442          fi
45443        done
45444        IFS="$IFS_save"
45445      else
45446        # This is an absolute path, we can use it without further modifications.
45447        new_path="$path"
45448      fi
45449
45450      if test "x$new_path" = x; then
45451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45452$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45453        has_space=`$ECHO "$complete" | $GREP " "`
45454        if test "x$has_space" != x; then
45455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45457        fi
45458        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45459      fi
45460    fi
45461
45462    # Now join together the path and the arguments once again
45463    if test "x$arguments" != xEOL; then
45464      new_complete="$new_path ${arguments% *}"
45465    else
45466      new_complete="$new_path"
45467    fi
45468
45469    if test "x$complete" != "x$new_complete"; then
45470      BUILD_AR="$new_complete"
45471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45472$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45473    fi
45474  fi
45475
45476
45477
45478  # Publish this variable in the help.
45479
45480
45481  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45482    # The variable is not set by user, try to locate tool using the code snippet
45483    for ac_prog in objcopy
45484do
45485  # Extract the first word of "$ac_prog", so it can be a program name with args.
45486set dummy $ac_prog; ac_word=$2
45487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45488$as_echo_n "checking for $ac_word... " >&6; }
45489if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45490  $as_echo_n "(cached) " >&6
45491else
45492  case $BUILD_OBJCOPY in
45493  [\\/]* | ?:[\\/]*)
45494  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45495  ;;
45496  *)
45497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45498for as_dir in $PATH
45499do
45500  IFS=$as_save_IFS
45501  test -z "$as_dir" && as_dir=.
45502    for ac_exec_ext in '' $ac_executable_extensions; do
45503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45504    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45506    break 2
45507  fi
45508done
45509  done
45510IFS=$as_save_IFS
45511
45512  ;;
45513esac
45514fi
45515BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45516if test -n "$BUILD_OBJCOPY"; then
45517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45518$as_echo "$BUILD_OBJCOPY" >&6; }
45519else
45520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45521$as_echo "no" >&6; }
45522fi
45523
45524
45525  test -n "$BUILD_OBJCOPY" && break
45526done
45527
45528  else
45529    # The variable is set, but is it from the command line or the environment?
45530
45531    # Try to remove the string !BUILD_OBJCOPY! from our list.
45532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45534      # If it failed, the variable was not from the command line. Ignore it,
45535      # but warn the user (except for BASH, which is always set by the calling BASH).
45536      if test "xBUILD_OBJCOPY" != xBASH; then
45537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45538$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45539      fi
45540      # Try to locate tool using the code snippet
45541      for ac_prog in objcopy
45542do
45543  # Extract the first word of "$ac_prog", so it can be a program name with args.
45544set dummy $ac_prog; ac_word=$2
45545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45546$as_echo_n "checking for $ac_word... " >&6; }
45547if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45548  $as_echo_n "(cached) " >&6
45549else
45550  case $BUILD_OBJCOPY in
45551  [\\/]* | ?:[\\/]*)
45552  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45553  ;;
45554  *)
45555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45556for as_dir in $PATH
45557do
45558  IFS=$as_save_IFS
45559  test -z "$as_dir" && as_dir=.
45560    for ac_exec_ext in '' $ac_executable_extensions; do
45561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45562    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45564    break 2
45565  fi
45566done
45567  done
45568IFS=$as_save_IFS
45569
45570  ;;
45571esac
45572fi
45573BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45574if test -n "$BUILD_OBJCOPY"; then
45575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45576$as_echo "$BUILD_OBJCOPY" >&6; }
45577else
45578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45579$as_echo "no" >&6; }
45580fi
45581
45582
45583  test -n "$BUILD_OBJCOPY" && break
45584done
45585
45586    else
45587      # If it succeeded, then it was overridden by the user. We will use it
45588      # for the tool.
45589
45590      # First remove it from the list of overridden variables, so we can test
45591      # for unknown variables in the end.
45592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45593
45594      # Check if we try to supply an empty value
45595      if test "x$BUILD_OBJCOPY" = x; then
45596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45597$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45599$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45601$as_echo "disabled" >&6; }
45602      else
45603        # Check if the provided tool contains a complete path.
45604        tool_specified="$BUILD_OBJCOPY"
45605        tool_basename="${tool_specified##*/}"
45606        if test "x$tool_basename" = "x$tool_specified"; then
45607          # A command without a complete path is provided, search $PATH.
45608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45609$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45610          # Extract the first word of "$tool_basename", so it can be a program name with args.
45611set dummy $tool_basename; ac_word=$2
45612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45613$as_echo_n "checking for $ac_word... " >&6; }
45614if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45615  $as_echo_n "(cached) " >&6
45616else
45617  case $BUILD_OBJCOPY in
45618  [\\/]* | ?:[\\/]*)
45619  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45620  ;;
45621  *)
45622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45623for as_dir in $PATH
45624do
45625  IFS=$as_save_IFS
45626  test -z "$as_dir" && as_dir=.
45627    for ac_exec_ext in '' $ac_executable_extensions; do
45628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45629    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45631    break 2
45632  fi
45633done
45634  done
45635IFS=$as_save_IFS
45636
45637  ;;
45638esac
45639fi
45640BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45641if test -n "$BUILD_OBJCOPY"; then
45642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45643$as_echo "$BUILD_OBJCOPY" >&6; }
45644else
45645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45646$as_echo "no" >&6; }
45647fi
45648
45649
45650          if test "x$BUILD_OBJCOPY" = x; then
45651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45652          fi
45653        else
45654          # Otherwise we believe it is a complete path. Use it as it is.
45655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45656$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45658$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45659          if test ! -x "$tool_specified"; then
45660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45661$as_echo "not found" >&6; }
45662            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45663          fi
45664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45665$as_echo "$tool_specified" >&6; }
45666        fi
45667      fi
45668    fi
45669
45670  fi
45671
45672
45673
45674  # Only process if variable expands to non-empty
45675
45676  if test "x$BUILD_OBJCOPY" != x; then
45677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45678
45679  # First separate the path from the arguments. This will split at the first
45680  # space.
45681  complete="$BUILD_OBJCOPY"
45682  path="${complete%% *}"
45683  tmp="$complete EOL"
45684  arguments="${tmp#* }"
45685
45686  # Input might be given as Windows format, start by converting to
45687  # unix format.
45688  new_path=`$CYGPATH -u "$path"`
45689
45690  # Now try to locate executable using which
45691  new_path=`$WHICH "$new_path" 2> /dev/null`
45692  # bat and cmd files are not always considered executable in cygwin causing which
45693  # to not find them
45694  if test "x$new_path" = x \
45695      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45696      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45697    new_path=`$CYGPATH -u "$path"`
45698  fi
45699  if test "x$new_path" = x; then
45700    # Oops. Which didn't find the executable.
45701    # The splitting of arguments from the executable at a space might have been incorrect,
45702    # since paths with space are more likely in Windows. Give it another try with the whole
45703    # argument.
45704    path="$complete"
45705    arguments="EOL"
45706    new_path=`$CYGPATH -u "$path"`
45707    new_path=`$WHICH "$new_path" 2> /dev/null`
45708    # bat and cmd files are not always considered executable in cygwin causing which
45709    # to not find them
45710    if test "x$new_path" = x \
45711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45713      new_path=`$CYGPATH -u "$path"`
45714    fi
45715    if test "x$new_path" = x; then
45716      # It's still not found. Now this is an unrecoverable error.
45717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45718$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45719      has_space=`$ECHO "$complete" | $GREP " "`
45720      if test "x$has_space" != x; then
45721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45723      fi
45724      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45725    fi
45726  fi
45727
45728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45731  # "foo.exe" is OK but "foo" is an error.
45732  #
45733  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45734  # It is also a way to make sure we got the proper file name for the real test later on.
45735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45736  if test "x$test_shortpath" = x; then
45737    # Short path failed, file does not exist as specified.
45738    # Try adding .exe or .cmd
45739    if test -f "${new_path}.exe"; then
45740      input_to_shortpath="${new_path}.exe"
45741    elif test -f "${new_path}.cmd"; then
45742      input_to_shortpath="${new_path}.cmd"
45743    else
45744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45745$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45748      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45749    fi
45750  else
45751    input_to_shortpath="$new_path"
45752  fi
45753
45754  # Call helper function which possibly converts this using DOS-style short mode.
45755  # If so, the updated path is stored in $new_path.
45756  new_path="$input_to_shortpath"
45757
45758  input_path="$input_to_shortpath"
45759  # Check if we need to convert this using DOS-style short mode. If the path
45760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45761  # take no chances and rewrite it.
45762  # Note: m4 eats our [], so we need to use [ and ] instead.
45763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45764  if test "x$has_forbidden_chars" != x; then
45765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45769      # Going to short mode and back again did indeed matter. Since short mode is
45770      # case insensitive, let's make it lowercase to improve readability.
45771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45772      # Now convert it back to Unix-style (cygpath)
45773      input_path=`$CYGPATH -u "$shortmode_path"`
45774      new_path="$input_path"
45775    fi
45776  fi
45777
45778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45779  if test "x$test_cygdrive_prefix" = x; then
45780    # As a simple fix, exclude /usr/bin since it's not a real path.
45781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45783      # a path prefixed by /cygdrive for fixpath to work.
45784      new_path="$CYGWIN_ROOT_PATH$input_path"
45785    fi
45786  fi
45787
45788  # remove trailing .exe if any
45789  new_path="${new_path/%.exe/}"
45790
45791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45792
45793  # First separate the path from the arguments. This will split at the first
45794  # space.
45795  complete="$BUILD_OBJCOPY"
45796  path="${complete%% *}"
45797  tmp="$complete EOL"
45798  arguments="${tmp#* }"
45799
45800  # Input might be given as Windows format, start by converting to
45801  # unix format.
45802  new_path="$path"
45803
45804  windows_path="$new_path"
45805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45806    unix_path=`$CYGPATH -u "$windows_path"`
45807    new_path="$unix_path"
45808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45810    new_path="$unix_path"
45811  fi
45812
45813
45814  # Now try to locate executable using which
45815  new_path=`$WHICH "$new_path" 2> /dev/null`
45816
45817  if test "x$new_path" = x; then
45818    # Oops. Which didn't find the executable.
45819    # The splitting of arguments from the executable at a space might have been incorrect,
45820    # since paths with space are more likely in Windows. Give it another try with the whole
45821    # argument.
45822    path="$complete"
45823    arguments="EOL"
45824    new_path="$path"
45825
45826  windows_path="$new_path"
45827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45828    unix_path=`$CYGPATH -u "$windows_path"`
45829    new_path="$unix_path"
45830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45832    new_path="$unix_path"
45833  fi
45834
45835
45836    new_path=`$WHICH "$new_path" 2> /dev/null`
45837    # bat and cmd files are not always considered executable in MSYS causing which
45838    # to not find them
45839    if test "x$new_path" = x \
45840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45842      new_path="$path"
45843
45844  windows_path="$new_path"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    unix_path=`$CYGPATH -u "$windows_path"`
45847    new_path="$unix_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45850    new_path="$unix_path"
45851  fi
45852
45853    fi
45854
45855    if test "x$new_path" = x; then
45856      # It's still not found. Now this is an unrecoverable error.
45857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45858$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45859      has_space=`$ECHO "$complete" | $GREP " "`
45860      if test "x$has_space" != x; then
45861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45863      fi
45864      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45865    fi
45866  fi
45867
45868  # Now new_path has a complete unix path to the binary
45869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45870    # Keep paths in /bin as-is, but remove trailing .exe if any
45871    new_path="${new_path/%.exe/}"
45872    # Do not save /bin paths to all_fixpath_prefixes!
45873  else
45874    # Not in mixed or Windows style, start by that.
45875    new_path=`cmd //c echo $new_path`
45876
45877  input_path="$new_path"
45878  # Check if we need to convert this using DOS-style short mode. If the path
45879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45880  # take no chances and rewrite it.
45881  # Note: m4 eats our [], so we need to use [ and ] instead.
45882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45883  if test "x$has_forbidden_chars" != x; then
45884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45886  fi
45887
45888    # Output is in $new_path
45889
45890  windows_path="$new_path"
45891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45892    unix_path=`$CYGPATH -u "$windows_path"`
45893    new_path="$unix_path"
45894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45896    new_path="$unix_path"
45897  fi
45898
45899    # remove trailing .exe if any
45900    new_path="${new_path/%.exe/}"
45901
45902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45904  fi
45905
45906    else
45907      # We're on a unix platform. Hooray! :)
45908      # First separate the path from the arguments. This will split at the first
45909      # space.
45910      complete="$BUILD_OBJCOPY"
45911      path="${complete%% *}"
45912      tmp="$complete EOL"
45913      arguments="${tmp#* }"
45914
45915      # Cannot rely on the command "which" here since it doesn't always work.
45916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45917      if test -z "$is_absolute_path"; then
45918        # Path to executable is not absolute. Find it.
45919        IFS_save="$IFS"
45920        IFS=:
45921        for p in $PATH; do
45922          if test -f "$p/$path" && test -x "$p/$path"; then
45923            new_path="$p/$path"
45924            break
45925          fi
45926        done
45927        IFS="$IFS_save"
45928      else
45929        # This is an absolute path, we can use it without further modifications.
45930        new_path="$path"
45931      fi
45932
45933      if test "x$new_path" = x; then
45934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45935$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45936        has_space=`$ECHO "$complete" | $GREP " "`
45937        if test "x$has_space" != x; then
45938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45940        fi
45941        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45942      fi
45943    fi
45944
45945    # Now join together the path and the arguments once again
45946    if test "x$arguments" != xEOL; then
45947      new_complete="$new_path ${arguments% *}"
45948    else
45949      new_complete="$new_path"
45950    fi
45951
45952    if test "x$complete" != "x$new_complete"; then
45953      BUILD_OBJCOPY="$new_complete"
45954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45955$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45956    fi
45957  fi
45958
45959
45960
45961  # Publish this variable in the help.
45962
45963
45964  if [ -z "${BUILD_STRIP+x}" ]; then
45965    # The variable is not set by user, try to locate tool using the code snippet
45966    for ac_prog in strip
45967do
45968  # Extract the first word of "$ac_prog", so it can be a program name with args.
45969set dummy $ac_prog; ac_word=$2
45970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45971$as_echo_n "checking for $ac_word... " >&6; }
45972if ${ac_cv_path_BUILD_STRIP+:} false; then :
45973  $as_echo_n "(cached) " >&6
45974else
45975  case $BUILD_STRIP in
45976  [\\/]* | ?:[\\/]*)
45977  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45978  ;;
45979  *)
45980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45981for as_dir in $PATH
45982do
45983  IFS=$as_save_IFS
45984  test -z "$as_dir" && as_dir=.
45985    for ac_exec_ext in '' $ac_executable_extensions; do
45986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45987    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45989    break 2
45990  fi
45991done
45992  done
45993IFS=$as_save_IFS
45994
45995  ;;
45996esac
45997fi
45998BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45999if test -n "$BUILD_STRIP"; then
46000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46001$as_echo "$BUILD_STRIP" >&6; }
46002else
46003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46004$as_echo "no" >&6; }
46005fi
46006
46007
46008  test -n "$BUILD_STRIP" && break
46009done
46010
46011  else
46012    # The variable is set, but is it from the command line or the environment?
46013
46014    # Try to remove the string !BUILD_STRIP! from our list.
46015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46017      # If it failed, the variable was not from the command line. Ignore it,
46018      # but warn the user (except for BASH, which is always set by the calling BASH).
46019      if test "xBUILD_STRIP" != xBASH; then
46020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46021$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46022      fi
46023      # Try to locate tool using the code snippet
46024      for ac_prog in strip
46025do
46026  # Extract the first word of "$ac_prog", so it can be a program name with args.
46027set dummy $ac_prog; ac_word=$2
46028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46029$as_echo_n "checking for $ac_word... " >&6; }
46030if ${ac_cv_path_BUILD_STRIP+:} false; then :
46031  $as_echo_n "(cached) " >&6
46032else
46033  case $BUILD_STRIP in
46034  [\\/]* | ?:[\\/]*)
46035  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46036  ;;
46037  *)
46038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46039for as_dir in $PATH
46040do
46041  IFS=$as_save_IFS
46042  test -z "$as_dir" && as_dir=.
46043    for ac_exec_ext in '' $ac_executable_extensions; do
46044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46045    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46047    break 2
46048  fi
46049done
46050  done
46051IFS=$as_save_IFS
46052
46053  ;;
46054esac
46055fi
46056BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46057if test -n "$BUILD_STRIP"; then
46058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46059$as_echo "$BUILD_STRIP" >&6; }
46060else
46061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46062$as_echo "no" >&6; }
46063fi
46064
46065
46066  test -n "$BUILD_STRIP" && break
46067done
46068
46069    else
46070      # If it succeeded, then it was overridden by the user. We will use it
46071      # for the tool.
46072
46073      # First remove it from the list of overridden variables, so we can test
46074      # for unknown variables in the end.
46075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46076
46077      # Check if we try to supply an empty value
46078      if test "x$BUILD_STRIP" = x; then
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46080$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46082$as_echo_n "checking for BUILD_STRIP... " >&6; }
46083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46084$as_echo "disabled" >&6; }
46085      else
46086        # Check if the provided tool contains a complete path.
46087        tool_specified="$BUILD_STRIP"
46088        tool_basename="${tool_specified##*/}"
46089        if test "x$tool_basename" = "x$tool_specified"; then
46090          # A command without a complete path is provided, search $PATH.
46091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46092$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46093          # Extract the first word of "$tool_basename", so it can be a program name with args.
46094set dummy $tool_basename; ac_word=$2
46095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46096$as_echo_n "checking for $ac_word... " >&6; }
46097if ${ac_cv_path_BUILD_STRIP+:} false; then :
46098  $as_echo_n "(cached) " >&6
46099else
46100  case $BUILD_STRIP in
46101  [\\/]* | ?:[\\/]*)
46102  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46103  ;;
46104  *)
46105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46106for as_dir in $PATH
46107do
46108  IFS=$as_save_IFS
46109  test -z "$as_dir" && as_dir=.
46110    for ac_exec_ext in '' $ac_executable_extensions; do
46111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46112    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46114    break 2
46115  fi
46116done
46117  done
46118IFS=$as_save_IFS
46119
46120  ;;
46121esac
46122fi
46123BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46124if test -n "$BUILD_STRIP"; then
46125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46126$as_echo "$BUILD_STRIP" >&6; }
46127else
46128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46129$as_echo "no" >&6; }
46130fi
46131
46132
46133          if test "x$BUILD_STRIP" = x; then
46134            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46135          fi
46136        else
46137          # Otherwise we believe it is a complete path. Use it as it is.
46138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46139$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46140          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46141$as_echo_n "checking for BUILD_STRIP... " >&6; }
46142          if test ! -x "$tool_specified"; then
46143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46144$as_echo "not found" >&6; }
46145            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46146          fi
46147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46148$as_echo "$tool_specified" >&6; }
46149        fi
46150      fi
46151    fi
46152
46153  fi
46154
46155
46156
46157  # Only process if variable expands to non-empty
46158
46159  if test "x$BUILD_STRIP" != x; then
46160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46161
46162  # First separate the path from the arguments. This will split at the first
46163  # space.
46164  complete="$BUILD_STRIP"
46165  path="${complete%% *}"
46166  tmp="$complete EOL"
46167  arguments="${tmp#* }"
46168
46169  # Input might be given as Windows format, start by converting to
46170  # unix format.
46171  new_path=`$CYGPATH -u "$path"`
46172
46173  # Now try to locate executable using which
46174  new_path=`$WHICH "$new_path" 2> /dev/null`
46175  # bat and cmd files are not always considered executable in cygwin causing which
46176  # to not find them
46177  if test "x$new_path" = x \
46178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46180    new_path=`$CYGPATH -u "$path"`
46181  fi
46182  if test "x$new_path" = x; then
46183    # Oops. Which didn't find the executable.
46184    # The splitting of arguments from the executable at a space might have been incorrect,
46185    # since paths with space are more likely in Windows. Give it another try with the whole
46186    # argument.
46187    path="$complete"
46188    arguments="EOL"
46189    new_path=`$CYGPATH -u "$path"`
46190    new_path=`$WHICH "$new_path" 2> /dev/null`
46191    # bat and cmd files are not always considered executable in cygwin causing which
46192    # to not find them
46193    if test "x$new_path" = x \
46194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46196      new_path=`$CYGPATH -u "$path"`
46197    fi
46198    if test "x$new_path" = x; then
46199      # It's still not found. Now this is an unrecoverable error.
46200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46201$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46202      has_space=`$ECHO "$complete" | $GREP " "`
46203      if test "x$has_space" != x; then
46204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46206      fi
46207      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46208    fi
46209  fi
46210
46211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46214  # "foo.exe" is OK but "foo" is an error.
46215  #
46216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46217  # It is also a way to make sure we got the proper file name for the real test later on.
46218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46219  if test "x$test_shortpath" = x; then
46220    # Short path failed, file does not exist as specified.
46221    # Try adding .exe or .cmd
46222    if test -f "${new_path}.exe"; then
46223      input_to_shortpath="${new_path}.exe"
46224    elif test -f "${new_path}.cmd"; then
46225      input_to_shortpath="${new_path}.cmd"
46226    else
46227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46228$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46231      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46232    fi
46233  else
46234    input_to_shortpath="$new_path"
46235  fi
46236
46237  # Call helper function which possibly converts this using DOS-style short mode.
46238  # If so, the updated path is stored in $new_path.
46239  new_path="$input_to_shortpath"
46240
46241  input_path="$input_to_shortpath"
46242  # Check if we need to convert this using DOS-style short mode. If the path
46243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46244  # take no chances and rewrite it.
46245  # Note: m4 eats our [], so we need to use [ and ] instead.
46246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46247  if test "x$has_forbidden_chars" != x; then
46248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46252      # Going to short mode and back again did indeed matter. Since short mode is
46253      # case insensitive, let's make it lowercase to improve readability.
46254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46255      # Now convert it back to Unix-style (cygpath)
46256      input_path=`$CYGPATH -u "$shortmode_path"`
46257      new_path="$input_path"
46258    fi
46259  fi
46260
46261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46262  if test "x$test_cygdrive_prefix" = x; then
46263    # As a simple fix, exclude /usr/bin since it's not a real path.
46264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46266      # a path prefixed by /cygdrive for fixpath to work.
46267      new_path="$CYGWIN_ROOT_PATH$input_path"
46268    fi
46269  fi
46270
46271  # remove trailing .exe if any
46272  new_path="${new_path/%.exe/}"
46273
46274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46275
46276  # First separate the path from the arguments. This will split at the first
46277  # space.
46278  complete="$BUILD_STRIP"
46279  path="${complete%% *}"
46280  tmp="$complete EOL"
46281  arguments="${tmp#* }"
46282
46283  # Input might be given as Windows format, start by converting to
46284  # unix format.
46285  new_path="$path"
46286
46287  windows_path="$new_path"
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289    unix_path=`$CYGPATH -u "$windows_path"`
46290    new_path="$unix_path"
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46293    new_path="$unix_path"
46294  fi
46295
46296
46297  # Now try to locate executable using which
46298  new_path=`$WHICH "$new_path" 2> /dev/null`
46299
46300  if test "x$new_path" = x; then
46301    # Oops. Which didn't find the executable.
46302    # The splitting of arguments from the executable at a space might have been incorrect,
46303    # since paths with space are more likely in Windows. Give it another try with the whole
46304    # argument.
46305    path="$complete"
46306    arguments="EOL"
46307    new_path="$path"
46308
46309  windows_path="$new_path"
46310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46311    unix_path=`$CYGPATH -u "$windows_path"`
46312    new_path="$unix_path"
46313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46315    new_path="$unix_path"
46316  fi
46317
46318
46319    new_path=`$WHICH "$new_path" 2> /dev/null`
46320    # bat and cmd files are not always considered executable in MSYS causing which
46321    # to not find them
46322    if test "x$new_path" = x \
46323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46325      new_path="$path"
46326
46327  windows_path="$new_path"
46328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329    unix_path=`$CYGPATH -u "$windows_path"`
46330    new_path="$unix_path"
46331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46333    new_path="$unix_path"
46334  fi
46335
46336    fi
46337
46338    if test "x$new_path" = x; then
46339      # It's still not found. Now this is an unrecoverable error.
46340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46341$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46342      has_space=`$ECHO "$complete" | $GREP " "`
46343      if test "x$has_space" != x; then
46344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46346      fi
46347      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46348    fi
46349  fi
46350
46351  # Now new_path has a complete unix path to the binary
46352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46353    # Keep paths in /bin as-is, but remove trailing .exe if any
46354    new_path="${new_path/%.exe/}"
46355    # Do not save /bin paths to all_fixpath_prefixes!
46356  else
46357    # Not in mixed or Windows style, start by that.
46358    new_path=`cmd //c echo $new_path`
46359
46360  input_path="$new_path"
46361  # Check if we need to convert this using DOS-style short mode. If the path
46362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46363  # take no chances and rewrite it.
46364  # Note: m4 eats our [], so we need to use [ and ] instead.
46365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46366  if test "x$has_forbidden_chars" != x; then
46367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46369  fi
46370
46371    # Output is in $new_path
46372
46373  windows_path="$new_path"
46374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375    unix_path=`$CYGPATH -u "$windows_path"`
46376    new_path="$unix_path"
46377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46379    new_path="$unix_path"
46380  fi
46381
46382    # remove trailing .exe if any
46383    new_path="${new_path/%.exe/}"
46384
46385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46387  fi
46388
46389    else
46390      # We're on a unix platform. Hooray! :)
46391      # First separate the path from the arguments. This will split at the first
46392      # space.
46393      complete="$BUILD_STRIP"
46394      path="${complete%% *}"
46395      tmp="$complete EOL"
46396      arguments="${tmp#* }"
46397
46398      # Cannot rely on the command "which" here since it doesn't always work.
46399      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46400      if test -z "$is_absolute_path"; then
46401        # Path to executable is not absolute. Find it.
46402        IFS_save="$IFS"
46403        IFS=:
46404        for p in $PATH; do
46405          if test -f "$p/$path" && test -x "$p/$path"; then
46406            new_path="$p/$path"
46407            break
46408          fi
46409        done
46410        IFS="$IFS_save"
46411      else
46412        # This is an absolute path, we can use it without further modifications.
46413        new_path="$path"
46414      fi
46415
46416      if test "x$new_path" = x; then
46417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46418$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46419        has_space=`$ECHO "$complete" | $GREP " "`
46420        if test "x$has_space" != x; then
46421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46423        fi
46424        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46425      fi
46426    fi
46427
46428    # Now join together the path and the arguments once again
46429    if test "x$arguments" != xEOL; then
46430      new_complete="$new_path ${arguments% *}"
46431    else
46432      new_complete="$new_path"
46433    fi
46434
46435    if test "x$complete" != "x$new_complete"; then
46436      BUILD_STRIP="$new_complete"
46437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46438$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46439    fi
46440  fi
46441
46442    # Assume the C compiler is the assembler
46443    BUILD_AS="$BUILD_CC -c"
46444    # Just like for the target compiler, use the compiler as linker
46445    BUILD_LD="$BUILD_CC"
46446    BUILD_LDCXX="$BUILD_CXX"
46447
46448    PATH="$OLDPATH"
46449  else
46450    # If we are not cross compiling, use the normal target compilers for
46451    # building the build platform executables.
46452    BUILD_CC="$CC"
46453    BUILD_CXX="$CXX"
46454    BUILD_LD="$LD"
46455    BUILD_LDCXX="$LDCXX"
46456    BUILD_NM="$NM"
46457    BUILD_AS="$AS"
46458    BUILD_OBJCOPY="$OBJCOPY"
46459    BUILD_STRIP="$STRIP"
46460    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46461    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46462    BUILD_AR="$AR"
46463  fi
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46477    # For hotspot, we need these in Windows mixed path,
46478    # so rewrite them all. Need added .exe suffix.
46479    HOTSPOT_CXX="$CXX.exe"
46480    HOTSPOT_LD="$LD.exe"
46481    HOTSPOT_MT="$MT.exe"
46482    HOTSPOT_RC="$RC.exe"
46483
46484  unix_path="$HOTSPOT_CXX"
46485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46486    windows_path=`$CYGPATH -m "$unix_path"`
46487    HOTSPOT_CXX="$windows_path"
46488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46489    windows_path=`cmd //c echo $unix_path`
46490    HOTSPOT_CXX="$windows_path"
46491  fi
46492
46493
46494  unix_path="$HOTSPOT_LD"
46495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46496    windows_path=`$CYGPATH -m "$unix_path"`
46497    HOTSPOT_LD="$windows_path"
46498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46499    windows_path=`cmd //c echo $unix_path`
46500    HOTSPOT_LD="$windows_path"
46501  fi
46502
46503
46504  unix_path="$HOTSPOT_MT"
46505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46506    windows_path=`$CYGPATH -m "$unix_path"`
46507    HOTSPOT_MT="$windows_path"
46508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46509    windows_path=`cmd //c echo $unix_path`
46510    HOTSPOT_MT="$windows_path"
46511  fi
46512
46513
46514  unix_path="$HOTSPOT_RC"
46515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46516    windows_path=`$CYGPATH -m "$unix_path"`
46517    HOTSPOT_RC="$windows_path"
46518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46519    windows_path=`cmd //c echo $unix_path`
46520    HOTSPOT_RC="$windows_path"
46521  fi
46522
46523
46524
46525  else
46526    HOTSPOT_CXX="$CXX"
46527    HOTSPOT_LD="$LD"
46528  fi
46529
46530
46531
46532  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46533    USE_CLANG=true
46534  fi
46535
46536
46537
46538
46539
46540  # The package path is used only on macosx?
46541  # FIXME: clean this up, and/or move it elsewhere.
46542  PACKAGE_PATH=/opt/local
46543
46544
46545  # Check for extra potential brokenness.
46546  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46547    # On Windows, double-check that we got the right compiler.
46548    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46549    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46550    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46551      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46552        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
46553      fi
46554    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46555      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46556        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46557      fi
46558    fi
46559  fi
46560
46561  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46562    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46563    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46564    # This is later checked when setting flags.
46565
46566    # "-Og" suppported for GCC 4.8 and later
46567    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615    # Execute function body
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664    # Execute function body
46665
46666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46667$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46668  supports=yes
46669
46670  saved_cflags="$CFLAGS"
46671  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46672  ac_ext=c
46673ac_cpp='$CPP $CPPFLAGS'
46674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46676ac_compiler_gnu=$ac_cv_c_compiler_gnu
46677
46678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46679/* end confdefs.h.  */
46680int i;
46681_ACEOF
46682if ac_fn_c_try_compile "$LINENO"; then :
46683
46684else
46685  supports=no
46686fi
46687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46688  ac_ext=cpp
46689ac_cpp='$CXXCPP $CPPFLAGS'
46690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46693
46694  CFLAGS="$saved_cflags"
46695
46696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46697$as_echo "$supports" >&6; }
46698  if test "x$supports" = "xyes" ; then
46699    :
46700    C_COMP_SUPPORTS="yes"
46701  else
46702    :
46703    C_COMP_SUPPORTS="no"
46704  fi
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764    # Execute function body
46765
46766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46767$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46768  supports=yes
46769
46770  saved_cxxflags="$CXXFLAGS"
46771  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46772  ac_ext=cpp
46773ac_cpp='$CXXCPP $CPPFLAGS'
46774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46777
46778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46779/* end confdefs.h.  */
46780int i;
46781_ACEOF
46782if ac_fn_cxx_try_compile "$LINENO"; then :
46783
46784else
46785  supports=no
46786fi
46787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46788  ac_ext=cpp
46789ac_cpp='$CXXCPP $CPPFLAGS'
46790ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46791ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46792ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46793
46794  CXXFLAGS="$saved_cxxflags"
46795
46796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46797$as_echo "$supports" >&6; }
46798  if test "x$supports" = "xyes" ; then
46799    :
46800    CXX_COMP_SUPPORTS="yes"
46801  else
46802    :
46803    CXX_COMP_SUPPORTS="no"
46804  fi
46805
46806
46807
46808
46809
46810
46811
46812
46813
46814
46815
46816
46817
46818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46819$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46820  supports=no
46821  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46822
46823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46824$as_echo "$supports" >&6; }
46825  if test "x$supports" = "xyes" ; then
46826    :
46827    HAS_CFLAG_OPTIMIZE_DEBUG=true
46828  else
46829    :
46830    HAS_CFLAG_OPTIMIZE_DEBUG=false
46831  fi
46832
46833
46834
46835
46836
46837
46838
46839    # "-z relro" supported in GNU binutils 2.17 and later
46840    LINKER_RELRO_FLAG="-Wl,-z,relro"
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888    # Execute function body
46889
46890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46891$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46892  supports=yes
46893
46894  saved_ldflags="$LDFLAGS"
46895  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46896  ac_ext=c
46897ac_cpp='$CPP $CPPFLAGS'
46898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46900ac_compiler_gnu=$ac_cv_c_compiler_gnu
46901
46902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46903/* end confdefs.h.  */
46904
46905int
46906main ()
46907{
46908
46909  ;
46910  return 0;
46911}
46912_ACEOF
46913if ac_fn_c_try_link "$LINENO"; then :
46914
46915else
46916  supports=no
46917fi
46918rm -f core conftest.err conftest.$ac_objext \
46919    conftest$ac_exeext conftest.$ac_ext
46920  ac_ext=cpp
46921ac_cpp='$CXXCPP $CPPFLAGS'
46922ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46923ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46924ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46925
46926  LDFLAGS="$saved_ldflags"
46927
46928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46929$as_echo "$supports" >&6; }
46930  if test "x$supports" = "xyes" ; then
46931    :
46932    HAS_LINKER_RELRO=true
46933  else
46934    :
46935    HAS_LINKER_RELRO=false
46936  fi
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950    # "-z now" supported in GNU binutils 2.11 and later
46951    LINKER_NOW_FLAG="-Wl,-z,now"
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999    # Execute function body
47000
47001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47002$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47003  supports=yes
47004
47005  saved_ldflags="$LDFLAGS"
47006  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47007  ac_ext=c
47008ac_cpp='$CPP $CPPFLAGS'
47009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47011ac_compiler_gnu=$ac_cv_c_compiler_gnu
47012
47013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47014/* end confdefs.h.  */
47015
47016int
47017main ()
47018{
47019
47020  ;
47021  return 0;
47022}
47023_ACEOF
47024if ac_fn_c_try_link "$LINENO"; then :
47025
47026else
47027  supports=no
47028fi
47029rm -f core conftest.err conftest.$ac_objext \
47030    conftest$ac_exeext conftest.$ac_ext
47031  ac_ext=cpp
47032ac_cpp='$CXXCPP $CPPFLAGS'
47033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47036
47037  LDFLAGS="$saved_ldflags"
47038
47039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47040$as_echo "$supports" >&6; }
47041  if test "x$supports" = "xyes" ; then
47042    :
47043    HAS_LINKER_NOW=true
47044  else
47045    :
47046    HAS_LINKER_NOW=false
47047  fi
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060  fi
47061
47062  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47063  # in executable.'
47064  USING_BROKEN_SUSE_LD=no
47065  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47067$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47068    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47069    $ECHO "int main() { }" > main.c
47070    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47072$as_echo "no" >&6; }
47073      USING_BROKEN_SUSE_LD=no
47074    else
47075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47076$as_echo "yes" >&6; }
47077      USING_BROKEN_SUSE_LD=yes
47078    fi
47079    rm -rf version-script.map main.c a.out
47080  fi
47081
47082
47083  # Setup hotspot lecagy names for toolchains
47084  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47085  if test "x$TOOLCHAIN_TYPE" = xclang; then
47086    HOTSPOT_TOOLCHAIN_TYPE=gcc
47087  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47088    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47089  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47090    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47091  fi
47092
47093
47094
47095# Setup the JTReg Regression Test Harness.
47096
47097
47098# Check whether --with-jtreg was given.
47099if test "${with_jtreg+set}" = set; then :
47100  withval=$with_jtreg;
47101else
47102  with_jtreg=no
47103fi
47104
47105
47106  if test "x$with_jtreg" = xno; then
47107    # jtreg disabled
47108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47109$as_echo_n "checking for jtreg... " >&6; }
47110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47111$as_echo "no" >&6; }
47112  else
47113    if test "x$with_jtreg" != xyes; then
47114      # with path specified.
47115      JT_HOME="$with_jtreg"
47116    fi
47117
47118    if test "x$JT_HOME" != x; then
47119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47120$as_echo_n "checking for jtreg... " >&6; }
47121
47122      # use JT_HOME enviroment var.
47123
47124  # Only process if variable expands to non-empty
47125
47126  if test "x$JT_HOME" != x; then
47127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47128
47129  # Input might be given as Windows format, start by converting to
47130  # unix format.
47131  path="$JT_HOME"
47132  new_path=`$CYGPATH -u "$path"`
47133
47134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47137  # "foo.exe" is OK but "foo" is an error.
47138  #
47139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47140  # It is also a way to make sure we got the proper file name for the real test later on.
47141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47142  if test "x$test_shortpath" = x; then
47143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47144$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47145    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47146  fi
47147
47148  # Call helper function which possibly converts this using DOS-style short mode.
47149  # If so, the updated path is stored in $new_path.
47150
47151  input_path="$new_path"
47152  # Check if we need to convert this using DOS-style short mode. If the path
47153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47154  # take no chances and rewrite it.
47155  # Note: m4 eats our [], so we need to use [ and ] instead.
47156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47157  if test "x$has_forbidden_chars" != x; then
47158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47162      # Going to short mode and back again did indeed matter. Since short mode is
47163      # case insensitive, let's make it lowercase to improve readability.
47164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47165      # Now convert it back to Unix-style (cygpath)
47166      input_path=`$CYGPATH -u "$shortmode_path"`
47167      new_path="$input_path"
47168    fi
47169  fi
47170
47171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47172  if test "x$test_cygdrive_prefix" = x; then
47173    # As a simple fix, exclude /usr/bin since it's not a real path.
47174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47176      # a path prefixed by /cygdrive for fixpath to work.
47177      new_path="$CYGWIN_ROOT_PATH$input_path"
47178    fi
47179  fi
47180
47181
47182  if test "x$path" != "x$new_path"; then
47183    JT_HOME="$new_path"
47184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47185$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47186  fi
47187
47188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47189
47190  path="$JT_HOME"
47191  has_colon=`$ECHO $path | $GREP ^.:`
47192  new_path="$path"
47193  if test "x$has_colon" = x; then
47194    # Not in mixed or Windows style, start by that.
47195    new_path=`cmd //c echo $path`
47196  fi
47197
47198
47199  input_path="$new_path"
47200  # Check if we need to convert this using DOS-style short mode. If the path
47201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47202  # take no chances and rewrite it.
47203  # Note: m4 eats our [], so we need to use [ and ] instead.
47204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47205  if test "x$has_forbidden_chars" != x; then
47206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47208  fi
47209
47210
47211  windows_path="$new_path"
47212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47213    unix_path=`$CYGPATH -u "$windows_path"`
47214    new_path="$unix_path"
47215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47217    new_path="$unix_path"
47218  fi
47219
47220  if test "x$path" != "x$new_path"; then
47221    JT_HOME="$new_path"
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47223$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47224  fi
47225
47226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47228
47229    else
47230      # We're on a unix platform. Hooray! :)
47231      path="$JT_HOME"
47232      has_space=`$ECHO "$path" | $GREP " "`
47233      if test "x$has_space" != x; then
47234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47235$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47237      fi
47238
47239      # Use eval to expand a potential ~
47240      eval path="$path"
47241      if test ! -f "$path" && test ! -d "$path"; then
47242        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47243      fi
47244
47245      if test -d "$path"; then
47246        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47247      else
47248        dir="`$DIRNAME "$path"`"
47249        base="`$BASENAME "$path"`"
47250        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47251      fi
47252    fi
47253  fi
47254
47255
47256      # jtreg win32 script works for everybody
47257      JTREGEXE="$JT_HOME/bin/jtreg"
47258
47259      if test ! -f "$JTREGEXE"; then
47260        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47261      fi
47262
47263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47264$as_echo "$JTREGEXE" >&6; }
47265    else
47266      # try to find jtreg on path
47267
47268
47269
47270  # Publish this variable in the help.
47271
47272
47273  if [ -z "${JTREGEXE+x}" ]; then
47274    # The variable is not set by user, try to locate tool using the code snippet
47275    for ac_prog in jtreg
47276do
47277  # Extract the first word of "$ac_prog", so it can be a program name with args.
47278set dummy $ac_prog; ac_word=$2
47279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47280$as_echo_n "checking for $ac_word... " >&6; }
47281if ${ac_cv_path_JTREGEXE+:} false; then :
47282  $as_echo_n "(cached) " >&6
47283else
47284  case $JTREGEXE in
47285  [\\/]* | ?:[\\/]*)
47286  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47287  ;;
47288  *)
47289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47290for as_dir in $PATH
47291do
47292  IFS=$as_save_IFS
47293  test -z "$as_dir" && as_dir=.
47294    for ac_exec_ext in '' $ac_executable_extensions; do
47295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47296    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47298    break 2
47299  fi
47300done
47301  done
47302IFS=$as_save_IFS
47303
47304  ;;
47305esac
47306fi
47307JTREGEXE=$ac_cv_path_JTREGEXE
47308if test -n "$JTREGEXE"; then
47309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47310$as_echo "$JTREGEXE" >&6; }
47311else
47312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47313$as_echo "no" >&6; }
47314fi
47315
47316
47317  test -n "$JTREGEXE" && break
47318done
47319
47320  else
47321    # The variable is set, but is it from the command line or the environment?
47322
47323    # Try to remove the string !JTREGEXE! from our list.
47324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47326      # If it failed, the variable was not from the command line. Ignore it,
47327      # but warn the user (except for BASH, which is always set by the calling BASH).
47328      if test "xJTREGEXE" != xBASH; then
47329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47330$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47331      fi
47332      # Try to locate tool using the code snippet
47333      for ac_prog in jtreg
47334do
47335  # Extract the first word of "$ac_prog", so it can be a program name with args.
47336set dummy $ac_prog; ac_word=$2
47337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47338$as_echo_n "checking for $ac_word... " >&6; }
47339if ${ac_cv_path_JTREGEXE+:} false; then :
47340  $as_echo_n "(cached) " >&6
47341else
47342  case $JTREGEXE in
47343  [\\/]* | ?:[\\/]*)
47344  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47345  ;;
47346  *)
47347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47348for as_dir in $PATH
47349do
47350  IFS=$as_save_IFS
47351  test -z "$as_dir" && as_dir=.
47352    for ac_exec_ext in '' $ac_executable_extensions; do
47353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47354    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47356    break 2
47357  fi
47358done
47359  done
47360IFS=$as_save_IFS
47361
47362  ;;
47363esac
47364fi
47365JTREGEXE=$ac_cv_path_JTREGEXE
47366if test -n "$JTREGEXE"; then
47367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47368$as_echo "$JTREGEXE" >&6; }
47369else
47370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47371$as_echo "no" >&6; }
47372fi
47373
47374
47375  test -n "$JTREGEXE" && break
47376done
47377
47378    else
47379      # If it succeeded, then it was overridden by the user. We will use it
47380      # for the tool.
47381
47382      # First remove it from the list of overridden variables, so we can test
47383      # for unknown variables in the end.
47384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47385
47386      # Check if we try to supply an empty value
47387      if test "x$JTREGEXE" = x; then
47388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47389$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47391$as_echo_n "checking for JTREGEXE... " >&6; }
47392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47393$as_echo "disabled" >&6; }
47394      else
47395        # Check if the provided tool contains a complete path.
47396        tool_specified="$JTREGEXE"
47397        tool_basename="${tool_specified##*/}"
47398        if test "x$tool_basename" = "x$tool_specified"; then
47399          # A command without a complete path is provided, search $PATH.
47400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47401$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47402          # Extract the first word of "$tool_basename", so it can be a program name with args.
47403set dummy $tool_basename; ac_word=$2
47404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47405$as_echo_n "checking for $ac_word... " >&6; }
47406if ${ac_cv_path_JTREGEXE+:} false; then :
47407  $as_echo_n "(cached) " >&6
47408else
47409  case $JTREGEXE in
47410  [\\/]* | ?:[\\/]*)
47411  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47412  ;;
47413  *)
47414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47415for as_dir in $PATH
47416do
47417  IFS=$as_save_IFS
47418  test -z "$as_dir" && as_dir=.
47419    for ac_exec_ext in '' $ac_executable_extensions; do
47420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47421    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47423    break 2
47424  fi
47425done
47426  done
47427IFS=$as_save_IFS
47428
47429  ;;
47430esac
47431fi
47432JTREGEXE=$ac_cv_path_JTREGEXE
47433if test -n "$JTREGEXE"; then
47434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47435$as_echo "$JTREGEXE" >&6; }
47436else
47437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47438$as_echo "no" >&6; }
47439fi
47440
47441
47442          if test "x$JTREGEXE" = x; then
47443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47444          fi
47445        else
47446          # Otherwise we believe it is a complete path. Use it as it is.
47447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47448$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47450$as_echo_n "checking for JTREGEXE... " >&6; }
47451          if test ! -x "$tool_specified"; then
47452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47453$as_echo "not found" >&6; }
47454            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47455          fi
47456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47457$as_echo "$tool_specified" >&6; }
47458        fi
47459      fi
47460    fi
47461
47462  fi
47463
47464
47465
47466  if test "x$JTREGEXE" = x; then
47467    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47468  fi
47469
47470
47471      JT_HOME="`$DIRNAME $JTREGEXE`"
47472    fi
47473  fi
47474
47475
47476
47477
47478
47479
47480  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47481  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47482  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47483  #                              commands produced by the link step (currently AIX only)
47484  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47485    COMPILER_TARGET_BITS_FLAG="-q"
47486    COMPILER_COMMAND_FILE_FLAG="-f"
47487    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47488  else
47489    COMPILER_TARGET_BITS_FLAG="-m"
47490    COMPILER_COMMAND_FILE_FLAG="@"
47491    COMPILER_BINDCMD_FILE_FLAG=""
47492
47493    # The solstudio linker does not support @-files.
47494    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47495      COMPILER_COMMAND_FILE_FLAG=
47496    fi
47497
47498    # Check if @file is supported by gcc
47499    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47501$as_echo_n "checking if @file is supported by gcc... " >&6; }
47502      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47503      $ECHO "" "--version" > command.file
47504      if $CXX @command.file 2>&5 >&5; then
47505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47506$as_echo "yes" >&6; }
47507        COMPILER_COMMAND_FILE_FLAG="@"
47508      else
47509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47510$as_echo "no" >&6; }
47511        COMPILER_COMMAND_FILE_FLAG=
47512      fi
47513      rm -rf command.file
47514    fi
47515  fi
47516
47517
47518
47519
47520  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47521  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47522    ARFLAGS="-r"
47523  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47524    ARFLAGS="-X64"
47525  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47526    # lib.exe is used as AR to create static libraries.
47527    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47528  else
47529    ARFLAGS=""
47530  fi
47531
47532
47533  ## Setup strip.
47534  # FIXME: should this really be per platform, or should it be per toolchain type?
47535  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47536  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47537  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47538    STRIPFLAGS="-g"
47539  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47540    STRIPFLAGS="-x"
47541  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47542    STRIPFLAGS="-S"
47543  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47544    STRIPFLAGS="-X32_64"
47545  fi
47546
47547
47548
47549  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47550    CC_OUT_OPTION=-Fo
47551    EXE_OUT_OPTION=-out:
47552    LD_OUT_OPTION=-out:
47553    AR_OUT_OPTION=-out:
47554  else
47555    # The option used to specify the target .o,.a or .so file.
47556    # When compiling, how to specify the to be created object file.
47557    CC_OUT_OPTION='-o$(SPACE)'
47558    # When linking, how to specify the to be created executable.
47559    EXE_OUT_OPTION='-o$(SPACE)'
47560    # When linking, how to specify the to be created dynamically linkable library.
47561    LD_OUT_OPTION='-o$(SPACE)'
47562    # When archiving, how to specify the to be create static archive for object files.
47563    AR_OUT_OPTION='rcs$(SPACE)'
47564  fi
47565
47566
47567
47568
47569
47570  # On Windows, we need to set RC flags.
47571  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47572    RC_FLAGS="-nologo -l0x409"
47573    JVM_RCFLAGS="-nologo"
47574    if test "x$DEBUG_LEVEL" = xrelease; then
47575      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47576      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47577    fi
47578
47579    # The version variables used to create RC_FLAGS may be overridden
47580    # in a custom configure script, or possibly the command line.
47581    # Let those variables be expanded at make time in spec.gmk.
47582    # The \$ are escaped to the shell, and the $(...) variables
47583    # are evaluated by make.
47584    RC_FLAGS="$RC_FLAGS \
47585        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47586        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47587        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47588        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47589        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47590        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47591        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47592
47593    JVM_RCFLAGS="$JVM_RCFLAGS \
47594        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47595        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47596        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47597        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47598        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47599        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47600        -D\"HS_FNAME=jvm.dll\" \
47601        -D\"HS_INTERNAL_NAME=jvm\""
47602  fi
47603
47604
47605
47606  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47607    # silence copyright notice and other headers.
47608    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47609  fi
47610
47611
47612# Now we can test some aspects on the target using configure macros.
47613
47614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47615$as_echo_n "checking for ANSI C header files... " >&6; }
47616if ${ac_cv_header_stdc+:} false; then :
47617  $as_echo_n "(cached) " >&6
47618else
47619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47620/* end confdefs.h.  */
47621#include <stdlib.h>
47622#include <stdarg.h>
47623#include <string.h>
47624#include <float.h>
47625
47626int
47627main ()
47628{
47629
47630  ;
47631  return 0;
47632}
47633_ACEOF
47634if ac_fn_cxx_try_compile "$LINENO"; then :
47635  ac_cv_header_stdc=yes
47636else
47637  ac_cv_header_stdc=no
47638fi
47639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47640
47641if test $ac_cv_header_stdc = yes; then
47642  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47644/* end confdefs.h.  */
47645#include <string.h>
47646
47647_ACEOF
47648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47649  $EGREP "memchr" >/dev/null 2>&1; then :
47650
47651else
47652  ac_cv_header_stdc=no
47653fi
47654rm -f conftest*
47655
47656fi
47657
47658if test $ac_cv_header_stdc = yes; then
47659  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47661/* end confdefs.h.  */
47662#include <stdlib.h>
47663
47664_ACEOF
47665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47666  $EGREP "free" >/dev/null 2>&1; then :
47667
47668else
47669  ac_cv_header_stdc=no
47670fi
47671rm -f conftest*
47672
47673fi
47674
47675if test $ac_cv_header_stdc = yes; then
47676  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47677  if test "$cross_compiling" = yes; then :
47678  :
47679else
47680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47681/* end confdefs.h.  */
47682#include <ctype.h>
47683#include <stdlib.h>
47684#if ((' ' & 0x0FF) == 0x020)
47685# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47686# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47687#else
47688# define ISLOWER(c) \
47689		   (('a' <= (c) && (c) <= 'i') \
47690		     || ('j' <= (c) && (c) <= 'r') \
47691		     || ('s' <= (c) && (c) <= 'z'))
47692# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47693#endif
47694
47695#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47696int
47697main ()
47698{
47699  int i;
47700  for (i = 0; i < 256; i++)
47701    if (XOR (islower (i), ISLOWER (i))
47702	|| toupper (i) != TOUPPER (i))
47703      return 2;
47704  return 0;
47705}
47706_ACEOF
47707if ac_fn_cxx_try_run "$LINENO"; then :
47708
47709else
47710  ac_cv_header_stdc=no
47711fi
47712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47713  conftest.$ac_objext conftest.beam conftest.$ac_ext
47714fi
47715
47716fi
47717fi
47718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47719$as_echo "$ac_cv_header_stdc" >&6; }
47720if test $ac_cv_header_stdc = yes; then
47721
47722$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47723
47724fi
47725
47726# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47727for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47728		  inttypes.h stdint.h unistd.h
47729do :
47730  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47731ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47732"
47733if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47734  cat >>confdefs.h <<_ACEOF
47735#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47736_ACEOF
47737
47738fi
47739
47740done
47741
47742
47743
47744  ###############################################################################
47745  #
47746  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47747  # (The JVM can use 32 or 64 bit Java pointers but that decision
47748  # is made at runtime.)
47749  #
47750
47751  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47752    # Always specify -m flag on Solaris
47753    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47754
47755  # When we add flags to the "official" CFLAGS etc, we need to
47756  # keep track of these additions in ADDED_CFLAGS etc. These
47757  # will later be checked to make sure only controlled additions
47758  # have been made to CFLAGS etc.
47759  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47760  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47761  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47762
47763  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47764  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47765  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47766
47767  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47768  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47769  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47770
47771  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47772  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47773  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47774
47775  elif test "x$COMPILE_TYPE" = xreduced; then
47776    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47777      # Specify -m if running reduced on unix platforms
47778
47779  # When we add flags to the "official" CFLAGS etc, we need to
47780  # keep track of these additions in ADDED_CFLAGS etc. These
47781  # will later be checked to make sure only controlled additions
47782  # have been made to CFLAGS etc.
47783  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47784  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47785  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47786
47787  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47788  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47789  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47790
47791  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47792  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47793  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47794
47795  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47796  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47797  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47798
47799    fi
47800  fi
47801  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47802    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47803    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47804    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47805  fi
47806
47807  # Make compilation sanity check
47808  for ac_header in stdio.h
47809do :
47810  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47811if test "x$ac_cv_header_stdio_h" = xyes; then :
47812  cat >>confdefs.h <<_ACEOF
47813#define HAVE_STDIO_H 1
47814_ACEOF
47815
47816else
47817
47818    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47819$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47820    if test "x$COMPILE_TYPE" = xreduced; then
47821
47822  # Print a helpful message on how to acquire the necessary build dependency.
47823  # reduced is the help tag: freetype, cups, alsa etc
47824  MISSING_DEPENDENCY=reduced
47825
47826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47827    cygwin_help $MISSING_DEPENDENCY
47828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47829    msys_help $MISSING_DEPENDENCY
47830  else
47831    PKGHANDLER_COMMAND=
47832
47833    case $PKGHANDLER in
47834      apt-get)
47835        apt_help     $MISSING_DEPENDENCY ;;
47836      yum)
47837        yum_help     $MISSING_DEPENDENCY ;;
47838      port)
47839        port_help    $MISSING_DEPENDENCY ;;
47840      pkgutil)
47841        pkgutil_help $MISSING_DEPENDENCY ;;
47842      pkgadd)
47843        pkgadd_help  $MISSING_DEPENDENCY ;;
47844    esac
47845
47846    if test "x$PKGHANDLER_COMMAND" != x; then
47847      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47848    fi
47849  fi
47850
47851      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47852$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47853    elif test "x$COMPILE_TYPE" = xcross; then
47854      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47855$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47856    fi
47857    as_fn_error $? "Cannot continue." "$LINENO" 5
47858
47859fi
47860
47861done
47862
47863
47864  # The cast to long int works around a bug in the HP C Compiler
47865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47867# This bug is HP SR number 8606223364.
47868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47869$as_echo_n "checking size of int *... " >&6; }
47870if ${ac_cv_sizeof_int_p+:} false; then :
47871  $as_echo_n "(cached) " >&6
47872else
47873  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47874
47875else
47876  if test "$ac_cv_type_int_p" = yes; then
47877     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47879as_fn_error 77 "cannot compute sizeof (int *)
47880See \`config.log' for more details" "$LINENO" 5; }
47881   else
47882     ac_cv_sizeof_int_p=0
47883   fi
47884fi
47885
47886fi
47887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47888$as_echo "$ac_cv_sizeof_int_p" >&6; }
47889
47890
47891
47892cat >>confdefs.h <<_ACEOF
47893#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47894_ACEOF
47895
47896
47897
47898  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47899  if test "x$ac_cv_sizeof_int_p" = x; then
47900    # The test failed, lets stick to the assumed value.
47901    { $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
47902$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47903  else
47904    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47905
47906    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47907      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47908      # Let's try to implicitely set the compilers target architecture and retry the test
47909      { $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
47910$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;}
47911      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47912$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47913
47914  # When we add flags to the "official" CFLAGS etc, we need to
47915  # keep track of these additions in ADDED_CFLAGS etc. These
47916  # will later be checked to make sure only controlled additions
47917  # have been made to CFLAGS etc.
47918  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47919  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47920  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47921
47922  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47923  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47924  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47925
47926  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47927  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47928  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47929
47930  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47931  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47932  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47933
47934
47935      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47936      unset ac_cv_sizeof_int_p
47937      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47938      cat >>confdefs.h <<_ACEOF
47939#undef SIZEOF_INT_P
47940_ACEOF
47941
47942      # The cast to long int works around a bug in the HP C Compiler
47943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47945# This bug is HP SR number 8606223364.
47946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47947$as_echo_n "checking size of int *... " >&6; }
47948if ${ac_cv_sizeof_int_p+:} false; then :
47949  $as_echo_n "(cached) " >&6
47950else
47951  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47952
47953else
47954  if test "$ac_cv_type_int_p" = yes; then
47955     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47957as_fn_error 77 "cannot compute sizeof (int *)
47958See \`config.log' for more details" "$LINENO" 5; }
47959   else
47960     ac_cv_sizeof_int_p=0
47961   fi
47962fi
47963
47964fi
47965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47966$as_echo "$ac_cv_sizeof_int_p" >&6; }
47967
47968
47969
47970cat >>confdefs.h <<_ACEOF
47971#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47972_ACEOF
47973
47974
47975
47976      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47977
47978      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47979        { $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
47980$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;}
47981        if test "x$COMPILE_TYPE" = xreduced; then
47982
47983  # Print a helpful message on how to acquire the necessary build dependency.
47984  # reduced is the help tag: freetype, cups, alsa etc
47985  MISSING_DEPENDENCY=reduced
47986
47987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47988    cygwin_help $MISSING_DEPENDENCY
47989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47990    msys_help $MISSING_DEPENDENCY
47991  else
47992    PKGHANDLER_COMMAND=
47993
47994    case $PKGHANDLER in
47995      apt-get)
47996        apt_help     $MISSING_DEPENDENCY ;;
47997      yum)
47998        yum_help     $MISSING_DEPENDENCY ;;
47999      port)
48000        port_help    $MISSING_DEPENDENCY ;;
48001      pkgutil)
48002        pkgutil_help $MISSING_DEPENDENCY ;;
48003      pkgadd)
48004        pkgadd_help  $MISSING_DEPENDENCY ;;
48005    esac
48006
48007    if test "x$PKGHANDLER_COMMAND" != x; then
48008      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48009    fi
48010  fi
48011
48012          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48013$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48014        elif test "x$COMPILE_TYPE" = xcross; then
48015          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48016$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48017        fi
48018        as_fn_error $? "Cannot continue." "$LINENO" 5
48019      fi
48020    fi
48021  fi
48022
48023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48024$as_echo_n "checking for target address size... " >&6; }
48025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48026$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48027
48028
48029  ###############################################################################
48030  #
48031  # Is the target little of big endian?
48032  #
48033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48034$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48035if ${ac_cv_c_bigendian+:} false; then :
48036  $as_echo_n "(cached) " >&6
48037else
48038  ac_cv_c_bigendian=unknown
48039    # See if we're dealing with a universal compiler.
48040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48041/* end confdefs.h.  */
48042#ifndef __APPLE_CC__
48043	       not a universal capable compiler
48044	     #endif
48045	     typedef int dummy;
48046
48047_ACEOF
48048if ac_fn_cxx_try_compile "$LINENO"; then :
48049
48050	# Check for potential -arch flags.  It is not universal unless
48051	# there are at least two -arch flags with different values.
48052	ac_arch=
48053	ac_prev=
48054	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48055	 if test -n "$ac_prev"; then
48056	   case $ac_word in
48057	     i?86 | x86_64 | ppc | ppc64)
48058	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48059		 ac_arch=$ac_word
48060	       else
48061		 ac_cv_c_bigendian=universal
48062		 break
48063	       fi
48064	       ;;
48065	   esac
48066	   ac_prev=
48067	 elif test "x$ac_word" = "x-arch"; then
48068	   ac_prev=arch
48069	 fi
48070       done
48071fi
48072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48073    if test $ac_cv_c_bigendian = unknown; then
48074      # See if sys/param.h defines the BYTE_ORDER macro.
48075      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48076/* end confdefs.h.  */
48077#include <sys/types.h>
48078	     #include <sys/param.h>
48079
48080int
48081main ()
48082{
48083#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48084		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48085		     && LITTLE_ENDIAN)
48086	      bogus endian macros
48087	     #endif
48088
48089  ;
48090  return 0;
48091}
48092_ACEOF
48093if ac_fn_cxx_try_compile "$LINENO"; then :
48094  # It does; now see whether it defined to BIG_ENDIAN or not.
48095	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48096/* end confdefs.h.  */
48097#include <sys/types.h>
48098		#include <sys/param.h>
48099
48100int
48101main ()
48102{
48103#if BYTE_ORDER != BIG_ENDIAN
48104		 not big endian
48105		#endif
48106
48107  ;
48108  return 0;
48109}
48110_ACEOF
48111if ac_fn_cxx_try_compile "$LINENO"; then :
48112  ac_cv_c_bigendian=yes
48113else
48114  ac_cv_c_bigendian=no
48115fi
48116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48117fi
48118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48119    fi
48120    if test $ac_cv_c_bigendian = unknown; then
48121      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48122      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48123/* end confdefs.h.  */
48124#include <limits.h>
48125
48126int
48127main ()
48128{
48129#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48130	      bogus endian macros
48131	     #endif
48132
48133  ;
48134  return 0;
48135}
48136_ACEOF
48137if ac_fn_cxx_try_compile "$LINENO"; then :
48138  # It does; now see whether it defined to _BIG_ENDIAN or not.
48139	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48140/* end confdefs.h.  */
48141#include <limits.h>
48142
48143int
48144main ()
48145{
48146#ifndef _BIG_ENDIAN
48147		 not big endian
48148		#endif
48149
48150  ;
48151  return 0;
48152}
48153_ACEOF
48154if ac_fn_cxx_try_compile "$LINENO"; then :
48155  ac_cv_c_bigendian=yes
48156else
48157  ac_cv_c_bigendian=no
48158fi
48159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48160fi
48161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48162    fi
48163    if test $ac_cv_c_bigendian = unknown; then
48164      # Compile a test program.
48165      if test "$cross_compiling" = yes; then :
48166  # Try to guess by grepping values from an object file.
48167	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48168/* end confdefs.h.  */
48169short int ascii_mm[] =
48170		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48171		short int ascii_ii[] =
48172		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48173		int use_ascii (int i) {
48174		  return ascii_mm[i] + ascii_ii[i];
48175		}
48176		short int ebcdic_ii[] =
48177		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48178		short int ebcdic_mm[] =
48179		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48180		int use_ebcdic (int i) {
48181		  return ebcdic_mm[i] + ebcdic_ii[i];
48182		}
48183		extern int foo;
48184
48185int
48186main ()
48187{
48188return use_ascii (foo) == use_ebcdic (foo);
48189  ;
48190  return 0;
48191}
48192_ACEOF
48193if ac_fn_cxx_try_compile "$LINENO"; then :
48194  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48195	      ac_cv_c_bigendian=yes
48196	    fi
48197	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48198	      if test "$ac_cv_c_bigendian" = unknown; then
48199		ac_cv_c_bigendian=no
48200	      else
48201		# finding both strings is unlikely to happen, but who knows?
48202		ac_cv_c_bigendian=unknown
48203	      fi
48204	    fi
48205fi
48206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48207else
48208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48209/* end confdefs.h.  */
48210$ac_includes_default
48211int
48212main ()
48213{
48214
48215	     /* Are we little or big endian?  From Harbison&Steele.  */
48216	     union
48217	     {
48218	       long int l;
48219	       char c[sizeof (long int)];
48220	     } u;
48221	     u.l = 1;
48222	     return u.c[sizeof (long int) - 1] == 1;
48223
48224  ;
48225  return 0;
48226}
48227_ACEOF
48228if ac_fn_cxx_try_run "$LINENO"; then :
48229  ac_cv_c_bigendian=no
48230else
48231  ac_cv_c_bigendian=yes
48232fi
48233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48234  conftest.$ac_objext conftest.beam conftest.$ac_ext
48235fi
48236
48237    fi
48238fi
48239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48240$as_echo "$ac_cv_c_bigendian" >&6; }
48241 case $ac_cv_c_bigendian in #(
48242   yes)
48243     ENDIAN="big";; #(
48244   no)
48245     ENDIAN="little" ;; #(
48246   universal)
48247     ENDIAN="universal_endianness"
48248     ;; #(
48249   *)
48250     ENDIAN="unknown" ;;
48251 esac
48252
48253
48254  if test "x$ENDIAN" = xuniversal_endianness; then
48255    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48256  fi
48257  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48258    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
48259  fi
48260
48261
48262# Configure flags for the tools
48263
48264  ###############################################################################
48265  #
48266  # How to compile shared libraries.
48267  #
48268
48269  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48270    PICFLAG="-fPIC"
48271    C_FLAG_REORDER=''
48272    CXX_FLAG_REORDER=''
48273
48274    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48275      # Linking is different on MacOSX
48276      if test "x$STATIC_BUILD" = xtrue; then
48277        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48278      else
48279        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48280        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48281      fi
48282      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48283      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48284      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48285      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48286    else
48287      # Default works for linux, might work on other platforms as well.
48288      SHARED_LIBRARY_FLAGS='-shared'
48289      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48290      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48291      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48292      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48293    fi
48294  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48295    C_FLAG_REORDER=''
48296    CXX_FLAG_REORDER=''
48297
48298    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48299      # Linking is different on MacOSX
48300      PICFLAG=''
48301      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48302      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48303      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48304      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48305      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48306
48307      if test "x$STATIC_BUILD" = xfalse; then
48308        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48309      fi
48310    else
48311      # Default works for linux, might work on other platforms as well.
48312      PICFLAG='-fPIC'
48313      SHARED_LIBRARY_FLAGS='-shared'
48314      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48315      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48316      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48317      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48318    fi
48319  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48320    PICFLAG="-KPIC"
48321    C_FLAG_REORDER='-xF'
48322    CXX_FLAG_REORDER='-xF'
48323    SHARED_LIBRARY_FLAGS="-G"
48324    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48325    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48326    SET_SHARED_LIBRARY_NAME='-h $1'
48327    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48328  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48329    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48330    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48331    # will have to patch this single instruction with a call to some out-of-order code which
48332    # does the load from the TOC. This is of course slow. But in that case we also would have
48333    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48334    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48335    # can be patched directly by the linker and does not require a jump to out-of-order code.
48336    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48337    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48338    # loads for accessing a global variable). But there are rumors that this may be seen as a
48339    # 'performance feature' because of improved code locality of the symbols used in a
48340    # compilation unit.
48341    PICFLAG="-qpic"
48342    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48343    C_FLAG_REORDER=''
48344    CXX_FLAG_REORDER=''
48345    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48346    SET_EXECUTABLE_ORIGIN=""
48347    SET_SHARED_LIBRARY_ORIGIN=''
48348    SET_SHARED_LIBRARY_NAME=''
48349    SET_SHARED_LIBRARY_MAPFILE=''
48350  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48351    PICFLAG=""
48352    C_FLAG_REORDER=''
48353    CXX_FLAG_REORDER=''
48354    SHARED_LIBRARY_FLAGS="-dll"
48355    SET_EXECUTABLE_ORIGIN=''
48356    SET_SHARED_LIBRARY_ORIGIN=''
48357    SET_SHARED_LIBRARY_NAME=''
48358    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48359  fi
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369  # The (cross) compiler is now configured, we can now test capabilities
48370  # of the target platform.
48371
48372
48373
48374  ###############################################################################
48375  #
48376  # Setup the opt flags for different compilers
48377  # and different operating systems.
48378  #
48379
48380  # FIXME: this was indirectly the old default, but just inherited.
48381  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48382  #   C_FLAG_DEPS="-MMD -MF"
48383  # fi
48384
48385  # Generate make dependency files
48386  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48387    C_FLAG_DEPS="-MMD -MF"
48388  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48389    C_FLAG_DEPS="-MMD -MF"
48390  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48391    C_FLAG_DEPS="-xMMD -xMF"
48392  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48393    C_FLAG_DEPS="-qmakedep=gcc -MF"
48394  fi
48395  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48396
48397
48398
48399  # Debug symbols
48400  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48401    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48402      # reduce from default "-g2" option to save space
48403      CFLAGS_DEBUG_SYMBOLS="-g1"
48404      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48405    else
48406      CFLAGS_DEBUG_SYMBOLS="-g"
48407      CXXFLAGS_DEBUG_SYMBOLS="-g"
48408    fi
48409  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48410    CFLAGS_DEBUG_SYMBOLS="-g"
48411    CXXFLAGS_DEBUG_SYMBOLS="-g"
48412  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48413    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48414    # -g0 enables debug symbols without disabling inlining.
48415    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48416  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48417    CFLAGS_DEBUG_SYMBOLS="-g"
48418    CXXFLAGS_DEBUG_SYMBOLS="-g"
48419  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48420    CFLAGS_DEBUG_SYMBOLS="-Zi"
48421    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48422  fi
48423
48424
48425
48426  # Debug symbols for JVM_CFLAGS
48427  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48428    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48429    if test "x$DEBUG_LEVEL" = xslowdebug; then
48430      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48431    else
48432      # -g0 does not disable inlining, which -g does.
48433      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48434    fi
48435  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48436    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48437  else
48438    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48439  fi
48440
48441
48442  # bounds, memory and behavior checking options
48443  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48444    case $DEBUG_LEVEL in
48445    release )
48446      # no adjustment
48447      ;;
48448    fastdebug )
48449      # no adjustment
48450      ;;
48451    slowdebug )
48452      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48453      # get's added conditionally on whether we produce debug symbols or not.
48454      # This is most likely not really correct.
48455
48456      # Add runtime stack smashing and undefined behavior checks.
48457      # Not all versions of gcc support -fstack-protector
48458      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501    # Execute function body
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550    # Execute function body
48551
48552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48553$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48554  supports=yes
48555
48556  saved_cflags="$CFLAGS"
48557  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48558  ac_ext=c
48559ac_cpp='$CPP $CPPFLAGS'
48560ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48561ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48562ac_compiler_gnu=$ac_cv_c_compiler_gnu
48563
48564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48565/* end confdefs.h.  */
48566int i;
48567_ACEOF
48568if ac_fn_c_try_compile "$LINENO"; then :
48569
48570else
48571  supports=no
48572fi
48573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48574  ac_ext=cpp
48575ac_cpp='$CXXCPP $CPPFLAGS'
48576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48579
48580  CFLAGS="$saved_cflags"
48581
48582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48583$as_echo "$supports" >&6; }
48584  if test "x$supports" = "xyes" ; then
48585    :
48586    C_COMP_SUPPORTS="yes"
48587  else
48588    :
48589    C_COMP_SUPPORTS="no"
48590  fi
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650    # Execute function body
48651
48652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48653$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48654  supports=yes
48655
48656  saved_cxxflags="$CXXFLAGS"
48657  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48658  ac_ext=cpp
48659ac_cpp='$CXXCPP $CPPFLAGS'
48660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48663
48664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48665/* end confdefs.h.  */
48666int i;
48667_ACEOF
48668if ac_fn_cxx_try_compile "$LINENO"; then :
48669
48670else
48671  supports=no
48672fi
48673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48674  ac_ext=cpp
48675ac_cpp='$CXXCPP $CPPFLAGS'
48676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48679
48680  CXXFLAGS="$saved_cxxflags"
48681
48682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48683$as_echo "$supports" >&6; }
48684  if test "x$supports" = "xyes" ; then
48685    :
48686    CXX_COMP_SUPPORTS="yes"
48687  else
48688    :
48689    CXX_COMP_SUPPORTS="no"
48690  fi
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48705$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48706  supports=no
48707  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48708
48709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48710$as_echo "$supports" >&6; }
48711  if test "x$supports" = "xyes" ; then
48712    :
48713
48714  else
48715    :
48716    STACK_PROTECTOR_CFLAG=""
48717  fi
48718
48719
48720
48721
48722
48723
48724
48725      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48726      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48727      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48728        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48729      fi
48730      ;;
48731    esac
48732  fi
48733
48734  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48735    if test "x$DEBUG_LEVEL" != xrelease; then
48736      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48737        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48738      fi
48739    fi
48740  fi
48741
48742  # Optimization levels
48743  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48744    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48745
48746    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48747      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48748      C_O_FLAG_HIGHEST_JVM="-xO4"
48749      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48750      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48751      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48752      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48753      C_O_FLAG_DEBUG_JVM=""
48754      C_O_FLAG_NONE="-xregs=no%frameptr"
48755      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48756      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48757      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48758      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48759      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48760      CXX_O_FLAG_DEBUG_JVM=""
48761      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48762      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48763        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48764        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48765      fi
48766    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48767      C_O_FLAG_HIGHEST_JVM="-xO4"
48768      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48769      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48770      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48771      C_O_FLAG_DEBUG=""
48772      C_O_FLAG_DEBUG_JVM=""
48773      C_O_FLAG_NONE=""
48774      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48775      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48776      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48777      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48778      CXX_O_FLAG_DEBUG=""
48779      CXX_O_FLAG_DEBUG_JVM=""
48780      CXX_O_FLAG_NONE=""
48781    fi
48782  else
48783    # The remaining toolchains share opt flags between CC and CXX;
48784    # setup for C and duplicate afterwards.
48785    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48786      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48787        # On MacOSX we optimize for size, something
48788        # we should do for all platforms?
48789        C_O_FLAG_HIGHEST_JVM="-Os"
48790        C_O_FLAG_HIGHEST="-Os"
48791        C_O_FLAG_HI="-Os"
48792        C_O_FLAG_NORM="-Os"
48793        C_O_FLAG_SIZE="-Os"
48794      else
48795        C_O_FLAG_HIGHEST_JVM="-O3"
48796        C_O_FLAG_HIGHEST="-O3"
48797        C_O_FLAG_HI="-O3"
48798        C_O_FLAG_NORM="-O2"
48799        C_O_FLAG_SIZE="-Os"
48800      fi
48801      C_O_FLAG_DEBUG="-O0"
48802      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48803        C_O_FLAG_DEBUG_JVM=""
48804      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48805        C_O_FLAG_DEBUG_JVM="-O0"
48806      fi
48807      C_O_FLAG_NONE="-O0"
48808    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48809      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48810        # On MacOSX we optimize for size, something
48811        # we should do for all platforms?
48812        C_O_FLAG_HIGHEST_JVM="-Os"
48813        C_O_FLAG_HIGHEST="-Os"
48814        C_O_FLAG_HI="-Os"
48815        C_O_FLAG_NORM="-Os"
48816        C_O_FLAG_SIZE="-Os"
48817      else
48818        C_O_FLAG_HIGHEST_JVM="-O3"
48819        C_O_FLAG_HIGHEST="-O3"
48820        C_O_FLAG_HI="-O3"
48821        C_O_FLAG_NORM="-O2"
48822        C_O_FLAG_SIZE="-Os"
48823      fi
48824      C_O_FLAG_DEBUG="-O0"
48825      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48826        C_O_FLAG_DEBUG_JVM=""
48827      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48828        C_O_FLAG_DEBUG_JVM="-O0"
48829      fi
48830      C_O_FLAG_NONE="-O0"
48831    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48832      C_O_FLAG_HIGHEST_JVM="-O3"
48833      C_O_FLAG_HIGHEST="-O3"
48834      C_O_FLAG_HI="-O3 -qstrict"
48835      C_O_FLAG_NORM="-O2"
48836      C_O_FLAG_DEBUG="-qnoopt"
48837      # FIXME: Value below not verified.
48838      C_O_FLAG_DEBUG_JVM=""
48839      C_O_FLAG_NONE="-qnoopt"
48840    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48841      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48842      C_O_FLAG_HIGHEST="-O2"
48843      C_O_FLAG_HI="-O1"
48844      C_O_FLAG_NORM="-O1"
48845      C_O_FLAG_DEBUG="-Od"
48846      C_O_FLAG_DEBUG_JVM=""
48847      C_O_FLAG_NONE="-Od"
48848      C_O_FLAG_SIZE="-Os"
48849    fi
48850    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48851    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48852    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48853    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48854    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48855    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48856    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48857    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48858  fi
48859
48860  # Adjust optimization flags according to debug level.
48861  case $DEBUG_LEVEL in
48862    release )
48863      # no adjustment
48864      ;;
48865    fastdebug )
48866      # Not quite so much optimization
48867      C_O_FLAG_HI="$C_O_FLAG_NORM"
48868      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48869      ;;
48870    slowdebug )
48871      # Disable optimization
48872      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48873      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48874      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48875      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48876      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48877      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48878      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48879      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48880      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48881      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48882      ;;
48883  esac
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896
48897
48898
48899
48900
48901
48902
48903  # Special extras...
48904  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48905    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48906      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48907      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48908    fi
48909    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48910    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48911  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48912    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48913    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48914  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48915    CXXSTD_CXXFLAG="-std=gnu++98"
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958    # Execute function body
48959
48960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48961$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48962  supports=yes
48963
48964  saved_cxxflags="$CXXFLAGS"
48965  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48966  ac_ext=cpp
48967ac_cpp='$CXXCPP $CPPFLAGS'
48968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48971
48972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48973/* end confdefs.h.  */
48974int i;
48975_ACEOF
48976if ac_fn_cxx_try_compile "$LINENO"; then :
48977
48978else
48979  supports=no
48980fi
48981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48982  ac_ext=cpp
48983ac_cpp='$CXXCPP $CPPFLAGS'
48984ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48985ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48986ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48987
48988  CXXFLAGS="$saved_cxxflags"
48989
48990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48991$as_echo "$supports" >&6; }
48992  if test "x$supports" = "xyes" ; then
48993    :
48994
48995  else
48996    :
48997    CXXSTD_CXXFLAG=""
48998  fi
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49012
49013  fi
49014  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49015    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49016    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49017    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49018    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49019    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49020  fi
49021
49022  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49023    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49024    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49025    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49026  fi
49027
49028  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49029  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49030  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49031
49032  ###############################################################################
49033  #
49034  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49035  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49036  #
49037
49038  # Setup compiler/platform specific flags into
49039  #    CFLAGS_JDK    - C Compiler flags
49040  #    CXXFLAGS_JDK  - C++ Compiler flags
49041  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49042  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49043    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49044    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49045    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49046    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49047      # Force compatibility with i586 on 32 bit intel platforms.
49048      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49049      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49050    fi
49051    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49052        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49053    case $OPENJDK_TARGET_CPU_ARCH in
49054      arm )
49055        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49056        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49057        ;;
49058      ppc )
49059        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49060        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49061        ;;
49062      * )
49063        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49064        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49065        ;;
49066    esac
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109    # Execute function body
49110
49111  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49112  REFERENCE_VERSION=6
49113
49114  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49115    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49116  fi
49117
49118  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49119    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49120  fi
49121
49122  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49123  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49124
49125  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49126    :
49127
49128  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49129  # runs afoul of the more aggressive versions of these optimisations.
49130  # Notably, value range propagation now assumes that the this pointer of C++
49131  # member functions is non-null.
49132  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175    # Execute function body
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
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    # Execute function body
49225
49226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49227$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49228  supports=yes
49229
49230  saved_cflags="$CFLAGS"
49231  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49232  ac_ext=c
49233ac_cpp='$CPP $CPPFLAGS'
49234ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49235ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49236ac_compiler_gnu=$ac_cv_c_compiler_gnu
49237
49238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49239/* end confdefs.h.  */
49240int i;
49241_ACEOF
49242if ac_fn_c_try_compile "$LINENO"; then :
49243
49244else
49245  supports=no
49246fi
49247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49248  ac_ext=cpp
49249ac_cpp='$CXXCPP $CPPFLAGS'
49250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49253
49254  CFLAGS="$saved_cflags"
49255
49256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49257$as_echo "$supports" >&6; }
49258  if test "x$supports" = "xyes" ; then
49259    :
49260    C_COMP_SUPPORTS="yes"
49261  else
49262    :
49263    C_COMP_SUPPORTS="no"
49264  fi
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
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324    # Execute function body
49325
49326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49327$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49328  supports=yes
49329
49330  saved_cxxflags="$CXXFLAGS"
49331  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49332  ac_ext=cpp
49333ac_cpp='$CXXCPP $CPPFLAGS'
49334ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49335ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49336ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49337
49338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49339/* end confdefs.h.  */
49340int i;
49341_ACEOF
49342if ac_fn_cxx_try_compile "$LINENO"; then :
49343
49344else
49345  supports=no
49346fi
49347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49348  ac_ext=cpp
49349ac_cpp='$CXXCPP $CPPFLAGS'
49350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49353
49354  CXXFLAGS="$saved_cxxflags"
49355
49356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49357$as_echo "$supports" >&6; }
49358  if test "x$supports" = "xyes" ; then
49359    :
49360    CXX_COMP_SUPPORTS="yes"
49361  else
49362    :
49363    CXX_COMP_SUPPORTS="no"
49364  fi
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49379$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49380  supports=no
49381  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49382
49383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49384$as_echo "$supports" >&6; }
49385  if test "x$supports" = "xyes" ; then
49386    :
49387
49388  else
49389    :
49390    NO_NULL_POINTER_CHECK_CFLAG=""
49391  fi
49392
49393
49394
49395
49396
49397
49398
49399  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442    # Execute function body
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491    # Execute function body
49492
49493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49494$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49495  supports=yes
49496
49497  saved_cflags="$CFLAGS"
49498  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49499  ac_ext=c
49500ac_cpp='$CPP $CPPFLAGS'
49501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49503ac_compiler_gnu=$ac_cv_c_compiler_gnu
49504
49505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49506/* end confdefs.h.  */
49507int i;
49508_ACEOF
49509if ac_fn_c_try_compile "$LINENO"; then :
49510
49511else
49512  supports=no
49513fi
49514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49515  ac_ext=cpp
49516ac_cpp='$CXXCPP $CPPFLAGS'
49517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49520
49521  CFLAGS="$saved_cflags"
49522
49523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49524$as_echo "$supports" >&6; }
49525  if test "x$supports" = "xyes" ; then
49526    :
49527    C_COMP_SUPPORTS="yes"
49528  else
49529    :
49530    C_COMP_SUPPORTS="no"
49531  fi
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591    # Execute function body
49592
49593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49594$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49595  supports=yes
49596
49597  saved_cxxflags="$CXXFLAGS"
49598  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49599  ac_ext=cpp
49600ac_cpp='$CXXCPP $CPPFLAGS'
49601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49604
49605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49606/* end confdefs.h.  */
49607int i;
49608_ACEOF
49609if ac_fn_cxx_try_compile "$LINENO"; then :
49610
49611else
49612  supports=no
49613fi
49614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49615  ac_ext=cpp
49616ac_cpp='$CXXCPP $CPPFLAGS'
49617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49620
49621  CXXFLAGS="$saved_cxxflags"
49622
49623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49624$as_echo "$supports" >&6; }
49625  if test "x$supports" = "xyes" ; then
49626    :
49627    CXX_COMP_SUPPORTS="yes"
49628  else
49629    :
49630    CXX_COMP_SUPPORTS="no"
49631  fi
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49646$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49647  supports=no
49648  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49649
49650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49651$as_echo "$supports" >&6; }
49652  if test "x$supports" = "xyes" ; then
49653    :
49654
49655  else
49656    :
49657    NO_LIFETIME_DSE_CFLAG=""
49658  fi
49659
49660
49661
49662
49663
49664
49665  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49666
49667
49668
49669  else
49670    :
49671
49672  fi
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49686    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49687
49688    # Restrict the debug information created by Clang to avoid
49689    # too big object files and speed the build up a little bit
49690    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49691    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49692    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49693      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49694        # Force compatibility with i586 on 32 bit intel platforms.
49695        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49696        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49697      fi
49698      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49699      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49700          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49701      case $OPENJDK_TARGET_CPU_ARCH in
49702        ppc )
49703          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49704          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49705          ;;
49706        * )
49707          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49708          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49709          ;;
49710      esac
49711    fi
49712  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49713    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49714    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49715    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49716      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49717    fi
49718
49719    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49720    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49721  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49722    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49723    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49724    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49725  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49726    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49727        -MD -Zc:wchar_t- -W3 -wd4800 \
49728        -DWIN32_LEAN_AND_MEAN \
49729        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49730        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49731        -DWIN32 -DIAL"
49732    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49733      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49734    else
49735      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49736    fi
49737    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49738    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49739    # studio.
49740    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49741      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49742      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49743      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49744    fi
49745  fi
49746
49747  ###############################################################################
49748
49749  # Adjust flags according to debug level.
49750  case $DEBUG_LEVEL in
49751    fastdebug | slowdebug )
49752      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49753      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49754      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49755      ;;
49756    release )
49757      ;;
49758    * )
49759      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49760      ;;
49761  esac
49762
49763  # Set some common defines. These works for all compilers, but assume
49764  # -D is universally accepted.
49765
49766  # Setup endianness
49767  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49768    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49769    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49770    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49771    #   Note: -Dmacro         is the same as    #define macro 1
49772    #         -Dmacro=        is the same as    #define macro
49773    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49774      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49775    else
49776      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49777    fi
49778  else
49779    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49780    # are defined in the system?
49781    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49782      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49783    else
49784      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49785    fi
49786  fi
49787
49788  # Setup target OS define. Use OS target name but in upper case.
49789  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49790  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49791
49792  # Setup target CPU
49793  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49794      $OPENJDK_TARGET_ADD_LP64 \
49795      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49796
49797  # Setup debug/release defines
49798  if test "x$DEBUG_LEVEL" = xrelease; then
49799    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49800    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49801      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49802    fi
49803  else
49804    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49805  fi
49806
49807  # Set some additional per-OS defines.
49808  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49809    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49810    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49811        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49812  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49813    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49814    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49815        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49816  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49817    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49818    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49819    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49820    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49821        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49822        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49823        -fno-omit-frame-pointer"
49824  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49825    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49826    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49827    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49828        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49829        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49830  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49831    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49832  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49833    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49834    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49835  fi
49836
49837  # Set some additional per-CPU defines.
49838  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49839    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49840  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49841    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49842  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49843    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49844      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49845      # fixes `relocation truncated to fit' error for gcc 4.1.
49846      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49847      # Use ppc64 instructions, but schedule for power5
49848      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49849    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49850      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49851    fi
49852  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49853    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49854      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49855      # Little endian machine uses ELFv2 ABI.
49856      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49857      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49858      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49859    fi
49860  fi
49861
49862  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49863    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49864  fi
49865
49866  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49867    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49868      # Solaris does not have _LP64=1 in the old build.
49869      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49870      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49871    fi
49872  fi
49873
49874  # Set JVM_CFLAGS warning handling
49875  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49876    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49877        -Wunused-value -Woverloaded-virtual"
49878
49879    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922    # Execute function body
49923
49924  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49925  REFERENCE_VERSION=4.8
49926
49927  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49928    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49929  fi
49930
49931  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49932    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49933  fi
49934
49935  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49936  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49937
49938  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49939    :
49940
49941            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49942            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49943
49944
49945  else
49946    :
49947
49948  fi
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961    fi
49962    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49963      # Non-zero builds have stricter warnings
49964      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49965    else
49966      if test "x$TOOLCHAIN_TYPE" = xclang; then
49967        # Some versions of llvm do not like -Wundef
49968        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49969      fi
49970    fi
49971  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49972    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49973        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49974  fi
49975
49976  # Additional macosx handling
49977  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49978    # Setting these parameters makes it an error to link to macosx APIs that are
49979    # newer than the given OS version and makes the linked binaries compatible
49980    # even if built on a newer version of the OS.
49981    # The expected format is X.Y.Z
49982    MACOSX_VERSION_MIN=10.7.0
49983
49984
49985    # The macro takes the version with no dots, ex: 1070
49986    # Let the flags variables get resolved in make for easier override on make
49987    # command line.
49988    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49989    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49990  fi
49991
49992  # Setup some hard coded includes
49993  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49994      -I${JDK_TOPDIR}/src/java.base/share/native/include \
49995      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49996      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49997      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49998      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49999
50000  # The shared libraries are compiled using the picflag.
50001  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50002      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50003  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50004      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50005
50006  # Executable flags
50007  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50008  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50009
50010
50011
50012
50013
50014
50015  # Setup LDFLAGS et al.
50016  #
50017
50018  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50019    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50020    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50021    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50022    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50023      LDFLAGS_SAFESH="-safeseh"
50024      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50025      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50026      # NOTE: Old build added -machine. Probably not needed.
50027      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50028    else
50029      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50030    fi
50031  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50032      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50033      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50034        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50035        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50036    fi
50037  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50038    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50039    # We have previously set HAS_GNU_HASH if this is the case
50040    if test -n "$HAS_GNU_HASH"; then
50041      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50042      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50043      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50044    fi
50045      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50046        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50047    fi
50048    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50049      # And since we now know that the linker is gnu, then add -z defs, to forbid
50050      # undefined symbols in object files.
50051      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50052      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50053      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50054      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50055      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50056      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50057        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50058      fi
50059      case $DEBUG_LEVEL in
50060        release )
50061          # tell linker to optimize libraries.
50062          # Should this be supplied to the OSS linker as well?
50063          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50064          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50065          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50066          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50067            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50068          fi
50069          ;;
50070        slowdebug )
50071          # Hotspot always let the linker optimize
50072          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50073          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50074            # do relocations at load
50075            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50076            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50077            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50078          fi
50079          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50080            # mark relocations read only
50081            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50082            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50083            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50084          fi
50085          ;;
50086        fastdebug )
50087          # Hotspot always let the linker optimize
50088          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50089          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50090            # mark relocations read only
50091            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50092            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50093            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50094          fi
50095          ;;
50096        * )
50097          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50098          ;;
50099        esac
50100    fi
50101  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50102    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50103    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50104    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50105    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50106    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50107    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50108      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50109    fi
50110  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50111    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50112    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50113    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50114  fi
50115
50116  # Customize LDFLAGS for executables
50117
50118  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50119
50120  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50121    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50122      LDFLAGS_STACK_SIZE=1048576
50123    else
50124      LDFLAGS_STACK_SIZE=327680
50125    fi
50126    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50127  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50128    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50129  fi
50130
50131  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50132
50133  # Customize LDFLAGS for libs
50134  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50135
50136  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50137  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50138    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50139        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50140    JDKLIB_LIBS=""
50141  else
50142    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50143        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50144
50145    if test "xTARGET" = "xTARGET"; then
50146    # On some platforms (mac) the linker warns about non existing -L dirs.
50147    # Add server first if available. Linking aginst client does not always produce the same results.
50148      # Only add client/minimal dir if client/minimal is being built.
50149    # Default to server for other variants.
50150      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50151        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50152      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50153        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50154      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50155        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50156    else
50157        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50158    fi
50159    elif test "xTARGET" = "xBUILD"; then
50160      # When building a buildjdk, it's always only the server variant
50161      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50162          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50163    fi
50164
50165    JDKLIB_LIBS="-ljava -ljvm"
50166    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50167      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50168    fi
50169
50170  fi
50171
50172  # Set JVM_LIBS (per os)
50173  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50174    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50175  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50176    # FIXME: This hard-coded path is not really proper.
50177    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50178      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50179    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50180      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50181    fi
50182    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50183        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50184  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50185    JVM_LIBS="$JVM_LIBS -lm"
50186  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50187    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50188  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50189    JVM_LIBS="$JVM_LIBS -lm"
50190  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50191    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50192        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50193        wsock32.lib winmm.lib version.lib psapi.lib"
50194    fi
50195
50196  # Set JVM_ASFLAGS
50197  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50198    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50199      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50200    fi
50201  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50202    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50203  fi
50204
50205  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221  # Special extras...
50222  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50223    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50224      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50225      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50226    fi
50227    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50228    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50229  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50230    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50231    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50232  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50233    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276    # Execute function body
50277
50278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50279$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50280  supports=yes
50281
50282  saved_cxxflags="$CXXFLAGS"
50283  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50284  ac_ext=cpp
50285ac_cpp='$CXXCPP $CPPFLAGS'
50286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50289
50290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50291/* end confdefs.h.  */
50292int i;
50293_ACEOF
50294if ac_fn_cxx_try_compile "$LINENO"; then :
50295
50296else
50297  supports=no
50298fi
50299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50300  ac_ext=cpp
50301ac_cpp='$CXXCPP $CPPFLAGS'
50302ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50303ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50304ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50305
50306  CXXFLAGS="$saved_cxxflags"
50307
50308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50309$as_echo "$supports" >&6; }
50310  if test "x$supports" = "xyes" ; then
50311    :
50312
50313  else
50314    :
50315    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50316  fi
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50330
50331  fi
50332  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50333    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50334    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50335    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50336    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50337    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50338  fi
50339
50340  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50341    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50342    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50343    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50344  fi
50345
50346  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50347  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50348  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50349
50350  ###############################################################################
50351  #
50352  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50353  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50354  #
50355
50356  # Setup compiler/platform specific flags into
50357  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50358  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50359  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50360  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50361    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50362    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50363    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50364    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50365      # Force compatibility with i586 on 32 bit intel platforms.
50366      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50367      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50368    fi
50369    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50370        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50371    case $OPENJDK_BUILD_CPU_ARCH in
50372      arm )
50373        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50374        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50375        ;;
50376      ppc )
50377        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50378        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50379        ;;
50380      * )
50381        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50382        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50383        ;;
50384    esac
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427    # Execute function body
50428
50429  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50430  REFERENCE_VERSION=6
50431
50432  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50433    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50434  fi
50435
50436  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50437    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50438  fi
50439
50440  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50441  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50442
50443  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50444    :
50445
50446  else
50447    :
50448
50449  fi
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50463    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50464
50465    # Restrict the debug information created by Clang to avoid
50466    # too big object files and speed the build up a little bit
50467    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50468    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50469    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50470      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50471        # Force compatibility with i586 on 32 bit intel platforms.
50472        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50473        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50474      fi
50475      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50476      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50477          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50478      case $OPENJDK_BUILD_CPU_ARCH in
50479        ppc )
50480          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50481          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50482          ;;
50483        * )
50484          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50485          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50486          ;;
50487      esac
50488    fi
50489  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50490    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50491    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50492    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50493      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50494    fi
50495
50496    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50497    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50498  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50499    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50500    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50501    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50502  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50503    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50504        -MD -Zc:wchar_t- -W3 -wd4800 \
50505        -DWIN32_LEAN_AND_MEAN \
50506        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50507        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50508        -DWIN32 -DIAL"
50509    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50510      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50511    else
50512      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50513    fi
50514    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50515    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50516    # studio.
50517    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50518      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50519      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50520      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50521    fi
50522  fi
50523
50524  ###############################################################################
50525
50526  # Adjust flags according to debug level.
50527  case $DEBUG_LEVEL in
50528    fastdebug | slowdebug )
50529      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50530      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50531      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50532      ;;
50533    release )
50534      ;;
50535    * )
50536      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50537      ;;
50538  esac
50539
50540  # Set some common defines. These works for all compilers, but assume
50541  # -D is universally accepted.
50542
50543  # Setup endianness
50544  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50545    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50546    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50547    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50548    #   Note: -Dmacro         is the same as    #define macro 1
50549    #         -Dmacro=        is the same as    #define macro
50550    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50551      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50552    else
50553      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50554    fi
50555  else
50556    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50557    # are defined in the system?
50558    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50559      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50560    else
50561      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50562    fi
50563  fi
50564
50565  # Setup target OS define. Use OS target name but in upper case.
50566  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50567  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50568
50569  # Setup target CPU
50570  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50571      $OPENJDK_BUILD_ADD_LP64 \
50572      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50573
50574  # Setup debug/release defines
50575  if test "x$DEBUG_LEVEL" = xrelease; then
50576    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50577    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50578      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50579    fi
50580  else
50581    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50582  fi
50583
50584  # Set some additional per-OS defines.
50585  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50586    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50587    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50588        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50589  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50590    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50591    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50592        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50593  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50594    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50596    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50597    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50598        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50599        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50600        -fno-omit-frame-pointer"
50601  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50602    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50603    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50604    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50605        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50606        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50607  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50608    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50609  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50610    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50611    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50612  fi
50613
50614  # Set some additional per-CPU defines.
50615  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50616    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50617  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50618    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50619  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50620    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50621      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50622      # fixes `relocation truncated to fit' error for gcc 4.1.
50623      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50624      # Use ppc64 instructions, but schedule for power5
50625      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50626    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50627      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50628    fi
50629  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50630    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50631      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50632      # Little endian machine uses ELFv2 ABI.
50633      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50634      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50635      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50636    fi
50637  fi
50638
50639  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50640    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50641  fi
50642
50643  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50644    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50645      # Solaris does not have _LP64=1 in the old build.
50646      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50647      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50648    fi
50649  fi
50650
50651  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50652  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50653    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50654        -Wunused-value -Woverloaded-virtual"
50655
50656    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699    # Execute function body
50700
50701  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50702  REFERENCE_VERSION=4.8
50703
50704  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50705    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50706  fi
50707
50708  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50709    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50710  fi
50711
50712  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50713  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50714
50715  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50716    :
50717
50718            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50719            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50720
50721
50722  else
50723    :
50724
50725  fi
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738    fi
50739    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50740      # Non-zero builds have stricter warnings
50741      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50742    else
50743      if test "x$TOOLCHAIN_TYPE" = xclang; then
50744        # Some versions of llvm do not like -Wundef
50745        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50746      fi
50747    fi
50748  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50749    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50750        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50751  fi
50752
50753  # Additional macosx handling
50754  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50755    # Setting these parameters makes it an error to link to macosx APIs that are
50756    # newer than the given OS version and makes the linked binaries compatible
50757    # even if built on a newer version of the OS.
50758    # The expected format is X.Y.Z
50759    MACOSX_VERSION_MIN=10.7.0
50760
50761
50762    # The macro takes the version with no dots, ex: 1070
50763    # Let the flags variables get resolved in make for easier override on make
50764    # command line.
50765    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)"
50766    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50767  fi
50768
50769  # Setup some hard coded includes
50770  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50771      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50772      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50773      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50774      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50775      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50776
50777  # The shared libraries are compiled using the picflag.
50778  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50779      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50780  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50781      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50782
50783  # Executable flags
50784  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50785  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50786
50787
50788
50789
50790
50791
50792  # Setup LDFLAGS et al.
50793  #
50794
50795  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50796    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50797    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50798    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50799    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50800      LDFLAGS_SAFESH="-safeseh"
50801      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50802      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50803      # NOTE: Old build added -machine. Probably not needed.
50804      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50805    else
50806      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50807    fi
50808  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50809      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50810      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50811        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50812        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50813    fi
50814  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50815    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50816    # We have previously set HAS_GNU_HASH if this is the case
50817    if test -n "$HAS_GNU_HASH"; then
50818      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50819      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50820      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50821    fi
50822      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50823        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50824    fi
50825    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50826      # And since we now know that the linker is gnu, then add -z defs, to forbid
50827      # undefined symbols in object files.
50828      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50829      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50830      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50831      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50832      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50833      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50834        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50835      fi
50836      case $DEBUG_LEVEL in
50837        release )
50838          # tell linker to optimize libraries.
50839          # Should this be supplied to the OSS linker as well?
50840          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50841          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50842          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50843          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50844            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50845          fi
50846          ;;
50847        slowdebug )
50848          # Hotspot always let the linker optimize
50849          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50850          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50851            # do relocations at load
50852            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50853            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50854            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50855          fi
50856          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50857            # mark relocations read only
50858            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50859            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50860            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50861          fi
50862          ;;
50863        fastdebug )
50864          # Hotspot always let the linker optimize
50865          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50866          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50867            # mark relocations read only
50868            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50869            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50870            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50871          fi
50872          ;;
50873        * )
50874          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50875          ;;
50876        esac
50877    fi
50878  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50879    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50880    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50881    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50882    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50883    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50884    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50885      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50886    fi
50887  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50888    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50889    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50890    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50891  fi
50892
50893  # Customize LDFLAGS for executables
50894
50895  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50896
50897  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50898    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50899      LDFLAGS_STACK_SIZE=1048576
50900    else
50901      LDFLAGS_STACK_SIZE=327680
50902    fi
50903    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50904  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50905    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50906  fi
50907
50908  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50909
50910  # Customize LDFLAGS for libs
50911  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50912
50913  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50914  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50915    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50916        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50917    OPENJDK_BUILD_JDKLIB_LIBS=""
50918  else
50919    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50920        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50921
50922    if test "xBUILD" = "xTARGET"; then
50923    # On some platforms (mac) the linker warns about non existing -L dirs.
50924    # Add server first if available. Linking aginst client does not always produce the same results.
50925      # Only add client/minimal dir if client/minimal is being built.
50926    # Default to server for other variants.
50927      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50928        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50929      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50930        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50931      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50932        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50933    else
50934        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50935    fi
50936    elif test "xBUILD" = "xBUILD"; then
50937      # When building a buildjdk, it's always only the server variant
50938      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50939          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50940    fi
50941
50942    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50943    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50944      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50945    fi
50946
50947  fi
50948
50949  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50950  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50951    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50952  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50953    # FIXME: This hard-coded path is not really proper.
50954    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50955      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50956    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50957      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50958    fi
50959    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50960        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50961  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50962    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50963  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50964    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50965  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50966    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50967  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50968    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50969        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50970        wsock32.lib winmm.lib version.lib psapi.lib"
50971    fi
50972
50973  # Set OPENJDK_BUILD_JVM_ASFLAGS
50974  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50975    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50976      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50977    fi
50978  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50979    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50980  fi
50981
50982  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998  # Tests are only ever compiled for TARGET
50999  # Flags for compiling test libraries
51000  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51001  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51002
51003  # Flags for compiling test executables
51004  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51005  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51006
51007
51008
51009
51010
51011
51012  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51013  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51014
51015
51016
51017
51018
51019
51020  # Some Zero and Shark settings.
51021  # ZERO_ARCHFLAG tells the compiler which mode to build for
51022  case "${OPENJDK_TARGET_CPU}" in
51023    s390)
51024      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51025      ;;
51026    *)
51027      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51028  esac
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071    # Execute function body
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120    # Execute function body
51121
51122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51123$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51124  supports=yes
51125
51126  saved_cflags="$CFLAGS"
51127  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51128  ac_ext=c
51129ac_cpp='$CPP $CPPFLAGS'
51130ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51131ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51132ac_compiler_gnu=$ac_cv_c_compiler_gnu
51133
51134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51135/* end confdefs.h.  */
51136int i;
51137_ACEOF
51138if ac_fn_c_try_compile "$LINENO"; then :
51139
51140else
51141  supports=no
51142fi
51143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51144  ac_ext=cpp
51145ac_cpp='$CXXCPP $CPPFLAGS'
51146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51149
51150  CFLAGS="$saved_cflags"
51151
51152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51153$as_echo "$supports" >&6; }
51154  if test "x$supports" = "xyes" ; then
51155    :
51156    C_COMP_SUPPORTS="yes"
51157  else
51158    :
51159    C_COMP_SUPPORTS="no"
51160  fi
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220    # Execute function body
51221
51222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51223$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51224  supports=yes
51225
51226  saved_cxxflags="$CXXFLAGS"
51227  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51228  ac_ext=cpp
51229ac_cpp='$CXXCPP $CPPFLAGS'
51230ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51231ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51232ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51233
51234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51235/* end confdefs.h.  */
51236int i;
51237_ACEOF
51238if ac_fn_cxx_try_compile "$LINENO"; then :
51239
51240else
51241  supports=no
51242fi
51243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51244  ac_ext=cpp
51245ac_cpp='$CXXCPP $CPPFLAGS'
51246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51249
51250  CXXFLAGS="$saved_cxxflags"
51251
51252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51253$as_echo "$supports" >&6; }
51254  if test "x$supports" = "xyes" ; then
51255    :
51256    CXX_COMP_SUPPORTS="yes"
51257  else
51258    :
51259    CXX_COMP_SUPPORTS="no"
51260  fi
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51275$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51276  supports=no
51277  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51278
51279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51280$as_echo "$supports" >&6; }
51281  if test "x$supports" = "xyes" ; then
51282    :
51283
51284  else
51285    :
51286    ZERO_ARCHFLAG=""
51287  fi
51288
51289
51290
51291
51292
51293
51294
51295
51296  # Check that the compiler supports -mX (or -qX on AIX) flags
51297  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345    # Execute function body
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
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    # Execute function body
51395
51396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51397$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51398  supports=yes
51399
51400  saved_cflags="$CFLAGS"
51401  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51402  ac_ext=c
51403ac_cpp='$CPP $CPPFLAGS'
51404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51406ac_compiler_gnu=$ac_cv_c_compiler_gnu
51407
51408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51409/* end confdefs.h.  */
51410int i;
51411_ACEOF
51412if ac_fn_c_try_compile "$LINENO"; then :
51413
51414else
51415  supports=no
51416fi
51417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51418  ac_ext=cpp
51419ac_cpp='$CXXCPP $CPPFLAGS'
51420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51423
51424  CFLAGS="$saved_cflags"
51425
51426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51427$as_echo "$supports" >&6; }
51428  if test "x$supports" = "xyes" ; then
51429    :
51430    C_COMP_SUPPORTS="yes"
51431  else
51432    :
51433    C_COMP_SUPPORTS="no"
51434  fi
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
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    # Execute function body
51495
51496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51497$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51498  supports=yes
51499
51500  saved_cxxflags="$CXXFLAGS"
51501  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51502  ac_ext=cpp
51503ac_cpp='$CXXCPP $CPPFLAGS'
51504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51507
51508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51509/* end confdefs.h.  */
51510int i;
51511_ACEOF
51512if ac_fn_cxx_try_compile "$LINENO"; then :
51513
51514else
51515  supports=no
51516fi
51517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51518  ac_ext=cpp
51519ac_cpp='$CXXCPP $CPPFLAGS'
51520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51523
51524  CXXFLAGS="$saved_cxxflags"
51525
51526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51527$as_echo "$supports" >&6; }
51528  if test "x$supports" = "xyes" ; then
51529    :
51530    CXX_COMP_SUPPORTS="yes"
51531  else
51532    :
51533    CXX_COMP_SUPPORTS="no"
51534  fi
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51549$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51550  supports=no
51551  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51552
51553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51554$as_echo "$supports" >&6; }
51555  if test "x$supports" = "xyes" ; then
51556    :
51557    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51558  else
51559    :
51560    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51561  fi
51562
51563
51564
51565
51566
51567
51568
51569
51570  # Check whether --enable-warnings-as-errors was given.
51571if test "${enable_warnings_as_errors+set}" = set; then :
51572  enableval=$enable_warnings_as_errors;
51573fi
51574
51575
51576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51577$as_echo_n "checking if native warnings are errors... " >&6; }
51578  if test "x$enable_warnings_as_errors" = "xyes"; then
51579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51580$as_echo "yes (explicitely set)" >&6; }
51581    WARNINGS_AS_ERRORS=true
51582  elif test "x$enable_warnings_as_errors" = "xno"; then
51583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51584$as_echo "no" >&6; }
51585    WARNINGS_AS_ERRORS=false
51586  elif test "x$enable_warnings_as_errors" = "x"; then
51587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51588$as_echo "yes (default)" >&6; }
51589    WARNINGS_AS_ERRORS=true
51590  else
51591    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51592  fi
51593
51594  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51595    # Set legacy hotspot variable
51596    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51597  else
51598    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51599  fi
51600
51601
51602
51603
51604  case "${TOOLCHAIN_TYPE}" in
51605    microsoft)
51606      DISABLE_WARNING_PREFIX="-wd"
51607      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51608      ;;
51609    solstudio)
51610      DISABLE_WARNING_PREFIX="-erroff="
51611      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51612      ;;
51613    gcc)
51614      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662    # Execute function body
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711    # Execute function body
51712
51713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51714$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51715  supports=yes
51716
51717  saved_cflags="$CFLAGS"
51718  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51719  ac_ext=c
51720ac_cpp='$CPP $CPPFLAGS'
51721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51723ac_compiler_gnu=$ac_cv_c_compiler_gnu
51724
51725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51726/* end confdefs.h.  */
51727int i;
51728_ACEOF
51729if ac_fn_c_try_compile "$LINENO"; then :
51730
51731else
51732  supports=no
51733fi
51734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51735  ac_ext=cpp
51736ac_cpp='$CXXCPP $CPPFLAGS'
51737ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51738ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51739ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51740
51741  CFLAGS="$saved_cflags"
51742
51743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51744$as_echo "$supports" >&6; }
51745  if test "x$supports" = "xyes" ; then
51746    :
51747    C_COMP_SUPPORTS="yes"
51748  else
51749    :
51750    C_COMP_SUPPORTS="no"
51751  fi
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
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811    # Execute function body
51812
51813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51814$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51815  supports=yes
51816
51817  saved_cxxflags="$CXXFLAGS"
51818  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51819  ac_ext=cpp
51820ac_cpp='$CXXCPP $CPPFLAGS'
51821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51824
51825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51826/* end confdefs.h.  */
51827int i;
51828_ACEOF
51829if ac_fn_cxx_try_compile "$LINENO"; then :
51830
51831else
51832  supports=no
51833fi
51834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51835  ac_ext=cpp
51836ac_cpp='$CXXCPP $CPPFLAGS'
51837ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51838ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51839ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51840
51841  CXXFLAGS="$saved_cxxflags"
51842
51843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51844$as_echo "$supports" >&6; }
51845  if test "x$supports" = "xyes" ; then
51846    :
51847    CXX_COMP_SUPPORTS="yes"
51848  else
51849    :
51850    CXX_COMP_SUPPORTS="no"
51851  fi
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51866$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51867  supports=no
51868  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51869
51870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51871$as_echo "$supports" >&6; }
51872  if test "x$supports" = "xyes" ; then
51873    :
51874    GCC_CAN_DISABLE_WARNINGS=true
51875  else
51876    :
51877    GCC_CAN_DISABLE_WARNINGS=false
51878
51879  fi
51880
51881
51882
51883
51884
51885
51886      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51887        DISABLE_WARNING_PREFIX="-Wno-"
51888      else
51889        DISABLE_WARNING_PREFIX=
51890      fi
51891      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51892      # Repeate the check for the BUILD_CC
51893      CC_OLD="$CC"
51894      CC="$BUILD_CC"
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942    # Execute function body
51943
51944
51945
51946
51947
51948
51949
51950
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    # Execute function body
51992
51993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51994$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51995  supports=yes
51996
51997  saved_cflags="$CFLAGS"
51998  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51999  ac_ext=c
52000ac_cpp='$CPP $CPPFLAGS'
52001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52003ac_compiler_gnu=$ac_cv_c_compiler_gnu
52004
52005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52006/* end confdefs.h.  */
52007int i;
52008_ACEOF
52009if ac_fn_c_try_compile "$LINENO"; then :
52010
52011else
52012  supports=no
52013fi
52014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52015  ac_ext=cpp
52016ac_cpp='$CXXCPP $CPPFLAGS'
52017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52020
52021  CFLAGS="$saved_cflags"
52022
52023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52024$as_echo "$supports" >&6; }
52025  if test "x$supports" = "xyes" ; then
52026    :
52027    C_COMP_SUPPORTS="yes"
52028  else
52029    :
52030    C_COMP_SUPPORTS="no"
52031  fi
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091    # Execute function body
52092
52093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52094$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52095  supports=yes
52096
52097  saved_cxxflags="$CXXFLAGS"
52098  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52099  ac_ext=cpp
52100ac_cpp='$CXXCPP $CPPFLAGS'
52101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52104
52105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52106/* end confdefs.h.  */
52107int i;
52108_ACEOF
52109if ac_fn_cxx_try_compile "$LINENO"; then :
52110
52111else
52112  supports=no
52113fi
52114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52115  ac_ext=cpp
52116ac_cpp='$CXXCPP $CPPFLAGS'
52117ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52118ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52119ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52120
52121  CXXFLAGS="$saved_cxxflags"
52122
52123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52124$as_echo "$supports" >&6; }
52125  if test "x$supports" = "xyes" ; then
52126    :
52127    CXX_COMP_SUPPORTS="yes"
52128  else
52129    :
52130    CXX_COMP_SUPPORTS="no"
52131  fi
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52146$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52147  supports=no
52148  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52149
52150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52151$as_echo "$supports" >&6; }
52152  if test "x$supports" = "xyes" ; then
52153    :
52154    BUILD_CC_CAN_DISABLE_WARNINGS=true
52155  else
52156    :
52157    BUILD_CC_CAN_DISABLE_WARNINGS=false
52158
52159  fi
52160
52161
52162
52163
52164
52165
52166      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52167        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52168      else
52169        BUILD_CC_DISABLE_WARNING_PREFIX=
52170      fi
52171      CC="$CC_OLD"
52172      ;;
52173    clang)
52174      DISABLE_WARNING_PREFIX="-Wno-"
52175      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52176      ;;
52177    xlc)
52178      DISABLE_WARNING_PREFIX="-qsuppress="
52179      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52180      ;;
52181  esac
52182
52183
52184
52185
52186
52187# Setup debug symbols (need objcopy from the toolchain for that)
52188
52189  #
52190  # NATIVE_DEBUG_SYMBOLS
52191  # This must be done after the toolchain is setup, since we're looking at objcopy.
52192  #
52193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52194$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52195
52196# Check whether --with-native-debug-symbols was given.
52197if test "${with_native_debug_symbols+set}" = set; then :
52198  withval=$with_native_debug_symbols;
52199        if test "x$OPENJDK_TARGET_OS" = xaix; then
52200          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52201            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52202          fi
52203        fi
52204
52205else
52206
52207        if test "x$OPENJDK_TARGET_OS" = xaix; then
52208          # AIX doesn't support 'zipped' so use 'internal' as default
52209          with_native_debug_symbols="internal"
52210        else
52211          if test "x$STATIC_BUILD" = xtrue; then
52212            with_native_debug_symbols="none"
52213          else
52214            with_native_debug_symbols="zipped"
52215          fi
52216        fi
52217
52218fi
52219
52220  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52222$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52223
52224  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52225
52226    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52227      if test "x$OBJCOPY" = x; then
52228        # enabling of enable-debug-symbols and can't find objcopy
52229        # this is an error
52230        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52231      fi
52232    fi
52233
52234    COMPILE_WITH_DEBUG_SYMBOLS=true
52235    COPY_DEBUG_SYMBOLS=true
52236    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52237
52238    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52239    DEBUG_BINARIES=false
52240    STRIP_POLICY=min_strip
52241
52242  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52243    COMPILE_WITH_DEBUG_SYMBOLS=false
52244    COPY_DEBUG_SYMBOLS=false
52245    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52246
52247    DEBUG_BINARIES=false
52248    STRIP_POLICY=no_strip
52249  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52250    COMPILE_WITH_DEBUG_SYMBOLS=true
52251    COPY_DEBUG_SYMBOLS=false
52252    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52253
52254    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52255    DEBUG_BINARIES=true
52256    STRIP_POLICY=no_strip
52257    STRIP=""
52258
52259  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52260
52261    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52262      if test "x$OBJCOPY" = x; then
52263        # enabling of enable-debug-symbols and can't find objcopy
52264        # this is an error
52265        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52266      fi
52267    fi
52268
52269    COMPILE_WITH_DEBUG_SYMBOLS=true
52270    COPY_DEBUG_SYMBOLS=true
52271    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52272
52273    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52274    DEBUG_BINARIES=false
52275    STRIP_POLICY=min_strip
52276  else
52277    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52278  fi
52279
52280  # --enable-debug-symbols is deprecated.
52281  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52282
52283  # Check whether --enable-debug-symbols was given.
52284if test "${enable_debug_symbols+set}" = set; then :
52285  enableval=$enable_debug_symbols;
52286fi
52287
52288  if test "x$enable_debug_symbols" != x; then
52289    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52290$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52291
52292    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52293      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52294$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52295    fi
52296
52297  fi
52298
52299
52300  # --enable-zip-debug-info is deprecated.
52301  # Please use --with-native-debug-symbols=zipped .
52302
52303  # Check whether --enable-zip-debug-info was given.
52304if test "${enable_zip_debug_info+set}" = set; then :
52305  enableval=$enable_zip_debug_info;
52306fi
52307
52308  if test "x$enable_zip_debug_info" != x; then
52309    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52310$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52311
52312    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52313      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52314$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52315    fi
52316
52317  fi
52318
52319
52320
52321
52322
52323
52324  # Legacy values
52325
52326
52327
52328
52329  # Check whether --enable-native-coverage was given.
52330if test "${enable_native_coverage+set}" = set; then :
52331  enableval=$enable_native_coverage;
52332fi
52333
52334  GCOV_ENABLED="false"
52335  if test "x$enable_native_coverage" = "xyes"; then
52336    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52338$as_echo_n "checking if native coverage is enabled... " >&6; }
52339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52340$as_echo "yes" >&6; }
52341      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52342      GCOV_LDFLAGS="-fprofile-arcs"
52343      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52344      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52345      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52346      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52347      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52348      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52349      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52350      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52351      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52352      GCOV_ENABLED="true"
52353    else
52354      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52355    fi
52356  elif test "x$enable_native_coverage" = "xno"; then
52357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52358$as_echo_n "checking if native coverage is enabled... " >&6; }
52359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52360$as_echo "no" >&6; }
52361  elif test "x$enable_native_coverage" != "x"; then
52362    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52363  fi
52364
52365
52366
52367
52368# Need toolchain to setup dtrace
52369
52370  # Test for dtrace dependencies
52371  # Check whether --enable-dtrace was given.
52372if test "${enable_dtrace+set}" = set; then :
52373  enableval=$enable_dtrace;
52374fi
52375
52376
52377  DTRACE_DEP_MISSING=false
52378
52379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52380$as_echo_n "checking for dtrace tool... " >&6; }
52381  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52383$as_echo "$DTRACE" >&6; }
52384  else
52385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52386$as_echo "not found, cannot build dtrace" >&6; }
52387    DTRACE_DEP_MISSING=true
52388  fi
52389
52390  for ac_header in sys/sdt.h
52391do :
52392  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52393if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52394  cat >>confdefs.h <<_ACEOF
52395#define HAVE_SYS_SDT_H 1
52396_ACEOF
52397 DTRACE_HEADERS_OK=yes
52398else
52399  DTRACE_HEADERS_OK=no
52400fi
52401
52402done
52403
52404  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52405    DTRACE_DEP_MISSING=true
52406  fi
52407
52408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52409$as_echo_n "checking if dtrace should be built... " >&6; }
52410  if test "x$enable_dtrace" = "xyes"; then
52411    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52413$as_echo "no, missing dependencies" >&6; }
52414
52415  # Print a helpful message on how to acquire the necessary build dependency.
52416  # dtrace is the help tag: freetype, cups, alsa etc
52417  MISSING_DEPENDENCY=dtrace
52418
52419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52420    cygwin_help $MISSING_DEPENDENCY
52421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52422    msys_help $MISSING_DEPENDENCY
52423  else
52424    PKGHANDLER_COMMAND=
52425
52426    case $PKGHANDLER in
52427      apt-get)
52428        apt_help     $MISSING_DEPENDENCY ;;
52429      yum)
52430        yum_help     $MISSING_DEPENDENCY ;;
52431      port)
52432        port_help    $MISSING_DEPENDENCY ;;
52433      pkgutil)
52434        pkgutil_help $MISSING_DEPENDENCY ;;
52435      pkgadd)
52436        pkgadd_help  $MISSING_DEPENDENCY ;;
52437    esac
52438
52439    if test "x$PKGHANDLER_COMMAND" != x; then
52440      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52441    fi
52442  fi
52443
52444      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52445    else
52446      INCLUDE_DTRACE=true
52447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52448$as_echo "yes, forced" >&6; }
52449    fi
52450  elif test "x$enable_dtrace" = "xno"; then
52451    INCLUDE_DTRACE=false
52452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52453$as_echo "no, forced" >&6; }
52454  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52455    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52456      INCLUDE_DTRACE=false
52457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52458$as_echo "no, non-open linux build" >&6; }
52459    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52460      INCLUDE_DTRACE=false
52461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52462$as_echo "no, missing dependencies" >&6; }
52463    else
52464      INCLUDE_DTRACE=true
52465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52466$as_echo "yes, dependencies present" >&6; }
52467    fi
52468  else
52469    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52470  fi
52471
52472
52473
52474  # The user can in some cases supply additional jvm features. For the custom
52475  # variant, this defines the entire variant.
52476
52477# Check whether --with-jvm-features was given.
52478if test "${with_jvm_features+set}" = set; then :
52479  withval=$with_jvm_features;
52480fi
52481
52482  if test "x$with_jvm_features" != x; then
52483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52484$as_echo_n "checking additional JVM features... " >&6; }
52485    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52487$as_echo "$JVM_FEATURES" >&6; }
52488  fi
52489
52490  # Verify that dependencies are met for explicitly set features.
52491  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52492    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52493  fi
52494
52495  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52496    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52497  fi
52498
52499  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52500    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52501  fi
52502
52503  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52504    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52505  fi
52506
52507  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52508    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52509  fi
52510
52511  # Turn on additional features based on other parts of configure
52512  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52513    JVM_FEATURES="$JVM_FEATURES dtrace"
52514  else
52515    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52516      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52517    fi
52518  fi
52519
52520  if test "x$STATIC_BUILD" = "xtrue"; then
52521    JVM_FEATURES="$JVM_FEATURES static-build"
52522  else
52523    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52524      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52525    fi
52526  fi
52527
52528  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52529    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52530      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52531    fi
52532  fi
52533
52534  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52535    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52536      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52537    fi
52538  fi
52539
52540  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52541  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52542      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52543      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52544    JVM_FEATURES_jvmci="jvmci"
52545  else
52546    JVM_FEATURES_jvmci=""
52547  fi
52548
52549  # All variants but minimal (and custom) get these features
52550  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52551
52552  # Enable features depending on variant.
52553  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52554  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52555  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52556  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52557  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52558  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52559  JVM_FEATURES_custom="$JVM_FEATURES"
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569  # Used for verification of Makefiles by check-jvm-feature
52570
52571
52572  # We don't support --with-jvm-interpreter anymore, use zero instead.
52573
52574
52575# Check whether --with-jvm-interpreter was given.
52576if test "${with_jvm_interpreter+set}" = set; then :
52577  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52578$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52579fi
52580
52581
52582
52583
52584###############################################################################
52585#
52586# Check dependencies for external and internal libraries.
52587#
52588###############################################################################
52589
52590# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52591
52592  # When using cygwin or msys, we need a wrapper binary that renames
52593  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52594  # @files and rewrites these too! This wrapper binary is
52595  # called fixpath.
52596  FIXPATH=
52597  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52599$as_echo_n "checking if fixpath can be created... " >&6; }
52600    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52601    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52602    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52603    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52604      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52605      FIXPATH="$FIXPATH_BIN -c"
52606    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52607      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52608      # @ was chosen as separator to minimize risk of other tools messing around with it
52609      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52610          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52611      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52612      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52613    fi
52614    FIXPATH_SRC_W="$FIXPATH_SRC"
52615    FIXPATH_BIN_W="$FIXPATH_BIN"
52616
52617  unix_path="$FIXPATH_SRC_W"
52618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52619    windows_path=`$CYGPATH -m "$unix_path"`
52620    FIXPATH_SRC_W="$windows_path"
52621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52622    windows_path=`cmd //c echo $unix_path`
52623    FIXPATH_SRC_W="$windows_path"
52624  fi
52625
52626
52627  unix_path="$FIXPATH_BIN_W"
52628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52629    windows_path=`$CYGPATH -m "$unix_path"`
52630    FIXPATH_BIN_W="$windows_path"
52631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52632    windows_path=`cmd //c echo $unix_path`
52633    FIXPATH_BIN_W="$windows_path"
52634  fi
52635
52636    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52637    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52638    cd $FIXPATH_DIR
52639    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52640    cd $CURDIR
52641
52642    if test ! -x $FIXPATH_BIN; then
52643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52644$as_echo "no" >&6; }
52645      cat $FIXPATH_DIR/fixpath1.log
52646      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52647    fi
52648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52649$as_echo "yes" >&6; }
52650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52651$as_echo_n "checking if fixpath.exe works... " >&6; }
52652    cd $FIXPATH_DIR
52653    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52654        > $FIXPATH_DIR/fixpath2.log 2>&1
52655    cd $CURDIR
52656    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52658$as_echo "no" >&6; }
52659      cat $FIXPATH_DIR/fixpath2.log
52660      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52661    fi
52662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52663$as_echo "yes" >&6; }
52664
52665    FIXPATH_DETACH_FLAG="--detach"
52666  fi
52667
52668
52669
52670
52671
52672
52673  # Check if X11 is needed
52674  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52675    # No X11 support on windows or macosx
52676    NEEDS_LIB_X11=false
52677  else
52678    if test "x$SUPPORT_HEADFUL" = xno; then
52679      # No X11 support if building headless-only
52680      NEEDS_LIB_X11=false
52681    else
52682      # All other instances need X11
52683      NEEDS_LIB_X11=true
52684    fi
52685  fi
52686
52687  # Check if cups is needed
52688  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52689    # Windows have a separate print system
52690    NEEDS_LIB_CUPS=false
52691  else
52692    NEEDS_LIB_CUPS=true
52693  fi
52694
52695  # Check if freetype is needed
52696  if test "x$OPENJDK" = "xtrue"; then
52697    NEEDS_LIB_FREETYPE=true
52698  else
52699    NEEDS_LIB_FREETYPE=false
52700  fi
52701
52702  # Check if alsa is needed
52703  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52704    NEEDS_LIB_ALSA=true
52705  else
52706    NEEDS_LIB_ALSA=false
52707  fi
52708
52709  # Check if ffi is needed
52710  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52711    NEEDS_LIB_FFI=true
52712  else
52713    NEEDS_LIB_FFI=false
52714  fi
52715
52716
52717  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52718  # dynamic build is configured on command line.
52719
52720# Check whether --with-stdc++lib was given.
52721if test "${with_stdc__lib+set}" = set; then :
52722  withval=$with_stdc__lib;
52723        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52724                && test "x$with_stdc__lib" != xdefault; then
52725          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52726        fi
52727
52728else
52729  with_stdc__lib=default
52730
52731fi
52732
52733
52734  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52735    # Test if -lstdc++ works.
52736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52737$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52738    ac_ext=cpp
52739ac_cpp='$CXXCPP $CPPFLAGS'
52740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52743
52744    OLD_CXXFLAGS="$CXXFLAGS"
52745    CXXFLAGS="$CXXFLAGS -lstdc++"
52746    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52747/* end confdefs.h.  */
52748
52749int
52750main ()
52751{
52752return 0;
52753  ;
52754  return 0;
52755}
52756_ACEOF
52757if ac_fn_cxx_try_link "$LINENO"; then :
52758  has_dynamic_libstdcxx=yes
52759else
52760  has_dynamic_libstdcxx=no
52761fi
52762rm -f core conftest.err conftest.$ac_objext \
52763    conftest$ac_exeext conftest.$ac_ext
52764    CXXFLAGS="$OLD_CXXFLAGS"
52765    ac_ext=cpp
52766ac_cpp='$CXXCPP $CPPFLAGS'
52767ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52768ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52769ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52770
52771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52772$as_echo "$has_dynamic_libstdcxx" >&6; }
52773
52774    # Test if stdc++ can be linked statically.
52775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52776$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52777    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52778    ac_ext=cpp
52779ac_cpp='$CXXCPP $CPPFLAGS'
52780ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52781ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52782ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52783
52784    OLD_LIBS="$LIBS"
52785    OLD_CXX="$CXX"
52786    LIBS="$STATIC_STDCXX_FLAGS"
52787    CXX="$CC"
52788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52789/* end confdefs.h.  */
52790
52791int
52792main ()
52793{
52794return 0;
52795  ;
52796  return 0;
52797}
52798_ACEOF
52799if ac_fn_cxx_try_link "$LINENO"; then :
52800  has_static_libstdcxx=yes
52801else
52802  has_static_libstdcxx=no
52803fi
52804rm -f core conftest.err conftest.$ac_objext \
52805    conftest$ac_exeext conftest.$ac_ext
52806    LIBS="$OLD_LIBS"
52807    CXX="$OLD_CXX"
52808    ac_ext=cpp
52809ac_cpp='$CXXCPP $CPPFLAGS'
52810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52813
52814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52815$as_echo "$has_static_libstdcxx" >&6; }
52816
52817    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52818      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52819    fi
52820
52821    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52822      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52823    fi
52824
52825    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52826      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52827    fi
52828
52829    # If dynamic was requested, it's available since it would fail above otherwise.
52830    # If dynamic wasn't requested, go with static unless it isn't available.
52831    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52832$as_echo_n "checking how to link with libstdc++... " >&6; }
52833    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52834      LIBCXX="$LIBCXX -lstdc++"
52835      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52836      JVM_LIBS="-lstdc++ $JVM_LIBS"
52837      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52838      # just use the same setting as for the TARGET toolchain.
52839      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52840      LDCXX="$CXX"
52841      STATIC_CXX_SETTING="STATIC_CXX=false"
52842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52843$as_echo "dynamic" >&6; }
52844    else
52845      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52846      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52847      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52848      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52849      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52850      # just use the same setting as for the TARGET toolchain.
52851      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52852      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52853      LDCXX="$CC"
52854      STATIC_CXX_SETTING="STATIC_CXX=true"
52855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52856$as_echo "static" >&6; }
52857    fi
52858  fi
52859
52860
52861  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52862  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52863    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52864  fi
52865
52866  # TODO better (platform agnostic) test
52867  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52868    LIBCXX="-lstdc++"
52869  fi
52870
52871
52872  # Setup Windows runtime dlls
52873  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52874
52875
52876# Check whether --with-msvcr-dll was given.
52877if test "${with_msvcr_dll+set}" = set; then :
52878  withval=$with_msvcr_dll;
52879fi
52880
52881
52882  if test "x$with_msvcr_dll" != x; then
52883    # If given explicitely by user, do not probe. If not present, fail directly.
52884
52885  DLL_NAME="$MSVCR_NAME"
52886  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52887  METHOD="--with-msvcr-dll"
52888  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52889    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52890$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52891
52892    # Need to check if the found msvcr is correct architecture
52893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52894$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52895    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52897      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52898      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52899      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52900        CORRECT_MSVCR_ARCH="PE32 executable"
52901      else
52902        CORRECT_MSVCR_ARCH="PE32+ executable"
52903      fi
52904    else
52905      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52906        CORRECT_MSVCR_ARCH=386
52907      else
52908        CORRECT_MSVCR_ARCH=x86-64
52909      fi
52910    fi
52911    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52913$as_echo "ok" >&6; }
52914      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52915
52916  # Only process if variable expands to non-empty
52917
52918  if test "x$MSVC_DLL" != x; then
52919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52920
52921  # Input might be given as Windows format, start by converting to
52922  # unix format.
52923  path="$MSVC_DLL"
52924  new_path=`$CYGPATH -u "$path"`
52925
52926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52929  # "foo.exe" is OK but "foo" is an error.
52930  #
52931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52932  # It is also a way to make sure we got the proper file name for the real test later on.
52933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52934  if test "x$test_shortpath" = x; then
52935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52936$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52937    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52938  fi
52939
52940  # Call helper function which possibly converts this using DOS-style short mode.
52941  # If so, the updated path is stored in $new_path.
52942
52943  input_path="$new_path"
52944  # Check if we need to convert this using DOS-style short mode. If the path
52945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52946  # take no chances and rewrite it.
52947  # Note: m4 eats our [], so we need to use [ and ] instead.
52948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52949  if test "x$has_forbidden_chars" != x; then
52950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52954      # Going to short mode and back again did indeed matter. Since short mode is
52955      # case insensitive, let's make it lowercase to improve readability.
52956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52957      # Now convert it back to Unix-style (cygpath)
52958      input_path=`$CYGPATH -u "$shortmode_path"`
52959      new_path="$input_path"
52960    fi
52961  fi
52962
52963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52964  if test "x$test_cygdrive_prefix" = x; then
52965    # As a simple fix, exclude /usr/bin since it's not a real path.
52966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52968      # a path prefixed by /cygdrive for fixpath to work.
52969      new_path="$CYGWIN_ROOT_PATH$input_path"
52970    fi
52971  fi
52972
52973
52974  if test "x$path" != "x$new_path"; then
52975    MSVC_DLL="$new_path"
52976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52977$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52978  fi
52979
52980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52981
52982  path="$MSVC_DLL"
52983  has_colon=`$ECHO $path | $GREP ^.:`
52984  new_path="$path"
52985  if test "x$has_colon" = x; then
52986    # Not in mixed or Windows style, start by that.
52987    new_path=`cmd //c echo $path`
52988  fi
52989
52990
52991  input_path="$new_path"
52992  # Check if we need to convert this using DOS-style short mode. If the path
52993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52994  # take no chances and rewrite it.
52995  # Note: m4 eats our [], so we need to use [ and ] instead.
52996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52997  if test "x$has_forbidden_chars" != x; then
52998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53000  fi
53001
53002
53003  windows_path="$new_path"
53004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53005    unix_path=`$CYGPATH -u "$windows_path"`
53006    new_path="$unix_path"
53007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53009    new_path="$unix_path"
53010  fi
53011
53012  if test "x$path" != "x$new_path"; then
53013    MSVC_DLL="$new_path"
53014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53015$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53016  fi
53017
53018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53020
53021    else
53022      # We're on a unix platform. Hooray! :)
53023      path="$MSVC_DLL"
53024      has_space=`$ECHO "$path" | $GREP " "`
53025      if test "x$has_space" != x; then
53026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53027$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53028        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53029      fi
53030
53031      # Use eval to expand a potential ~
53032      eval path="$path"
53033      if test ! -f "$path" && test ! -d "$path"; then
53034        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53035      fi
53036
53037      if test -d "$path"; then
53038        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53039      else
53040        dir="`$DIRNAME "$path"`"
53041        base="`$BASENAME "$path"`"
53042        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53043      fi
53044    fi
53045  fi
53046
53047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53048$as_echo_n "checking for $DLL_NAME... " >&6; }
53049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53050$as_echo "$MSVC_DLL" >&6; }
53051    else
53052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53053$as_echo "incorrect, ignoring" >&6; }
53054      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53055$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53056    fi
53057  fi
53058
53059    if test "x$MSVC_DLL" = x; then
53060      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53061    fi
53062    MSVCR_DLL="$MSVC_DLL"
53063  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53064
53065  DLL_NAME="$MSVCR_NAME"
53066  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53067  METHOD="devkit"
53068  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53069    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53070$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53071
53072    # Need to check if the found msvcr is correct architecture
53073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53074$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53075    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53076    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53077      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53078      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53079      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53080        CORRECT_MSVCR_ARCH="PE32 executable"
53081      else
53082        CORRECT_MSVCR_ARCH="PE32+ executable"
53083      fi
53084    else
53085      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53086        CORRECT_MSVCR_ARCH=386
53087      else
53088        CORRECT_MSVCR_ARCH=x86-64
53089      fi
53090    fi
53091    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53093$as_echo "ok" >&6; }
53094      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53095
53096  # Only process if variable expands to non-empty
53097
53098  if test "x$MSVC_DLL" != x; then
53099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53100
53101  # Input might be given as Windows format, start by converting to
53102  # unix format.
53103  path="$MSVC_DLL"
53104  new_path=`$CYGPATH -u "$path"`
53105
53106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53109  # "foo.exe" is OK but "foo" is an error.
53110  #
53111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53112  # It is also a way to make sure we got the proper file name for the real test later on.
53113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53114  if test "x$test_shortpath" = x; then
53115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53116$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53117    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53118  fi
53119
53120  # Call helper function which possibly converts this using DOS-style short mode.
53121  # If so, the updated path is stored in $new_path.
53122
53123  input_path="$new_path"
53124  # Check if we need to convert this using DOS-style short mode. If the path
53125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53126  # take no chances and rewrite it.
53127  # Note: m4 eats our [], so we need to use [ and ] instead.
53128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53129  if test "x$has_forbidden_chars" != x; then
53130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53134      # Going to short mode and back again did indeed matter. Since short mode is
53135      # case insensitive, let's make it lowercase to improve readability.
53136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53137      # Now convert it back to Unix-style (cygpath)
53138      input_path=`$CYGPATH -u "$shortmode_path"`
53139      new_path="$input_path"
53140    fi
53141  fi
53142
53143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53144  if test "x$test_cygdrive_prefix" = x; then
53145    # As a simple fix, exclude /usr/bin since it's not a real path.
53146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53148      # a path prefixed by /cygdrive for fixpath to work.
53149      new_path="$CYGWIN_ROOT_PATH$input_path"
53150    fi
53151  fi
53152
53153
53154  if test "x$path" != "x$new_path"; then
53155    MSVC_DLL="$new_path"
53156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53157$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53158  fi
53159
53160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53161
53162  path="$MSVC_DLL"
53163  has_colon=`$ECHO $path | $GREP ^.:`
53164  new_path="$path"
53165  if test "x$has_colon" = x; then
53166    # Not in mixed or Windows style, start by that.
53167    new_path=`cmd //c echo $path`
53168  fi
53169
53170
53171  input_path="$new_path"
53172  # Check if we need to convert this using DOS-style short mode. If the path
53173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53174  # take no chances and rewrite it.
53175  # Note: m4 eats our [], so we need to use [ and ] instead.
53176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53177  if test "x$has_forbidden_chars" != x; then
53178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53180  fi
53181
53182
53183  windows_path="$new_path"
53184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53185    unix_path=`$CYGPATH -u "$windows_path"`
53186    new_path="$unix_path"
53187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53189    new_path="$unix_path"
53190  fi
53191
53192  if test "x$path" != "x$new_path"; then
53193    MSVC_DLL="$new_path"
53194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53196  fi
53197
53198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53200
53201    else
53202      # We're on a unix platform. Hooray! :)
53203      path="$MSVC_DLL"
53204      has_space=`$ECHO "$path" | $GREP " "`
53205      if test "x$has_space" != x; then
53206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53207$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53209      fi
53210
53211      # Use eval to expand a potential ~
53212      eval path="$path"
53213      if test ! -f "$path" && test ! -d "$path"; then
53214        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53215      fi
53216
53217      if test -d "$path"; then
53218        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53219      else
53220        dir="`$DIRNAME "$path"`"
53221        base="`$BASENAME "$path"`"
53222        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53223      fi
53224    fi
53225  fi
53226
53227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53228$as_echo_n "checking for $DLL_NAME... " >&6; }
53229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53230$as_echo "$MSVC_DLL" >&6; }
53231    else
53232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53233$as_echo "incorrect, ignoring" >&6; }
53234      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53235$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53236    fi
53237  fi
53238
53239    if test "x$MSVC_DLL" = x; then
53240      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53241    fi
53242    MSVCR_DLL="$MSVC_DLL"
53243  else
53244
53245  DLL_NAME="${MSVCR_NAME}"
53246  MSVC_DLL=
53247
53248  if test "x$MSVC_DLL" = x; then
53249    # Probe: Using well-known location from Visual Studio 10.0
53250    if test "x$VCINSTALLDIR" != x; then
53251      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53252
53253  windows_path="$CYGWIN_VC_INSTALL_DIR"
53254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53255    unix_path=`$CYGPATH -u "$windows_path"`
53256    CYGWIN_VC_INSTALL_DIR="$unix_path"
53257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53259    CYGWIN_VC_INSTALL_DIR="$unix_path"
53260  fi
53261
53262      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53263        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53264      else
53265        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53266      fi
53267      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53268
53269  DLL_NAME="$DLL_NAME"
53270  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53271  METHOD="well-known location in VCINSTALLDIR"
53272  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53273    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53274$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53275
53276    # Need to check if the found msvcr is correct architecture
53277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53278$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53279    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53281      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53282      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53283      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53284        CORRECT_MSVCR_ARCH="PE32 executable"
53285      else
53286        CORRECT_MSVCR_ARCH="PE32+ executable"
53287      fi
53288    else
53289      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53290        CORRECT_MSVCR_ARCH=386
53291      else
53292        CORRECT_MSVCR_ARCH=x86-64
53293      fi
53294    fi
53295    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53297$as_echo "ok" >&6; }
53298      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53299
53300  # Only process if variable expands to non-empty
53301
53302  if test "x$MSVC_DLL" != x; then
53303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53304
53305  # Input might be given as Windows format, start by converting to
53306  # unix format.
53307  path="$MSVC_DLL"
53308  new_path=`$CYGPATH -u "$path"`
53309
53310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53313  # "foo.exe" is OK but "foo" is an error.
53314  #
53315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53316  # It is also a way to make sure we got the proper file name for the real test later on.
53317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53318  if test "x$test_shortpath" = x; then
53319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53320$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53321    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53322  fi
53323
53324  # Call helper function which possibly converts this using DOS-style short mode.
53325  # If so, the updated path is stored in $new_path.
53326
53327  input_path="$new_path"
53328  # Check if we need to convert this using DOS-style short mode. If the path
53329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53330  # take no chances and rewrite it.
53331  # Note: m4 eats our [], so we need to use [ and ] instead.
53332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53333  if test "x$has_forbidden_chars" != x; then
53334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53338      # Going to short mode and back again did indeed matter. Since short mode is
53339      # case insensitive, let's make it lowercase to improve readability.
53340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53341      # Now convert it back to Unix-style (cygpath)
53342      input_path=`$CYGPATH -u "$shortmode_path"`
53343      new_path="$input_path"
53344    fi
53345  fi
53346
53347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53348  if test "x$test_cygdrive_prefix" = x; then
53349    # As a simple fix, exclude /usr/bin since it's not a real path.
53350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53352      # a path prefixed by /cygdrive for fixpath to work.
53353      new_path="$CYGWIN_ROOT_PATH$input_path"
53354    fi
53355  fi
53356
53357
53358  if test "x$path" != "x$new_path"; then
53359    MSVC_DLL="$new_path"
53360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53361$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53362  fi
53363
53364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53365
53366  path="$MSVC_DLL"
53367  has_colon=`$ECHO $path | $GREP ^.:`
53368  new_path="$path"
53369  if test "x$has_colon" = x; then
53370    # Not in mixed or Windows style, start by that.
53371    new_path=`cmd //c echo $path`
53372  fi
53373
53374
53375  input_path="$new_path"
53376  # Check if we need to convert this using DOS-style short mode. If the path
53377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53378  # take no chances and rewrite it.
53379  # Note: m4 eats our [], so we need to use [ and ] instead.
53380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53381  if test "x$has_forbidden_chars" != x; then
53382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53384  fi
53385
53386
53387  windows_path="$new_path"
53388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53389    unix_path=`$CYGPATH -u "$windows_path"`
53390    new_path="$unix_path"
53391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53393    new_path="$unix_path"
53394  fi
53395
53396  if test "x$path" != "x$new_path"; then
53397    MSVC_DLL="$new_path"
53398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53399$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53400  fi
53401
53402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53404
53405    else
53406      # We're on a unix platform. Hooray! :)
53407      path="$MSVC_DLL"
53408      has_space=`$ECHO "$path" | $GREP " "`
53409      if test "x$has_space" != x; then
53410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53411$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53413      fi
53414
53415      # Use eval to expand a potential ~
53416      eval path="$path"
53417      if test ! -f "$path" && test ! -d "$path"; then
53418        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53419      fi
53420
53421      if test -d "$path"; then
53422        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53423      else
53424        dir="`$DIRNAME "$path"`"
53425        base="`$BASENAME "$path"`"
53426        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53427      fi
53428    fi
53429  fi
53430
53431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53432$as_echo_n "checking for $DLL_NAME... " >&6; }
53433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53434$as_echo "$MSVC_DLL" >&6; }
53435    else
53436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53437$as_echo "incorrect, ignoring" >&6; }
53438      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53439$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53440    fi
53441  fi
53442
53443    fi
53444  fi
53445
53446  if test "x$MSVC_DLL" = x; then
53447    # Probe: Check in the Boot JDK directory.
53448    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53449
53450  DLL_NAME="$DLL_NAME"
53451  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53452  METHOD="well-known location in Boot JDK"
53453  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53454    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53455$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53456
53457    # Need to check if the found msvcr is correct architecture
53458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53459$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53460    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53461    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53462      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53463      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53464      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53465        CORRECT_MSVCR_ARCH="PE32 executable"
53466      else
53467        CORRECT_MSVCR_ARCH="PE32+ executable"
53468      fi
53469    else
53470      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53471        CORRECT_MSVCR_ARCH=386
53472      else
53473        CORRECT_MSVCR_ARCH=x86-64
53474      fi
53475    fi
53476    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53478$as_echo "ok" >&6; }
53479      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53480
53481  # Only process if variable expands to non-empty
53482
53483  if test "x$MSVC_DLL" != x; then
53484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53485
53486  # Input might be given as Windows format, start by converting to
53487  # unix format.
53488  path="$MSVC_DLL"
53489  new_path=`$CYGPATH -u "$path"`
53490
53491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53494  # "foo.exe" is OK but "foo" is an error.
53495  #
53496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53497  # It is also a way to make sure we got the proper file name for the real test later on.
53498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53499  if test "x$test_shortpath" = x; then
53500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53501$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53502    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53503  fi
53504
53505  # Call helper function which possibly converts this using DOS-style short mode.
53506  # If so, the updated path is stored in $new_path.
53507
53508  input_path="$new_path"
53509  # Check if we need to convert this using DOS-style short mode. If the path
53510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53511  # take no chances and rewrite it.
53512  # Note: m4 eats our [], so we need to use [ and ] instead.
53513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53514  if test "x$has_forbidden_chars" != x; then
53515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53519      # Going to short mode and back again did indeed matter. Since short mode is
53520      # case insensitive, let's make it lowercase to improve readability.
53521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53522      # Now convert it back to Unix-style (cygpath)
53523      input_path=`$CYGPATH -u "$shortmode_path"`
53524      new_path="$input_path"
53525    fi
53526  fi
53527
53528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53529  if test "x$test_cygdrive_prefix" = x; then
53530    # As a simple fix, exclude /usr/bin since it's not a real path.
53531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53533      # a path prefixed by /cygdrive for fixpath to work.
53534      new_path="$CYGWIN_ROOT_PATH$input_path"
53535    fi
53536  fi
53537
53538
53539  if test "x$path" != "x$new_path"; then
53540    MSVC_DLL="$new_path"
53541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53542$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53543  fi
53544
53545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53546
53547  path="$MSVC_DLL"
53548  has_colon=`$ECHO $path | $GREP ^.:`
53549  new_path="$path"
53550  if test "x$has_colon" = x; then
53551    # Not in mixed or Windows style, start by that.
53552    new_path=`cmd //c echo $path`
53553  fi
53554
53555
53556  input_path="$new_path"
53557  # Check if we need to convert this using DOS-style short mode. If the path
53558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53559  # take no chances and rewrite it.
53560  # Note: m4 eats our [], so we need to use [ and ] instead.
53561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53562  if test "x$has_forbidden_chars" != x; then
53563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53565  fi
53566
53567
53568  windows_path="$new_path"
53569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53570    unix_path=`$CYGPATH -u "$windows_path"`
53571    new_path="$unix_path"
53572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53574    new_path="$unix_path"
53575  fi
53576
53577  if test "x$path" != "x$new_path"; then
53578    MSVC_DLL="$new_path"
53579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53580$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53581  fi
53582
53583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53585
53586    else
53587      # We're on a unix platform. Hooray! :)
53588      path="$MSVC_DLL"
53589      has_space=`$ECHO "$path" | $GREP " "`
53590      if test "x$has_space" != x; then
53591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53592$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53594      fi
53595
53596      # Use eval to expand a potential ~
53597      eval path="$path"
53598      if test ! -f "$path" && test ! -d "$path"; then
53599        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53600      fi
53601
53602      if test -d "$path"; then
53603        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53604      else
53605        dir="`$DIRNAME "$path"`"
53606        base="`$BASENAME "$path"`"
53607        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53608      fi
53609    fi
53610  fi
53611
53612      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53613$as_echo_n "checking for $DLL_NAME... " >&6; }
53614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53615$as_echo "$MSVC_DLL" >&6; }
53616    else
53617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53618$as_echo "incorrect, ignoring" >&6; }
53619      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53620$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53621    fi
53622  fi
53623
53624  fi
53625
53626  if test "x$MSVC_DLL" = x; then
53627    # Probe: Look in the Windows system32 directory
53628    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53629
53630  windows_path="$CYGWIN_SYSTEMROOT"
53631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53632    unix_path=`$CYGPATH -u "$windows_path"`
53633    CYGWIN_SYSTEMROOT="$unix_path"
53634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53636    CYGWIN_SYSTEMROOT="$unix_path"
53637  fi
53638
53639    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53640
53641  DLL_NAME="$DLL_NAME"
53642  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53643  METHOD="well-known location in SYSTEMROOT"
53644  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53646$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53647
53648    # Need to check if the found msvcr is correct architecture
53649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53650$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53651    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53653      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53654      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53655      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53656        CORRECT_MSVCR_ARCH="PE32 executable"
53657      else
53658        CORRECT_MSVCR_ARCH="PE32+ executable"
53659      fi
53660    else
53661      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53662        CORRECT_MSVCR_ARCH=386
53663      else
53664        CORRECT_MSVCR_ARCH=x86-64
53665      fi
53666    fi
53667    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53668      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53669$as_echo "ok" >&6; }
53670      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53671
53672  # Only process if variable expands to non-empty
53673
53674  if test "x$MSVC_DLL" != x; then
53675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53676
53677  # Input might be given as Windows format, start by converting to
53678  # unix format.
53679  path="$MSVC_DLL"
53680  new_path=`$CYGPATH -u "$path"`
53681
53682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53685  # "foo.exe" is OK but "foo" is an error.
53686  #
53687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53688  # It is also a way to make sure we got the proper file name for the real test later on.
53689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53690  if test "x$test_shortpath" = x; then
53691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53692$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53693    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53694  fi
53695
53696  # Call helper function which possibly converts this using DOS-style short mode.
53697  # If so, the updated path is stored in $new_path.
53698
53699  input_path="$new_path"
53700  # Check if we need to convert this using DOS-style short mode. If the path
53701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53702  # take no chances and rewrite it.
53703  # Note: m4 eats our [], so we need to use [ and ] instead.
53704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53705  if test "x$has_forbidden_chars" != x; then
53706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53710      # Going to short mode and back again did indeed matter. Since short mode is
53711      # case insensitive, let's make it lowercase to improve readability.
53712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53713      # Now convert it back to Unix-style (cygpath)
53714      input_path=`$CYGPATH -u "$shortmode_path"`
53715      new_path="$input_path"
53716    fi
53717  fi
53718
53719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53720  if test "x$test_cygdrive_prefix" = x; then
53721    # As a simple fix, exclude /usr/bin since it's not a real path.
53722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53724      # a path prefixed by /cygdrive for fixpath to work.
53725      new_path="$CYGWIN_ROOT_PATH$input_path"
53726    fi
53727  fi
53728
53729
53730  if test "x$path" != "x$new_path"; then
53731    MSVC_DLL="$new_path"
53732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53733$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53734  fi
53735
53736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53737
53738  path="$MSVC_DLL"
53739  has_colon=`$ECHO $path | $GREP ^.:`
53740  new_path="$path"
53741  if test "x$has_colon" = x; then
53742    # Not in mixed or Windows style, start by that.
53743    new_path=`cmd //c echo $path`
53744  fi
53745
53746
53747  input_path="$new_path"
53748  # Check if we need to convert this using DOS-style short mode. If the path
53749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53750  # take no chances and rewrite it.
53751  # Note: m4 eats our [], so we need to use [ and ] instead.
53752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53753  if test "x$has_forbidden_chars" != x; then
53754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53756  fi
53757
53758
53759  windows_path="$new_path"
53760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53761    unix_path=`$CYGPATH -u "$windows_path"`
53762    new_path="$unix_path"
53763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53765    new_path="$unix_path"
53766  fi
53767
53768  if test "x$path" != "x$new_path"; then
53769    MSVC_DLL="$new_path"
53770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53771$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53772  fi
53773
53774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53776
53777    else
53778      # We're on a unix platform. Hooray! :)
53779      path="$MSVC_DLL"
53780      has_space=`$ECHO "$path" | $GREP " "`
53781      if test "x$has_space" != x; then
53782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53783$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53785      fi
53786
53787      # Use eval to expand a potential ~
53788      eval path="$path"
53789      if test ! -f "$path" && test ! -d "$path"; then
53790        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53791      fi
53792
53793      if test -d "$path"; then
53794        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53795      else
53796        dir="`$DIRNAME "$path"`"
53797        base="`$BASENAME "$path"`"
53798        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53799      fi
53800    fi
53801  fi
53802
53803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53804$as_echo_n "checking for $DLL_NAME... " >&6; }
53805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53806$as_echo "$MSVC_DLL" >&6; }
53807    else
53808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53809$as_echo "incorrect, ignoring" >&6; }
53810      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53811$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53812    fi
53813  fi
53814
53815  fi
53816
53817  if test "x$MSVC_DLL" = x; then
53818    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53819    if test "x$VS100COMNTOOLS" != x; then
53820      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53821
53822  windows_path="$CYGWIN_VS_TOOLS_DIR"
53823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53824    unix_path=`$CYGPATH -u "$windows_path"`
53825    CYGWIN_VS_TOOLS_DIR="$unix_path"
53826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53828    CYGWIN_VS_TOOLS_DIR="$unix_path"
53829  fi
53830
53831      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53832        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53833	    | $GREP -i /x64/ | $HEAD --lines 1`
53834      else
53835        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53836	    | $GREP -i /x86/ | $HEAD --lines 1`
53837      fi
53838
53839  DLL_NAME="$DLL_NAME"
53840  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53841  METHOD="search of VS100COMNTOOLS"
53842  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53843    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53844$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53845
53846    # Need to check if the found msvcr is correct architecture
53847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53848$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53849    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53851      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53852      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53853      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53854        CORRECT_MSVCR_ARCH="PE32 executable"
53855      else
53856        CORRECT_MSVCR_ARCH="PE32+ executable"
53857      fi
53858    else
53859      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53860        CORRECT_MSVCR_ARCH=386
53861      else
53862        CORRECT_MSVCR_ARCH=x86-64
53863      fi
53864    fi
53865    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53867$as_echo "ok" >&6; }
53868      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53869
53870  # Only process if variable expands to non-empty
53871
53872  if test "x$MSVC_DLL" != x; then
53873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53874
53875  # Input might be given as Windows format, start by converting to
53876  # unix format.
53877  path="$MSVC_DLL"
53878  new_path=`$CYGPATH -u "$path"`
53879
53880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53883  # "foo.exe" is OK but "foo" is an error.
53884  #
53885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53886  # It is also a way to make sure we got the proper file name for the real test later on.
53887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53888  if test "x$test_shortpath" = x; then
53889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53890$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53891    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53892  fi
53893
53894  # Call helper function which possibly converts this using DOS-style short mode.
53895  # If so, the updated path is stored in $new_path.
53896
53897  input_path="$new_path"
53898  # Check if we need to convert this using DOS-style short mode. If the path
53899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53900  # take no chances and rewrite it.
53901  # Note: m4 eats our [], so we need to use [ and ] instead.
53902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53903  if test "x$has_forbidden_chars" != x; then
53904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53908      # Going to short mode and back again did indeed matter. Since short mode is
53909      # case insensitive, let's make it lowercase to improve readability.
53910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53911      # Now convert it back to Unix-style (cygpath)
53912      input_path=`$CYGPATH -u "$shortmode_path"`
53913      new_path="$input_path"
53914    fi
53915  fi
53916
53917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53918  if test "x$test_cygdrive_prefix" = x; then
53919    # As a simple fix, exclude /usr/bin since it's not a real path.
53920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53922      # a path prefixed by /cygdrive for fixpath to work.
53923      new_path="$CYGWIN_ROOT_PATH$input_path"
53924    fi
53925  fi
53926
53927
53928  if test "x$path" != "x$new_path"; then
53929    MSVC_DLL="$new_path"
53930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53931$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53932  fi
53933
53934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53935
53936  path="$MSVC_DLL"
53937  has_colon=`$ECHO $path | $GREP ^.:`
53938  new_path="$path"
53939  if test "x$has_colon" = x; then
53940    # Not in mixed or Windows style, start by that.
53941    new_path=`cmd //c echo $path`
53942  fi
53943
53944
53945  input_path="$new_path"
53946  # Check if we need to convert this using DOS-style short mode. If the path
53947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53948  # take no chances and rewrite it.
53949  # Note: m4 eats our [], so we need to use [ and ] instead.
53950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53951  if test "x$has_forbidden_chars" != x; then
53952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53954  fi
53955
53956
53957  windows_path="$new_path"
53958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53959    unix_path=`$CYGPATH -u "$windows_path"`
53960    new_path="$unix_path"
53961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53963    new_path="$unix_path"
53964  fi
53965
53966  if test "x$path" != "x$new_path"; then
53967    MSVC_DLL="$new_path"
53968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53969$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53970  fi
53971
53972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53974
53975    else
53976      # We're on a unix platform. Hooray! :)
53977      path="$MSVC_DLL"
53978      has_space=`$ECHO "$path" | $GREP " "`
53979      if test "x$has_space" != x; then
53980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53981$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53983      fi
53984
53985      # Use eval to expand a potential ~
53986      eval path="$path"
53987      if test ! -f "$path" && test ! -d "$path"; then
53988        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53989      fi
53990
53991      if test -d "$path"; then
53992        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53993      else
53994        dir="`$DIRNAME "$path"`"
53995        base="`$BASENAME "$path"`"
53996        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53997      fi
53998    fi
53999  fi
54000
54001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54002$as_echo_n "checking for $DLL_NAME... " >&6; }
54003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54004$as_echo "$MSVC_DLL" >&6; }
54005    else
54006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54007$as_echo "incorrect, ignoring" >&6; }
54008      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54009$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54010    fi
54011  fi
54012
54013    fi
54014  fi
54015
54016  if test "x$MSVC_DLL" = x; then
54017    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54018    # (This was the original behaviour; kept since it might turn something up)
54019    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54020      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54021        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54022	    | $GREP x64 | $HEAD --lines 1`
54023      else
54024        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54025	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54026        if test "x$POSSIBLE_MSVC_DLL" = x; then
54027          # We're grasping at straws now...
54028          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54029	      | $HEAD --lines 1`
54030        fi
54031      fi
54032
54033
54034  DLL_NAME="$DLL_NAME"
54035  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54036  METHOD="search of VCINSTALLDIR"
54037  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54038    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54039$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54040
54041    # Need to check if the found msvcr is correct architecture
54042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54043$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54044    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54046      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54047      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54048      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54049        CORRECT_MSVCR_ARCH="PE32 executable"
54050      else
54051        CORRECT_MSVCR_ARCH="PE32+ executable"
54052      fi
54053    else
54054      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54055        CORRECT_MSVCR_ARCH=386
54056      else
54057        CORRECT_MSVCR_ARCH=x86-64
54058      fi
54059    fi
54060    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54062$as_echo "ok" >&6; }
54063      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54064
54065  # Only process if variable expands to non-empty
54066
54067  if test "x$MSVC_DLL" != x; then
54068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54069
54070  # Input might be given as Windows format, start by converting to
54071  # unix format.
54072  path="$MSVC_DLL"
54073  new_path=`$CYGPATH -u "$path"`
54074
54075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54078  # "foo.exe" is OK but "foo" is an error.
54079  #
54080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54081  # It is also a way to make sure we got the proper file name for the real test later on.
54082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54083  if test "x$test_shortpath" = x; then
54084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54085$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54086    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54087  fi
54088
54089  # Call helper function which possibly converts this using DOS-style short mode.
54090  # If so, the updated path is stored in $new_path.
54091
54092  input_path="$new_path"
54093  # Check if we need to convert this using DOS-style short mode. If the path
54094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54095  # take no chances and rewrite it.
54096  # Note: m4 eats our [], so we need to use [ and ] instead.
54097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54098  if test "x$has_forbidden_chars" != x; then
54099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54103      # Going to short mode and back again did indeed matter. Since short mode is
54104      # case insensitive, let's make it lowercase to improve readability.
54105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54106      # Now convert it back to Unix-style (cygpath)
54107      input_path=`$CYGPATH -u "$shortmode_path"`
54108      new_path="$input_path"
54109    fi
54110  fi
54111
54112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54113  if test "x$test_cygdrive_prefix" = x; then
54114    # As a simple fix, exclude /usr/bin since it's not a real path.
54115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54117      # a path prefixed by /cygdrive for fixpath to work.
54118      new_path="$CYGWIN_ROOT_PATH$input_path"
54119    fi
54120  fi
54121
54122
54123  if test "x$path" != "x$new_path"; then
54124    MSVC_DLL="$new_path"
54125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54126$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54127  fi
54128
54129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54130
54131  path="$MSVC_DLL"
54132  has_colon=`$ECHO $path | $GREP ^.:`
54133  new_path="$path"
54134  if test "x$has_colon" = x; then
54135    # Not in mixed or Windows style, start by that.
54136    new_path=`cmd //c echo $path`
54137  fi
54138
54139
54140  input_path="$new_path"
54141  # Check if we need to convert this using DOS-style short mode. If the path
54142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54143  # take no chances and rewrite it.
54144  # Note: m4 eats our [], so we need to use [ and ] instead.
54145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54146  if test "x$has_forbidden_chars" != x; then
54147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54149  fi
54150
54151
54152  windows_path="$new_path"
54153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54154    unix_path=`$CYGPATH -u "$windows_path"`
54155    new_path="$unix_path"
54156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54158    new_path="$unix_path"
54159  fi
54160
54161  if test "x$path" != "x$new_path"; then
54162    MSVC_DLL="$new_path"
54163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54164$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54165  fi
54166
54167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54169
54170    else
54171      # We're on a unix platform. Hooray! :)
54172      path="$MSVC_DLL"
54173      has_space=`$ECHO "$path" | $GREP " "`
54174      if test "x$has_space" != x; then
54175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54176$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54178      fi
54179
54180      # Use eval to expand a potential ~
54181      eval path="$path"
54182      if test ! -f "$path" && test ! -d "$path"; then
54183        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54184      fi
54185
54186      if test -d "$path"; then
54187        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54188      else
54189        dir="`$DIRNAME "$path"`"
54190        base="`$BASENAME "$path"`"
54191        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54192      fi
54193    fi
54194  fi
54195
54196      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54197$as_echo_n "checking for $DLL_NAME... " >&6; }
54198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54199$as_echo "$MSVC_DLL" >&6; }
54200    else
54201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54202$as_echo "incorrect, ignoring" >&6; }
54203      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54204$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54205    fi
54206  fi
54207
54208    fi
54209  fi
54210
54211  if test "x$MSVC_DLL" = x; then
54212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54213$as_echo_n "checking for $DLL_NAME... " >&6; }
54214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54215$as_echo "no" >&6; }
54216    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54217  fi
54218
54219    MSVCR_DLL="$MSVC_DLL"
54220  fi
54221
54222
54223
54224# Check whether --with-msvcp-dll was given.
54225if test "${with_msvcp_dll+set}" = set; then :
54226  withval=$with_msvcp_dll;
54227fi
54228
54229
54230  if test "x$MSVCP_NAME" != "x"; then
54231    if test "x$with_msvcp_dll" != x; then
54232      # If given explicitely by user, do not probe. If not present, fail directly.
54233
54234  DLL_NAME="$MSVCP_NAME"
54235  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54236  METHOD="--with-msvcp-dll"
54237  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54238    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54239$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54240
54241    # Need to check if the found msvcr is correct architecture
54242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54243$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54244    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54246      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54247      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54248      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54249        CORRECT_MSVCR_ARCH="PE32 executable"
54250      else
54251        CORRECT_MSVCR_ARCH="PE32+ executable"
54252      fi
54253    else
54254      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54255        CORRECT_MSVCR_ARCH=386
54256      else
54257        CORRECT_MSVCR_ARCH=x86-64
54258      fi
54259    fi
54260    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54262$as_echo "ok" >&6; }
54263      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54264
54265  # Only process if variable expands to non-empty
54266
54267  if test "x$MSVC_DLL" != x; then
54268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54269
54270  # Input might be given as Windows format, start by converting to
54271  # unix format.
54272  path="$MSVC_DLL"
54273  new_path=`$CYGPATH -u "$path"`
54274
54275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54278  # "foo.exe" is OK but "foo" is an error.
54279  #
54280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54281  # It is also a way to make sure we got the proper file name for the real test later on.
54282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54283  if test "x$test_shortpath" = x; then
54284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54286    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54287  fi
54288
54289  # Call helper function which possibly converts this using DOS-style short mode.
54290  # If so, the updated path is stored in $new_path.
54291
54292  input_path="$new_path"
54293  # Check if we need to convert this using DOS-style short mode. If the path
54294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54295  # take no chances and rewrite it.
54296  # Note: m4 eats our [], so we need to use [ and ] instead.
54297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54298  if test "x$has_forbidden_chars" != x; then
54299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54303      # Going to short mode and back again did indeed matter. Since short mode is
54304      # case insensitive, let's make it lowercase to improve readability.
54305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54306      # Now convert it back to Unix-style (cygpath)
54307      input_path=`$CYGPATH -u "$shortmode_path"`
54308      new_path="$input_path"
54309    fi
54310  fi
54311
54312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54313  if test "x$test_cygdrive_prefix" = x; then
54314    # As a simple fix, exclude /usr/bin since it's not a real path.
54315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54317      # a path prefixed by /cygdrive for fixpath to work.
54318      new_path="$CYGWIN_ROOT_PATH$input_path"
54319    fi
54320  fi
54321
54322
54323  if test "x$path" != "x$new_path"; then
54324    MSVC_DLL="$new_path"
54325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54326$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54327  fi
54328
54329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54330
54331  path="$MSVC_DLL"
54332  has_colon=`$ECHO $path | $GREP ^.:`
54333  new_path="$path"
54334  if test "x$has_colon" = x; then
54335    # Not in mixed or Windows style, start by that.
54336    new_path=`cmd //c echo $path`
54337  fi
54338
54339
54340  input_path="$new_path"
54341  # Check if we need to convert this using DOS-style short mode. If the path
54342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54343  # take no chances and rewrite it.
54344  # Note: m4 eats our [], so we need to use [ and ] instead.
54345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54346  if test "x$has_forbidden_chars" != x; then
54347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54349  fi
54350
54351
54352  windows_path="$new_path"
54353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54354    unix_path=`$CYGPATH -u "$windows_path"`
54355    new_path="$unix_path"
54356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54358    new_path="$unix_path"
54359  fi
54360
54361  if test "x$path" != "x$new_path"; then
54362    MSVC_DLL="$new_path"
54363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54364$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54365  fi
54366
54367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54369
54370    else
54371      # We're on a unix platform. Hooray! :)
54372      path="$MSVC_DLL"
54373      has_space=`$ECHO "$path" | $GREP " "`
54374      if test "x$has_space" != x; then
54375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54376$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54378      fi
54379
54380      # Use eval to expand a potential ~
54381      eval path="$path"
54382      if test ! -f "$path" && test ! -d "$path"; then
54383        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54384      fi
54385
54386      if test -d "$path"; then
54387        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54388      else
54389        dir="`$DIRNAME "$path"`"
54390        base="`$BASENAME "$path"`"
54391        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54392      fi
54393    fi
54394  fi
54395
54396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54397$as_echo_n "checking for $DLL_NAME... " >&6; }
54398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54399$as_echo "$MSVC_DLL" >&6; }
54400    else
54401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54402$as_echo "incorrect, ignoring" >&6; }
54403      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54404$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54405    fi
54406  fi
54407
54408      if test "x$MSVC_DLL" = x; then
54409        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54410      fi
54411      MSVCP_DLL="$MSVC_DLL"
54412    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54413
54414  DLL_NAME="$MSVCP_NAME"
54415  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54416  METHOD="devkit"
54417  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54418    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54419$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54420
54421    # Need to check if the found msvcr is correct architecture
54422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54423$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54424    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54426      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54427      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54428      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54429        CORRECT_MSVCR_ARCH="PE32 executable"
54430      else
54431        CORRECT_MSVCR_ARCH="PE32+ executable"
54432      fi
54433    else
54434      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54435        CORRECT_MSVCR_ARCH=386
54436      else
54437        CORRECT_MSVCR_ARCH=x86-64
54438      fi
54439    fi
54440    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54442$as_echo "ok" >&6; }
54443      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54444
54445  # Only process if variable expands to non-empty
54446
54447  if test "x$MSVC_DLL" != x; then
54448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54449
54450  # Input might be given as Windows format, start by converting to
54451  # unix format.
54452  path="$MSVC_DLL"
54453  new_path=`$CYGPATH -u "$path"`
54454
54455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54458  # "foo.exe" is OK but "foo" is an error.
54459  #
54460  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54461  # It is also a way to make sure we got the proper file name for the real test later on.
54462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54463  if test "x$test_shortpath" = x; then
54464    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54465$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54466    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54467  fi
54468
54469  # Call helper function which possibly converts this using DOS-style short mode.
54470  # If so, the updated path is stored in $new_path.
54471
54472  input_path="$new_path"
54473  # Check if we need to convert this using DOS-style short mode. If the path
54474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54475  # take no chances and rewrite it.
54476  # Note: m4 eats our [], so we need to use [ and ] instead.
54477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54478  if test "x$has_forbidden_chars" != x; then
54479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54483      # Going to short mode and back again did indeed matter. Since short mode is
54484      # case insensitive, let's make it lowercase to improve readability.
54485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54486      # Now convert it back to Unix-style (cygpath)
54487      input_path=`$CYGPATH -u "$shortmode_path"`
54488      new_path="$input_path"
54489    fi
54490  fi
54491
54492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54493  if test "x$test_cygdrive_prefix" = x; then
54494    # As a simple fix, exclude /usr/bin since it's not a real path.
54495    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54497      # a path prefixed by /cygdrive for fixpath to work.
54498      new_path="$CYGWIN_ROOT_PATH$input_path"
54499    fi
54500  fi
54501
54502
54503  if test "x$path" != "x$new_path"; then
54504    MSVC_DLL="$new_path"
54505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54506$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54507  fi
54508
54509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54510
54511  path="$MSVC_DLL"
54512  has_colon=`$ECHO $path | $GREP ^.:`
54513  new_path="$path"
54514  if test "x$has_colon" = x; then
54515    # Not in mixed or Windows style, start by that.
54516    new_path=`cmd //c echo $path`
54517  fi
54518
54519
54520  input_path="$new_path"
54521  # Check if we need to convert this using DOS-style short mode. If the path
54522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54523  # take no chances and rewrite it.
54524  # Note: m4 eats our [], so we need to use [ and ] instead.
54525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54526  if test "x$has_forbidden_chars" != x; then
54527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54529  fi
54530
54531
54532  windows_path="$new_path"
54533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54534    unix_path=`$CYGPATH -u "$windows_path"`
54535    new_path="$unix_path"
54536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54538    new_path="$unix_path"
54539  fi
54540
54541  if test "x$path" != "x$new_path"; then
54542    MSVC_DLL="$new_path"
54543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54544$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54545  fi
54546
54547  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54548  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54549
54550    else
54551      # We're on a unix platform. Hooray! :)
54552      path="$MSVC_DLL"
54553      has_space=`$ECHO "$path" | $GREP " "`
54554      if test "x$has_space" != x; then
54555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54556$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54557        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54558      fi
54559
54560      # Use eval to expand a potential ~
54561      eval path="$path"
54562      if test ! -f "$path" && test ! -d "$path"; then
54563        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54564      fi
54565
54566      if test -d "$path"; then
54567        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54568      else
54569        dir="`$DIRNAME "$path"`"
54570        base="`$BASENAME "$path"`"
54571        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54572      fi
54573    fi
54574  fi
54575
54576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54577$as_echo_n "checking for $DLL_NAME... " >&6; }
54578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54579$as_echo "$MSVC_DLL" >&6; }
54580    else
54581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54582$as_echo "incorrect, ignoring" >&6; }
54583      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54584$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54585    fi
54586  fi
54587
54588      if test "x$MSVC_DLL" = x; then
54589        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54590      fi
54591      MSVCP_DLL="$MSVC_DLL"
54592    else
54593
54594  DLL_NAME="${MSVCP_NAME}"
54595  MSVC_DLL=
54596
54597  if test "x$MSVC_DLL" = x; then
54598    # Probe: Using well-known location from Visual Studio 10.0
54599    if test "x$VCINSTALLDIR" != x; then
54600      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54601
54602  windows_path="$CYGWIN_VC_INSTALL_DIR"
54603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54604    unix_path=`$CYGPATH -u "$windows_path"`
54605    CYGWIN_VC_INSTALL_DIR="$unix_path"
54606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54608    CYGWIN_VC_INSTALL_DIR="$unix_path"
54609  fi
54610
54611      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54612        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54613      else
54614        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54615      fi
54616      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54617
54618  DLL_NAME="$DLL_NAME"
54619  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54620  METHOD="well-known location in VCINSTALLDIR"
54621  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54623$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54624
54625    # Need to check if the found msvcr is correct architecture
54626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54627$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54628    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54630      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54631      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54632      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54633        CORRECT_MSVCR_ARCH="PE32 executable"
54634      else
54635        CORRECT_MSVCR_ARCH="PE32+ executable"
54636      fi
54637    else
54638      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54639        CORRECT_MSVCR_ARCH=386
54640      else
54641        CORRECT_MSVCR_ARCH=x86-64
54642      fi
54643    fi
54644    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54646$as_echo "ok" >&6; }
54647      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54648
54649  # Only process if variable expands to non-empty
54650
54651  if test "x$MSVC_DLL" != x; then
54652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54653
54654  # Input might be given as Windows format, start by converting to
54655  # unix format.
54656  path="$MSVC_DLL"
54657  new_path=`$CYGPATH -u "$path"`
54658
54659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54662  # "foo.exe" is OK but "foo" is an error.
54663  #
54664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54665  # It is also a way to make sure we got the proper file name for the real test later on.
54666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54667  if test "x$test_shortpath" = x; then
54668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54669$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54670    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54671  fi
54672
54673  # Call helper function which possibly converts this using DOS-style short mode.
54674  # If so, the updated path is stored in $new_path.
54675
54676  input_path="$new_path"
54677  # Check if we need to convert this using DOS-style short mode. If the path
54678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54679  # take no chances and rewrite it.
54680  # Note: m4 eats our [], so we need to use [ and ] instead.
54681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54682  if test "x$has_forbidden_chars" != x; then
54683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54687      # Going to short mode and back again did indeed matter. Since short mode is
54688      # case insensitive, let's make it lowercase to improve readability.
54689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54690      # Now convert it back to Unix-style (cygpath)
54691      input_path=`$CYGPATH -u "$shortmode_path"`
54692      new_path="$input_path"
54693    fi
54694  fi
54695
54696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54697  if test "x$test_cygdrive_prefix" = x; then
54698    # As a simple fix, exclude /usr/bin since it's not a real path.
54699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54701      # a path prefixed by /cygdrive for fixpath to work.
54702      new_path="$CYGWIN_ROOT_PATH$input_path"
54703    fi
54704  fi
54705
54706
54707  if test "x$path" != "x$new_path"; then
54708    MSVC_DLL="$new_path"
54709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54710$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54711  fi
54712
54713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54714
54715  path="$MSVC_DLL"
54716  has_colon=`$ECHO $path | $GREP ^.:`
54717  new_path="$path"
54718  if test "x$has_colon" = x; then
54719    # Not in mixed or Windows style, start by that.
54720    new_path=`cmd //c echo $path`
54721  fi
54722
54723
54724  input_path="$new_path"
54725  # Check if we need to convert this using DOS-style short mode. If the path
54726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54727  # take no chances and rewrite it.
54728  # Note: m4 eats our [], so we need to use [ and ] instead.
54729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54730  if test "x$has_forbidden_chars" != x; then
54731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54733  fi
54734
54735
54736  windows_path="$new_path"
54737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54738    unix_path=`$CYGPATH -u "$windows_path"`
54739    new_path="$unix_path"
54740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54742    new_path="$unix_path"
54743  fi
54744
54745  if test "x$path" != "x$new_path"; then
54746    MSVC_DLL="$new_path"
54747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54748$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54749  fi
54750
54751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54753
54754    else
54755      # We're on a unix platform. Hooray! :)
54756      path="$MSVC_DLL"
54757      has_space=`$ECHO "$path" | $GREP " "`
54758      if test "x$has_space" != x; then
54759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54760$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54762      fi
54763
54764      # Use eval to expand a potential ~
54765      eval path="$path"
54766      if test ! -f "$path" && test ! -d "$path"; then
54767        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54768      fi
54769
54770      if test -d "$path"; then
54771        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54772      else
54773        dir="`$DIRNAME "$path"`"
54774        base="`$BASENAME "$path"`"
54775        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54776      fi
54777    fi
54778  fi
54779
54780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54781$as_echo_n "checking for $DLL_NAME... " >&6; }
54782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54783$as_echo "$MSVC_DLL" >&6; }
54784    else
54785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54786$as_echo "incorrect, ignoring" >&6; }
54787      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54788$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54789    fi
54790  fi
54791
54792    fi
54793  fi
54794
54795  if test "x$MSVC_DLL" = x; then
54796    # Probe: Check in the Boot JDK directory.
54797    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54798
54799  DLL_NAME="$DLL_NAME"
54800  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54801  METHOD="well-known location in Boot JDK"
54802  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54803    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54804$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54805
54806    # Need to check if the found msvcr is correct architecture
54807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54808$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54809    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54811      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54812      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54813      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54814        CORRECT_MSVCR_ARCH="PE32 executable"
54815      else
54816        CORRECT_MSVCR_ARCH="PE32+ executable"
54817      fi
54818    else
54819      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54820        CORRECT_MSVCR_ARCH=386
54821      else
54822        CORRECT_MSVCR_ARCH=x86-64
54823      fi
54824    fi
54825    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54827$as_echo "ok" >&6; }
54828      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54829
54830  # Only process if variable expands to non-empty
54831
54832  if test "x$MSVC_DLL" != x; then
54833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54834
54835  # Input might be given as Windows format, start by converting to
54836  # unix format.
54837  path="$MSVC_DLL"
54838  new_path=`$CYGPATH -u "$path"`
54839
54840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54843  # "foo.exe" is OK but "foo" is an error.
54844  #
54845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54846  # It is also a way to make sure we got the proper file name for the real test later on.
54847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54848  if test "x$test_shortpath" = x; then
54849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54850$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54851    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54852  fi
54853
54854  # Call helper function which possibly converts this using DOS-style short mode.
54855  # If so, the updated path is stored in $new_path.
54856
54857  input_path="$new_path"
54858  # Check if we need to convert this using DOS-style short mode. If the path
54859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54860  # take no chances and rewrite it.
54861  # Note: m4 eats our [], so we need to use [ and ] instead.
54862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54863  if test "x$has_forbidden_chars" != x; then
54864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54868      # Going to short mode and back again did indeed matter. Since short mode is
54869      # case insensitive, let's make it lowercase to improve readability.
54870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54871      # Now convert it back to Unix-style (cygpath)
54872      input_path=`$CYGPATH -u "$shortmode_path"`
54873      new_path="$input_path"
54874    fi
54875  fi
54876
54877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54878  if test "x$test_cygdrive_prefix" = x; then
54879    # As a simple fix, exclude /usr/bin since it's not a real path.
54880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54882      # a path prefixed by /cygdrive for fixpath to work.
54883      new_path="$CYGWIN_ROOT_PATH$input_path"
54884    fi
54885  fi
54886
54887
54888  if test "x$path" != "x$new_path"; then
54889    MSVC_DLL="$new_path"
54890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54891$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54892  fi
54893
54894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54895
54896  path="$MSVC_DLL"
54897  has_colon=`$ECHO $path | $GREP ^.:`
54898  new_path="$path"
54899  if test "x$has_colon" = x; then
54900    # Not in mixed or Windows style, start by that.
54901    new_path=`cmd //c echo $path`
54902  fi
54903
54904
54905  input_path="$new_path"
54906  # Check if we need to convert this using DOS-style short mode. If the path
54907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54908  # take no chances and rewrite it.
54909  # Note: m4 eats our [], so we need to use [ and ] instead.
54910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54911  if test "x$has_forbidden_chars" != x; then
54912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54914  fi
54915
54916
54917  windows_path="$new_path"
54918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54919    unix_path=`$CYGPATH -u "$windows_path"`
54920    new_path="$unix_path"
54921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54923    new_path="$unix_path"
54924  fi
54925
54926  if test "x$path" != "x$new_path"; then
54927    MSVC_DLL="$new_path"
54928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54929$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54930  fi
54931
54932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54934
54935    else
54936      # We're on a unix platform. Hooray! :)
54937      path="$MSVC_DLL"
54938      has_space=`$ECHO "$path" | $GREP " "`
54939      if test "x$has_space" != x; then
54940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54941$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54943      fi
54944
54945      # Use eval to expand a potential ~
54946      eval path="$path"
54947      if test ! -f "$path" && test ! -d "$path"; then
54948        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54949      fi
54950
54951      if test -d "$path"; then
54952        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54953      else
54954        dir="`$DIRNAME "$path"`"
54955        base="`$BASENAME "$path"`"
54956        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54957      fi
54958    fi
54959  fi
54960
54961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54962$as_echo_n "checking for $DLL_NAME... " >&6; }
54963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54964$as_echo "$MSVC_DLL" >&6; }
54965    else
54966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54967$as_echo "incorrect, ignoring" >&6; }
54968      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54969$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54970    fi
54971  fi
54972
54973  fi
54974
54975  if test "x$MSVC_DLL" = x; then
54976    # Probe: Look in the Windows system32 directory
54977    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54978
54979  windows_path="$CYGWIN_SYSTEMROOT"
54980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54981    unix_path=`$CYGPATH -u "$windows_path"`
54982    CYGWIN_SYSTEMROOT="$unix_path"
54983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54985    CYGWIN_SYSTEMROOT="$unix_path"
54986  fi
54987
54988    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54989
54990  DLL_NAME="$DLL_NAME"
54991  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54992  METHOD="well-known location in SYSTEMROOT"
54993  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54994    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54995$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54996
54997    # Need to check if the found msvcr is correct architecture
54998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54999$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55000    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55002      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55003      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55004      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55005        CORRECT_MSVCR_ARCH="PE32 executable"
55006      else
55007        CORRECT_MSVCR_ARCH="PE32+ executable"
55008      fi
55009    else
55010      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55011        CORRECT_MSVCR_ARCH=386
55012      else
55013        CORRECT_MSVCR_ARCH=x86-64
55014      fi
55015    fi
55016    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55018$as_echo "ok" >&6; }
55019      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55020
55021  # Only process if variable expands to non-empty
55022
55023  if test "x$MSVC_DLL" != x; then
55024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55025
55026  # Input might be given as Windows format, start by converting to
55027  # unix format.
55028  path="$MSVC_DLL"
55029  new_path=`$CYGPATH -u "$path"`
55030
55031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55034  # "foo.exe" is OK but "foo" is an error.
55035  #
55036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55037  # It is also a way to make sure we got the proper file name for the real test later on.
55038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55039  if test "x$test_shortpath" = x; then
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55041$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55042    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55043  fi
55044
55045  # Call helper function which possibly converts this using DOS-style short mode.
55046  # If so, the updated path is stored in $new_path.
55047
55048  input_path="$new_path"
55049  # Check if we need to convert this using DOS-style short mode. If the path
55050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55051  # take no chances and rewrite it.
55052  # Note: m4 eats our [], so we need to use [ and ] instead.
55053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55054  if test "x$has_forbidden_chars" != x; then
55055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55059      # Going to short mode and back again did indeed matter. Since short mode is
55060      # case insensitive, let's make it lowercase to improve readability.
55061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55062      # Now convert it back to Unix-style (cygpath)
55063      input_path=`$CYGPATH -u "$shortmode_path"`
55064      new_path="$input_path"
55065    fi
55066  fi
55067
55068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55069  if test "x$test_cygdrive_prefix" = x; then
55070    # As a simple fix, exclude /usr/bin since it's not a real path.
55071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55073      # a path prefixed by /cygdrive for fixpath to work.
55074      new_path="$CYGWIN_ROOT_PATH$input_path"
55075    fi
55076  fi
55077
55078
55079  if test "x$path" != "x$new_path"; then
55080    MSVC_DLL="$new_path"
55081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55082$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55083  fi
55084
55085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55086
55087  path="$MSVC_DLL"
55088  has_colon=`$ECHO $path | $GREP ^.:`
55089  new_path="$path"
55090  if test "x$has_colon" = x; then
55091    # Not in mixed or Windows style, start by that.
55092    new_path=`cmd //c echo $path`
55093  fi
55094
55095
55096  input_path="$new_path"
55097  # Check if we need to convert this using DOS-style short mode. If the path
55098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55099  # take no chances and rewrite it.
55100  # Note: m4 eats our [], so we need to use [ and ] instead.
55101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55102  if test "x$has_forbidden_chars" != x; then
55103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55105  fi
55106
55107
55108  windows_path="$new_path"
55109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55110    unix_path=`$CYGPATH -u "$windows_path"`
55111    new_path="$unix_path"
55112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55114    new_path="$unix_path"
55115  fi
55116
55117  if test "x$path" != "x$new_path"; then
55118    MSVC_DLL="$new_path"
55119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55120$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55121  fi
55122
55123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55125
55126    else
55127      # We're on a unix platform. Hooray! :)
55128      path="$MSVC_DLL"
55129      has_space=`$ECHO "$path" | $GREP " "`
55130      if test "x$has_space" != x; then
55131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55132$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55134      fi
55135
55136      # Use eval to expand a potential ~
55137      eval path="$path"
55138      if test ! -f "$path" && test ! -d "$path"; then
55139        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55140      fi
55141
55142      if test -d "$path"; then
55143        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55144      else
55145        dir="`$DIRNAME "$path"`"
55146        base="`$BASENAME "$path"`"
55147        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55148      fi
55149    fi
55150  fi
55151
55152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55153$as_echo_n "checking for $DLL_NAME... " >&6; }
55154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55155$as_echo "$MSVC_DLL" >&6; }
55156    else
55157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55158$as_echo "incorrect, ignoring" >&6; }
55159      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55160$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55161    fi
55162  fi
55163
55164  fi
55165
55166  if test "x$MSVC_DLL" = x; then
55167    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55168    if test "x$VS100COMNTOOLS" != x; then
55169      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55170
55171  windows_path="$CYGWIN_VS_TOOLS_DIR"
55172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55173    unix_path=`$CYGPATH -u "$windows_path"`
55174    CYGWIN_VS_TOOLS_DIR="$unix_path"
55175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55177    CYGWIN_VS_TOOLS_DIR="$unix_path"
55178  fi
55179
55180      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55181        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55182	    | $GREP -i /x64/ | $HEAD --lines 1`
55183      else
55184        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55185	    | $GREP -i /x86/ | $HEAD --lines 1`
55186      fi
55187
55188  DLL_NAME="$DLL_NAME"
55189  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55190  METHOD="search of VS100COMNTOOLS"
55191  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55193$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55194
55195    # Need to check if the found msvcr is correct architecture
55196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55197$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55198    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55200      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55201      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55203        CORRECT_MSVCR_ARCH="PE32 executable"
55204      else
55205        CORRECT_MSVCR_ARCH="PE32+ executable"
55206      fi
55207    else
55208      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55209        CORRECT_MSVCR_ARCH=386
55210      else
55211        CORRECT_MSVCR_ARCH=x86-64
55212      fi
55213    fi
55214    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55216$as_echo "ok" >&6; }
55217      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55218
55219  # Only process if variable expands to non-empty
55220
55221  if test "x$MSVC_DLL" != x; then
55222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55223
55224  # Input might be given as Windows format, start by converting to
55225  # unix format.
55226  path="$MSVC_DLL"
55227  new_path=`$CYGPATH -u "$path"`
55228
55229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55232  # "foo.exe" is OK but "foo" is an error.
55233  #
55234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55235  # It is also a way to make sure we got the proper file name for the real test later on.
55236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55237  if test "x$test_shortpath" = x; then
55238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55240    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55241  fi
55242
55243  # Call helper function which possibly converts this using DOS-style short mode.
55244  # If so, the updated path is stored in $new_path.
55245
55246  input_path="$new_path"
55247  # Check if we need to convert this using DOS-style short mode. If the path
55248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55249  # take no chances and rewrite it.
55250  # Note: m4 eats our [], so we need to use [ and ] instead.
55251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55252  if test "x$has_forbidden_chars" != x; then
55253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55257      # Going to short mode and back again did indeed matter. Since short mode is
55258      # case insensitive, let's make it lowercase to improve readability.
55259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55260      # Now convert it back to Unix-style (cygpath)
55261      input_path=`$CYGPATH -u "$shortmode_path"`
55262      new_path="$input_path"
55263    fi
55264  fi
55265
55266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55267  if test "x$test_cygdrive_prefix" = x; then
55268    # As a simple fix, exclude /usr/bin since it's not a real path.
55269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55271      # a path prefixed by /cygdrive for fixpath to work.
55272      new_path="$CYGWIN_ROOT_PATH$input_path"
55273    fi
55274  fi
55275
55276
55277  if test "x$path" != "x$new_path"; then
55278    MSVC_DLL="$new_path"
55279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55280$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55281  fi
55282
55283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55284
55285  path="$MSVC_DLL"
55286  has_colon=`$ECHO $path | $GREP ^.:`
55287  new_path="$path"
55288  if test "x$has_colon" = x; then
55289    # Not in mixed or Windows style, start by that.
55290    new_path=`cmd //c echo $path`
55291  fi
55292
55293
55294  input_path="$new_path"
55295  # Check if we need to convert this using DOS-style short mode. If the path
55296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55297  # take no chances and rewrite it.
55298  # Note: m4 eats our [], so we need to use [ and ] instead.
55299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55300  if test "x$has_forbidden_chars" != x; then
55301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55303  fi
55304
55305
55306  windows_path="$new_path"
55307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55308    unix_path=`$CYGPATH -u "$windows_path"`
55309    new_path="$unix_path"
55310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55312    new_path="$unix_path"
55313  fi
55314
55315  if test "x$path" != "x$new_path"; then
55316    MSVC_DLL="$new_path"
55317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55318$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55319  fi
55320
55321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55323
55324    else
55325      # We're on a unix platform. Hooray! :)
55326      path="$MSVC_DLL"
55327      has_space=`$ECHO "$path" | $GREP " "`
55328      if test "x$has_space" != x; then
55329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55330$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55332      fi
55333
55334      # Use eval to expand a potential ~
55335      eval path="$path"
55336      if test ! -f "$path" && test ! -d "$path"; then
55337        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55338      fi
55339
55340      if test -d "$path"; then
55341        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55342      else
55343        dir="`$DIRNAME "$path"`"
55344        base="`$BASENAME "$path"`"
55345        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55346      fi
55347    fi
55348  fi
55349
55350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55351$as_echo_n "checking for $DLL_NAME... " >&6; }
55352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55353$as_echo "$MSVC_DLL" >&6; }
55354    else
55355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55356$as_echo "incorrect, ignoring" >&6; }
55357      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55358$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55359    fi
55360  fi
55361
55362    fi
55363  fi
55364
55365  if test "x$MSVC_DLL" = x; then
55366    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55367    # (This was the original behaviour; kept since it might turn something up)
55368    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55369      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55370        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55371	    | $GREP x64 | $HEAD --lines 1`
55372      else
55373        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55374	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55375        if test "x$POSSIBLE_MSVC_DLL" = x; then
55376          # We're grasping at straws now...
55377          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55378	      | $HEAD --lines 1`
55379        fi
55380      fi
55381
55382
55383  DLL_NAME="$DLL_NAME"
55384  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55385  METHOD="search of VCINSTALLDIR"
55386  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55388$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55389
55390    # Need to check if the found msvcr is correct architecture
55391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55392$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55393    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55395      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55396      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55397      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55398        CORRECT_MSVCR_ARCH="PE32 executable"
55399      else
55400        CORRECT_MSVCR_ARCH="PE32+ executable"
55401      fi
55402    else
55403      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55404        CORRECT_MSVCR_ARCH=386
55405      else
55406        CORRECT_MSVCR_ARCH=x86-64
55407      fi
55408    fi
55409    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55411$as_echo "ok" >&6; }
55412      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55413
55414  # Only process if variable expands to non-empty
55415
55416  if test "x$MSVC_DLL" != x; then
55417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55418
55419  # Input might be given as Windows format, start by converting to
55420  # unix format.
55421  path="$MSVC_DLL"
55422  new_path=`$CYGPATH -u "$path"`
55423
55424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55427  # "foo.exe" is OK but "foo" is an error.
55428  #
55429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55430  # It is also a way to make sure we got the proper file name for the real test later on.
55431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55432  if test "x$test_shortpath" = x; then
55433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55434$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55435    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55436  fi
55437
55438  # Call helper function which possibly converts this using DOS-style short mode.
55439  # If so, the updated path is stored in $new_path.
55440
55441  input_path="$new_path"
55442  # Check if we need to convert this using DOS-style short mode. If the path
55443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55444  # take no chances and rewrite it.
55445  # Note: m4 eats our [], so we need to use [ and ] instead.
55446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55447  if test "x$has_forbidden_chars" != x; then
55448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55452      # Going to short mode and back again did indeed matter. Since short mode is
55453      # case insensitive, let's make it lowercase to improve readability.
55454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55455      # Now convert it back to Unix-style (cygpath)
55456      input_path=`$CYGPATH -u "$shortmode_path"`
55457      new_path="$input_path"
55458    fi
55459  fi
55460
55461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55462  if test "x$test_cygdrive_prefix" = x; then
55463    # As a simple fix, exclude /usr/bin since it's not a real path.
55464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55466      # a path prefixed by /cygdrive for fixpath to work.
55467      new_path="$CYGWIN_ROOT_PATH$input_path"
55468    fi
55469  fi
55470
55471
55472  if test "x$path" != "x$new_path"; then
55473    MSVC_DLL="$new_path"
55474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55475$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55476  fi
55477
55478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55479
55480  path="$MSVC_DLL"
55481  has_colon=`$ECHO $path | $GREP ^.:`
55482  new_path="$path"
55483  if test "x$has_colon" = x; then
55484    # Not in mixed or Windows style, start by that.
55485    new_path=`cmd //c echo $path`
55486  fi
55487
55488
55489  input_path="$new_path"
55490  # Check if we need to convert this using DOS-style short mode. If the path
55491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55492  # take no chances and rewrite it.
55493  # Note: m4 eats our [], so we need to use [ and ] instead.
55494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55495  if test "x$has_forbidden_chars" != x; then
55496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55498  fi
55499
55500
55501  windows_path="$new_path"
55502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55503    unix_path=`$CYGPATH -u "$windows_path"`
55504    new_path="$unix_path"
55505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55507    new_path="$unix_path"
55508  fi
55509
55510  if test "x$path" != "x$new_path"; then
55511    MSVC_DLL="$new_path"
55512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55513$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55514  fi
55515
55516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55518
55519    else
55520      # We're on a unix platform. Hooray! :)
55521      path="$MSVC_DLL"
55522      has_space=`$ECHO "$path" | $GREP " "`
55523      if test "x$has_space" != x; then
55524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55525$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55527      fi
55528
55529      # Use eval to expand a potential ~
55530      eval path="$path"
55531      if test ! -f "$path" && test ! -d "$path"; then
55532        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55533      fi
55534
55535      if test -d "$path"; then
55536        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55537      else
55538        dir="`$DIRNAME "$path"`"
55539        base="`$BASENAME "$path"`"
55540        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55541      fi
55542    fi
55543  fi
55544
55545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55546$as_echo_n "checking for $DLL_NAME... " >&6; }
55547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55548$as_echo "$MSVC_DLL" >&6; }
55549    else
55550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55551$as_echo "incorrect, ignoring" >&6; }
55552      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55553$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55554    fi
55555  fi
55556
55557    fi
55558  fi
55559
55560  if test "x$MSVC_DLL" = x; then
55561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55562$as_echo_n "checking for $DLL_NAME... " >&6; }
55563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55564$as_echo "no" >&6; }
55565    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55566  fi
55567
55568      MSVCP_DLL="$MSVC_DLL"
55569    fi
55570
55571  fi
55572
55573  fi
55574
55575
55576  if test "x$NEEDS_LIB_X11" = xfalse; then
55577    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55578      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55579$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55580    fi
55581    X_CFLAGS=
55582    X_LIBS=
55583  else
55584
55585    if test "x${with_x}" = xno; then
55586      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55587    fi
55588
55589    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55590      # The user has specified a X11 base directory. Use it for includes and
55591      # libraries, unless explicitely overridden.
55592      if test "x$x_includes" = xNONE; then
55593        x_includes="${with_x}/include"
55594      fi
55595      if test "x$x_libraries" = xNONE; then
55596        x_libraries="${with_x}/lib"
55597      fi
55598    else
55599      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55600      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55601      # --x-libraries for the sysroot, if that seems to be correct.
55602      if test "x$SYSROOT" != "x"; then
55603        if test "x$x_includes" = xNONE; then
55604          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55605            x_includes="$SYSROOT/usr/X11R6/include"
55606          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55607            x_includes="$SYSROOT/usr/include"
55608          fi
55609        fi
55610        if test "x$x_libraries" = xNONE; then
55611          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55612            x_libraries="$SYSROOT/usr/X11R6/lib"
55613          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55614            x_libraries="$SYSROOT/usr/lib64"
55615          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55616            x_libraries="$SYSROOT/usr/lib"
55617          fi
55618        fi
55619      fi
55620    fi
55621
55622    # Now let autoconf do it's magic
55623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55624$as_echo_n "checking for X... " >&6; }
55625
55626
55627# Check whether --with-x was given.
55628if test "${with_x+set}" = set; then :
55629  withval=$with_x;
55630fi
55631
55632# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55633if test "x$with_x" = xno; then
55634  # The user explicitly disabled X.
55635  have_x=disabled
55636else
55637  case $x_includes,$x_libraries in #(
55638    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55639    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55640  $as_echo_n "(cached) " >&6
55641else
55642  # One or both of the vars are not set, and there is no cached value.
55643ac_x_includes=no ac_x_libraries=no
55644rm -f -r conftest.dir
55645if mkdir conftest.dir; then
55646  cd conftest.dir
55647  cat >Imakefile <<'_ACEOF'
55648incroot:
55649	@echo incroot='${INCROOT}'
55650usrlibdir:
55651	@echo usrlibdir='${USRLIBDIR}'
55652libdir:
55653	@echo libdir='${LIBDIR}'
55654_ACEOF
55655  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55656    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55657    for ac_var in incroot usrlibdir libdir; do
55658      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55659    done
55660    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55661    for ac_extension in a so sl dylib la dll; do
55662      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55663	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55664	ac_im_usrlibdir=$ac_im_libdir; break
55665      fi
55666    done
55667    # Screen out bogus values from the imake configuration.  They are
55668    # bogus both because they are the default anyway, and because
55669    # using them would break gcc on systems where it needs fixed includes.
55670    case $ac_im_incroot in
55671	/usr/include) ac_x_includes= ;;
55672	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55673    esac
55674    case $ac_im_usrlibdir in
55675	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55676	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55677    esac
55678  fi
55679  cd ..
55680  rm -f -r conftest.dir
55681fi
55682
55683# Standard set of common directories for X headers.
55684# Check X11 before X11Rn because it is often a symlink to the current release.
55685ac_x_header_dirs='
55686/usr/X11/include
55687/usr/X11R7/include
55688/usr/X11R6/include
55689/usr/X11R5/include
55690/usr/X11R4/include
55691
55692/usr/include/X11
55693/usr/include/X11R7
55694/usr/include/X11R6
55695/usr/include/X11R5
55696/usr/include/X11R4
55697
55698/usr/local/X11/include
55699/usr/local/X11R7/include
55700/usr/local/X11R6/include
55701/usr/local/X11R5/include
55702/usr/local/X11R4/include
55703
55704/usr/local/include/X11
55705/usr/local/include/X11R7
55706/usr/local/include/X11R6
55707/usr/local/include/X11R5
55708/usr/local/include/X11R4
55709
55710/usr/X386/include
55711/usr/x386/include
55712/usr/XFree86/include/X11
55713
55714/usr/include
55715/usr/local/include
55716/usr/unsupported/include
55717/usr/athena/include
55718/usr/local/x11r5/include
55719/usr/lpp/Xamples/include
55720
55721/usr/openwin/include
55722/usr/openwin/share/include'
55723
55724if test "$ac_x_includes" = no; then
55725  # Guess where to find include files, by looking for Xlib.h.
55726  # First, try using that file with no special directory specified.
55727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55728/* end confdefs.h.  */
55729#include <X11/Xlib.h>
55730_ACEOF
55731if ac_fn_cxx_try_cpp "$LINENO"; then :
55732  # We can compile using X headers with no special include directory.
55733ac_x_includes=
55734else
55735  for ac_dir in $ac_x_header_dirs; do
55736  if test -r "$ac_dir/X11/Xlib.h"; then
55737    ac_x_includes=$ac_dir
55738    break
55739  fi
55740done
55741fi
55742rm -f conftest.err conftest.i conftest.$ac_ext
55743fi # $ac_x_includes = no
55744
55745if test "$ac_x_libraries" = no; then
55746  # Check for the libraries.
55747  # See if we find them without any special options.
55748  # Don't add to $LIBS permanently.
55749  ac_save_LIBS=$LIBS
55750  LIBS="-lX11 $LIBS"
55751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55752/* end confdefs.h.  */
55753#include <X11/Xlib.h>
55754int
55755main ()
55756{
55757XrmInitialize ()
55758  ;
55759  return 0;
55760}
55761_ACEOF
55762if ac_fn_cxx_try_link "$LINENO"; then :
55763  LIBS=$ac_save_LIBS
55764# We can link X programs with no special library path.
55765ac_x_libraries=
55766else
55767  LIBS=$ac_save_LIBS
55768for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55769do
55770  # Don't even attempt the hair of trying to link an X program!
55771  for ac_extension in a so sl dylib la dll; do
55772    if test -r "$ac_dir/libX11.$ac_extension"; then
55773      ac_x_libraries=$ac_dir
55774      break 2
55775    fi
55776  done
55777done
55778fi
55779rm -f core conftest.err conftest.$ac_objext \
55780    conftest$ac_exeext conftest.$ac_ext
55781fi # $ac_x_libraries = no
55782
55783case $ac_x_includes,$ac_x_libraries in #(
55784  no,* | *,no | *\'*)
55785    # Didn't find X, or a directory has "'" in its name.
55786    ac_cv_have_x="have_x=no";; #(
55787  *)
55788    # Record where we found X for the cache.
55789    ac_cv_have_x="have_x=yes\
55790	ac_x_includes='$ac_x_includes'\
55791	ac_x_libraries='$ac_x_libraries'"
55792esac
55793fi
55794;; #(
55795    *) have_x=yes;;
55796  esac
55797  eval "$ac_cv_have_x"
55798fi # $with_x != no
55799
55800if test "$have_x" != yes; then
55801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55802$as_echo "$have_x" >&6; }
55803  no_x=yes
55804else
55805  # If each of the values was on the command line, it overrides each guess.
55806  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55807  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55808  # Update the cache value to reflect the command line values.
55809  ac_cv_have_x="have_x=yes\
55810	ac_x_includes='$x_includes'\
55811	ac_x_libraries='$x_libraries'"
55812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55813$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55814fi
55815
55816    if test "$no_x" = yes; then
55817  # Not all programs may use this symbol, but it does not hurt to define it.
55818
55819$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55820
55821  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55822else
55823  if test -n "$x_includes"; then
55824    X_CFLAGS="$X_CFLAGS -I$x_includes"
55825  fi
55826
55827  # It would also be nice to do this for all -L options, not just this one.
55828  if test -n "$x_libraries"; then
55829    X_LIBS="$X_LIBS -L$x_libraries"
55830    # For Solaris; some versions of Sun CC require a space after -R and
55831    # others require no space.  Words are not sufficient . . . .
55832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55833$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55834    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55835    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55836    ac_cxx_werror_flag=yes
55837    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55838/* end confdefs.h.  */
55839
55840int
55841main ()
55842{
55843
55844  ;
55845  return 0;
55846}
55847_ACEOF
55848if ac_fn_cxx_try_link "$LINENO"; then :
55849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55850$as_echo "no" >&6; }
55851       X_LIBS="$X_LIBS -R$x_libraries"
55852else
55853  LIBS="$ac_xsave_LIBS -R $x_libraries"
55854       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55855/* end confdefs.h.  */
55856
55857int
55858main ()
55859{
55860
55861  ;
55862  return 0;
55863}
55864_ACEOF
55865if ac_fn_cxx_try_link "$LINENO"; then :
55866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55867$as_echo "yes" >&6; }
55868	  X_LIBS="$X_LIBS -R $x_libraries"
55869else
55870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55871$as_echo "neither works" >&6; }
55872fi
55873rm -f core conftest.err conftest.$ac_objext \
55874    conftest$ac_exeext conftest.$ac_ext
55875fi
55876rm -f core conftest.err conftest.$ac_objext \
55877    conftest$ac_exeext conftest.$ac_ext
55878    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55879    LIBS=$ac_xsave_LIBS
55880  fi
55881
55882  # Check for system-dependent libraries X programs must link with.
55883  # Do this before checking for the system-independent R6 libraries
55884  # (-lICE), since we may need -lsocket or whatever for X linking.
55885
55886  if test "$ISC" = yes; then
55887    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55888  else
55889    # Martyn Johnson says this is needed for Ultrix, if the X
55890    # libraries were built with DECnet support.  And Karl Berry says
55891    # the Alpha needs dnet_stub (dnet does not exist).
55892    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55893    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55894/* end confdefs.h.  */
55895
55896/* Override any GCC internal prototype to avoid an error.
55897   Use char because int might match the return type of a GCC
55898   builtin and then its argument prototype would still apply.  */
55899#ifdef __cplusplus
55900extern "C"
55901#endif
55902char XOpenDisplay ();
55903int
55904main ()
55905{
55906return XOpenDisplay ();
55907  ;
55908  return 0;
55909}
55910_ACEOF
55911if ac_fn_cxx_try_link "$LINENO"; then :
55912
55913else
55914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55915$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55916if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55917  $as_echo_n "(cached) " >&6
55918else
55919  ac_check_lib_save_LIBS=$LIBS
55920LIBS="-ldnet  $LIBS"
55921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55922/* end confdefs.h.  */
55923
55924/* Override any GCC internal prototype to avoid an error.
55925   Use char because int might match the return type of a GCC
55926   builtin and then its argument prototype would still apply.  */
55927#ifdef __cplusplus
55928extern "C"
55929#endif
55930char dnet_ntoa ();
55931int
55932main ()
55933{
55934return dnet_ntoa ();
55935  ;
55936  return 0;
55937}
55938_ACEOF
55939if ac_fn_cxx_try_link "$LINENO"; then :
55940  ac_cv_lib_dnet_dnet_ntoa=yes
55941else
55942  ac_cv_lib_dnet_dnet_ntoa=no
55943fi
55944rm -f core conftest.err conftest.$ac_objext \
55945    conftest$ac_exeext conftest.$ac_ext
55946LIBS=$ac_check_lib_save_LIBS
55947fi
55948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55949$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55950if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55951  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55952fi
55953
55954    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55956$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55957if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55958  $as_echo_n "(cached) " >&6
55959else
55960  ac_check_lib_save_LIBS=$LIBS
55961LIBS="-ldnet_stub  $LIBS"
55962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55963/* end confdefs.h.  */
55964
55965/* Override any GCC internal prototype to avoid an error.
55966   Use char because int might match the return type of a GCC
55967   builtin and then its argument prototype would still apply.  */
55968#ifdef __cplusplus
55969extern "C"
55970#endif
55971char dnet_ntoa ();
55972int
55973main ()
55974{
55975return dnet_ntoa ();
55976  ;
55977  return 0;
55978}
55979_ACEOF
55980if ac_fn_cxx_try_link "$LINENO"; then :
55981  ac_cv_lib_dnet_stub_dnet_ntoa=yes
55982else
55983  ac_cv_lib_dnet_stub_dnet_ntoa=no
55984fi
55985rm -f core conftest.err conftest.$ac_objext \
55986    conftest$ac_exeext conftest.$ac_ext
55987LIBS=$ac_check_lib_save_LIBS
55988fi
55989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
55990$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
55991if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
55992  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
55993fi
55994
55995    fi
55996fi
55997rm -f core conftest.err conftest.$ac_objext \
55998    conftest$ac_exeext conftest.$ac_ext
55999    LIBS="$ac_xsave_LIBS"
56000
56001    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56002    # to get the SysV transport functions.
56003    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56004    # needs -lnsl.
56005    # The nsl library prevents programs from opening the X display
56006    # on Irix 5.2, according to T.E. Dickey.
56007    # The functions gethostbyname, getservbyname, and inet_addr are
56008    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56009    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56010if test "x$ac_cv_func_gethostbyname" = xyes; then :
56011
56012fi
56013
56014    if test $ac_cv_func_gethostbyname = no; then
56015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56016$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56017if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56018  $as_echo_n "(cached) " >&6
56019else
56020  ac_check_lib_save_LIBS=$LIBS
56021LIBS="-lnsl  $LIBS"
56022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56023/* end confdefs.h.  */
56024
56025/* Override any GCC internal prototype to avoid an error.
56026   Use char because int might match the return type of a GCC
56027   builtin and then its argument prototype would still apply.  */
56028#ifdef __cplusplus
56029extern "C"
56030#endif
56031char gethostbyname ();
56032int
56033main ()
56034{
56035return gethostbyname ();
56036  ;
56037  return 0;
56038}
56039_ACEOF
56040if ac_fn_cxx_try_link "$LINENO"; then :
56041  ac_cv_lib_nsl_gethostbyname=yes
56042else
56043  ac_cv_lib_nsl_gethostbyname=no
56044fi
56045rm -f core conftest.err conftest.$ac_objext \
56046    conftest$ac_exeext conftest.$ac_ext
56047LIBS=$ac_check_lib_save_LIBS
56048fi
56049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56050$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56051if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56052  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56053fi
56054
56055      if test $ac_cv_lib_nsl_gethostbyname = no; then
56056	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56057$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56058if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56059  $as_echo_n "(cached) " >&6
56060else
56061  ac_check_lib_save_LIBS=$LIBS
56062LIBS="-lbsd  $LIBS"
56063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56064/* end confdefs.h.  */
56065
56066/* Override any GCC internal prototype to avoid an error.
56067   Use char because int might match the return type of a GCC
56068   builtin and then its argument prototype would still apply.  */
56069#ifdef __cplusplus
56070extern "C"
56071#endif
56072char gethostbyname ();
56073int
56074main ()
56075{
56076return gethostbyname ();
56077  ;
56078  return 0;
56079}
56080_ACEOF
56081if ac_fn_cxx_try_link "$LINENO"; then :
56082  ac_cv_lib_bsd_gethostbyname=yes
56083else
56084  ac_cv_lib_bsd_gethostbyname=no
56085fi
56086rm -f core conftest.err conftest.$ac_objext \
56087    conftest$ac_exeext conftest.$ac_ext
56088LIBS=$ac_check_lib_save_LIBS
56089fi
56090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56091$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56092if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56093  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56094fi
56095
56096      fi
56097    fi
56098
56099    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56100    # socket/setsockopt and other routines are undefined under SCO ODT
56101    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56102    # on later versions), says Simon Leinen: it contains gethostby*
56103    # variants that don't use the name server (or something).  -lsocket
56104    # must be given before -lnsl if both are needed.  We assume that
56105    # if connect needs -lnsl, so does gethostbyname.
56106    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56107if test "x$ac_cv_func_connect" = xyes; then :
56108
56109fi
56110
56111    if test $ac_cv_func_connect = no; then
56112      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56113$as_echo_n "checking for connect in -lsocket... " >&6; }
56114if ${ac_cv_lib_socket_connect+:} false; then :
56115  $as_echo_n "(cached) " >&6
56116else
56117  ac_check_lib_save_LIBS=$LIBS
56118LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56120/* end confdefs.h.  */
56121
56122/* Override any GCC internal prototype to avoid an error.
56123   Use char because int might match the return type of a GCC
56124   builtin and then its argument prototype would still apply.  */
56125#ifdef __cplusplus
56126extern "C"
56127#endif
56128char connect ();
56129int
56130main ()
56131{
56132return connect ();
56133  ;
56134  return 0;
56135}
56136_ACEOF
56137if ac_fn_cxx_try_link "$LINENO"; then :
56138  ac_cv_lib_socket_connect=yes
56139else
56140  ac_cv_lib_socket_connect=no
56141fi
56142rm -f core conftest.err conftest.$ac_objext \
56143    conftest$ac_exeext conftest.$ac_ext
56144LIBS=$ac_check_lib_save_LIBS
56145fi
56146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56147$as_echo "$ac_cv_lib_socket_connect" >&6; }
56148if test "x$ac_cv_lib_socket_connect" = xyes; then :
56149  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56150fi
56151
56152    fi
56153
56154    # Guillermo Gomez says -lposix is necessary on A/UX.
56155    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56156if test "x$ac_cv_func_remove" = xyes; then :
56157
56158fi
56159
56160    if test $ac_cv_func_remove = no; then
56161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56162$as_echo_n "checking for remove in -lposix... " >&6; }
56163if ${ac_cv_lib_posix_remove+:} false; then :
56164  $as_echo_n "(cached) " >&6
56165else
56166  ac_check_lib_save_LIBS=$LIBS
56167LIBS="-lposix  $LIBS"
56168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56169/* end confdefs.h.  */
56170
56171/* Override any GCC internal prototype to avoid an error.
56172   Use char because int might match the return type of a GCC
56173   builtin and then its argument prototype would still apply.  */
56174#ifdef __cplusplus
56175extern "C"
56176#endif
56177char remove ();
56178int
56179main ()
56180{
56181return remove ();
56182  ;
56183  return 0;
56184}
56185_ACEOF
56186if ac_fn_cxx_try_link "$LINENO"; then :
56187  ac_cv_lib_posix_remove=yes
56188else
56189  ac_cv_lib_posix_remove=no
56190fi
56191rm -f core conftest.err conftest.$ac_objext \
56192    conftest$ac_exeext conftest.$ac_ext
56193LIBS=$ac_check_lib_save_LIBS
56194fi
56195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56196$as_echo "$ac_cv_lib_posix_remove" >&6; }
56197if test "x$ac_cv_lib_posix_remove" = xyes; then :
56198  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56199fi
56200
56201    fi
56202
56203    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56204    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56205if test "x$ac_cv_func_shmat" = xyes; then :
56206
56207fi
56208
56209    if test $ac_cv_func_shmat = no; then
56210      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56211$as_echo_n "checking for shmat in -lipc... " >&6; }
56212if ${ac_cv_lib_ipc_shmat+:} false; then :
56213  $as_echo_n "(cached) " >&6
56214else
56215  ac_check_lib_save_LIBS=$LIBS
56216LIBS="-lipc  $LIBS"
56217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56218/* end confdefs.h.  */
56219
56220/* Override any GCC internal prototype to avoid an error.
56221   Use char because int might match the return type of a GCC
56222   builtin and then its argument prototype would still apply.  */
56223#ifdef __cplusplus
56224extern "C"
56225#endif
56226char shmat ();
56227int
56228main ()
56229{
56230return shmat ();
56231  ;
56232  return 0;
56233}
56234_ACEOF
56235if ac_fn_cxx_try_link "$LINENO"; then :
56236  ac_cv_lib_ipc_shmat=yes
56237else
56238  ac_cv_lib_ipc_shmat=no
56239fi
56240rm -f core conftest.err conftest.$ac_objext \
56241    conftest$ac_exeext conftest.$ac_ext
56242LIBS=$ac_check_lib_save_LIBS
56243fi
56244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56245$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56246if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56247  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56248fi
56249
56250    fi
56251  fi
56252
56253  # Check for libraries that X11R6 Xt/Xaw programs need.
56254  ac_save_LDFLAGS=$LDFLAGS
56255  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56256  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56257  # check for ICE first), but we must link in the order -lSM -lICE or
56258  # we get undefined symbols.  So assume we have SM if we have ICE.
56259  # These have to be linked with before -lX11, unlike the other
56260  # libraries we check for below, so use a different variable.
56261  # John Interrante, Karl Berry
56262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56263$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56264if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56265  $as_echo_n "(cached) " >&6
56266else
56267  ac_check_lib_save_LIBS=$LIBS
56268LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56270/* end confdefs.h.  */
56271
56272/* Override any GCC internal prototype to avoid an error.
56273   Use char because int might match the return type of a GCC
56274   builtin and then its argument prototype would still apply.  */
56275#ifdef __cplusplus
56276extern "C"
56277#endif
56278char IceConnectionNumber ();
56279int
56280main ()
56281{
56282return IceConnectionNumber ();
56283  ;
56284  return 0;
56285}
56286_ACEOF
56287if ac_fn_cxx_try_link "$LINENO"; then :
56288  ac_cv_lib_ICE_IceConnectionNumber=yes
56289else
56290  ac_cv_lib_ICE_IceConnectionNumber=no
56291fi
56292rm -f core conftest.err conftest.$ac_objext \
56293    conftest$ac_exeext conftest.$ac_ext
56294LIBS=$ac_check_lib_save_LIBS
56295fi
56296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56297$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56298if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56299  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56300fi
56301
56302  LDFLAGS=$ac_save_LDFLAGS
56303
56304fi
56305
56306
56307    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56308    # this doesn't make sense so we remove it.
56309    if test "x$COMPILE_TYPE" = xcross; then
56310      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56311    fi
56312
56313    if test "x$no_x" = xyes; then
56314
56315  # Print a helpful message on how to acquire the necessary build dependency.
56316  # x11 is the help tag: freetype, cups, alsa etc
56317  MISSING_DEPENDENCY=x11
56318
56319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56320    cygwin_help $MISSING_DEPENDENCY
56321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56322    msys_help $MISSING_DEPENDENCY
56323  else
56324    PKGHANDLER_COMMAND=
56325
56326    case $PKGHANDLER in
56327      apt-get)
56328        apt_help     $MISSING_DEPENDENCY ;;
56329      yum)
56330        yum_help     $MISSING_DEPENDENCY ;;
56331      port)
56332        port_help    $MISSING_DEPENDENCY ;;
56333      pkgutil)
56334        pkgutil_help $MISSING_DEPENDENCY ;;
56335      pkgadd)
56336        pkgadd_help  $MISSING_DEPENDENCY ;;
56337    esac
56338
56339    if test "x$PKGHANDLER_COMMAND" != x; then
56340      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56341    fi
56342  fi
56343
56344      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56345    fi
56346
56347    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56348      OPENWIN_HOME="/usr/openwin"
56349      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56350      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56351          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56352          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56353          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56354    fi
56355
56356    ac_ext=c
56357ac_cpp='$CPP $CPPFLAGS'
56358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56360ac_compiler_gnu=$ac_cv_c_compiler_gnu
56361
56362    OLD_CFLAGS="$CFLAGS"
56363    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56364
56365    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56366    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56367do :
56368  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56369ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56370          # include <X11/Xlib.h>
56371          # include <X11/Xutil.h>
56372
56373
56374"
56375if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56376  cat >>confdefs.h <<_ACEOF
56377#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56378_ACEOF
56379 X11_HEADERS_OK=yes
56380else
56381  X11_HEADERS_OK=no; break
56382fi
56383
56384done
56385
56386
56387    if test "x$X11_HEADERS_OK" = xno; then
56388
56389  # Print a helpful message on how to acquire the necessary build dependency.
56390  # x11 is the help tag: freetype, cups, alsa etc
56391  MISSING_DEPENDENCY=x11
56392
56393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56394    cygwin_help $MISSING_DEPENDENCY
56395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56396    msys_help $MISSING_DEPENDENCY
56397  else
56398    PKGHANDLER_COMMAND=
56399
56400    case $PKGHANDLER in
56401      apt-get)
56402        apt_help     $MISSING_DEPENDENCY ;;
56403      yum)
56404        yum_help     $MISSING_DEPENDENCY ;;
56405      port)
56406        port_help    $MISSING_DEPENDENCY ;;
56407      pkgutil)
56408        pkgutil_help $MISSING_DEPENDENCY ;;
56409      pkgadd)
56410        pkgadd_help  $MISSING_DEPENDENCY ;;
56411    esac
56412
56413    if test "x$PKGHANDLER_COMMAND" != x; then
56414      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56415    fi
56416  fi
56417
56418      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56419    fi
56420
56421    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56422    # defined in libawt_xawt.
56423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56424$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56425    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56426/* end confdefs.h.  */
56427#include <X11/extensions/Xrender.h>
56428int
56429main ()
56430{
56431XLinearGradient x;
56432  ;
56433  return 0;
56434}
56435_ACEOF
56436if ac_fn_c_try_compile "$LINENO"; then :
56437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56438$as_echo "yes" >&6; }
56439else
56440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56441$as_echo "no" >&6; }
56442         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56443fi
56444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56445
56446    CFLAGS="$OLD_CFLAGS"
56447    ac_ext=cpp
56448ac_cpp='$CXXCPP $CPPFLAGS'
56449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56452
56453  fi # NEEDS_LIB_X11
56454
56455
56456
56457
56458
56459
56460# Check whether --with-cups was given.
56461if test "${with_cups+set}" = set; then :
56462  withval=$with_cups;
56463fi
56464
56465
56466# Check whether --with-cups-include was given.
56467if test "${with_cups_include+set}" = set; then :
56468  withval=$with_cups_include;
56469fi
56470
56471
56472  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56473    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56474        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56475      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56476$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56477    fi
56478    CUPS_CFLAGS=
56479  else
56480    CUPS_FOUND=no
56481
56482    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56483      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56484    fi
56485
56486    if test "x${with_cups}" != x; then
56487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56488$as_echo_n "checking for cups headers... " >&6; }
56489      if test -s "${with_cups}/include/cups/cups.h"; then
56490        CUPS_CFLAGS="-I${with_cups}/include"
56491        CUPS_FOUND=yes
56492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56493$as_echo "$CUPS_FOUND" >&6; }
56494      else
56495        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56496      fi
56497    fi
56498    if test "x${with_cups_include}" != x; then
56499      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56500$as_echo_n "checking for cups headers... " >&6; }
56501      if test -s "${with_cups_include}/cups/cups.h"; then
56502        CUPS_CFLAGS="-I${with_cups_include}"
56503        CUPS_FOUND=yes
56504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56505$as_echo "$CUPS_FOUND" >&6; }
56506      else
56507        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56508      fi
56509    fi
56510    if test "x$CUPS_FOUND" = xno; then
56511      # Are the cups headers installed in the default /usr/include location?
56512      for ac_header in cups/cups.h cups/ppd.h
56513do :
56514  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56515ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56516if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56517  cat >>confdefs.h <<_ACEOF
56518#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56519_ACEOF
56520
56521          CUPS_FOUND=yes
56522          CUPS_CFLAGS=
56523          DEFAULT_CUPS=yes
56524
56525fi
56526
56527done
56528
56529    fi
56530    if test "x$CUPS_FOUND" = xno; then
56531      # Getting nervous now? Lets poke around for standard Solaris third-party
56532      # package installation locations.
56533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56534$as_echo_n "checking for cups headers... " >&6; }
56535      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56536        # An SFW package seems to be installed!
56537        CUPS_FOUND=yes
56538        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56539      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56540        # A CSW package seems to be installed!
56541        CUPS_FOUND=yes
56542        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56543      fi
56544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56545$as_echo "$CUPS_FOUND" >&6; }
56546    fi
56547    if test "x$CUPS_FOUND" = xno; then
56548
56549  # Print a helpful message on how to acquire the necessary build dependency.
56550  # cups is the help tag: freetype, cups, alsa etc
56551  MISSING_DEPENDENCY=cups
56552
56553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56554    cygwin_help $MISSING_DEPENDENCY
56555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56556    msys_help $MISSING_DEPENDENCY
56557  else
56558    PKGHANDLER_COMMAND=
56559
56560    case $PKGHANDLER in
56561      apt-get)
56562        apt_help     $MISSING_DEPENDENCY ;;
56563      yum)
56564        yum_help     $MISSING_DEPENDENCY ;;
56565      port)
56566        port_help    $MISSING_DEPENDENCY ;;
56567      pkgutil)
56568        pkgutil_help $MISSING_DEPENDENCY ;;
56569      pkgadd)
56570        pkgadd_help  $MISSING_DEPENDENCY ;;
56571    esac
56572
56573    if test "x$PKGHANDLER_COMMAND" != x; then
56574      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56575    fi
56576  fi
56577
56578      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56579    fi
56580  fi
56581
56582
56583
56584
56585
56586# Check whether --with-freetype was given.
56587if test "${with_freetype+set}" = set; then :
56588  withval=$with_freetype;
56589fi
56590
56591
56592# Check whether --with-freetype-include was given.
56593if test "${with_freetype_include+set}" = set; then :
56594  withval=$with_freetype_include;
56595fi
56596
56597
56598# Check whether --with-freetype-lib was given.
56599if test "${with_freetype_lib+set}" = set; then :
56600  withval=$with_freetype_lib;
56601fi
56602
56603
56604# Check whether --with-freetype-src was given.
56605if test "${with_freetype_src+set}" = set; then :
56606  withval=$with_freetype_src;
56607fi
56608
56609  # Check whether --enable-freetype-bundling was given.
56610if test "${enable_freetype_bundling+set}" = set; then :
56611  enableval=$enable_freetype_bundling;
56612fi
56613
56614
56615  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56616  FREETYPE_BASE_NAME=freetype
56617  FREETYPE_CFLAGS=
56618  FREETYPE_LIBS=
56619  FREETYPE_BUNDLE_LIB_PATH=
56620
56621  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56622    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56623        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56624        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56625        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56626      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56627$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56628    fi
56629    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56630      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56631$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56632    fi
56633  else
56634    # freetype is needed to build; go get it!
56635
56636    BUNDLE_FREETYPE="$enable_freetype_bundling"
56637
56638    if  test "x$with_freetype_src" != x; then
56639      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56640        # Try to build freetype if --with-freetype-src was given on Windows
56641
56642  FREETYPE_SRC_PATH="$with_freetype_src"
56643  BUILD_FREETYPE=yes
56644
56645  # Check if the freetype sources are acessible..
56646  if ! test -d $FREETYPE_SRC_PATH; then
56647    { $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
56648$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56649    BUILD_FREETYPE=no
56650  fi
56651  # ..and contain a vc2010 project file
56652  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56653  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56654    { $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
56655$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56656    BUILD_FREETYPE=no
56657  fi
56658  # Now check if configure found a version of 'msbuild.exe'
56659  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56660    { $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
56661$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;}
56662    BUILD_FREETYPE=no
56663  fi
56664
56665  # Ready to go..
56666  if test "x$BUILD_FREETYPE" = xyes; then
56667    # msbuild requires trailing slashes for output directories
56668    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56669    freetype_lib_path_unix="$freetype_lib_path"
56670    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56671
56672  unix_path="$vcxproj_path"
56673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56674    windows_path=`$CYGPATH -m "$unix_path"`
56675    vcxproj_path="$windows_path"
56676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56677    windows_path=`cmd //c echo $unix_path`
56678    vcxproj_path="$windows_path"
56679  fi
56680
56681
56682  unix_path="$freetype_lib_path"
56683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56684    windows_path=`$CYGPATH -m "$unix_path"`
56685    freetype_lib_path="$windows_path"
56686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56687    windows_path=`cmd //c echo $unix_path`
56688    freetype_lib_path="$windows_path"
56689  fi
56690
56691
56692  unix_path="$freetype_obj_path"
56693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56694    windows_path=`$CYGPATH -m "$unix_path"`
56695    freetype_obj_path="$windows_path"
56696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56697    windows_path=`cmd //c echo $unix_path`
56698    freetype_obj_path="$windows_path"
56699  fi
56700
56701    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56702      freetype_platform=x64
56703    else
56704      freetype_platform=win32
56705    fi
56706
56707    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56708    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56709    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56710    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56711    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56712$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56713
56714    # First we try to build the freetype.dll
56715    $ECHO -e "@echo off\n"\
56716        "$MSBUILD $vcxproj_path "\
56717        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56718        "/p:Configuration=\"Release Multithreaded\" "\
56719        "/p:Platform=$freetype_platform "\
56720        "/p:ConfigurationType=DynamicLibrary "\
56721        "/p:TargetName=freetype "\
56722        "/p:OutDir=\"$freetype_lib_path\" "\
56723        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56724    cmd /c freetype.bat
56725
56726    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56727      # If that succeeds we also build freetype.lib
56728      $ECHO -e "@echo off\n"\
56729          "$MSBUILD $vcxproj_path "\
56730          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56731          "/p:Configuration=\"Release Multithreaded\" "\
56732          "/p:Platform=$freetype_platform "\
56733          "/p:ConfigurationType=StaticLibrary "\
56734          "/p:TargetName=freetype "\
56735          "/p:OutDir=\"$freetype_lib_path\" "\
56736          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56737      cmd /c freetype.bat
56738
56739      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56740        # Once we build both, lib and dll, set freetype lib and include path appropriately
56741        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56742        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56743        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56744$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56745      else
56746        BUILD_FREETYPE=no
56747      fi
56748    else
56749      BUILD_FREETYPE=no
56750    fi
56751  fi
56752
56753        if test "x$BUILD_FREETYPE" = xyes; then
56754          # Okay, we built it. Check that it works.
56755
56756  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56757  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56758  METHOD="--with-freetype-src"
56759
56760  # Let's start with an optimistic view of the world :-)
56761  FOUND_FREETYPE=yes
56762
56763  # First look for the canonical freetype main include file ft2build.h.
56764  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56765    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56766    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56767    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56768      # Fail.
56769      FOUND_FREETYPE=no
56770    fi
56771  fi
56772
56773  if test "x$FOUND_FREETYPE" = xyes; then
56774    # Include file found, let's continue the sanity check.
56775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56776$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56777
56778    # Reset to default value
56779    FREETYPE_BASE_NAME=freetype
56780    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56781    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56782      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56783          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56784        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56785        # for the .6 version explicitly.
56786        FREETYPE_BASE_NAME=freetype.6
56787        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56788        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56789$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56790      else
56791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56792$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56793        FOUND_FREETYPE=no
56794      fi
56795    else
56796      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56797        # On Windows, we will need both .lib and .dll file.
56798        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56799          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56800$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56801          FOUND_FREETYPE=no
56802        fi
56803      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56805        # Found lib in isa dir, use that instead.
56806        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56807        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56808$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56809      fi
56810    fi
56811  fi
56812
56813  if test "x$FOUND_FREETYPE" = xyes; then
56814
56815  # Only process if variable expands to non-empty
56816
56817  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56819
56820  # Input might be given as Windows format, start by converting to
56821  # unix format.
56822  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56823  new_path=`$CYGPATH -u "$path"`
56824
56825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56828  # "foo.exe" is OK but "foo" is an error.
56829  #
56830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56831  # It is also a way to make sure we got the proper file name for the real test later on.
56832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56833  if test "x$test_shortpath" = x; then
56834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56837  fi
56838
56839  # Call helper function which possibly converts this using DOS-style short mode.
56840  # If so, the updated path is stored in $new_path.
56841
56842  input_path="$new_path"
56843  # Check if we need to convert this using DOS-style short mode. If the path
56844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56845  # take no chances and rewrite it.
56846  # Note: m4 eats our [], so we need to use [ and ] instead.
56847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56848  if test "x$has_forbidden_chars" != x; then
56849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56853      # Going to short mode and back again did indeed matter. Since short mode is
56854      # case insensitive, let's make it lowercase to improve readability.
56855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56856      # Now convert it back to Unix-style (cygpath)
56857      input_path=`$CYGPATH -u "$shortmode_path"`
56858      new_path="$input_path"
56859    fi
56860  fi
56861
56862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56863  if test "x$test_cygdrive_prefix" = x; then
56864    # As a simple fix, exclude /usr/bin since it's not a real path.
56865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56867      # a path prefixed by /cygdrive for fixpath to work.
56868      new_path="$CYGWIN_ROOT_PATH$input_path"
56869    fi
56870  fi
56871
56872
56873  if test "x$path" != "x$new_path"; then
56874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56877  fi
56878
56879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56880
56881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56882  has_colon=`$ECHO $path | $GREP ^.:`
56883  new_path="$path"
56884  if test "x$has_colon" = x; then
56885    # Not in mixed or Windows style, start by that.
56886    new_path=`cmd //c echo $path`
56887  fi
56888
56889
56890  input_path="$new_path"
56891  # Check if we need to convert this using DOS-style short mode. If the path
56892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56893  # take no chances and rewrite it.
56894  # Note: m4 eats our [], so we need to use [ and ] instead.
56895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56896  if test "x$has_forbidden_chars" != x; then
56897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56899  fi
56900
56901
56902  windows_path="$new_path"
56903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56904    unix_path=`$CYGPATH -u "$windows_path"`
56905    new_path="$unix_path"
56906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56908    new_path="$unix_path"
56909  fi
56910
56911  if test "x$path" != "x$new_path"; then
56912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56915  fi
56916
56917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56919
56920    else
56921      # We're on a unix platform. Hooray! :)
56922      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56923      has_space=`$ECHO "$path" | $GREP " "`
56924      if test "x$has_space" != x; then
56925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56928      fi
56929
56930      # Use eval to expand a potential ~
56931      eval path="$path"
56932      if test ! -f "$path" && test ! -d "$path"; then
56933        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56934      fi
56935
56936      if test -d "$path"; then
56937        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56938      else
56939        dir="`$DIRNAME "$path"`"
56940        base="`$BASENAME "$path"`"
56941        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56942      fi
56943    fi
56944  fi
56945
56946
56947  # Only process if variable expands to non-empty
56948
56949  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56951
56952  # Input might be given as Windows format, start by converting to
56953  # unix format.
56954  path="$POTENTIAL_FREETYPE_LIB_PATH"
56955  new_path=`$CYGPATH -u "$path"`
56956
56957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56960  # "foo.exe" is OK but "foo" is an error.
56961  #
56962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56963  # It is also a way to make sure we got the proper file name for the real test later on.
56964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56965  if test "x$test_shortpath" = x; then
56966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56968    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56969  fi
56970
56971  # Call helper function which possibly converts this using DOS-style short mode.
56972  # If so, the updated path is stored in $new_path.
56973
56974  input_path="$new_path"
56975  # Check if we need to convert this using DOS-style short mode. If the path
56976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56977  # take no chances and rewrite it.
56978  # Note: m4 eats our [], so we need to use [ and ] instead.
56979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56980  if test "x$has_forbidden_chars" != x; then
56981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56985      # Going to short mode and back again did indeed matter. Since short mode is
56986      # case insensitive, let's make it lowercase to improve readability.
56987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56988      # Now convert it back to Unix-style (cygpath)
56989      input_path=`$CYGPATH -u "$shortmode_path"`
56990      new_path="$input_path"
56991    fi
56992  fi
56993
56994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56995  if test "x$test_cygdrive_prefix" = x; then
56996    # As a simple fix, exclude /usr/bin since it's not a real path.
56997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56999      # a path prefixed by /cygdrive for fixpath to work.
57000      new_path="$CYGWIN_ROOT_PATH$input_path"
57001    fi
57002  fi
57003
57004
57005  if test "x$path" != "x$new_path"; then
57006    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57009  fi
57010
57011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57012
57013  path="$POTENTIAL_FREETYPE_LIB_PATH"
57014  has_colon=`$ECHO $path | $GREP ^.:`
57015  new_path="$path"
57016  if test "x$has_colon" = x; then
57017    # Not in mixed or Windows style, start by that.
57018    new_path=`cmd //c echo $path`
57019  fi
57020
57021
57022  input_path="$new_path"
57023  # Check if we need to convert this using DOS-style short mode. If the path
57024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57025  # take no chances and rewrite it.
57026  # Note: m4 eats our [], so we need to use [ and ] instead.
57027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57028  if test "x$has_forbidden_chars" != x; then
57029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57031  fi
57032
57033
57034  windows_path="$new_path"
57035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57036    unix_path=`$CYGPATH -u "$windows_path"`
57037    new_path="$unix_path"
57038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57040    new_path="$unix_path"
57041  fi
57042
57043  if test "x$path" != "x$new_path"; then
57044    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57046$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57047  fi
57048
57049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57051
57052    else
57053      # We're on a unix platform. Hooray! :)
57054      path="$POTENTIAL_FREETYPE_LIB_PATH"
57055      has_space=`$ECHO "$path" | $GREP " "`
57056      if test "x$has_space" != x; then
57057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57060      fi
57061
57062      # Use eval to expand a potential ~
57063      eval path="$path"
57064      if test ! -f "$path" && test ! -d "$path"; then
57065        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57066      fi
57067
57068      if test -d "$path"; then
57069        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57070      else
57071        dir="`$DIRNAME "$path"`"
57072        base="`$BASENAME "$path"`"
57073        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57074      fi
57075    fi
57076  fi
57077
57078
57079    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57081$as_echo_n "checking for freetype includes... " >&6; }
57082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57083$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57084    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57086$as_echo_n "checking for freetype libraries... " >&6; }
57087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57088$as_echo "$FREETYPE_LIB_PATH" >&6; }
57089  fi
57090
57091          if test "x$FOUND_FREETYPE" != xyes; then
57092            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57093          fi
57094        else
57095          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57096$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57097          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57098        fi
57099      else
57100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57101$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57102      fi
57103    fi
57104
57105    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57106      # User has specified settings
57107
57108      if test "x$BUNDLE_FREETYPE" = x; then
57109        # If not specified, default is to bundle freetype
57110        BUNDLE_FREETYPE=yes
57111      fi
57112
57113      if test "x$with_freetype" != x; then
57114        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57115        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57116      fi
57117
57118      # Allow --with-freetype-lib and --with-freetype-include to override
57119      if test "x$with_freetype_include" != x; then
57120        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57121      fi
57122      if test "x$with_freetype_lib" != x; then
57123        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57124      fi
57125
57126      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57127        # Okay, we got it. Check that it works.
57128
57129  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57130  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57131  METHOD="--with-freetype"
57132
57133  # Let's start with an optimistic view of the world :-)
57134  FOUND_FREETYPE=yes
57135
57136  # First look for the canonical freetype main include file ft2build.h.
57137  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57138    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57139    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57140    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57141      # Fail.
57142      FOUND_FREETYPE=no
57143    fi
57144  fi
57145
57146  if test "x$FOUND_FREETYPE" = xyes; then
57147    # Include file found, let's continue the sanity check.
57148    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57149$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57150
57151    # Reset to default value
57152    FREETYPE_BASE_NAME=freetype
57153    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57154    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57155      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57156          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57157        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57158        # for the .6 version explicitly.
57159        FREETYPE_BASE_NAME=freetype.6
57160        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57161        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57162$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57163      else
57164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57165$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57166        FOUND_FREETYPE=no
57167      fi
57168    else
57169      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57170        # On Windows, we will need both .lib and .dll file.
57171        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57172          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57173$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57174          FOUND_FREETYPE=no
57175        fi
57176      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57177          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57178        # Found lib in isa dir, use that instead.
57179        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57180        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57181$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57182      fi
57183    fi
57184  fi
57185
57186  if test "x$FOUND_FREETYPE" = xyes; then
57187
57188  # Only process if variable expands to non-empty
57189
57190  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57192
57193  # Input might be given as Windows format, start by converting to
57194  # unix format.
57195  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57196  new_path=`$CYGPATH -u "$path"`
57197
57198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57201  # "foo.exe" is OK but "foo" is an error.
57202  #
57203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57204  # It is also a way to make sure we got the proper file name for the real test later on.
57205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57206  if test "x$test_shortpath" = x; then
57207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57209    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57210  fi
57211
57212  # Call helper function which possibly converts this using DOS-style short mode.
57213  # If so, the updated path is stored in $new_path.
57214
57215  input_path="$new_path"
57216  # Check if we need to convert this using DOS-style short mode. If the path
57217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57218  # take no chances and rewrite it.
57219  # Note: m4 eats our [], so we need to use [ and ] instead.
57220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57221  if test "x$has_forbidden_chars" != x; then
57222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57226      # Going to short mode and back again did indeed matter. Since short mode is
57227      # case insensitive, let's make it lowercase to improve readability.
57228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57229      # Now convert it back to Unix-style (cygpath)
57230      input_path=`$CYGPATH -u "$shortmode_path"`
57231      new_path="$input_path"
57232    fi
57233  fi
57234
57235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57236  if test "x$test_cygdrive_prefix" = x; then
57237    # As a simple fix, exclude /usr/bin since it's not a real path.
57238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57240      # a path prefixed by /cygdrive for fixpath to work.
57241      new_path="$CYGWIN_ROOT_PATH$input_path"
57242    fi
57243  fi
57244
57245
57246  if test "x$path" != "x$new_path"; then
57247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57250  fi
57251
57252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57253
57254  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57255  has_colon=`$ECHO $path | $GREP ^.:`
57256  new_path="$path"
57257  if test "x$has_colon" = x; then
57258    # Not in mixed or Windows style, start by that.
57259    new_path=`cmd //c echo $path`
57260  fi
57261
57262
57263  input_path="$new_path"
57264  # Check if we need to convert this using DOS-style short mode. If the path
57265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57266  # take no chances and rewrite it.
57267  # Note: m4 eats our [], so we need to use [ and ] instead.
57268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57269  if test "x$has_forbidden_chars" != x; then
57270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57272  fi
57273
57274
57275  windows_path="$new_path"
57276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57277    unix_path=`$CYGPATH -u "$windows_path"`
57278    new_path="$unix_path"
57279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57281    new_path="$unix_path"
57282  fi
57283
57284  if test "x$path" != "x$new_path"; then
57285    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57288  fi
57289
57290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57292
57293    else
57294      # We're on a unix platform. Hooray! :)
57295      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57296      has_space=`$ECHO "$path" | $GREP " "`
57297      if test "x$has_space" != x; then
57298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57301      fi
57302
57303      # Use eval to expand a potential ~
57304      eval path="$path"
57305      if test ! -f "$path" && test ! -d "$path"; then
57306        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57307      fi
57308
57309      if test -d "$path"; then
57310        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57311      else
57312        dir="`$DIRNAME "$path"`"
57313        base="`$BASENAME "$path"`"
57314        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57315      fi
57316    fi
57317  fi
57318
57319
57320  # Only process if variable expands to non-empty
57321
57322  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57324
57325  # Input might be given as Windows format, start by converting to
57326  # unix format.
57327  path="$POTENTIAL_FREETYPE_LIB_PATH"
57328  new_path=`$CYGPATH -u "$path"`
57329
57330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57333  # "foo.exe" is OK but "foo" is an error.
57334  #
57335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57336  # It is also a way to make sure we got the proper file name for the real test later on.
57337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57338  if test "x$test_shortpath" = x; then
57339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57341    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57342  fi
57343
57344  # Call helper function which possibly converts this using DOS-style short mode.
57345  # If so, the updated path is stored in $new_path.
57346
57347  input_path="$new_path"
57348  # Check if we need to convert this using DOS-style short mode. If the path
57349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57350  # take no chances and rewrite it.
57351  # Note: m4 eats our [], so we need to use [ and ] instead.
57352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57353  if test "x$has_forbidden_chars" != x; then
57354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57358      # Going to short mode and back again did indeed matter. Since short mode is
57359      # case insensitive, let's make it lowercase to improve readability.
57360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57361      # Now convert it back to Unix-style (cygpath)
57362      input_path=`$CYGPATH -u "$shortmode_path"`
57363      new_path="$input_path"
57364    fi
57365  fi
57366
57367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57368  if test "x$test_cygdrive_prefix" = x; then
57369    # As a simple fix, exclude /usr/bin since it's not a real path.
57370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57372      # a path prefixed by /cygdrive for fixpath to work.
57373      new_path="$CYGWIN_ROOT_PATH$input_path"
57374    fi
57375  fi
57376
57377
57378  if test "x$path" != "x$new_path"; then
57379    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57382  fi
57383
57384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57385
57386  path="$POTENTIAL_FREETYPE_LIB_PATH"
57387  has_colon=`$ECHO $path | $GREP ^.:`
57388  new_path="$path"
57389  if test "x$has_colon" = x; then
57390    # Not in mixed or Windows style, start by that.
57391    new_path=`cmd //c echo $path`
57392  fi
57393
57394
57395  input_path="$new_path"
57396  # Check if we need to convert this using DOS-style short mode. If the path
57397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57398  # take no chances and rewrite it.
57399  # Note: m4 eats our [], so we need to use [ and ] instead.
57400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57401  if test "x$has_forbidden_chars" != x; then
57402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57404  fi
57405
57406
57407  windows_path="$new_path"
57408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57409    unix_path=`$CYGPATH -u "$windows_path"`
57410    new_path="$unix_path"
57411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57413    new_path="$unix_path"
57414  fi
57415
57416  if test "x$path" != "x$new_path"; then
57417    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57420  fi
57421
57422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57424
57425    else
57426      # We're on a unix platform. Hooray! :)
57427      path="$POTENTIAL_FREETYPE_LIB_PATH"
57428      has_space=`$ECHO "$path" | $GREP " "`
57429      if test "x$has_space" != x; then
57430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57433      fi
57434
57435      # Use eval to expand a potential ~
57436      eval path="$path"
57437      if test ! -f "$path" && test ! -d "$path"; then
57438        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57439      fi
57440
57441      if test -d "$path"; then
57442        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57443      else
57444        dir="`$DIRNAME "$path"`"
57445        base="`$BASENAME "$path"`"
57446        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57447      fi
57448    fi
57449  fi
57450
57451
57452    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57454$as_echo_n "checking for freetype includes... " >&6; }
57455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57456$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57457    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57459$as_echo_n "checking for freetype libraries... " >&6; }
57460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57461$as_echo "$FREETYPE_LIB_PATH" >&6; }
57462  fi
57463
57464        if test "x$FOUND_FREETYPE" != xyes; then
57465          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57466        fi
57467      else
57468        # User specified only one of lib or include. This is an error.
57469        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57470          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57471$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57472          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57473        else
57474          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57475$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57476          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57477        fi
57478      fi
57479    else
57480      # User did not specify settings, but we need freetype. Try to locate it.
57481
57482      if test "x$BUNDLE_FREETYPE" = x; then
57483        # If not specified, default is to bundle freetype only on windows
57484        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57485          BUNDLE_FREETYPE=yes
57486        else
57487          BUNDLE_FREETYPE=no
57488        fi
57489      fi
57490
57491      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57492      if test "x$SYSROOT" = x; then
57493        if test "x$FOUND_FREETYPE" != xyes; then
57494          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57495          if test "x$PKG_CONFIG" != x; then
57496
57497pkg_failed=no
57498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57499$as_echo_n "checking for FREETYPE... " >&6; }
57500
57501if test -n "$FREETYPE_CFLAGS"; then
57502    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57503 elif test -n "$PKG_CONFIG"; then
57504    if test -n "$PKG_CONFIG" && \
57505    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57506  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57507  ac_status=$?
57508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57509  test $ac_status = 0; }; then
57510  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57511else
57512  pkg_failed=yes
57513fi
57514 else
57515    pkg_failed=untried
57516fi
57517if test -n "$FREETYPE_LIBS"; then
57518    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57519 elif test -n "$PKG_CONFIG"; then
57520    if test -n "$PKG_CONFIG" && \
57521    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57522  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57523  ac_status=$?
57524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57525  test $ac_status = 0; }; then
57526  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57527else
57528  pkg_failed=yes
57529fi
57530 else
57531    pkg_failed=untried
57532fi
57533
57534
57535
57536if test $pkg_failed = yes; then
57537
57538if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57539        _pkg_short_errors_supported=yes
57540else
57541        _pkg_short_errors_supported=no
57542fi
57543        if test $_pkg_short_errors_supported = yes; then
57544	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57545        else
57546	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57547        fi
57548	# Put the nasty error message in config.log where it belongs
57549	echo "$FREETYPE_PKG_ERRORS" >&5
57550
57551	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57552$as_echo "no" >&6; }
57553                FOUND_FREETYPE=no
57554elif test $pkg_failed = untried; then
57555	FOUND_FREETYPE=no
57556else
57557	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57558	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57560$as_echo "yes" >&6; }
57561	FOUND_FREETYPE=yes
57562fi
57563            if test "x$FOUND_FREETYPE" = xyes; then
57564              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57565              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57566              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57567              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57568                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57569              fi
57570              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57571              if test "x$BUNDLE_FREETYPE" = xyes; then
57572                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57573$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57574                FOUND_FREETYPE=no
57575              else
57576                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57577$as_echo_n "checking for freetype... " >&6; }
57578                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57579$as_echo "yes (using pkg-config)" >&6; }
57580              fi
57581            fi
57582          fi
57583        fi
57584      fi
57585
57586      if test "x$FOUND_FREETYPE" != xyes; then
57587        # Check in well-known locations
57588        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57589          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57590
57591  windows_path="$FREETYPE_BASE_DIR"
57592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57593    unix_path=`$CYGPATH -u "$windows_path"`
57594    FREETYPE_BASE_DIR="$unix_path"
57595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57597    FREETYPE_BASE_DIR="$unix_path"
57598  fi
57599
57600
57601  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57602  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57603  METHOD="well-known location"
57604
57605  # Let's start with an optimistic view of the world :-)
57606  FOUND_FREETYPE=yes
57607
57608  # First look for the canonical freetype main include file ft2build.h.
57609  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57610    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57611    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57612    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57613      # Fail.
57614      FOUND_FREETYPE=no
57615    fi
57616  fi
57617
57618  if test "x$FOUND_FREETYPE" = xyes; then
57619    # Include file found, let's continue the sanity check.
57620    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57621$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57622
57623    # Reset to default value
57624    FREETYPE_BASE_NAME=freetype
57625    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57626    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57627      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57628          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57629        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57630        # for the .6 version explicitly.
57631        FREETYPE_BASE_NAME=freetype.6
57632        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57633        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57634$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57635      else
57636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57637$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57638        FOUND_FREETYPE=no
57639      fi
57640    else
57641      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57642        # On Windows, we will need both .lib and .dll file.
57643        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57644          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57645$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57646          FOUND_FREETYPE=no
57647        fi
57648      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57649          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57650        # Found lib in isa dir, use that instead.
57651        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57652        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57653$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57654      fi
57655    fi
57656  fi
57657
57658  if test "x$FOUND_FREETYPE" = xyes; then
57659
57660  # Only process if variable expands to non-empty
57661
57662  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57664
57665  # Input might be given as Windows format, start by converting to
57666  # unix format.
57667  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57668  new_path=`$CYGPATH -u "$path"`
57669
57670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57673  # "foo.exe" is OK but "foo" is an error.
57674  #
57675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57676  # It is also a way to make sure we got the proper file name for the real test later on.
57677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57678  if test "x$test_shortpath" = x; then
57679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57681    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57682  fi
57683
57684  # Call helper function which possibly converts this using DOS-style short mode.
57685  # If so, the updated path is stored in $new_path.
57686
57687  input_path="$new_path"
57688  # Check if we need to convert this using DOS-style short mode. If the path
57689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57690  # take no chances and rewrite it.
57691  # Note: m4 eats our [], so we need to use [ and ] instead.
57692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57693  if test "x$has_forbidden_chars" != x; then
57694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57698      # Going to short mode and back again did indeed matter. Since short mode is
57699      # case insensitive, let's make it lowercase to improve readability.
57700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57701      # Now convert it back to Unix-style (cygpath)
57702      input_path=`$CYGPATH -u "$shortmode_path"`
57703      new_path="$input_path"
57704    fi
57705  fi
57706
57707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57708  if test "x$test_cygdrive_prefix" = x; then
57709    # As a simple fix, exclude /usr/bin since it's not a real path.
57710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57712      # a path prefixed by /cygdrive for fixpath to work.
57713      new_path="$CYGWIN_ROOT_PATH$input_path"
57714    fi
57715  fi
57716
57717
57718  if test "x$path" != "x$new_path"; then
57719    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57722  fi
57723
57724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57725
57726  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57727  has_colon=`$ECHO $path | $GREP ^.:`
57728  new_path="$path"
57729  if test "x$has_colon" = x; then
57730    # Not in mixed or Windows style, start by that.
57731    new_path=`cmd //c echo $path`
57732  fi
57733
57734
57735  input_path="$new_path"
57736  # Check if we need to convert this using DOS-style short mode. If the path
57737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57738  # take no chances and rewrite it.
57739  # Note: m4 eats our [], so we need to use [ and ] instead.
57740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57741  if test "x$has_forbidden_chars" != x; then
57742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57744  fi
57745
57746
57747  windows_path="$new_path"
57748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57749    unix_path=`$CYGPATH -u "$windows_path"`
57750    new_path="$unix_path"
57751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57753    new_path="$unix_path"
57754  fi
57755
57756  if test "x$path" != "x$new_path"; then
57757    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57760  fi
57761
57762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57764
57765    else
57766      # We're on a unix platform. Hooray! :)
57767      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57768      has_space=`$ECHO "$path" | $GREP " "`
57769      if test "x$has_space" != x; then
57770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57773      fi
57774
57775      # Use eval to expand a potential ~
57776      eval path="$path"
57777      if test ! -f "$path" && test ! -d "$path"; then
57778        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57779      fi
57780
57781      if test -d "$path"; then
57782        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57783      else
57784        dir="`$DIRNAME "$path"`"
57785        base="`$BASENAME "$path"`"
57786        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57787      fi
57788    fi
57789  fi
57790
57791
57792  # Only process if variable expands to non-empty
57793
57794  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57796
57797  # Input might be given as Windows format, start by converting to
57798  # unix format.
57799  path="$POTENTIAL_FREETYPE_LIB_PATH"
57800  new_path=`$CYGPATH -u "$path"`
57801
57802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57805  # "foo.exe" is OK but "foo" is an error.
57806  #
57807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57808  # It is also a way to make sure we got the proper file name for the real test later on.
57809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57810  if test "x$test_shortpath" = x; then
57811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57813    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57814  fi
57815
57816  # Call helper function which possibly converts this using DOS-style short mode.
57817  # If so, the updated path is stored in $new_path.
57818
57819  input_path="$new_path"
57820  # Check if we need to convert this using DOS-style short mode. If the path
57821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57822  # take no chances and rewrite it.
57823  # Note: m4 eats our [], so we need to use [ and ] instead.
57824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57825  if test "x$has_forbidden_chars" != x; then
57826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57830      # Going to short mode and back again did indeed matter. Since short mode is
57831      # case insensitive, let's make it lowercase to improve readability.
57832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57833      # Now convert it back to Unix-style (cygpath)
57834      input_path=`$CYGPATH -u "$shortmode_path"`
57835      new_path="$input_path"
57836    fi
57837  fi
57838
57839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57840  if test "x$test_cygdrive_prefix" = x; then
57841    # As a simple fix, exclude /usr/bin since it's not a real path.
57842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57844      # a path prefixed by /cygdrive for fixpath to work.
57845      new_path="$CYGWIN_ROOT_PATH$input_path"
57846    fi
57847  fi
57848
57849
57850  if test "x$path" != "x$new_path"; then
57851    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57853$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57854  fi
57855
57856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57857
57858  path="$POTENTIAL_FREETYPE_LIB_PATH"
57859  has_colon=`$ECHO $path | $GREP ^.:`
57860  new_path="$path"
57861  if test "x$has_colon" = x; then
57862    # Not in mixed or Windows style, start by that.
57863    new_path=`cmd //c echo $path`
57864  fi
57865
57866
57867  input_path="$new_path"
57868  # Check if we need to convert this using DOS-style short mode. If the path
57869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57870  # take no chances and rewrite it.
57871  # Note: m4 eats our [], so we need to use [ and ] instead.
57872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57873  if test "x$has_forbidden_chars" != x; then
57874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57876  fi
57877
57878
57879  windows_path="$new_path"
57880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57881    unix_path=`$CYGPATH -u "$windows_path"`
57882    new_path="$unix_path"
57883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57885    new_path="$unix_path"
57886  fi
57887
57888  if test "x$path" != "x$new_path"; then
57889    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57892  fi
57893
57894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57896
57897    else
57898      # We're on a unix platform. Hooray! :)
57899      path="$POTENTIAL_FREETYPE_LIB_PATH"
57900      has_space=`$ECHO "$path" | $GREP " "`
57901      if test "x$has_space" != x; then
57902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57905      fi
57906
57907      # Use eval to expand a potential ~
57908      eval path="$path"
57909      if test ! -f "$path" && test ! -d "$path"; then
57910        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57911      fi
57912
57913      if test -d "$path"; then
57914        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57915      else
57916        dir="`$DIRNAME "$path"`"
57917        base="`$BASENAME "$path"`"
57918        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57919      fi
57920    fi
57921  fi
57922
57923
57924    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57926$as_echo_n "checking for freetype includes... " >&6; }
57927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57928$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57929    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57931$as_echo_n "checking for freetype libraries... " >&6; }
57932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57933$as_echo "$FREETYPE_LIB_PATH" >&6; }
57934  fi
57935
57936          if test "x$FOUND_FREETYPE" != xyes; then
57937            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57938
57939  windows_path="$FREETYPE_BASE_DIR"
57940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57941    unix_path=`$CYGPATH -u "$windows_path"`
57942    FREETYPE_BASE_DIR="$unix_path"
57943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57945    FREETYPE_BASE_DIR="$unix_path"
57946  fi
57947
57948
57949  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57950  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57951  METHOD="well-known location"
57952
57953  # Let's start with an optimistic view of the world :-)
57954  FOUND_FREETYPE=yes
57955
57956  # First look for the canonical freetype main include file ft2build.h.
57957  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57958    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57959    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57960    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57961      # Fail.
57962      FOUND_FREETYPE=no
57963    fi
57964  fi
57965
57966  if test "x$FOUND_FREETYPE" = xyes; then
57967    # Include file found, let's continue the sanity check.
57968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57969$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57970
57971    # Reset to default value
57972    FREETYPE_BASE_NAME=freetype
57973    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57974    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57975      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57977        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57978        # for the .6 version explicitly.
57979        FREETYPE_BASE_NAME=freetype.6
57980        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57981        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57982$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57983      else
57984        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57986        FOUND_FREETYPE=no
57987      fi
57988    else
57989      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57990        # On Windows, we will need both .lib and .dll file.
57991        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57992          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57993$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57994          FOUND_FREETYPE=no
57995        fi
57996      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57997          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57998        # Found lib in isa dir, use that instead.
57999        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58000        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58001$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58002      fi
58003    fi
58004  fi
58005
58006  if test "x$FOUND_FREETYPE" = xyes; then
58007
58008  # Only process if variable expands to non-empty
58009
58010  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58012
58013  # Input might be given as Windows format, start by converting to
58014  # unix format.
58015  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58016  new_path=`$CYGPATH -u "$path"`
58017
58018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58021  # "foo.exe" is OK but "foo" is an error.
58022  #
58023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58024  # It is also a way to make sure we got the proper file name for the real test later on.
58025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58026  if test "x$test_shortpath" = x; then
58027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58030  fi
58031
58032  # Call helper function which possibly converts this using DOS-style short mode.
58033  # If so, the updated path is stored in $new_path.
58034
58035  input_path="$new_path"
58036  # Check if we need to convert this using DOS-style short mode. If the path
58037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58038  # take no chances and rewrite it.
58039  # Note: m4 eats our [], so we need to use [ and ] instead.
58040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58041  if test "x$has_forbidden_chars" != x; then
58042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58046      # Going to short mode and back again did indeed matter. Since short mode is
58047      # case insensitive, let's make it lowercase to improve readability.
58048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58049      # Now convert it back to Unix-style (cygpath)
58050      input_path=`$CYGPATH -u "$shortmode_path"`
58051      new_path="$input_path"
58052    fi
58053  fi
58054
58055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58056  if test "x$test_cygdrive_prefix" = x; then
58057    # As a simple fix, exclude /usr/bin since it's not a real path.
58058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58060      # a path prefixed by /cygdrive for fixpath to work.
58061      new_path="$CYGWIN_ROOT_PATH$input_path"
58062    fi
58063  fi
58064
58065
58066  if test "x$path" != "x$new_path"; then
58067    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58070  fi
58071
58072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58073
58074  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58075  has_colon=`$ECHO $path | $GREP ^.:`
58076  new_path="$path"
58077  if test "x$has_colon" = x; then
58078    # Not in mixed or Windows style, start by that.
58079    new_path=`cmd //c echo $path`
58080  fi
58081
58082
58083  input_path="$new_path"
58084  # Check if we need to convert this using DOS-style short mode. If the path
58085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58086  # take no chances and rewrite it.
58087  # Note: m4 eats our [], so we need to use [ and ] instead.
58088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58089  if test "x$has_forbidden_chars" != x; then
58090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58092  fi
58093
58094
58095  windows_path="$new_path"
58096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58097    unix_path=`$CYGPATH -u "$windows_path"`
58098    new_path="$unix_path"
58099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58101    new_path="$unix_path"
58102  fi
58103
58104  if test "x$path" != "x$new_path"; then
58105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58108  fi
58109
58110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58112
58113    else
58114      # We're on a unix platform. Hooray! :)
58115      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58116      has_space=`$ECHO "$path" | $GREP " "`
58117      if test "x$has_space" != x; then
58118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58121      fi
58122
58123      # Use eval to expand a potential ~
58124      eval path="$path"
58125      if test ! -f "$path" && test ! -d "$path"; then
58126        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58127      fi
58128
58129      if test -d "$path"; then
58130        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58131      else
58132        dir="`$DIRNAME "$path"`"
58133        base="`$BASENAME "$path"`"
58134        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58135      fi
58136    fi
58137  fi
58138
58139
58140  # Only process if variable expands to non-empty
58141
58142  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58144
58145  # Input might be given as Windows format, start by converting to
58146  # unix format.
58147  path="$POTENTIAL_FREETYPE_LIB_PATH"
58148  new_path=`$CYGPATH -u "$path"`
58149
58150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58153  # "foo.exe" is OK but "foo" is an error.
58154  #
58155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58156  # It is also a way to make sure we got the proper file name for the real test later on.
58157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58158  if test "x$test_shortpath" = x; then
58159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58161    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58162  fi
58163
58164  # Call helper function which possibly converts this using DOS-style short mode.
58165  # If so, the updated path is stored in $new_path.
58166
58167  input_path="$new_path"
58168  # Check if we need to convert this using DOS-style short mode. If the path
58169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58170  # take no chances and rewrite it.
58171  # Note: m4 eats our [], so we need to use [ and ] instead.
58172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58173  if test "x$has_forbidden_chars" != x; then
58174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58178      # Going to short mode and back again did indeed matter. Since short mode is
58179      # case insensitive, let's make it lowercase to improve readability.
58180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58181      # Now convert it back to Unix-style (cygpath)
58182      input_path=`$CYGPATH -u "$shortmode_path"`
58183      new_path="$input_path"
58184    fi
58185  fi
58186
58187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58188  if test "x$test_cygdrive_prefix" = x; then
58189    # As a simple fix, exclude /usr/bin since it's not a real path.
58190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58192      # a path prefixed by /cygdrive for fixpath to work.
58193      new_path="$CYGWIN_ROOT_PATH$input_path"
58194    fi
58195  fi
58196
58197
58198  if test "x$path" != "x$new_path"; then
58199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58202  fi
58203
58204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58205
58206  path="$POTENTIAL_FREETYPE_LIB_PATH"
58207  has_colon=`$ECHO $path | $GREP ^.:`
58208  new_path="$path"
58209  if test "x$has_colon" = x; then
58210    # Not in mixed or Windows style, start by that.
58211    new_path=`cmd //c echo $path`
58212  fi
58213
58214
58215  input_path="$new_path"
58216  # Check if we need to convert this using DOS-style short mode. If the path
58217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58218  # take no chances and rewrite it.
58219  # Note: m4 eats our [], so we need to use [ and ] instead.
58220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58221  if test "x$has_forbidden_chars" != x; then
58222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58224  fi
58225
58226
58227  windows_path="$new_path"
58228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58229    unix_path=`$CYGPATH -u "$windows_path"`
58230    new_path="$unix_path"
58231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58233    new_path="$unix_path"
58234  fi
58235
58236  if test "x$path" != "x$new_path"; then
58237    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58240  fi
58241
58242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58244
58245    else
58246      # We're on a unix platform. Hooray! :)
58247      path="$POTENTIAL_FREETYPE_LIB_PATH"
58248      has_space=`$ECHO "$path" | $GREP " "`
58249      if test "x$has_space" != x; then
58250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58253      fi
58254
58255      # Use eval to expand a potential ~
58256      eval path="$path"
58257      if test ! -f "$path" && test ! -d "$path"; then
58258        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58259      fi
58260
58261      if test -d "$path"; then
58262        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58263      else
58264        dir="`$DIRNAME "$path"`"
58265        base="`$BASENAME "$path"`"
58266        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58267      fi
58268    fi
58269  fi
58270
58271
58272    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58274$as_echo_n "checking for freetype includes... " >&6; }
58275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58276$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58277    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58279$as_echo_n "checking for freetype libraries... " >&6; }
58280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58281$as_echo "$FREETYPE_LIB_PATH" >&6; }
58282  fi
58283
58284          fi
58285          if test "x$FOUND_FREETYPE" != xyes; then
58286            FREETYPE_BASE_DIR="$HOME/freetype"
58287
58288  windows_path="$FREETYPE_BASE_DIR"
58289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58290    unix_path=`$CYGPATH -u "$windows_path"`
58291    FREETYPE_BASE_DIR="$unix_path"
58292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58294    FREETYPE_BASE_DIR="$unix_path"
58295  fi
58296
58297            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58298
58299  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58300  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58301  METHOD="well-known location"
58302
58303  # Let's start with an optimistic view of the world :-)
58304  FOUND_FREETYPE=yes
58305
58306  # First look for the canonical freetype main include file ft2build.h.
58307  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58308    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58309    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58310    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58311      # Fail.
58312      FOUND_FREETYPE=no
58313    fi
58314  fi
58315
58316  if test "x$FOUND_FREETYPE" = xyes; then
58317    # Include file found, let's continue the sanity check.
58318    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58319$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58320
58321    # Reset to default value
58322    FREETYPE_BASE_NAME=freetype
58323    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58324    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58325      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58326          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58327        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58328        # for the .6 version explicitly.
58329        FREETYPE_BASE_NAME=freetype.6
58330        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58331        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58332$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58333      else
58334        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58335$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58336        FOUND_FREETYPE=no
58337      fi
58338    else
58339      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58340        # On Windows, we will need both .lib and .dll file.
58341        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58342          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58343$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58344          FOUND_FREETYPE=no
58345        fi
58346      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58347          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58348        # Found lib in isa dir, use that instead.
58349        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58350        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58351$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58352      fi
58353    fi
58354  fi
58355
58356  if test "x$FOUND_FREETYPE" = xyes; then
58357
58358  # Only process if variable expands to non-empty
58359
58360  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58362
58363  # Input might be given as Windows format, start by converting to
58364  # unix format.
58365  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58366  new_path=`$CYGPATH -u "$path"`
58367
58368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58371  # "foo.exe" is OK but "foo" is an error.
58372  #
58373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58374  # It is also a way to make sure we got the proper file name for the real test later on.
58375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58376  if test "x$test_shortpath" = x; then
58377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58378$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58379    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58380  fi
58381
58382  # Call helper function which possibly converts this using DOS-style short mode.
58383  # If so, the updated path is stored in $new_path.
58384
58385  input_path="$new_path"
58386  # Check if we need to convert this using DOS-style short mode. If the path
58387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58388  # take no chances and rewrite it.
58389  # Note: m4 eats our [], so we need to use [ and ] instead.
58390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58391  if test "x$has_forbidden_chars" != x; then
58392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58396      # Going to short mode and back again did indeed matter. Since short mode is
58397      # case insensitive, let's make it lowercase to improve readability.
58398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58399      # Now convert it back to Unix-style (cygpath)
58400      input_path=`$CYGPATH -u "$shortmode_path"`
58401      new_path="$input_path"
58402    fi
58403  fi
58404
58405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58406  if test "x$test_cygdrive_prefix" = x; then
58407    # As a simple fix, exclude /usr/bin since it's not a real path.
58408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58410      # a path prefixed by /cygdrive for fixpath to work.
58411      new_path="$CYGWIN_ROOT_PATH$input_path"
58412    fi
58413  fi
58414
58415
58416  if test "x$path" != "x$new_path"; then
58417    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58420  fi
58421
58422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58423
58424  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58425  has_colon=`$ECHO $path | $GREP ^.:`
58426  new_path="$path"
58427  if test "x$has_colon" = x; then
58428    # Not in mixed or Windows style, start by that.
58429    new_path=`cmd //c echo $path`
58430  fi
58431
58432
58433  input_path="$new_path"
58434  # Check if we need to convert this using DOS-style short mode. If the path
58435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58436  # take no chances and rewrite it.
58437  # Note: m4 eats our [], so we need to use [ and ] instead.
58438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58439  if test "x$has_forbidden_chars" != x; then
58440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58442  fi
58443
58444
58445  windows_path="$new_path"
58446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58447    unix_path=`$CYGPATH -u "$windows_path"`
58448    new_path="$unix_path"
58449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58451    new_path="$unix_path"
58452  fi
58453
58454  if test "x$path" != "x$new_path"; then
58455    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58458  fi
58459
58460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58462
58463    else
58464      # We're on a unix platform. Hooray! :)
58465      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58466      has_space=`$ECHO "$path" | $GREP " "`
58467      if test "x$has_space" != x; then
58468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58469$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58471      fi
58472
58473      # Use eval to expand a potential ~
58474      eval path="$path"
58475      if test ! -f "$path" && test ! -d "$path"; then
58476        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58477      fi
58478
58479      if test -d "$path"; then
58480        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58481      else
58482        dir="`$DIRNAME "$path"`"
58483        base="`$BASENAME "$path"`"
58484        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58485      fi
58486    fi
58487  fi
58488
58489
58490  # Only process if variable expands to non-empty
58491
58492  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58494
58495  # Input might be given as Windows format, start by converting to
58496  # unix format.
58497  path="$POTENTIAL_FREETYPE_LIB_PATH"
58498  new_path=`$CYGPATH -u "$path"`
58499
58500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58503  # "foo.exe" is OK but "foo" is an error.
58504  #
58505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58506  # It is also a way to make sure we got the proper file name for the real test later on.
58507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58508  if test "x$test_shortpath" = x; then
58509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58512  fi
58513
58514  # Call helper function which possibly converts this using DOS-style short mode.
58515  # If so, the updated path is stored in $new_path.
58516
58517  input_path="$new_path"
58518  # Check if we need to convert this using DOS-style short mode. If the path
58519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58520  # take no chances and rewrite it.
58521  # Note: m4 eats our [], so we need to use [ and ] instead.
58522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58523  if test "x$has_forbidden_chars" != x; then
58524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58528      # Going to short mode and back again did indeed matter. Since short mode is
58529      # case insensitive, let's make it lowercase to improve readability.
58530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58531      # Now convert it back to Unix-style (cygpath)
58532      input_path=`$CYGPATH -u "$shortmode_path"`
58533      new_path="$input_path"
58534    fi
58535  fi
58536
58537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58538  if test "x$test_cygdrive_prefix" = x; then
58539    # As a simple fix, exclude /usr/bin since it's not a real path.
58540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58542      # a path prefixed by /cygdrive for fixpath to work.
58543      new_path="$CYGWIN_ROOT_PATH$input_path"
58544    fi
58545  fi
58546
58547
58548  if test "x$path" != "x$new_path"; then
58549    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58552  fi
58553
58554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58555
58556  path="$POTENTIAL_FREETYPE_LIB_PATH"
58557  has_colon=`$ECHO $path | $GREP ^.:`
58558  new_path="$path"
58559  if test "x$has_colon" = x; then
58560    # Not in mixed or Windows style, start by that.
58561    new_path=`cmd //c echo $path`
58562  fi
58563
58564
58565  input_path="$new_path"
58566  # Check if we need to convert this using DOS-style short mode. If the path
58567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58568  # take no chances and rewrite it.
58569  # Note: m4 eats our [], so we need to use [ and ] instead.
58570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58571  if test "x$has_forbidden_chars" != x; then
58572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58574  fi
58575
58576
58577  windows_path="$new_path"
58578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58579    unix_path=`$CYGPATH -u "$windows_path"`
58580    new_path="$unix_path"
58581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58583    new_path="$unix_path"
58584  fi
58585
58586  if test "x$path" != "x$new_path"; then
58587    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58590  fi
58591
58592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58594
58595    else
58596      # We're on a unix platform. Hooray! :)
58597      path="$POTENTIAL_FREETYPE_LIB_PATH"
58598      has_space=`$ECHO "$path" | $GREP " "`
58599      if test "x$has_space" != x; then
58600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58603      fi
58604
58605      # Use eval to expand a potential ~
58606      eval path="$path"
58607      if test ! -f "$path" && test ! -d "$path"; then
58608        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58609      fi
58610
58611      if test -d "$path"; then
58612        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58613      else
58614        dir="`$DIRNAME "$path"`"
58615        base="`$BASENAME "$path"`"
58616        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58617      fi
58618    fi
58619  fi
58620
58621
58622    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58624$as_echo_n "checking for freetype includes... " >&6; }
58625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58626$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58627    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58629$as_echo_n "checking for freetype libraries... " >&6; }
58630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58631$as_echo "$FREETYPE_LIB_PATH" >&6; }
58632  fi
58633
58634            else
58635
58636  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58637  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58638  METHOD="well-known location"
58639
58640  # Let's start with an optimistic view of the world :-)
58641  FOUND_FREETYPE=yes
58642
58643  # First look for the canonical freetype main include file ft2build.h.
58644  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58645    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58646    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58647    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58648      # Fail.
58649      FOUND_FREETYPE=no
58650    fi
58651  fi
58652
58653  if test "x$FOUND_FREETYPE" = xyes; then
58654    # Include file found, let's continue the sanity check.
58655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58656$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58657
58658    # Reset to default value
58659    FREETYPE_BASE_NAME=freetype
58660    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58661    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58662      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58663          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58664        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58665        # for the .6 version explicitly.
58666        FREETYPE_BASE_NAME=freetype.6
58667        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58668        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58669$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58670      else
58671        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58672$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58673        FOUND_FREETYPE=no
58674      fi
58675    else
58676      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58677        # On Windows, we will need both .lib and .dll file.
58678        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58679          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58680$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58681          FOUND_FREETYPE=no
58682        fi
58683      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58684          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58685        # Found lib in isa dir, use that instead.
58686        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58687        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58688$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58689      fi
58690    fi
58691  fi
58692
58693  if test "x$FOUND_FREETYPE" = xyes; then
58694
58695  # Only process if variable expands to non-empty
58696
58697  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58699
58700  # Input might be given as Windows format, start by converting to
58701  # unix format.
58702  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58703  new_path=`$CYGPATH -u "$path"`
58704
58705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58708  # "foo.exe" is OK but "foo" is an error.
58709  #
58710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58711  # It is also a way to make sure we got the proper file name for the real test later on.
58712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58713  if test "x$test_shortpath" = x; then
58714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58715$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58716    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58717  fi
58718
58719  # Call helper function which possibly converts this using DOS-style short mode.
58720  # If so, the updated path is stored in $new_path.
58721
58722  input_path="$new_path"
58723  # Check if we need to convert this using DOS-style short mode. If the path
58724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58725  # take no chances and rewrite it.
58726  # Note: m4 eats our [], so we need to use [ and ] instead.
58727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58728  if test "x$has_forbidden_chars" != x; then
58729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58733      # Going to short mode and back again did indeed matter. Since short mode is
58734      # case insensitive, let's make it lowercase to improve readability.
58735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58736      # Now convert it back to Unix-style (cygpath)
58737      input_path=`$CYGPATH -u "$shortmode_path"`
58738      new_path="$input_path"
58739    fi
58740  fi
58741
58742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58743  if test "x$test_cygdrive_prefix" = x; then
58744    # As a simple fix, exclude /usr/bin since it's not a real path.
58745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58747      # a path prefixed by /cygdrive for fixpath to work.
58748      new_path="$CYGWIN_ROOT_PATH$input_path"
58749    fi
58750  fi
58751
58752
58753  if test "x$path" != "x$new_path"; then
58754    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58757  fi
58758
58759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58760
58761  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58762  has_colon=`$ECHO $path | $GREP ^.:`
58763  new_path="$path"
58764  if test "x$has_colon" = x; then
58765    # Not in mixed or Windows style, start by that.
58766    new_path=`cmd //c echo $path`
58767  fi
58768
58769
58770  input_path="$new_path"
58771  # Check if we need to convert this using DOS-style short mode. If the path
58772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58773  # take no chances and rewrite it.
58774  # Note: m4 eats our [], so we need to use [ and ] instead.
58775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58776  if test "x$has_forbidden_chars" != x; then
58777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58779  fi
58780
58781
58782  windows_path="$new_path"
58783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58784    unix_path=`$CYGPATH -u "$windows_path"`
58785    new_path="$unix_path"
58786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58788    new_path="$unix_path"
58789  fi
58790
58791  if test "x$path" != "x$new_path"; then
58792    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58795  fi
58796
58797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58799
58800    else
58801      # We're on a unix platform. Hooray! :)
58802      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58803      has_space=`$ECHO "$path" | $GREP " "`
58804      if test "x$has_space" != x; then
58805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58807        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58808      fi
58809
58810      # Use eval to expand a potential ~
58811      eval path="$path"
58812      if test ! -f "$path" && test ! -d "$path"; then
58813        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58814      fi
58815
58816      if test -d "$path"; then
58817        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58818      else
58819        dir="`$DIRNAME "$path"`"
58820        base="`$BASENAME "$path"`"
58821        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58822      fi
58823    fi
58824  fi
58825
58826
58827  # Only process if variable expands to non-empty
58828
58829  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58831
58832  # Input might be given as Windows format, start by converting to
58833  # unix format.
58834  path="$POTENTIAL_FREETYPE_LIB_PATH"
58835  new_path=`$CYGPATH -u "$path"`
58836
58837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58840  # "foo.exe" is OK but "foo" is an error.
58841  #
58842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58843  # It is also a way to make sure we got the proper file name for the real test later on.
58844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58845  if test "x$test_shortpath" = x; then
58846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58847$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58848    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58849  fi
58850
58851  # Call helper function which possibly converts this using DOS-style short mode.
58852  # If so, the updated path is stored in $new_path.
58853
58854  input_path="$new_path"
58855  # Check if we need to convert this using DOS-style short mode. If the path
58856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58857  # take no chances and rewrite it.
58858  # Note: m4 eats our [], so we need to use [ and ] instead.
58859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58860  if test "x$has_forbidden_chars" != x; then
58861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58865      # Going to short mode and back again did indeed matter. Since short mode is
58866      # case insensitive, let's make it lowercase to improve readability.
58867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58868      # Now convert it back to Unix-style (cygpath)
58869      input_path=`$CYGPATH -u "$shortmode_path"`
58870      new_path="$input_path"
58871    fi
58872  fi
58873
58874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58875  if test "x$test_cygdrive_prefix" = x; then
58876    # As a simple fix, exclude /usr/bin since it's not a real path.
58877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58879      # a path prefixed by /cygdrive for fixpath to work.
58880      new_path="$CYGWIN_ROOT_PATH$input_path"
58881    fi
58882  fi
58883
58884
58885  if test "x$path" != "x$new_path"; then
58886    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58889  fi
58890
58891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58892
58893  path="$POTENTIAL_FREETYPE_LIB_PATH"
58894  has_colon=`$ECHO $path | $GREP ^.:`
58895  new_path="$path"
58896  if test "x$has_colon" = x; then
58897    # Not in mixed or Windows style, start by that.
58898    new_path=`cmd //c echo $path`
58899  fi
58900
58901
58902  input_path="$new_path"
58903  # Check if we need to convert this using DOS-style short mode. If the path
58904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58905  # take no chances and rewrite it.
58906  # Note: m4 eats our [], so we need to use [ and ] instead.
58907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58908  if test "x$has_forbidden_chars" != x; then
58909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58911  fi
58912
58913
58914  windows_path="$new_path"
58915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58916    unix_path=`$CYGPATH -u "$windows_path"`
58917    new_path="$unix_path"
58918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58920    new_path="$unix_path"
58921  fi
58922
58923  if test "x$path" != "x$new_path"; then
58924    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58926$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58927  fi
58928
58929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58931
58932    else
58933      # We're on a unix platform. Hooray! :)
58934      path="$POTENTIAL_FREETYPE_LIB_PATH"
58935      has_space=`$ECHO "$path" | $GREP " "`
58936      if test "x$has_space" != x; then
58937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58940      fi
58941
58942      # Use eval to expand a potential ~
58943      eval path="$path"
58944      if test ! -f "$path" && test ! -d "$path"; then
58945        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58946      fi
58947
58948      if test -d "$path"; then
58949        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58950      else
58951        dir="`$DIRNAME "$path"`"
58952        base="`$BASENAME "$path"`"
58953        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58954      fi
58955    fi
58956  fi
58957
58958
58959    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58961$as_echo_n "checking for freetype includes... " >&6; }
58962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58963$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58964    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58966$as_echo_n "checking for freetype libraries... " >&6; }
58967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58968$as_echo "$FREETYPE_LIB_PATH" >&6; }
58969  fi
58970
58971            fi
58972            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58973                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58974              # Source is available, as a last resort try to build freetype in default location
58975
58976  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58977  BUILD_FREETYPE=yes
58978
58979  # Check if the freetype sources are acessible..
58980  if ! test -d $FREETYPE_SRC_PATH; then
58981    { $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
58982$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58983    BUILD_FREETYPE=no
58984  fi
58985  # ..and contain a vc2010 project file
58986  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58987  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58988    { $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
58989$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58990    BUILD_FREETYPE=no
58991  fi
58992  # Now check if configure found a version of 'msbuild.exe'
58993  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58994    { $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
58995$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;}
58996    BUILD_FREETYPE=no
58997  fi
58998
58999  # Ready to go..
59000  if test "x$BUILD_FREETYPE" = xyes; then
59001    # msbuild requires trailing slashes for output directories
59002    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59003    freetype_lib_path_unix="$freetype_lib_path"
59004    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59005
59006  unix_path="$vcxproj_path"
59007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59008    windows_path=`$CYGPATH -m "$unix_path"`
59009    vcxproj_path="$windows_path"
59010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59011    windows_path=`cmd //c echo $unix_path`
59012    vcxproj_path="$windows_path"
59013  fi
59014
59015
59016  unix_path="$freetype_lib_path"
59017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59018    windows_path=`$CYGPATH -m "$unix_path"`
59019    freetype_lib_path="$windows_path"
59020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59021    windows_path=`cmd //c echo $unix_path`
59022    freetype_lib_path="$windows_path"
59023  fi
59024
59025
59026  unix_path="$freetype_obj_path"
59027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59028    windows_path=`$CYGPATH -m "$unix_path"`
59029    freetype_obj_path="$windows_path"
59030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59031    windows_path=`cmd //c echo $unix_path`
59032    freetype_obj_path="$windows_path"
59033  fi
59034
59035    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59036      freetype_platform=x64
59037    else
59038      freetype_platform=win32
59039    fi
59040
59041    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59042    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59043    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59044    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59045    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59046$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59047
59048    # First we try to build the freetype.dll
59049    $ECHO -e "@echo off\n"\
59050        "$MSBUILD $vcxproj_path "\
59051        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59052        "/p:Configuration=\"Release Multithreaded\" "\
59053        "/p:Platform=$freetype_platform "\
59054        "/p:ConfigurationType=DynamicLibrary "\
59055        "/p:TargetName=freetype "\
59056        "/p:OutDir=\"$freetype_lib_path\" "\
59057        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59058    cmd /c freetype.bat
59059
59060    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59061      # If that succeeds we also build freetype.lib
59062      $ECHO -e "@echo off\n"\
59063          "$MSBUILD $vcxproj_path "\
59064          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59065          "/p:Configuration=\"Release Multithreaded\" "\
59066          "/p:Platform=$freetype_platform "\
59067          "/p:ConfigurationType=StaticLibrary "\
59068          "/p:TargetName=freetype "\
59069          "/p:OutDir=\"$freetype_lib_path\" "\
59070          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59071      cmd /c freetype.bat
59072
59073      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59074        # Once we build both, lib and dll, set freetype lib and include path appropriately
59075        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59076        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59077        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59078$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59079      else
59080        BUILD_FREETYPE=no
59081      fi
59082    else
59083      BUILD_FREETYPE=no
59084    fi
59085  fi
59086
59087              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59088
59089  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59090  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59091  METHOD="well-known location"
59092
59093  # Let's start with an optimistic view of the world :-)
59094  FOUND_FREETYPE=yes
59095
59096  # First look for the canonical freetype main include file ft2build.h.
59097  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59098    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59099    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59100    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59101      # Fail.
59102      FOUND_FREETYPE=no
59103    fi
59104  fi
59105
59106  if test "x$FOUND_FREETYPE" = xyes; then
59107    # Include file found, let's continue the sanity check.
59108    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59109$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59110
59111    # Reset to default value
59112    FREETYPE_BASE_NAME=freetype
59113    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59114    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59115      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59116          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59117        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59118        # for the .6 version explicitly.
59119        FREETYPE_BASE_NAME=freetype.6
59120        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59121        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59122$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59123      else
59124        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59126        FOUND_FREETYPE=no
59127      fi
59128    else
59129      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59130        # On Windows, we will need both .lib and .dll file.
59131        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59132          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59133$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59134          FOUND_FREETYPE=no
59135        fi
59136      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59137          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59138        # Found lib in isa dir, use that instead.
59139        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59140        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59141$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59142      fi
59143    fi
59144  fi
59145
59146  if test "x$FOUND_FREETYPE" = xyes; then
59147
59148  # Only process if variable expands to non-empty
59149
59150  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59152
59153  # Input might be given as Windows format, start by converting to
59154  # unix format.
59155  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59156  new_path=`$CYGPATH -u "$path"`
59157
59158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59161  # "foo.exe" is OK but "foo" is an error.
59162  #
59163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59164  # It is also a way to make sure we got the proper file name for the real test later on.
59165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59166  if test "x$test_shortpath" = x; then
59167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59170  fi
59171
59172  # Call helper function which possibly converts this using DOS-style short mode.
59173  # If so, the updated path is stored in $new_path.
59174
59175  input_path="$new_path"
59176  # Check if we need to convert this using DOS-style short mode. If the path
59177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59178  # take no chances and rewrite it.
59179  # Note: m4 eats our [], so we need to use [ and ] instead.
59180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59181  if test "x$has_forbidden_chars" != x; then
59182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59186      # Going to short mode and back again did indeed matter. Since short mode is
59187      # case insensitive, let's make it lowercase to improve readability.
59188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59189      # Now convert it back to Unix-style (cygpath)
59190      input_path=`$CYGPATH -u "$shortmode_path"`
59191      new_path="$input_path"
59192    fi
59193  fi
59194
59195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59196  if test "x$test_cygdrive_prefix" = x; then
59197    # As a simple fix, exclude /usr/bin since it's not a real path.
59198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59200      # a path prefixed by /cygdrive for fixpath to work.
59201      new_path="$CYGWIN_ROOT_PATH$input_path"
59202    fi
59203  fi
59204
59205
59206  if test "x$path" != "x$new_path"; then
59207    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59210  fi
59211
59212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59213
59214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59215  has_colon=`$ECHO $path | $GREP ^.:`
59216  new_path="$path"
59217  if test "x$has_colon" = x; then
59218    # Not in mixed or Windows style, start by that.
59219    new_path=`cmd //c echo $path`
59220  fi
59221
59222
59223  input_path="$new_path"
59224  # Check if we need to convert this using DOS-style short mode. If the path
59225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59226  # take no chances and rewrite it.
59227  # Note: m4 eats our [], so we need to use [ and ] instead.
59228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59229  if test "x$has_forbidden_chars" != x; then
59230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59232  fi
59233
59234
59235  windows_path="$new_path"
59236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59237    unix_path=`$CYGPATH -u "$windows_path"`
59238    new_path="$unix_path"
59239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59241    new_path="$unix_path"
59242  fi
59243
59244  if test "x$path" != "x$new_path"; then
59245    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59248  fi
59249
59250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59252
59253    else
59254      # We're on a unix platform. Hooray! :)
59255      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59256      has_space=`$ECHO "$path" | $GREP " "`
59257      if test "x$has_space" != x; then
59258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59261      fi
59262
59263      # Use eval to expand a potential ~
59264      eval path="$path"
59265      if test ! -f "$path" && test ! -d "$path"; then
59266        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59267      fi
59268
59269      if test -d "$path"; then
59270        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59271      else
59272        dir="`$DIRNAME "$path"`"
59273        base="`$BASENAME "$path"`"
59274        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59275      fi
59276    fi
59277  fi
59278
59279
59280  # Only process if variable expands to non-empty
59281
59282  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59284
59285  # Input might be given as Windows format, start by converting to
59286  # unix format.
59287  path="$POTENTIAL_FREETYPE_LIB_PATH"
59288  new_path=`$CYGPATH -u "$path"`
59289
59290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59293  # "foo.exe" is OK but "foo" is an error.
59294  #
59295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59296  # It is also a way to make sure we got the proper file name for the real test later on.
59297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59298  if test "x$test_shortpath" = x; then
59299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59301    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59302  fi
59303
59304  # Call helper function which possibly converts this using DOS-style short mode.
59305  # If so, the updated path is stored in $new_path.
59306
59307  input_path="$new_path"
59308  # Check if we need to convert this using DOS-style short mode. If the path
59309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59310  # take no chances and rewrite it.
59311  # Note: m4 eats our [], so we need to use [ and ] instead.
59312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59313  if test "x$has_forbidden_chars" != x; then
59314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59318      # Going to short mode and back again did indeed matter. Since short mode is
59319      # case insensitive, let's make it lowercase to improve readability.
59320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59321      # Now convert it back to Unix-style (cygpath)
59322      input_path=`$CYGPATH -u "$shortmode_path"`
59323      new_path="$input_path"
59324    fi
59325  fi
59326
59327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59328  if test "x$test_cygdrive_prefix" = x; then
59329    # As a simple fix, exclude /usr/bin since it's not a real path.
59330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59332      # a path prefixed by /cygdrive for fixpath to work.
59333      new_path="$CYGWIN_ROOT_PATH$input_path"
59334    fi
59335  fi
59336
59337
59338  if test "x$path" != "x$new_path"; then
59339    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59342  fi
59343
59344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59345
59346  path="$POTENTIAL_FREETYPE_LIB_PATH"
59347  has_colon=`$ECHO $path | $GREP ^.:`
59348  new_path="$path"
59349  if test "x$has_colon" = x; then
59350    # Not in mixed or Windows style, start by that.
59351    new_path=`cmd //c echo $path`
59352  fi
59353
59354
59355  input_path="$new_path"
59356  # Check if we need to convert this using DOS-style short mode. If the path
59357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59358  # take no chances and rewrite it.
59359  # Note: m4 eats our [], so we need to use [ and ] instead.
59360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59361  if test "x$has_forbidden_chars" != x; then
59362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59364  fi
59365
59366
59367  windows_path="$new_path"
59368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59369    unix_path=`$CYGPATH -u "$windows_path"`
59370    new_path="$unix_path"
59371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59373    new_path="$unix_path"
59374  fi
59375
59376  if test "x$path" != "x$new_path"; then
59377    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59380  fi
59381
59382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59384
59385    else
59386      # We're on a unix platform. Hooray! :)
59387      path="$POTENTIAL_FREETYPE_LIB_PATH"
59388      has_space=`$ECHO "$path" | $GREP " "`
59389      if test "x$has_space" != x; then
59390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59393      fi
59394
59395      # Use eval to expand a potential ~
59396      eval path="$path"
59397      if test ! -f "$path" && test ! -d "$path"; then
59398        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59399      fi
59400
59401      if test -d "$path"; then
59402        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59403      else
59404        dir="`$DIRNAME "$path"`"
59405        base="`$BASENAME "$path"`"
59406        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59407      fi
59408    fi
59409  fi
59410
59411
59412    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59414$as_echo_n "checking for freetype includes... " >&6; }
59415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59416$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59417    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59419$as_echo_n "checking for freetype libraries... " >&6; }
59420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59421$as_echo "$FREETYPE_LIB_PATH" >&6; }
59422  fi
59423
59424              else
59425
59426  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59427  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59428  METHOD="well-known location"
59429
59430  # Let's start with an optimistic view of the world :-)
59431  FOUND_FREETYPE=yes
59432
59433  # First look for the canonical freetype main include file ft2build.h.
59434  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59435    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59436    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59437    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59438      # Fail.
59439      FOUND_FREETYPE=no
59440    fi
59441  fi
59442
59443  if test "x$FOUND_FREETYPE" = xyes; then
59444    # Include file found, let's continue the sanity check.
59445    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59446$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59447
59448    # Reset to default value
59449    FREETYPE_BASE_NAME=freetype
59450    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59451    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59452      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59453          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59454        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59455        # for the .6 version explicitly.
59456        FREETYPE_BASE_NAME=freetype.6
59457        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59458        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59459$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59460      else
59461        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59462$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59463        FOUND_FREETYPE=no
59464      fi
59465    else
59466      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59467        # On Windows, we will need both .lib and .dll file.
59468        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59469          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59470$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59471          FOUND_FREETYPE=no
59472        fi
59473      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59475        # Found lib in isa dir, use that instead.
59476        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59477        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59478$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59479      fi
59480    fi
59481  fi
59482
59483  if test "x$FOUND_FREETYPE" = xyes; then
59484
59485  # Only process if variable expands to non-empty
59486
59487  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59489
59490  # Input might be given as Windows format, start by converting to
59491  # unix format.
59492  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59493  new_path=`$CYGPATH -u "$path"`
59494
59495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59498  # "foo.exe" is OK but "foo" is an error.
59499  #
59500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59501  # It is also a way to make sure we got the proper file name for the real test later on.
59502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59503  if test "x$test_shortpath" = x; then
59504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59506    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59507  fi
59508
59509  # Call helper function which possibly converts this using DOS-style short mode.
59510  # If so, the updated path is stored in $new_path.
59511
59512  input_path="$new_path"
59513  # Check if we need to convert this using DOS-style short mode. If the path
59514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59515  # take no chances and rewrite it.
59516  # Note: m4 eats our [], so we need to use [ and ] instead.
59517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59518  if test "x$has_forbidden_chars" != x; then
59519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59523      # Going to short mode and back again did indeed matter. Since short mode is
59524      # case insensitive, let's make it lowercase to improve readability.
59525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59526      # Now convert it back to Unix-style (cygpath)
59527      input_path=`$CYGPATH -u "$shortmode_path"`
59528      new_path="$input_path"
59529    fi
59530  fi
59531
59532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59533  if test "x$test_cygdrive_prefix" = x; then
59534    # As a simple fix, exclude /usr/bin since it's not a real path.
59535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59537      # a path prefixed by /cygdrive for fixpath to work.
59538      new_path="$CYGWIN_ROOT_PATH$input_path"
59539    fi
59540  fi
59541
59542
59543  if test "x$path" != "x$new_path"; then
59544    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59547  fi
59548
59549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59550
59551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59552  has_colon=`$ECHO $path | $GREP ^.:`
59553  new_path="$path"
59554  if test "x$has_colon" = x; then
59555    # Not in mixed or Windows style, start by that.
59556    new_path=`cmd //c echo $path`
59557  fi
59558
59559
59560  input_path="$new_path"
59561  # Check if we need to convert this using DOS-style short mode. If the path
59562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59563  # take no chances and rewrite it.
59564  # Note: m4 eats our [], so we need to use [ and ] instead.
59565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59566  if test "x$has_forbidden_chars" != x; then
59567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59569  fi
59570
59571
59572  windows_path="$new_path"
59573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59574    unix_path=`$CYGPATH -u "$windows_path"`
59575    new_path="$unix_path"
59576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59578    new_path="$unix_path"
59579  fi
59580
59581  if test "x$path" != "x$new_path"; then
59582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59585  fi
59586
59587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59589
59590    else
59591      # We're on a unix platform. Hooray! :)
59592      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59593      has_space=`$ECHO "$path" | $GREP " "`
59594      if test "x$has_space" != x; then
59595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59597        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59598      fi
59599
59600      # Use eval to expand a potential ~
59601      eval path="$path"
59602      if test ! -f "$path" && test ! -d "$path"; then
59603        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59604      fi
59605
59606      if test -d "$path"; then
59607        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59608      else
59609        dir="`$DIRNAME "$path"`"
59610        base="`$BASENAME "$path"`"
59611        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59612      fi
59613    fi
59614  fi
59615
59616
59617  # Only process if variable expands to non-empty
59618
59619  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59621
59622  # Input might be given as Windows format, start by converting to
59623  # unix format.
59624  path="$POTENTIAL_FREETYPE_LIB_PATH"
59625  new_path=`$CYGPATH -u "$path"`
59626
59627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59630  # "foo.exe" is OK but "foo" is an error.
59631  #
59632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59633  # It is also a way to make sure we got the proper file name for the real test later on.
59634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59635  if test "x$test_shortpath" = x; then
59636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59638    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59639  fi
59640
59641  # Call helper function which possibly converts this using DOS-style short mode.
59642  # If so, the updated path is stored in $new_path.
59643
59644  input_path="$new_path"
59645  # Check if we need to convert this using DOS-style short mode. If the path
59646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59647  # take no chances and rewrite it.
59648  # Note: m4 eats our [], so we need to use [ and ] instead.
59649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59650  if test "x$has_forbidden_chars" != x; then
59651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59655      # Going to short mode and back again did indeed matter. Since short mode is
59656      # case insensitive, let's make it lowercase to improve readability.
59657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59658      # Now convert it back to Unix-style (cygpath)
59659      input_path=`$CYGPATH -u "$shortmode_path"`
59660      new_path="$input_path"
59661    fi
59662  fi
59663
59664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59665  if test "x$test_cygdrive_prefix" = x; then
59666    # As a simple fix, exclude /usr/bin since it's not a real path.
59667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59669      # a path prefixed by /cygdrive for fixpath to work.
59670      new_path="$CYGWIN_ROOT_PATH$input_path"
59671    fi
59672  fi
59673
59674
59675  if test "x$path" != "x$new_path"; then
59676    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59678$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59679  fi
59680
59681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59682
59683  path="$POTENTIAL_FREETYPE_LIB_PATH"
59684  has_colon=`$ECHO $path | $GREP ^.:`
59685  new_path="$path"
59686  if test "x$has_colon" = x; then
59687    # Not in mixed or Windows style, start by that.
59688    new_path=`cmd //c echo $path`
59689  fi
59690
59691
59692  input_path="$new_path"
59693  # Check if we need to convert this using DOS-style short mode. If the path
59694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59695  # take no chances and rewrite it.
59696  # Note: m4 eats our [], so we need to use [ and ] instead.
59697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59698  if test "x$has_forbidden_chars" != x; then
59699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59701  fi
59702
59703
59704  windows_path="$new_path"
59705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59706    unix_path=`$CYGPATH -u "$windows_path"`
59707    new_path="$unix_path"
59708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59710    new_path="$unix_path"
59711  fi
59712
59713  if test "x$path" != "x$new_path"; then
59714    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59717  fi
59718
59719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59721
59722    else
59723      # We're on a unix platform. Hooray! :)
59724      path="$POTENTIAL_FREETYPE_LIB_PATH"
59725      has_space=`$ECHO "$path" | $GREP " "`
59726      if test "x$has_space" != x; then
59727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59730      fi
59731
59732      # Use eval to expand a potential ~
59733      eval path="$path"
59734      if test ! -f "$path" && test ! -d "$path"; then
59735        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59736      fi
59737
59738      if test -d "$path"; then
59739        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59740      else
59741        dir="`$DIRNAME "$path"`"
59742        base="`$BASENAME "$path"`"
59743        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59744      fi
59745    fi
59746  fi
59747
59748
59749    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59751$as_echo_n "checking for freetype includes... " >&6; }
59752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59753$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59754    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59756$as_echo_n "checking for freetype libraries... " >&6; }
59757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59758$as_echo "$FREETYPE_LIB_PATH" >&6; }
59759  fi
59760
59761              fi
59762            fi
59763          fi
59764        else
59765          FREETYPE_BASE_DIR="$SYSROOT/usr"
59766
59767  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59768  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59769  METHOD="well-known location"
59770
59771  # Let's start with an optimistic view of the world :-)
59772  FOUND_FREETYPE=yes
59773
59774  # First look for the canonical freetype main include file ft2build.h.
59775  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59776    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59777    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59778    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59779      # Fail.
59780      FOUND_FREETYPE=no
59781    fi
59782  fi
59783
59784  if test "x$FOUND_FREETYPE" = xyes; then
59785    # Include file found, let's continue the sanity check.
59786    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59787$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59788
59789    # Reset to default value
59790    FREETYPE_BASE_NAME=freetype
59791    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59792    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59793      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59794          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59795        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59796        # for the .6 version explicitly.
59797        FREETYPE_BASE_NAME=freetype.6
59798        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59799        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59800$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59801      else
59802        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59803$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59804        FOUND_FREETYPE=no
59805      fi
59806    else
59807      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59808        # On Windows, we will need both .lib and .dll file.
59809        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59810          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59811$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59812          FOUND_FREETYPE=no
59813        fi
59814      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59815          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59816        # Found lib in isa dir, use that instead.
59817        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59818        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59819$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59820      fi
59821    fi
59822  fi
59823
59824  if test "x$FOUND_FREETYPE" = xyes; then
59825
59826  # Only process if variable expands to non-empty
59827
59828  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59830
59831  # Input might be given as Windows format, start by converting to
59832  # unix format.
59833  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59834  new_path=`$CYGPATH -u "$path"`
59835
59836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59839  # "foo.exe" is OK but "foo" is an error.
59840  #
59841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59842  # It is also a way to make sure we got the proper file name for the real test later on.
59843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59844  if test "x$test_shortpath" = x; then
59845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59846$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59847    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59848  fi
59849
59850  # Call helper function which possibly converts this using DOS-style short mode.
59851  # If so, the updated path is stored in $new_path.
59852
59853  input_path="$new_path"
59854  # Check if we need to convert this using DOS-style short mode. If the path
59855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59856  # take no chances and rewrite it.
59857  # Note: m4 eats our [], so we need to use [ and ] instead.
59858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59859  if test "x$has_forbidden_chars" != x; then
59860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59864      # Going to short mode and back again did indeed matter. Since short mode is
59865      # case insensitive, let's make it lowercase to improve readability.
59866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59867      # Now convert it back to Unix-style (cygpath)
59868      input_path=`$CYGPATH -u "$shortmode_path"`
59869      new_path="$input_path"
59870    fi
59871  fi
59872
59873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59874  if test "x$test_cygdrive_prefix" = x; then
59875    # As a simple fix, exclude /usr/bin since it's not a real path.
59876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59878      # a path prefixed by /cygdrive for fixpath to work.
59879      new_path="$CYGWIN_ROOT_PATH$input_path"
59880    fi
59881  fi
59882
59883
59884  if test "x$path" != "x$new_path"; then
59885    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59888  fi
59889
59890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59891
59892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59893  has_colon=`$ECHO $path | $GREP ^.:`
59894  new_path="$path"
59895  if test "x$has_colon" = x; then
59896    # Not in mixed or Windows style, start by that.
59897    new_path=`cmd //c echo $path`
59898  fi
59899
59900
59901  input_path="$new_path"
59902  # Check if we need to convert this using DOS-style short mode. If the path
59903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59904  # take no chances and rewrite it.
59905  # Note: m4 eats our [], so we need to use [ and ] instead.
59906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59907  if test "x$has_forbidden_chars" != x; then
59908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59910  fi
59911
59912
59913  windows_path="$new_path"
59914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59915    unix_path=`$CYGPATH -u "$windows_path"`
59916    new_path="$unix_path"
59917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59919    new_path="$unix_path"
59920  fi
59921
59922  if test "x$path" != "x$new_path"; then
59923    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59926  fi
59927
59928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59930
59931    else
59932      # We're on a unix platform. Hooray! :)
59933      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59934      has_space=`$ECHO "$path" | $GREP " "`
59935      if test "x$has_space" != x; then
59936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59937$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59939      fi
59940
59941      # Use eval to expand a potential ~
59942      eval path="$path"
59943      if test ! -f "$path" && test ! -d "$path"; then
59944        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59945      fi
59946
59947      if test -d "$path"; then
59948        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59949      else
59950        dir="`$DIRNAME "$path"`"
59951        base="`$BASENAME "$path"`"
59952        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59953      fi
59954    fi
59955  fi
59956
59957
59958  # Only process if variable expands to non-empty
59959
59960  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59962
59963  # Input might be given as Windows format, start by converting to
59964  # unix format.
59965  path="$POTENTIAL_FREETYPE_LIB_PATH"
59966  new_path=`$CYGPATH -u "$path"`
59967
59968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59971  # "foo.exe" is OK but "foo" is an error.
59972  #
59973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59974  # It is also a way to make sure we got the proper file name for the real test later on.
59975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59976  if test "x$test_shortpath" = x; then
59977    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59978$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59979    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59980  fi
59981
59982  # Call helper function which possibly converts this using DOS-style short mode.
59983  # If so, the updated path is stored in $new_path.
59984
59985  input_path="$new_path"
59986  # Check if we need to convert this using DOS-style short mode. If the path
59987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59988  # take no chances and rewrite it.
59989  # Note: m4 eats our [], so we need to use [ and ] instead.
59990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59991  if test "x$has_forbidden_chars" != x; then
59992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59996      # Going to short mode and back again did indeed matter. Since short mode is
59997      # case insensitive, let's make it lowercase to improve readability.
59998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59999      # Now convert it back to Unix-style (cygpath)
60000      input_path=`$CYGPATH -u "$shortmode_path"`
60001      new_path="$input_path"
60002    fi
60003  fi
60004
60005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60006  if test "x$test_cygdrive_prefix" = x; then
60007    # As a simple fix, exclude /usr/bin since it's not a real path.
60008    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60010      # a path prefixed by /cygdrive for fixpath to work.
60011      new_path="$CYGWIN_ROOT_PATH$input_path"
60012    fi
60013  fi
60014
60015
60016  if test "x$path" != "x$new_path"; then
60017    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60020  fi
60021
60022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60023
60024  path="$POTENTIAL_FREETYPE_LIB_PATH"
60025  has_colon=`$ECHO $path | $GREP ^.:`
60026  new_path="$path"
60027  if test "x$has_colon" = x; then
60028    # Not in mixed or Windows style, start by that.
60029    new_path=`cmd //c echo $path`
60030  fi
60031
60032
60033  input_path="$new_path"
60034  # Check if we need to convert this using DOS-style short mode. If the path
60035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60036  # take no chances and rewrite it.
60037  # Note: m4 eats our [], so we need to use [ and ] instead.
60038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60039  if test "x$has_forbidden_chars" != x; then
60040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60042  fi
60043
60044
60045  windows_path="$new_path"
60046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60047    unix_path=`$CYGPATH -u "$windows_path"`
60048    new_path="$unix_path"
60049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60051    new_path="$unix_path"
60052  fi
60053
60054  if test "x$path" != "x$new_path"; then
60055    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60058  fi
60059
60060  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60061  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60062
60063    else
60064      # We're on a unix platform. Hooray! :)
60065      path="$POTENTIAL_FREETYPE_LIB_PATH"
60066      has_space=`$ECHO "$path" | $GREP " "`
60067      if test "x$has_space" != x; then
60068        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60070        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60071      fi
60072
60073      # Use eval to expand a potential ~
60074      eval path="$path"
60075      if test ! -f "$path" && test ! -d "$path"; then
60076        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60077      fi
60078
60079      if test -d "$path"; then
60080        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60081      else
60082        dir="`$DIRNAME "$path"`"
60083        base="`$BASENAME "$path"`"
60084        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60085      fi
60086    fi
60087  fi
60088
60089
60090    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60092$as_echo_n "checking for freetype includes... " >&6; }
60093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60094$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60095    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60097$as_echo_n "checking for freetype libraries... " >&6; }
60098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60099$as_echo "$FREETYPE_LIB_PATH" >&6; }
60100  fi
60101
60102
60103          if test "x$FOUND_FREETYPE" != xyes; then
60104            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60105
60106  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60107  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60108  METHOD="well-known location"
60109
60110  # Let's start with an optimistic view of the world :-)
60111  FOUND_FREETYPE=yes
60112
60113  # First look for the canonical freetype main include file ft2build.h.
60114  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60115    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60116    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60117    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60118      # Fail.
60119      FOUND_FREETYPE=no
60120    fi
60121  fi
60122
60123  if test "x$FOUND_FREETYPE" = xyes; then
60124    # Include file found, let's continue the sanity check.
60125    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60126$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60127
60128    # Reset to default value
60129    FREETYPE_BASE_NAME=freetype
60130    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60131    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60132      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60133          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60134        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60135        # for the .6 version explicitly.
60136        FREETYPE_BASE_NAME=freetype.6
60137        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60138        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60139$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60140      else
60141        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60142$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60143        FOUND_FREETYPE=no
60144      fi
60145    else
60146      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60147        # On Windows, we will need both .lib and .dll file.
60148        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60149          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60150$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60151          FOUND_FREETYPE=no
60152        fi
60153      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60154          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60155        # Found lib in isa dir, use that instead.
60156        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60157        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60158$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60159      fi
60160    fi
60161  fi
60162
60163  if test "x$FOUND_FREETYPE" = xyes; then
60164
60165  # Only process if variable expands to non-empty
60166
60167  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60169
60170  # Input might be given as Windows format, start by converting to
60171  # unix format.
60172  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60173  new_path=`$CYGPATH -u "$path"`
60174
60175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60178  # "foo.exe" is OK but "foo" is an error.
60179  #
60180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60181  # It is also a way to make sure we got the proper file name for the real test later on.
60182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60183  if test "x$test_shortpath" = x; then
60184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60186    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60187  fi
60188
60189  # Call helper function which possibly converts this using DOS-style short mode.
60190  # If so, the updated path is stored in $new_path.
60191
60192  input_path="$new_path"
60193  # Check if we need to convert this using DOS-style short mode. If the path
60194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60195  # take no chances and rewrite it.
60196  # Note: m4 eats our [], so we need to use [ and ] instead.
60197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60198  if test "x$has_forbidden_chars" != x; then
60199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60203      # Going to short mode and back again did indeed matter. Since short mode is
60204      # case insensitive, let's make it lowercase to improve readability.
60205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60206      # Now convert it back to Unix-style (cygpath)
60207      input_path=`$CYGPATH -u "$shortmode_path"`
60208      new_path="$input_path"
60209    fi
60210  fi
60211
60212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60213  if test "x$test_cygdrive_prefix" = x; then
60214    # As a simple fix, exclude /usr/bin since it's not a real path.
60215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60217      # a path prefixed by /cygdrive for fixpath to work.
60218      new_path="$CYGWIN_ROOT_PATH$input_path"
60219    fi
60220  fi
60221
60222
60223  if test "x$path" != "x$new_path"; then
60224    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60226$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60227  fi
60228
60229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60230
60231  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60232  has_colon=`$ECHO $path | $GREP ^.:`
60233  new_path="$path"
60234  if test "x$has_colon" = x; then
60235    # Not in mixed or Windows style, start by that.
60236    new_path=`cmd //c echo $path`
60237  fi
60238
60239
60240  input_path="$new_path"
60241  # Check if we need to convert this using DOS-style short mode. If the path
60242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60243  # take no chances and rewrite it.
60244  # Note: m4 eats our [], so we need to use [ and ] instead.
60245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60246  if test "x$has_forbidden_chars" != x; then
60247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60249  fi
60250
60251
60252  windows_path="$new_path"
60253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60254    unix_path=`$CYGPATH -u "$windows_path"`
60255    new_path="$unix_path"
60256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60258    new_path="$unix_path"
60259  fi
60260
60261  if test "x$path" != "x$new_path"; then
60262    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60265  fi
60266
60267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60269
60270    else
60271      # We're on a unix platform. Hooray! :)
60272      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60273      has_space=`$ECHO "$path" | $GREP " "`
60274      if test "x$has_space" != x; then
60275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60278      fi
60279
60280      # Use eval to expand a potential ~
60281      eval path="$path"
60282      if test ! -f "$path" && test ! -d "$path"; then
60283        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60284      fi
60285
60286      if test -d "$path"; then
60287        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60288      else
60289        dir="`$DIRNAME "$path"`"
60290        base="`$BASENAME "$path"`"
60291        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60292      fi
60293    fi
60294  fi
60295
60296
60297  # Only process if variable expands to non-empty
60298
60299  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60301
60302  # Input might be given as Windows format, start by converting to
60303  # unix format.
60304  path="$POTENTIAL_FREETYPE_LIB_PATH"
60305  new_path=`$CYGPATH -u "$path"`
60306
60307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60310  # "foo.exe" is OK but "foo" is an error.
60311  #
60312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60313  # It is also a way to make sure we got the proper file name for the real test later on.
60314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60315  if test "x$test_shortpath" = x; then
60316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60318    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60319  fi
60320
60321  # Call helper function which possibly converts this using DOS-style short mode.
60322  # If so, the updated path is stored in $new_path.
60323
60324  input_path="$new_path"
60325  # Check if we need to convert this using DOS-style short mode. If the path
60326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60327  # take no chances and rewrite it.
60328  # Note: m4 eats our [], so we need to use [ and ] instead.
60329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60330  if test "x$has_forbidden_chars" != x; then
60331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60335      # Going to short mode and back again did indeed matter. Since short mode is
60336      # case insensitive, let's make it lowercase to improve readability.
60337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60338      # Now convert it back to Unix-style (cygpath)
60339      input_path=`$CYGPATH -u "$shortmode_path"`
60340      new_path="$input_path"
60341    fi
60342  fi
60343
60344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60345  if test "x$test_cygdrive_prefix" = x; then
60346    # As a simple fix, exclude /usr/bin since it's not a real path.
60347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60349      # a path prefixed by /cygdrive for fixpath to work.
60350      new_path="$CYGWIN_ROOT_PATH$input_path"
60351    fi
60352  fi
60353
60354
60355  if test "x$path" != "x$new_path"; then
60356    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60359  fi
60360
60361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60362
60363  path="$POTENTIAL_FREETYPE_LIB_PATH"
60364  has_colon=`$ECHO $path | $GREP ^.:`
60365  new_path="$path"
60366  if test "x$has_colon" = x; then
60367    # Not in mixed or Windows style, start by that.
60368    new_path=`cmd //c echo $path`
60369  fi
60370
60371
60372  input_path="$new_path"
60373  # Check if we need to convert this using DOS-style short mode. If the path
60374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60375  # take no chances and rewrite it.
60376  # Note: m4 eats our [], so we need to use [ and ] instead.
60377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60378  if test "x$has_forbidden_chars" != x; then
60379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60381  fi
60382
60383
60384  windows_path="$new_path"
60385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60386    unix_path=`$CYGPATH -u "$windows_path"`
60387    new_path="$unix_path"
60388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60390    new_path="$unix_path"
60391  fi
60392
60393  if test "x$path" != "x$new_path"; then
60394    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60396$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60397  fi
60398
60399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60401
60402    else
60403      # We're on a unix platform. Hooray! :)
60404      path="$POTENTIAL_FREETYPE_LIB_PATH"
60405      has_space=`$ECHO "$path" | $GREP " "`
60406      if test "x$has_space" != x; then
60407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60410      fi
60411
60412      # Use eval to expand a potential ~
60413      eval path="$path"
60414      if test ! -f "$path" && test ! -d "$path"; then
60415        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60416      fi
60417
60418      if test -d "$path"; then
60419        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60420      else
60421        dir="`$DIRNAME "$path"`"
60422        base="`$BASENAME "$path"`"
60423        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60424      fi
60425    fi
60426  fi
60427
60428
60429    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60431$as_echo_n "checking for freetype includes... " >&6; }
60432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60433$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60434    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60436$as_echo_n "checking for freetype libraries... " >&6; }
60437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60438$as_echo "$FREETYPE_LIB_PATH" >&6; }
60439  fi
60440
60441          fi
60442
60443          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60444            if test "x$FOUND_FREETYPE" != xyes; then
60445              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60446              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60447
60448  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60449  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60450  METHOD="well-known location"
60451
60452  # Let's start with an optimistic view of the world :-)
60453  FOUND_FREETYPE=yes
60454
60455  # First look for the canonical freetype main include file ft2build.h.
60456  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60457    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60458    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60459    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60460      # Fail.
60461      FOUND_FREETYPE=no
60462    fi
60463  fi
60464
60465  if test "x$FOUND_FREETYPE" = xyes; then
60466    # Include file found, let's continue the sanity check.
60467    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60468$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60469
60470    # Reset to default value
60471    FREETYPE_BASE_NAME=freetype
60472    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60473    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60474      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60475          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60476        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60477        # for the .6 version explicitly.
60478        FREETYPE_BASE_NAME=freetype.6
60479        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60480        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60481$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60482      else
60483        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60484$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60485        FOUND_FREETYPE=no
60486      fi
60487    else
60488      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60489        # On Windows, we will need both .lib and .dll file.
60490        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60491          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60493          FOUND_FREETYPE=no
60494        fi
60495      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60496          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60497        # Found lib in isa dir, use that instead.
60498        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60499        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60500$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60501      fi
60502    fi
60503  fi
60504
60505  if test "x$FOUND_FREETYPE" = xyes; then
60506
60507  # Only process if variable expands to non-empty
60508
60509  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60511
60512  # Input might be given as Windows format, start by converting to
60513  # unix format.
60514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60515  new_path=`$CYGPATH -u "$path"`
60516
60517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60520  # "foo.exe" is OK but "foo" is an error.
60521  #
60522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60523  # It is also a way to make sure we got the proper file name for the real test later on.
60524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60525  if test "x$test_shortpath" = x; then
60526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60528    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60529  fi
60530
60531  # Call helper function which possibly converts this using DOS-style short mode.
60532  # If so, the updated path is stored in $new_path.
60533
60534  input_path="$new_path"
60535  # Check if we need to convert this using DOS-style short mode. If the path
60536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60537  # take no chances and rewrite it.
60538  # Note: m4 eats our [], so we need to use [ and ] instead.
60539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60540  if test "x$has_forbidden_chars" != x; then
60541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60545      # Going to short mode and back again did indeed matter. Since short mode is
60546      # case insensitive, let's make it lowercase to improve readability.
60547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60548      # Now convert it back to Unix-style (cygpath)
60549      input_path=`$CYGPATH -u "$shortmode_path"`
60550      new_path="$input_path"
60551    fi
60552  fi
60553
60554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60555  if test "x$test_cygdrive_prefix" = x; then
60556    # As a simple fix, exclude /usr/bin since it's not a real path.
60557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60559      # a path prefixed by /cygdrive for fixpath to work.
60560      new_path="$CYGWIN_ROOT_PATH$input_path"
60561    fi
60562  fi
60563
60564
60565  if test "x$path" != "x$new_path"; then
60566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60569  fi
60570
60571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60572
60573  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60574  has_colon=`$ECHO $path | $GREP ^.:`
60575  new_path="$path"
60576  if test "x$has_colon" = x; then
60577    # Not in mixed or Windows style, start by that.
60578    new_path=`cmd //c echo $path`
60579  fi
60580
60581
60582  input_path="$new_path"
60583  # Check if we need to convert this using DOS-style short mode. If the path
60584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60585  # take no chances and rewrite it.
60586  # Note: m4 eats our [], so we need to use [ and ] instead.
60587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60588  if test "x$has_forbidden_chars" != x; then
60589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60591  fi
60592
60593
60594  windows_path="$new_path"
60595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60596    unix_path=`$CYGPATH -u "$windows_path"`
60597    new_path="$unix_path"
60598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60600    new_path="$unix_path"
60601  fi
60602
60603  if test "x$path" != "x$new_path"; then
60604    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60607  fi
60608
60609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60611
60612    else
60613      # We're on a unix platform. Hooray! :)
60614      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60615      has_space=`$ECHO "$path" | $GREP " "`
60616      if test "x$has_space" != x; then
60617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60620      fi
60621
60622      # Use eval to expand a potential ~
60623      eval path="$path"
60624      if test ! -f "$path" && test ! -d "$path"; then
60625        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60626      fi
60627
60628      if test -d "$path"; then
60629        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60630      else
60631        dir="`$DIRNAME "$path"`"
60632        base="`$BASENAME "$path"`"
60633        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60634      fi
60635    fi
60636  fi
60637
60638
60639  # Only process if variable expands to non-empty
60640
60641  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60643
60644  # Input might be given as Windows format, start by converting to
60645  # unix format.
60646  path="$POTENTIAL_FREETYPE_LIB_PATH"
60647  new_path=`$CYGPATH -u "$path"`
60648
60649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60652  # "foo.exe" is OK but "foo" is an error.
60653  #
60654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60655  # It is also a way to make sure we got the proper file name for the real test later on.
60656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60657  if test "x$test_shortpath" = x; then
60658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60660    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60661  fi
60662
60663  # Call helper function which possibly converts this using DOS-style short mode.
60664  # If so, the updated path is stored in $new_path.
60665
60666  input_path="$new_path"
60667  # Check if we need to convert this using DOS-style short mode. If the path
60668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60669  # take no chances and rewrite it.
60670  # Note: m4 eats our [], so we need to use [ and ] instead.
60671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60672  if test "x$has_forbidden_chars" != x; then
60673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60677      # Going to short mode and back again did indeed matter. Since short mode is
60678      # case insensitive, let's make it lowercase to improve readability.
60679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60680      # Now convert it back to Unix-style (cygpath)
60681      input_path=`$CYGPATH -u "$shortmode_path"`
60682      new_path="$input_path"
60683    fi
60684  fi
60685
60686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60687  if test "x$test_cygdrive_prefix" = x; then
60688    # As a simple fix, exclude /usr/bin since it's not a real path.
60689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60691      # a path prefixed by /cygdrive for fixpath to work.
60692      new_path="$CYGWIN_ROOT_PATH$input_path"
60693    fi
60694  fi
60695
60696
60697  if test "x$path" != "x$new_path"; then
60698    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60701  fi
60702
60703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60704
60705  path="$POTENTIAL_FREETYPE_LIB_PATH"
60706  has_colon=`$ECHO $path | $GREP ^.:`
60707  new_path="$path"
60708  if test "x$has_colon" = x; then
60709    # Not in mixed or Windows style, start by that.
60710    new_path=`cmd //c echo $path`
60711  fi
60712
60713
60714  input_path="$new_path"
60715  # Check if we need to convert this using DOS-style short mode. If the path
60716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60717  # take no chances and rewrite it.
60718  # Note: m4 eats our [], so we need to use [ and ] instead.
60719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60720  if test "x$has_forbidden_chars" != x; then
60721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60723  fi
60724
60725
60726  windows_path="$new_path"
60727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60728    unix_path=`$CYGPATH -u "$windows_path"`
60729    new_path="$unix_path"
60730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60732    new_path="$unix_path"
60733  fi
60734
60735  if test "x$path" != "x$new_path"; then
60736    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60738$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60739  fi
60740
60741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60743
60744    else
60745      # We're on a unix platform. Hooray! :)
60746      path="$POTENTIAL_FREETYPE_LIB_PATH"
60747      has_space=`$ECHO "$path" | $GREP " "`
60748      if test "x$has_space" != x; then
60749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60752      fi
60753
60754      # Use eval to expand a potential ~
60755      eval path="$path"
60756      if test ! -f "$path" && test ! -d "$path"; then
60757        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60758      fi
60759
60760      if test -d "$path"; then
60761        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60762      else
60763        dir="`$DIRNAME "$path"`"
60764        base="`$BASENAME "$path"`"
60765        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60766      fi
60767    fi
60768  fi
60769
60770
60771    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60773$as_echo_n "checking for freetype includes... " >&6; }
60774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60775$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60776    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60778$as_echo_n "checking for freetype libraries... " >&6; }
60779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60780$as_echo "$FREETYPE_LIB_PATH" >&6; }
60781  fi
60782
60783            fi
60784          fi
60785
60786          if test "x$FOUND_FREETYPE" != xyes; then
60787            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60788
60789  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60790  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60791  METHOD="well-known location"
60792
60793  # Let's start with an optimistic view of the world :-)
60794  FOUND_FREETYPE=yes
60795
60796  # First look for the canonical freetype main include file ft2build.h.
60797  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60798    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60799    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60800    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60801      # Fail.
60802      FOUND_FREETYPE=no
60803    fi
60804  fi
60805
60806  if test "x$FOUND_FREETYPE" = xyes; then
60807    # Include file found, let's continue the sanity check.
60808    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60809$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60810
60811    # Reset to default value
60812    FREETYPE_BASE_NAME=freetype
60813    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60814    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60815      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60816          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60817        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60818        # for the .6 version explicitly.
60819        FREETYPE_BASE_NAME=freetype.6
60820        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60821        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60822$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60823      else
60824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60825$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60826        FOUND_FREETYPE=no
60827      fi
60828    else
60829      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60830        # On Windows, we will need both .lib and .dll file.
60831        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60832          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60833$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60834          FOUND_FREETYPE=no
60835        fi
60836      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60837          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60838        # Found lib in isa dir, use that instead.
60839        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60840        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60841$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60842      fi
60843    fi
60844  fi
60845
60846  if test "x$FOUND_FREETYPE" = xyes; then
60847
60848  # Only process if variable expands to non-empty
60849
60850  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60852
60853  # Input might be given as Windows format, start by converting to
60854  # unix format.
60855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60856  new_path=`$CYGPATH -u "$path"`
60857
60858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60861  # "foo.exe" is OK but "foo" is an error.
60862  #
60863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60864  # It is also a way to make sure we got the proper file name for the real test later on.
60865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60866  if test "x$test_shortpath" = x; then
60867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60870  fi
60871
60872  # Call helper function which possibly converts this using DOS-style short mode.
60873  # If so, the updated path is stored in $new_path.
60874
60875  input_path="$new_path"
60876  # Check if we need to convert this using DOS-style short mode. If the path
60877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60878  # take no chances and rewrite it.
60879  # Note: m4 eats our [], so we need to use [ and ] instead.
60880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60881  if test "x$has_forbidden_chars" != x; then
60882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60886      # Going to short mode and back again did indeed matter. Since short mode is
60887      # case insensitive, let's make it lowercase to improve readability.
60888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60889      # Now convert it back to Unix-style (cygpath)
60890      input_path=`$CYGPATH -u "$shortmode_path"`
60891      new_path="$input_path"
60892    fi
60893  fi
60894
60895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60896  if test "x$test_cygdrive_prefix" = x; then
60897    # As a simple fix, exclude /usr/bin since it's not a real path.
60898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60900      # a path prefixed by /cygdrive for fixpath to work.
60901      new_path="$CYGWIN_ROOT_PATH$input_path"
60902    fi
60903  fi
60904
60905
60906  if test "x$path" != "x$new_path"; then
60907    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60910  fi
60911
60912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60913
60914  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60915  has_colon=`$ECHO $path | $GREP ^.:`
60916  new_path="$path"
60917  if test "x$has_colon" = x; then
60918    # Not in mixed or Windows style, start by that.
60919    new_path=`cmd //c echo $path`
60920  fi
60921
60922
60923  input_path="$new_path"
60924  # Check if we need to convert this using DOS-style short mode. If the path
60925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60926  # take no chances and rewrite it.
60927  # Note: m4 eats our [], so we need to use [ and ] instead.
60928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60929  if test "x$has_forbidden_chars" != x; then
60930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60932  fi
60933
60934
60935  windows_path="$new_path"
60936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60937    unix_path=`$CYGPATH -u "$windows_path"`
60938    new_path="$unix_path"
60939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60941    new_path="$unix_path"
60942  fi
60943
60944  if test "x$path" != "x$new_path"; then
60945    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60948  fi
60949
60950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60952
60953    else
60954      # We're on a unix platform. Hooray! :)
60955      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60956      has_space=`$ECHO "$path" | $GREP " "`
60957      if test "x$has_space" != x; then
60958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60961      fi
60962
60963      # Use eval to expand a potential ~
60964      eval path="$path"
60965      if test ! -f "$path" && test ! -d "$path"; then
60966        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60967      fi
60968
60969      if test -d "$path"; then
60970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60971      else
60972        dir="`$DIRNAME "$path"`"
60973        base="`$BASENAME "$path"`"
60974        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60975      fi
60976    fi
60977  fi
60978
60979
60980  # Only process if variable expands to non-empty
60981
60982  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60984
60985  # Input might be given as Windows format, start by converting to
60986  # unix format.
60987  path="$POTENTIAL_FREETYPE_LIB_PATH"
60988  new_path=`$CYGPATH -u "$path"`
60989
60990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60993  # "foo.exe" is OK but "foo" is an error.
60994  #
60995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60996  # It is also a way to make sure we got the proper file name for the real test later on.
60997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60998  if test "x$test_shortpath" = x; then
60999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61001    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61002  fi
61003
61004  # Call helper function which possibly converts this using DOS-style short mode.
61005  # If so, the updated path is stored in $new_path.
61006
61007  input_path="$new_path"
61008  # Check if we need to convert this using DOS-style short mode. If the path
61009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61010  # take no chances and rewrite it.
61011  # Note: m4 eats our [], so we need to use [ and ] instead.
61012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61013  if test "x$has_forbidden_chars" != x; then
61014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61018      # Going to short mode and back again did indeed matter. Since short mode is
61019      # case insensitive, let's make it lowercase to improve readability.
61020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61021      # Now convert it back to Unix-style (cygpath)
61022      input_path=`$CYGPATH -u "$shortmode_path"`
61023      new_path="$input_path"
61024    fi
61025  fi
61026
61027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61028  if test "x$test_cygdrive_prefix" = x; then
61029    # As a simple fix, exclude /usr/bin since it's not a real path.
61030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61032      # a path prefixed by /cygdrive for fixpath to work.
61033      new_path="$CYGWIN_ROOT_PATH$input_path"
61034    fi
61035  fi
61036
61037
61038  if test "x$path" != "x$new_path"; then
61039    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61042  fi
61043
61044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61045
61046  path="$POTENTIAL_FREETYPE_LIB_PATH"
61047  has_colon=`$ECHO $path | $GREP ^.:`
61048  new_path="$path"
61049  if test "x$has_colon" = x; then
61050    # Not in mixed or Windows style, start by that.
61051    new_path=`cmd //c echo $path`
61052  fi
61053
61054
61055  input_path="$new_path"
61056  # Check if we need to convert this using DOS-style short mode. If the path
61057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61058  # take no chances and rewrite it.
61059  # Note: m4 eats our [], so we need to use [ and ] instead.
61060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61061  if test "x$has_forbidden_chars" != x; then
61062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61064  fi
61065
61066
61067  windows_path="$new_path"
61068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61069    unix_path=`$CYGPATH -u "$windows_path"`
61070    new_path="$unix_path"
61071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61073    new_path="$unix_path"
61074  fi
61075
61076  if test "x$path" != "x$new_path"; then
61077    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61080  fi
61081
61082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61084
61085    else
61086      # We're on a unix platform. Hooray! :)
61087      path="$POTENTIAL_FREETYPE_LIB_PATH"
61088      has_space=`$ECHO "$path" | $GREP " "`
61089      if test "x$has_space" != x; then
61090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61093      fi
61094
61095      # Use eval to expand a potential ~
61096      eval path="$path"
61097      if test ! -f "$path" && test ! -d "$path"; then
61098        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61099      fi
61100
61101      if test -d "$path"; then
61102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61103      else
61104        dir="`$DIRNAME "$path"`"
61105        base="`$BASENAME "$path"`"
61106        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61107      fi
61108    fi
61109  fi
61110
61111
61112    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61114$as_echo_n "checking for freetype includes... " >&6; }
61115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61116$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61117    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61119$as_echo_n "checking for freetype libraries... " >&6; }
61120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61121$as_echo "$FREETYPE_LIB_PATH" >&6; }
61122  fi
61123
61124          fi
61125
61126          if test "x$FOUND_FREETYPE" != xyes; then
61127            FREETYPE_BASE_DIR="$SYSROOT/usr"
61128            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61129
61130  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61131  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61132  METHOD="well-known location"
61133
61134  # Let's start with an optimistic view of the world :-)
61135  FOUND_FREETYPE=yes
61136
61137  # First look for the canonical freetype main include file ft2build.h.
61138  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61139    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61140    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61141    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61142      # Fail.
61143      FOUND_FREETYPE=no
61144    fi
61145  fi
61146
61147  if test "x$FOUND_FREETYPE" = xyes; then
61148    # Include file found, let's continue the sanity check.
61149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61150$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61151
61152    # Reset to default value
61153    FREETYPE_BASE_NAME=freetype
61154    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61155    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61156      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61157          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61158        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61159        # for the .6 version explicitly.
61160        FREETYPE_BASE_NAME=freetype.6
61161        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61162        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61163$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61164      else
61165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61167        FOUND_FREETYPE=no
61168      fi
61169    else
61170      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61171        # On Windows, we will need both .lib and .dll file.
61172        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61173          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61174$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61175          FOUND_FREETYPE=no
61176        fi
61177      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61178          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61179        # Found lib in isa dir, use that instead.
61180        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61181        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61182$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61183      fi
61184    fi
61185  fi
61186
61187  if test "x$FOUND_FREETYPE" = xyes; then
61188
61189  # Only process if variable expands to non-empty
61190
61191  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61193
61194  # Input might be given as Windows format, start by converting to
61195  # unix format.
61196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61197  new_path=`$CYGPATH -u "$path"`
61198
61199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61202  # "foo.exe" is OK but "foo" is an error.
61203  #
61204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61205  # It is also a way to make sure we got the proper file name for the real test later on.
61206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61207  if test "x$test_shortpath" = x; then
61208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61209$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61210    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61211  fi
61212
61213  # Call helper function which possibly converts this using DOS-style short mode.
61214  # If so, the updated path is stored in $new_path.
61215
61216  input_path="$new_path"
61217  # Check if we need to convert this using DOS-style short mode. If the path
61218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61219  # take no chances and rewrite it.
61220  # Note: m4 eats our [], so we need to use [ and ] instead.
61221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61222  if test "x$has_forbidden_chars" != x; then
61223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61227      # Going to short mode and back again did indeed matter. Since short mode is
61228      # case insensitive, let's make it lowercase to improve readability.
61229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61230      # Now convert it back to Unix-style (cygpath)
61231      input_path=`$CYGPATH -u "$shortmode_path"`
61232      new_path="$input_path"
61233    fi
61234  fi
61235
61236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61237  if test "x$test_cygdrive_prefix" = x; then
61238    # As a simple fix, exclude /usr/bin since it's not a real path.
61239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61241      # a path prefixed by /cygdrive for fixpath to work.
61242      new_path="$CYGWIN_ROOT_PATH$input_path"
61243    fi
61244  fi
61245
61246
61247  if test "x$path" != "x$new_path"; then
61248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61251  fi
61252
61253    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61254
61255  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61256  has_colon=`$ECHO $path | $GREP ^.:`
61257  new_path="$path"
61258  if test "x$has_colon" = x; then
61259    # Not in mixed or Windows style, start by that.
61260    new_path=`cmd //c echo $path`
61261  fi
61262
61263
61264  input_path="$new_path"
61265  # Check if we need to convert this using DOS-style short mode. If the path
61266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61267  # take no chances and rewrite it.
61268  # Note: m4 eats our [], so we need to use [ and ] instead.
61269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61270  if test "x$has_forbidden_chars" != x; then
61271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61273  fi
61274
61275
61276  windows_path="$new_path"
61277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61278    unix_path=`$CYGPATH -u "$windows_path"`
61279    new_path="$unix_path"
61280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61282    new_path="$unix_path"
61283  fi
61284
61285  if test "x$path" != "x$new_path"; then
61286    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61289  fi
61290
61291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61293
61294    else
61295      # We're on a unix platform. Hooray! :)
61296      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61297      has_space=`$ECHO "$path" | $GREP " "`
61298      if test "x$has_space" != x; then
61299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61301        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61302      fi
61303
61304      # Use eval to expand a potential ~
61305      eval path="$path"
61306      if test ! -f "$path" && test ! -d "$path"; then
61307        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61308      fi
61309
61310      if test -d "$path"; then
61311        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61312      else
61313        dir="`$DIRNAME "$path"`"
61314        base="`$BASENAME "$path"`"
61315        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61316      fi
61317    fi
61318  fi
61319
61320
61321  # Only process if variable expands to non-empty
61322
61323  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61325
61326  # Input might be given as Windows format, start by converting to
61327  # unix format.
61328  path="$POTENTIAL_FREETYPE_LIB_PATH"
61329  new_path=`$CYGPATH -u "$path"`
61330
61331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61334  # "foo.exe" is OK but "foo" is an error.
61335  #
61336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61337  # It is also a way to make sure we got the proper file name for the real test later on.
61338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61339  if test "x$test_shortpath" = x; then
61340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61342    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61343  fi
61344
61345  # Call helper function which possibly converts this using DOS-style short mode.
61346  # If so, the updated path is stored in $new_path.
61347
61348  input_path="$new_path"
61349  # Check if we need to convert this using DOS-style short mode. If the path
61350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61351  # take no chances and rewrite it.
61352  # Note: m4 eats our [], so we need to use [ and ] instead.
61353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61354  if test "x$has_forbidden_chars" != x; then
61355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61359      # Going to short mode and back again did indeed matter. Since short mode is
61360      # case insensitive, let's make it lowercase to improve readability.
61361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61362      # Now convert it back to Unix-style (cygpath)
61363      input_path=`$CYGPATH -u "$shortmode_path"`
61364      new_path="$input_path"
61365    fi
61366  fi
61367
61368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61369  if test "x$test_cygdrive_prefix" = x; then
61370    # As a simple fix, exclude /usr/bin since it's not a real path.
61371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61373      # a path prefixed by /cygdrive for fixpath to work.
61374      new_path="$CYGWIN_ROOT_PATH$input_path"
61375    fi
61376  fi
61377
61378
61379  if test "x$path" != "x$new_path"; then
61380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61383  fi
61384
61385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61386
61387  path="$POTENTIAL_FREETYPE_LIB_PATH"
61388  has_colon=`$ECHO $path | $GREP ^.:`
61389  new_path="$path"
61390  if test "x$has_colon" = x; then
61391    # Not in mixed or Windows style, start by that.
61392    new_path=`cmd //c echo $path`
61393  fi
61394
61395
61396  input_path="$new_path"
61397  # Check if we need to convert this using DOS-style short mode. If the path
61398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61399  # take no chances and rewrite it.
61400  # Note: m4 eats our [], so we need to use [ and ] instead.
61401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61402  if test "x$has_forbidden_chars" != x; then
61403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61405  fi
61406
61407
61408  windows_path="$new_path"
61409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61410    unix_path=`$CYGPATH -u "$windows_path"`
61411    new_path="$unix_path"
61412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61414    new_path="$unix_path"
61415  fi
61416
61417  if test "x$path" != "x$new_path"; then
61418    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61421  fi
61422
61423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61425
61426    else
61427      # We're on a unix platform. Hooray! :)
61428      path="$POTENTIAL_FREETYPE_LIB_PATH"
61429      has_space=`$ECHO "$path" | $GREP " "`
61430      if test "x$has_space" != x; then
61431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61434      fi
61435
61436      # Use eval to expand a potential ~
61437      eval path="$path"
61438      if test ! -f "$path" && test ! -d "$path"; then
61439        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61440      fi
61441
61442      if test -d "$path"; then
61443        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61444      else
61445        dir="`$DIRNAME "$path"`"
61446        base="`$BASENAME "$path"`"
61447        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61448      fi
61449    fi
61450  fi
61451
61452
61453    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61455$as_echo_n "checking for freetype includes... " >&6; }
61456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61457$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61458    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61460$as_echo_n "checking for freetype libraries... " >&6; }
61461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61462$as_echo "$FREETYPE_LIB_PATH" >&6; }
61463  fi
61464
61465            else
61466
61467  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61468  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61469  METHOD="well-known location"
61470
61471  # Let's start with an optimistic view of the world :-)
61472  FOUND_FREETYPE=yes
61473
61474  # First look for the canonical freetype main include file ft2build.h.
61475  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61476    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61477    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61478    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61479      # Fail.
61480      FOUND_FREETYPE=no
61481    fi
61482  fi
61483
61484  if test "x$FOUND_FREETYPE" = xyes; then
61485    # Include file found, let's continue the sanity check.
61486    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61487$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61488
61489    # Reset to default value
61490    FREETYPE_BASE_NAME=freetype
61491    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61492    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61493      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61494          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61495        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61496        # for the .6 version explicitly.
61497        FREETYPE_BASE_NAME=freetype.6
61498        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61499        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61500$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61501      else
61502        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61503$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61504        FOUND_FREETYPE=no
61505      fi
61506    else
61507      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61508        # On Windows, we will need both .lib and .dll file.
61509        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61510          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61512          FOUND_FREETYPE=no
61513        fi
61514      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61515          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61516        # Found lib in isa dir, use that instead.
61517        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61518        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61519$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61520      fi
61521    fi
61522  fi
61523
61524  if test "x$FOUND_FREETYPE" = xyes; then
61525
61526  # Only process if variable expands to non-empty
61527
61528  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61530
61531  # Input might be given as Windows format, start by converting to
61532  # unix format.
61533  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61534  new_path=`$CYGPATH -u "$path"`
61535
61536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61539  # "foo.exe" is OK but "foo" is an error.
61540  #
61541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61542  # It is also a way to make sure we got the proper file name for the real test later on.
61543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61544  if test "x$test_shortpath" = x; then
61545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61547    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61548  fi
61549
61550  # Call helper function which possibly converts this using DOS-style short mode.
61551  # If so, the updated path is stored in $new_path.
61552
61553  input_path="$new_path"
61554  # Check if we need to convert this using DOS-style short mode. If the path
61555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61556  # take no chances and rewrite it.
61557  # Note: m4 eats our [], so we need to use [ and ] instead.
61558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61559  if test "x$has_forbidden_chars" != x; then
61560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61564      # Going to short mode and back again did indeed matter. Since short mode is
61565      # case insensitive, let's make it lowercase to improve readability.
61566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61567      # Now convert it back to Unix-style (cygpath)
61568      input_path=`$CYGPATH -u "$shortmode_path"`
61569      new_path="$input_path"
61570    fi
61571  fi
61572
61573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61574  if test "x$test_cygdrive_prefix" = x; then
61575    # As a simple fix, exclude /usr/bin since it's not a real path.
61576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61578      # a path prefixed by /cygdrive for fixpath to work.
61579      new_path="$CYGWIN_ROOT_PATH$input_path"
61580    fi
61581  fi
61582
61583
61584  if test "x$path" != "x$new_path"; then
61585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61588  fi
61589
61590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61591
61592  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61593  has_colon=`$ECHO $path | $GREP ^.:`
61594  new_path="$path"
61595  if test "x$has_colon" = x; then
61596    # Not in mixed or Windows style, start by that.
61597    new_path=`cmd //c echo $path`
61598  fi
61599
61600
61601  input_path="$new_path"
61602  # Check if we need to convert this using DOS-style short mode. If the path
61603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61604  # take no chances and rewrite it.
61605  # Note: m4 eats our [], so we need to use [ and ] instead.
61606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61607  if test "x$has_forbidden_chars" != x; then
61608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61610  fi
61611
61612
61613  windows_path="$new_path"
61614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61615    unix_path=`$CYGPATH -u "$windows_path"`
61616    new_path="$unix_path"
61617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61619    new_path="$unix_path"
61620  fi
61621
61622  if test "x$path" != "x$new_path"; then
61623    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61625$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61626  fi
61627
61628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61630
61631    else
61632      # We're on a unix platform. Hooray! :)
61633      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61634      has_space=`$ECHO "$path" | $GREP " "`
61635      if test "x$has_space" != x; then
61636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61639      fi
61640
61641      # Use eval to expand a potential ~
61642      eval path="$path"
61643      if test ! -f "$path" && test ! -d "$path"; then
61644        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61645      fi
61646
61647      if test -d "$path"; then
61648        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61649      else
61650        dir="`$DIRNAME "$path"`"
61651        base="`$BASENAME "$path"`"
61652        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61653      fi
61654    fi
61655  fi
61656
61657
61658  # Only process if variable expands to non-empty
61659
61660  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61662
61663  # Input might be given as Windows format, start by converting to
61664  # unix format.
61665  path="$POTENTIAL_FREETYPE_LIB_PATH"
61666  new_path=`$CYGPATH -u "$path"`
61667
61668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61671  # "foo.exe" is OK but "foo" is an error.
61672  #
61673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61674  # It is also a way to make sure we got the proper file name for the real test later on.
61675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61676  if test "x$test_shortpath" = x; then
61677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61680  fi
61681
61682  # Call helper function which possibly converts this using DOS-style short mode.
61683  # If so, the updated path is stored in $new_path.
61684
61685  input_path="$new_path"
61686  # Check if we need to convert this using DOS-style short mode. If the path
61687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61688  # take no chances and rewrite it.
61689  # Note: m4 eats our [], so we need to use [ and ] instead.
61690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61691  if test "x$has_forbidden_chars" != x; then
61692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61696      # Going to short mode and back again did indeed matter. Since short mode is
61697      # case insensitive, let's make it lowercase to improve readability.
61698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61699      # Now convert it back to Unix-style (cygpath)
61700      input_path=`$CYGPATH -u "$shortmode_path"`
61701      new_path="$input_path"
61702    fi
61703  fi
61704
61705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61706  if test "x$test_cygdrive_prefix" = x; then
61707    # As a simple fix, exclude /usr/bin since it's not a real path.
61708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61710      # a path prefixed by /cygdrive for fixpath to work.
61711      new_path="$CYGWIN_ROOT_PATH$input_path"
61712    fi
61713  fi
61714
61715
61716  if test "x$path" != "x$new_path"; then
61717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61720  fi
61721
61722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61723
61724  path="$POTENTIAL_FREETYPE_LIB_PATH"
61725  has_colon=`$ECHO $path | $GREP ^.:`
61726  new_path="$path"
61727  if test "x$has_colon" = x; then
61728    # Not in mixed or Windows style, start by that.
61729    new_path=`cmd //c echo $path`
61730  fi
61731
61732
61733  input_path="$new_path"
61734  # Check if we need to convert this using DOS-style short mode. If the path
61735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61736  # take no chances and rewrite it.
61737  # Note: m4 eats our [], so we need to use [ and ] instead.
61738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61739  if test "x$has_forbidden_chars" != x; then
61740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61742  fi
61743
61744
61745  windows_path="$new_path"
61746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61747    unix_path=`$CYGPATH -u "$windows_path"`
61748    new_path="$unix_path"
61749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61751    new_path="$unix_path"
61752  fi
61753
61754  if test "x$path" != "x$new_path"; then
61755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61758  fi
61759
61760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61762
61763    else
61764      # We're on a unix platform. Hooray! :)
61765      path="$POTENTIAL_FREETYPE_LIB_PATH"
61766      has_space=`$ECHO "$path" | $GREP " "`
61767      if test "x$has_space" != x; then
61768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61771      fi
61772
61773      # Use eval to expand a potential ~
61774      eval path="$path"
61775      if test ! -f "$path" && test ! -d "$path"; then
61776        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61777      fi
61778
61779      if test -d "$path"; then
61780        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61781      else
61782        dir="`$DIRNAME "$path"`"
61783        base="`$BASENAME "$path"`"
61784        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61785      fi
61786    fi
61787  fi
61788
61789
61790    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61792$as_echo_n "checking for freetype includes... " >&6; }
61793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61794$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61795    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61797$as_echo_n "checking for freetype libraries... " >&6; }
61798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61799$as_echo "$FREETYPE_LIB_PATH" >&6; }
61800  fi
61801
61802              if test "x$FOUND_FREETYPE" != xyes; then
61803
61804  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61805  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61806  METHOD="well-known location"
61807
61808  # Let's start with an optimistic view of the world :-)
61809  FOUND_FREETYPE=yes
61810
61811  # First look for the canonical freetype main include file ft2build.h.
61812  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61813    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61814    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61815    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61816      # Fail.
61817      FOUND_FREETYPE=no
61818    fi
61819  fi
61820
61821  if test "x$FOUND_FREETYPE" = xyes; then
61822    # Include file found, let's continue the sanity check.
61823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61824$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61825
61826    # Reset to default value
61827    FREETYPE_BASE_NAME=freetype
61828    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61829    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61830      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61831          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61832        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61833        # for the .6 version explicitly.
61834        FREETYPE_BASE_NAME=freetype.6
61835        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61836        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61837$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61838      else
61839        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61840$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61841        FOUND_FREETYPE=no
61842      fi
61843    else
61844      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61845        # On Windows, we will need both .lib and .dll file.
61846        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61847          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61848$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61849          FOUND_FREETYPE=no
61850        fi
61851      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61852          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61853        # Found lib in isa dir, use that instead.
61854        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61855        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61856$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61857      fi
61858    fi
61859  fi
61860
61861  if test "x$FOUND_FREETYPE" = xyes; then
61862
61863  # Only process if variable expands to non-empty
61864
61865  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61867
61868  # Input might be given as Windows format, start by converting to
61869  # unix format.
61870  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61871  new_path=`$CYGPATH -u "$path"`
61872
61873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61876  # "foo.exe" is OK but "foo" is an error.
61877  #
61878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61879  # It is also a way to make sure we got the proper file name for the real test later on.
61880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61881  if test "x$test_shortpath" = x; then
61882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61883$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61884    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61885  fi
61886
61887  # Call helper function which possibly converts this using DOS-style short mode.
61888  # If so, the updated path is stored in $new_path.
61889
61890  input_path="$new_path"
61891  # Check if we need to convert this using DOS-style short mode. If the path
61892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61893  # take no chances and rewrite it.
61894  # Note: m4 eats our [], so we need to use [ and ] instead.
61895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61896  if test "x$has_forbidden_chars" != x; then
61897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61901      # Going to short mode and back again did indeed matter. Since short mode is
61902      # case insensitive, let's make it lowercase to improve readability.
61903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61904      # Now convert it back to Unix-style (cygpath)
61905      input_path=`$CYGPATH -u "$shortmode_path"`
61906      new_path="$input_path"
61907    fi
61908  fi
61909
61910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61911  if test "x$test_cygdrive_prefix" = x; then
61912    # As a simple fix, exclude /usr/bin since it's not a real path.
61913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61915      # a path prefixed by /cygdrive for fixpath to work.
61916      new_path="$CYGWIN_ROOT_PATH$input_path"
61917    fi
61918  fi
61919
61920
61921  if test "x$path" != "x$new_path"; then
61922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61925  fi
61926
61927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61928
61929  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61930  has_colon=`$ECHO $path | $GREP ^.:`
61931  new_path="$path"
61932  if test "x$has_colon" = x; then
61933    # Not in mixed or Windows style, start by that.
61934    new_path=`cmd //c echo $path`
61935  fi
61936
61937
61938  input_path="$new_path"
61939  # Check if we need to convert this using DOS-style short mode. If the path
61940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61941  # take no chances and rewrite it.
61942  # Note: m4 eats our [], so we need to use [ and ] instead.
61943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61944  if test "x$has_forbidden_chars" != x; then
61945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61947  fi
61948
61949
61950  windows_path="$new_path"
61951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61952    unix_path=`$CYGPATH -u "$windows_path"`
61953    new_path="$unix_path"
61954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61956    new_path="$unix_path"
61957  fi
61958
61959  if test "x$path" != "x$new_path"; then
61960    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61962$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61963  fi
61964
61965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61967
61968    else
61969      # We're on a unix platform. Hooray! :)
61970      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61971      has_space=`$ECHO "$path" | $GREP " "`
61972      if test "x$has_space" != x; then
61973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61976      fi
61977
61978      # Use eval to expand a potential ~
61979      eval path="$path"
61980      if test ! -f "$path" && test ! -d "$path"; then
61981        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61982      fi
61983
61984      if test -d "$path"; then
61985        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61986      else
61987        dir="`$DIRNAME "$path"`"
61988        base="`$BASENAME "$path"`"
61989        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61990      fi
61991    fi
61992  fi
61993
61994
61995  # Only process if variable expands to non-empty
61996
61997  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61999
62000  # Input might be given as Windows format, start by converting to
62001  # unix format.
62002  path="$POTENTIAL_FREETYPE_LIB_PATH"
62003  new_path=`$CYGPATH -u "$path"`
62004
62005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62008  # "foo.exe" is OK but "foo" is an error.
62009  #
62010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62011  # It is also a way to make sure we got the proper file name for the real test later on.
62012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62013  if test "x$test_shortpath" = x; then
62014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62016    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62017  fi
62018
62019  # Call helper function which possibly converts this using DOS-style short mode.
62020  # If so, the updated path is stored in $new_path.
62021
62022  input_path="$new_path"
62023  # Check if we need to convert this using DOS-style short mode. If the path
62024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62025  # take no chances and rewrite it.
62026  # Note: m4 eats our [], so we need to use [ and ] instead.
62027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62028  if test "x$has_forbidden_chars" != x; then
62029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62033      # Going to short mode and back again did indeed matter. Since short mode is
62034      # case insensitive, let's make it lowercase to improve readability.
62035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62036      # Now convert it back to Unix-style (cygpath)
62037      input_path=`$CYGPATH -u "$shortmode_path"`
62038      new_path="$input_path"
62039    fi
62040  fi
62041
62042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62043  if test "x$test_cygdrive_prefix" = x; then
62044    # As a simple fix, exclude /usr/bin since it's not a real path.
62045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62047      # a path prefixed by /cygdrive for fixpath to work.
62048      new_path="$CYGWIN_ROOT_PATH$input_path"
62049    fi
62050  fi
62051
62052
62053  if test "x$path" != "x$new_path"; then
62054    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62057  fi
62058
62059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62060
62061  path="$POTENTIAL_FREETYPE_LIB_PATH"
62062  has_colon=`$ECHO $path | $GREP ^.:`
62063  new_path="$path"
62064  if test "x$has_colon" = x; then
62065    # Not in mixed or Windows style, start by that.
62066    new_path=`cmd //c echo $path`
62067  fi
62068
62069
62070  input_path="$new_path"
62071  # Check if we need to convert this using DOS-style short mode. If the path
62072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62073  # take no chances and rewrite it.
62074  # Note: m4 eats our [], so we need to use [ and ] instead.
62075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62076  if test "x$has_forbidden_chars" != x; then
62077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62079  fi
62080
62081
62082  windows_path="$new_path"
62083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62084    unix_path=`$CYGPATH -u "$windows_path"`
62085    new_path="$unix_path"
62086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62088    new_path="$unix_path"
62089  fi
62090
62091  if test "x$path" != "x$new_path"; then
62092    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62095  fi
62096
62097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62099
62100    else
62101      # We're on a unix platform. Hooray! :)
62102      path="$POTENTIAL_FREETYPE_LIB_PATH"
62103      has_space=`$ECHO "$path" | $GREP " "`
62104      if test "x$has_space" != x; then
62105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62108      fi
62109
62110      # Use eval to expand a potential ~
62111      eval path="$path"
62112      if test ! -f "$path" && test ! -d "$path"; then
62113        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62114      fi
62115
62116      if test -d "$path"; then
62117        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62118      else
62119        dir="`$DIRNAME "$path"`"
62120        base="`$BASENAME "$path"`"
62121        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62122      fi
62123    fi
62124  fi
62125
62126
62127    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62129$as_echo_n "checking for freetype includes... " >&6; }
62130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62131$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62132    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62134$as_echo_n "checking for freetype libraries... " >&6; }
62135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62136$as_echo "$FREETYPE_LIB_PATH" >&6; }
62137  fi
62138
62139              fi
62140            fi
62141          fi
62142        fi
62143      fi # end check in well-known locations
62144
62145      if test "x$FOUND_FREETYPE" != xyes; then
62146
62147  # Print a helpful message on how to acquire the necessary build dependency.
62148  # freetype is the help tag: freetype, cups, alsa etc
62149  MISSING_DEPENDENCY=freetype
62150
62151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62152    cygwin_help $MISSING_DEPENDENCY
62153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62154    msys_help $MISSING_DEPENDENCY
62155  else
62156    PKGHANDLER_COMMAND=
62157
62158    case $PKGHANDLER in
62159      apt-get)
62160        apt_help     $MISSING_DEPENDENCY ;;
62161      yum)
62162        yum_help     $MISSING_DEPENDENCY ;;
62163      port)
62164        port_help    $MISSING_DEPENDENCY ;;
62165      pkgutil)
62166        pkgutil_help $MISSING_DEPENDENCY ;;
62167      pkgadd)
62168        pkgadd_help  $MISSING_DEPENDENCY ;;
62169    esac
62170
62171    if test "x$PKGHANDLER_COMMAND" != x; then
62172      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62173    fi
62174  fi
62175
62176        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62177      fi
62178    fi # end user specified settings
62179
62180    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62181    if test "x$FREETYPE_CFLAGS" = x; then
62182
62183  # Only process if variable expands to non-empty
62184
62185  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62187
62188  # Input might be given as Windows format, start by converting to
62189  # unix format.
62190  path="$FREETYPE_INCLUDE_PATH"
62191  new_path=`$CYGPATH -u "$path"`
62192
62193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62196  # "foo.exe" is OK but "foo" is an error.
62197  #
62198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62199  # It is also a way to make sure we got the proper file name for the real test later on.
62200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62201  if test "x$test_shortpath" = x; then
62202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62203$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62204    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62205  fi
62206
62207  # Call helper function which possibly converts this using DOS-style short mode.
62208  # If so, the updated path is stored in $new_path.
62209
62210  input_path="$new_path"
62211  # Check if we need to convert this using DOS-style short mode. If the path
62212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62213  # take no chances and rewrite it.
62214  # Note: m4 eats our [], so we need to use [ and ] instead.
62215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62216  if test "x$has_forbidden_chars" != x; then
62217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62221      # Going to short mode and back again did indeed matter. Since short mode is
62222      # case insensitive, let's make it lowercase to improve readability.
62223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62224      # Now convert it back to Unix-style (cygpath)
62225      input_path=`$CYGPATH -u "$shortmode_path"`
62226      new_path="$input_path"
62227    fi
62228  fi
62229
62230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62231  if test "x$test_cygdrive_prefix" = x; then
62232    # As a simple fix, exclude /usr/bin since it's not a real path.
62233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62235      # a path prefixed by /cygdrive for fixpath to work.
62236      new_path="$CYGWIN_ROOT_PATH$input_path"
62237    fi
62238  fi
62239
62240
62241  if test "x$path" != "x$new_path"; then
62242    FREETYPE_INCLUDE_PATH="$new_path"
62243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62244$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62245  fi
62246
62247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62248
62249  path="$FREETYPE_INCLUDE_PATH"
62250  has_colon=`$ECHO $path | $GREP ^.:`
62251  new_path="$path"
62252  if test "x$has_colon" = x; then
62253    # Not in mixed or Windows style, start by that.
62254    new_path=`cmd //c echo $path`
62255  fi
62256
62257
62258  input_path="$new_path"
62259  # Check if we need to convert this using DOS-style short mode. If the path
62260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62261  # take no chances and rewrite it.
62262  # Note: m4 eats our [], so we need to use [ and ] instead.
62263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62264  if test "x$has_forbidden_chars" != x; then
62265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62267  fi
62268
62269
62270  windows_path="$new_path"
62271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62272    unix_path=`$CYGPATH -u "$windows_path"`
62273    new_path="$unix_path"
62274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62276    new_path="$unix_path"
62277  fi
62278
62279  if test "x$path" != "x$new_path"; then
62280    FREETYPE_INCLUDE_PATH="$new_path"
62281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62282$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62283  fi
62284
62285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62287
62288    else
62289      # We're on a unix platform. Hooray! :)
62290      path="$FREETYPE_INCLUDE_PATH"
62291      has_space=`$ECHO "$path" | $GREP " "`
62292      if test "x$has_space" != x; then
62293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62294$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62296      fi
62297
62298      # Use eval to expand a potential ~
62299      eval path="$path"
62300      if test ! -f "$path" && test ! -d "$path"; then
62301        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62302      fi
62303
62304      if test -d "$path"; then
62305        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62306      else
62307        dir="`$DIRNAME "$path"`"
62308        base="`$BASENAME "$path"`"
62309        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62310      fi
62311    fi
62312  fi
62313
62314      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62315        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62316      else
62317        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62318      fi
62319    fi
62320
62321    if test "x$FREETYPE_LIBS" = x; then
62322
62323  # Only process if variable expands to non-empty
62324
62325  if test "x$FREETYPE_LIB_PATH" != x; then
62326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62327
62328  # Input might be given as Windows format, start by converting to
62329  # unix format.
62330  path="$FREETYPE_LIB_PATH"
62331  new_path=`$CYGPATH -u "$path"`
62332
62333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62336  # "foo.exe" is OK but "foo" is an error.
62337  #
62338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62339  # It is also a way to make sure we got the proper file name for the real test later on.
62340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62341  if test "x$test_shortpath" = x; then
62342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62343$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62344    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62345  fi
62346
62347  # Call helper function which possibly converts this using DOS-style short mode.
62348  # If so, the updated path is stored in $new_path.
62349
62350  input_path="$new_path"
62351  # Check if we need to convert this using DOS-style short mode. If the path
62352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62353  # take no chances and rewrite it.
62354  # Note: m4 eats our [], so we need to use [ and ] instead.
62355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62356  if test "x$has_forbidden_chars" != x; then
62357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62361      # Going to short mode and back again did indeed matter. Since short mode is
62362      # case insensitive, let's make it lowercase to improve readability.
62363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62364      # Now convert it back to Unix-style (cygpath)
62365      input_path=`$CYGPATH -u "$shortmode_path"`
62366      new_path="$input_path"
62367    fi
62368  fi
62369
62370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62371  if test "x$test_cygdrive_prefix" = x; then
62372    # As a simple fix, exclude /usr/bin since it's not a real path.
62373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62375      # a path prefixed by /cygdrive for fixpath to work.
62376      new_path="$CYGWIN_ROOT_PATH$input_path"
62377    fi
62378  fi
62379
62380
62381  if test "x$path" != "x$new_path"; then
62382    FREETYPE_LIB_PATH="$new_path"
62383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62384$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62385  fi
62386
62387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62388
62389  path="$FREETYPE_LIB_PATH"
62390  has_colon=`$ECHO $path | $GREP ^.:`
62391  new_path="$path"
62392  if test "x$has_colon" = x; then
62393    # Not in mixed or Windows style, start by that.
62394    new_path=`cmd //c echo $path`
62395  fi
62396
62397
62398  input_path="$new_path"
62399  # Check if we need to convert this using DOS-style short mode. If the path
62400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62401  # take no chances and rewrite it.
62402  # Note: m4 eats our [], so we need to use [ and ] instead.
62403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62404  if test "x$has_forbidden_chars" != x; then
62405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62407  fi
62408
62409
62410  windows_path="$new_path"
62411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62412    unix_path=`$CYGPATH -u "$windows_path"`
62413    new_path="$unix_path"
62414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62416    new_path="$unix_path"
62417  fi
62418
62419  if test "x$path" != "x$new_path"; then
62420    FREETYPE_LIB_PATH="$new_path"
62421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62422$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62423  fi
62424
62425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62427
62428    else
62429      # We're on a unix platform. Hooray! :)
62430      path="$FREETYPE_LIB_PATH"
62431      has_space=`$ECHO "$path" | $GREP " "`
62432      if test "x$has_space" != x; then
62433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62434$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62436      fi
62437
62438      # Use eval to expand a potential ~
62439      eval path="$path"
62440      if test ! -f "$path" && test ! -d "$path"; then
62441        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62442      fi
62443
62444      if test -d "$path"; then
62445        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62446      else
62447        dir="`$DIRNAME "$path"`"
62448        base="`$BASENAME "$path"`"
62449        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62450      fi
62451    fi
62452  fi
62453
62454      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62455        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62456      else
62457        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62458      fi
62459    fi
62460
62461    # Try to compile it
62462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62463$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62464    ac_ext=cpp
62465ac_cpp='$CXXCPP $CPPFLAGS'
62466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62469
62470    PREV_CXXCFLAGS="$CXXFLAGS"
62471    PREV_LIBS="$LIBS"
62472    PREV_CXX="$CXX"
62473    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62474    LIBS="$LIBS $FREETYPE_LIBS"
62475    CXX="$FIXPATH $CXX"
62476    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62477/* end confdefs.h.  */
62478
62479          #include<ft2build.h>
62480          #include FT_FREETYPE_H
62481          int main () {
62482            FT_Init_FreeType(NULL);
62483            return 0;
62484          }
62485
62486_ACEOF
62487if ac_fn_cxx_try_link "$LINENO"; then :
62488
62489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62490$as_echo "yes" >&6; }
62491
62492else
62493
62494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62495$as_echo "no" >&6; }
62496          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62497$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62498          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62499$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62500
62501
62502  # Print a helpful message on how to acquire the necessary build dependency.
62503  # freetype is the help tag: freetype, cups, alsa etc
62504  MISSING_DEPENDENCY=freetype
62505
62506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62507    cygwin_help $MISSING_DEPENDENCY
62508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62509    msys_help $MISSING_DEPENDENCY
62510  else
62511    PKGHANDLER_COMMAND=
62512
62513    case $PKGHANDLER in
62514      apt-get)
62515        apt_help     $MISSING_DEPENDENCY ;;
62516      yum)
62517        yum_help     $MISSING_DEPENDENCY ;;
62518      port)
62519        port_help    $MISSING_DEPENDENCY ;;
62520      pkgutil)
62521        pkgutil_help $MISSING_DEPENDENCY ;;
62522      pkgadd)
62523        pkgadd_help  $MISSING_DEPENDENCY ;;
62524    esac
62525
62526    if test "x$PKGHANDLER_COMMAND" != x; then
62527      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62528    fi
62529  fi
62530
62531
62532          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62533
62534
62535fi
62536rm -f core conftest.err conftest.$ac_objext \
62537    conftest$ac_exeext conftest.$ac_ext
62538    CXXCFLAGS="$PREV_CXXFLAGS"
62539    LIBS="$PREV_LIBS"
62540    CXX="$PREV_CXX"
62541    ac_ext=cpp
62542ac_cpp='$CXXCPP $CPPFLAGS'
62543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62546
62547
62548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62549$as_echo_n "checking if we should bundle freetype... " >&6; }
62550    if test "x$BUNDLE_FREETYPE" = xyes; then
62551      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62552    fi
62553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62554$as_echo "$BUNDLE_FREETYPE" >&6; }
62555
62556  fi # end freetype needed
62557
62558
62559
62560
62561
62562
62563
62564# Check whether --with-alsa was given.
62565if test "${with_alsa+set}" = set; then :
62566  withval=$with_alsa;
62567fi
62568
62569
62570# Check whether --with-alsa-include was given.
62571if test "${with_alsa_include+set}" = set; then :
62572  withval=$with_alsa_include;
62573fi
62574
62575
62576# Check whether --with-alsa-lib was given.
62577if test "${with_alsa_lib+set}" = set; then :
62578  withval=$with_alsa_lib;
62579fi
62580
62581
62582  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62583    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62584        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62585        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62586      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62587$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62588    fi
62589    ALSA_CFLAGS=
62590    ALSA_LIBS=
62591  else
62592    ALSA_FOUND=no
62593
62594    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62595      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62596    fi
62597
62598    if test "x${with_alsa}" != x; then
62599      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62600      ALSA_CFLAGS="-I${with_alsa}/include"
62601      ALSA_FOUND=yes
62602    fi
62603    if test "x${with_alsa_include}" != x; then
62604      ALSA_CFLAGS="-I${with_alsa_include}"
62605      ALSA_FOUND=yes
62606    fi
62607    if test "x${with_alsa_lib}" != x; then
62608      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62609      ALSA_FOUND=yes
62610    fi
62611    # Do not try pkg-config if we have a sysroot set.
62612    if test "x$SYSROOT" = x; then
62613      if test "x$ALSA_FOUND" = xno; then
62614
62615pkg_failed=no
62616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62617$as_echo_n "checking for ALSA... " >&6; }
62618
62619if test -n "$ALSA_CFLAGS"; then
62620    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62621 elif test -n "$PKG_CONFIG"; then
62622    if test -n "$PKG_CONFIG" && \
62623    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62624  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62625  ac_status=$?
62626  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62627  test $ac_status = 0; }; then
62628  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62629else
62630  pkg_failed=yes
62631fi
62632 else
62633    pkg_failed=untried
62634fi
62635if test -n "$ALSA_LIBS"; then
62636    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62637 elif test -n "$PKG_CONFIG"; then
62638    if test -n "$PKG_CONFIG" && \
62639    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62640  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62641  ac_status=$?
62642  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62643  test $ac_status = 0; }; then
62644  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62645else
62646  pkg_failed=yes
62647fi
62648 else
62649    pkg_failed=untried
62650fi
62651
62652
62653
62654if test $pkg_failed = yes; then
62655
62656if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62657        _pkg_short_errors_supported=yes
62658else
62659        _pkg_short_errors_supported=no
62660fi
62661        if test $_pkg_short_errors_supported = yes; then
62662	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62663        else
62664	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62665        fi
62666	# Put the nasty error message in config.log where it belongs
62667	echo "$ALSA_PKG_ERRORS" >&5
62668
62669	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62670$as_echo "no" >&6; }
62671                ALSA_FOUND=no
62672elif test $pkg_failed = untried; then
62673	ALSA_FOUND=no
62674else
62675	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62676	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62678$as_echo "yes" >&6; }
62679	ALSA_FOUND=yes
62680fi
62681      fi
62682    fi
62683    if test "x$ALSA_FOUND" = xno; then
62684      for ac_header in alsa/asoundlib.h
62685do :
62686  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62687if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62688  cat >>confdefs.h <<_ACEOF
62689#define HAVE_ALSA_ASOUNDLIB_H 1
62690_ACEOF
62691
62692            ALSA_FOUND=yes
62693            ALSA_CFLAGS=-Iignoreme
62694            ALSA_LIBS=-lasound
62695            DEFAULT_ALSA=yes
62696
62697else
62698  ALSA_FOUND=no
62699
62700fi
62701
62702done
62703
62704    fi
62705    if test "x$ALSA_FOUND" = xno; then
62706
62707  # Print a helpful message on how to acquire the necessary build dependency.
62708  # alsa is the help tag: freetype, cups, alsa etc
62709  MISSING_DEPENDENCY=alsa
62710
62711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62712    cygwin_help $MISSING_DEPENDENCY
62713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62714    msys_help $MISSING_DEPENDENCY
62715  else
62716    PKGHANDLER_COMMAND=
62717
62718    case $PKGHANDLER in
62719      apt-get)
62720        apt_help     $MISSING_DEPENDENCY ;;
62721      yum)
62722        yum_help     $MISSING_DEPENDENCY ;;
62723      port)
62724        port_help    $MISSING_DEPENDENCY ;;
62725      pkgutil)
62726        pkgutil_help $MISSING_DEPENDENCY ;;
62727      pkgadd)
62728        pkgadd_help  $MISSING_DEPENDENCY ;;
62729    esac
62730
62731    if test "x$PKGHANDLER_COMMAND" != x; then
62732      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62733    fi
62734  fi
62735
62736      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62737    fi
62738  fi
62739
62740
62741
62742
62743
62744
62745# Check whether --with-libffi was given.
62746if test "${with_libffi+set}" = set; then :
62747  withval=$with_libffi;
62748fi
62749
62750
62751# Check whether --with-libffi-include was given.
62752if test "${with_libffi_include+set}" = set; then :
62753  withval=$with_libffi_include;
62754fi
62755
62756
62757# Check whether --with-libffi-lib was given.
62758if test "${with_libffi_lib+set}" = set; then :
62759  withval=$with_libffi_lib;
62760fi
62761
62762
62763  if test "x$NEEDS_LIB_FFI" = xfalse; then
62764    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62765        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62766        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62767      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62768$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62769    fi
62770    LIBFFI_CFLAGS=
62771    LIBFFI_LIBS=
62772  else
62773    LIBFFI_FOUND=no
62774
62775    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62776      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62777    fi
62778
62779    if test "x${with_libffi}" != x; then
62780      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62781      LIBFFI_CFLAGS="-I${with_libffi}/include"
62782      LIBFFI_FOUND=yes
62783    fi
62784    if test "x${with_libffi_include}" != x; then
62785      LIBFFI_CFLAGS="-I${with_libffi_include}"
62786      LIBFFI_FOUND=yes
62787    fi
62788    if test "x${with_libffi_lib}" != x; then
62789      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62790      LIBFFI_FOUND=yes
62791    fi
62792    # Do not try pkg-config if we have a sysroot set.
62793    if test "x$SYSROOT" = x; then
62794      if test "x$LIBFFI_FOUND" = xno; then
62795        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62796
62797pkg_failed=no
62798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62799$as_echo_n "checking for LIBFFI... " >&6; }
62800
62801if test -n "$LIBFFI_CFLAGS"; then
62802    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62803 elif test -n "$PKG_CONFIG"; then
62804    if test -n "$PKG_CONFIG" && \
62805    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62806  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62807  ac_status=$?
62808  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62809  test $ac_status = 0; }; then
62810  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62811else
62812  pkg_failed=yes
62813fi
62814 else
62815    pkg_failed=untried
62816fi
62817if test -n "$LIBFFI_LIBS"; then
62818    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62819 elif test -n "$PKG_CONFIG"; then
62820    if test -n "$PKG_CONFIG" && \
62821    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62822  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62823  ac_status=$?
62824  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62825  test $ac_status = 0; }; then
62826  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62827else
62828  pkg_failed=yes
62829fi
62830 else
62831    pkg_failed=untried
62832fi
62833
62834
62835
62836if test $pkg_failed = yes; then
62837
62838if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62839        _pkg_short_errors_supported=yes
62840else
62841        _pkg_short_errors_supported=no
62842fi
62843        if test $_pkg_short_errors_supported = yes; then
62844	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62845        else
62846	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62847        fi
62848	# Put the nasty error message in config.log where it belongs
62849	echo "$LIBFFI_PKG_ERRORS" >&5
62850
62851	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62852$as_echo "no" >&6; }
62853                LIBFFI_FOUND=no
62854elif test $pkg_failed = untried; then
62855	LIBFFI_FOUND=no
62856else
62857	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62858	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62860$as_echo "yes" >&6; }
62861	LIBFFI_FOUND=yes
62862fi
62863      fi
62864    fi
62865    if test "x$LIBFFI_FOUND" = xno; then
62866      for ac_header in ffi.h
62867do :
62868  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62869if test "x$ac_cv_header_ffi_h" = xyes; then :
62870  cat >>confdefs.h <<_ACEOF
62871#define HAVE_FFI_H 1
62872_ACEOF
62873
62874            LIBFFI_FOUND=yes
62875            LIBFFI_CFLAGS=
62876            LIBFFI_LIBS=-lffi
62877
62878else
62879  LIBFFI_FOUND=no
62880
62881fi
62882
62883done
62884
62885    fi
62886    if test "x$LIBFFI_FOUND" = xno; then
62887
62888  # Print a helpful message on how to acquire the necessary build dependency.
62889  # ffi is the help tag: freetype, cups, alsa etc
62890  MISSING_DEPENDENCY=ffi
62891
62892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62893    cygwin_help $MISSING_DEPENDENCY
62894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62895    msys_help $MISSING_DEPENDENCY
62896  else
62897    PKGHANDLER_COMMAND=
62898
62899    case $PKGHANDLER in
62900      apt-get)
62901        apt_help     $MISSING_DEPENDENCY ;;
62902      yum)
62903        yum_help     $MISSING_DEPENDENCY ;;
62904      port)
62905        port_help    $MISSING_DEPENDENCY ;;
62906      pkgutil)
62907        pkgutil_help $MISSING_DEPENDENCY ;;
62908      pkgadd)
62909        pkgadd_help  $MISSING_DEPENDENCY ;;
62910    esac
62911
62912    if test "x$PKGHANDLER_COMMAND" != x; then
62913      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62914    fi
62915  fi
62916
62917      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62918    fi
62919
62920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62921$as_echo_n "checking if libffi works... " >&6; }
62922    ac_ext=c
62923ac_cpp='$CPP $CPPFLAGS'
62924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62926ac_compiler_gnu=$ac_cv_c_compiler_gnu
62927
62928    OLD_CFLAGS="$CFLAGS"
62929    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62930    OLD_LIBS="$LIBS"
62931    LIBS="$LIBS $LIBFFI_LIBS"
62932    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62933/* end confdefs.h.  */
62934#include <ffi.h>
62935int
62936main ()
62937{
62938
62939          ffi_call(NULL, NULL, NULL, NULL);
62940          return 0;
62941
62942  ;
62943  return 0;
62944}
62945_ACEOF
62946if ac_fn_c_try_link "$LINENO"; then :
62947  LIBFFI_WORKS=yes
62948else
62949  LIBFFI_WORKS=no
62950
62951fi
62952rm -f core conftest.err conftest.$ac_objext \
62953    conftest$ac_exeext conftest.$ac_ext
62954    CFLAGS="$OLD_CFLAGS"
62955    LIBS="$OLD_LIBS"
62956    ac_ext=cpp
62957ac_cpp='$CXXCPP $CPPFLAGS'
62958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62961
62962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62963$as_echo "$LIBFFI_WORKS" >&6; }
62964
62965    if test "x$LIBFFI_WORKS" = xno; then
62966
62967  # Print a helpful message on how to acquire the necessary build dependency.
62968  # ffi is the help tag: freetype, cups, alsa etc
62969  MISSING_DEPENDENCY=ffi
62970
62971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62972    cygwin_help $MISSING_DEPENDENCY
62973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62974    msys_help $MISSING_DEPENDENCY
62975  else
62976    PKGHANDLER_COMMAND=
62977
62978    case $PKGHANDLER in
62979      apt-get)
62980        apt_help     $MISSING_DEPENDENCY ;;
62981      yum)
62982        yum_help     $MISSING_DEPENDENCY ;;
62983      port)
62984        port_help    $MISSING_DEPENDENCY ;;
62985      pkgutil)
62986        pkgutil_help $MISSING_DEPENDENCY ;;
62987      pkgadd)
62988        pkgadd_help  $MISSING_DEPENDENCY ;;
62989    esac
62990
62991    if test "x$PKGHANDLER_COMMAND" != x; then
62992      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62993    fi
62994  fi
62995
62996      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62997    fi
62998  fi
62999
63000
63001
63002
63003
63004  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63005    # Extract the first word of "llvm-config", so it can be a program name with args.
63006set dummy llvm-config; ac_word=$2
63007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63008$as_echo_n "checking for $ac_word... " >&6; }
63009if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63010  $as_echo_n "(cached) " >&6
63011else
63012  if test -n "$LLVM_CONFIG"; then
63013  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63014else
63015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63016for as_dir in $PATH
63017do
63018  IFS=$as_save_IFS
63019  test -z "$as_dir" && as_dir=.
63020    for ac_exec_ext in '' $ac_executable_extensions; do
63021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63022    ac_cv_prog_LLVM_CONFIG="llvm-config"
63023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63024    break 2
63025  fi
63026done
63027  done
63028IFS=$as_save_IFS
63029
63030fi
63031fi
63032LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63033if test -n "$LLVM_CONFIG"; then
63034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63035$as_echo "$LLVM_CONFIG" >&6; }
63036else
63037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63038$as_echo "no" >&6; }
63039fi
63040
63041
63042
63043    if test "x$LLVM_CONFIG" != xllvm-config; then
63044      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63045    fi
63046
63047    llvm_components="jit mcjit engine nativecodegen native"
63048    unset LLVM_CFLAGS
63049    for flag in $("$LLVM_CONFIG" --cxxflags); do
63050      if echo "${flag}" | grep -q '^-[ID]'; then
63051        if test "${flag}" != "-D_DEBUG" ; then
63052          if test "${LLVM_CFLAGS}" != "" ; then
63053            LLVM_CFLAGS="${LLVM_CFLAGS} "
63054          fi
63055          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63056        fi
63057      fi
63058    done
63059    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63060    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63061
63062    unset LLVM_LDFLAGS
63063    for flag in $("${LLVM_CONFIG}" --ldflags); do
63064      if echo "${flag}" | grep -q '^-L'; then
63065        if test "${LLVM_LDFLAGS}" != ""; then
63066          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63067        fi
63068        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63069      fi
63070    done
63071
63072    unset LLVM_LIBS
63073    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63074      if echo "${flag}" | grep -q '^-l'; then
63075        if test "${LLVM_LIBS}" != ""; then
63076          LLVM_LIBS="${LLVM_LIBS} "
63077        fi
63078        LLVM_LIBS="${LLVM_LIBS}${flag}"
63079      fi
63080    done
63081
63082    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63083    # always properly detect -ltinfo
63084    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63085
63086
63087
63088
63089  fi
63090
63091
63092
63093# Check whether --with-libjpeg was given.
63094if test "${with_libjpeg+set}" = set; then :
63095  withval=$with_libjpeg;
63096fi
63097
63098
63099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63100$as_echo_n "checking for which libjpeg to use... " >&6; }
63101  # default is bundled
63102  DEFAULT_LIBJPEG=bundled
63103  # if user didn't specify, use DEFAULT_LIBJPEG
63104  if test "x${with_libjpeg}" = "x"; then
63105    with_libjpeg=${DEFAULT_LIBJPEG}
63106  fi
63107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63108$as_echo "${with_libjpeg}" >&6; }
63109
63110  if test "x${with_libjpeg}" = "xbundled"; then
63111    USE_EXTERNAL_LIBJPEG=false
63112  elif test "x${with_libjpeg}" = "xsystem"; then
63113    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63114if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63115
63116else
63117   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63118fi
63119
63120
63121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63122$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63123if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63124  $as_echo_n "(cached) " >&6
63125else
63126  ac_check_lib_save_LIBS=$LIBS
63127LIBS="-ljpeg  $LIBS"
63128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63129/* end confdefs.h.  */
63130
63131/* Override any GCC internal prototype to avoid an error.
63132   Use char because int might match the return type of a GCC
63133   builtin and then its argument prototype would still apply.  */
63134#ifdef __cplusplus
63135extern "C"
63136#endif
63137char jpeg_CreateDecompress ();
63138int
63139main ()
63140{
63141return jpeg_CreateDecompress ();
63142  ;
63143  return 0;
63144}
63145_ACEOF
63146if ac_fn_cxx_try_link "$LINENO"; then :
63147  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63148else
63149  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63150fi
63151rm -f core conftest.err conftest.$ac_objext \
63152    conftest$ac_exeext conftest.$ac_ext
63153LIBS=$ac_check_lib_save_LIBS
63154fi
63155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63156$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63157if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63158  cat >>confdefs.h <<_ACEOF
63159#define HAVE_LIBJPEG 1
63160_ACEOF
63161
63162  LIBS="-ljpeg $LIBS"
63163
63164else
63165   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63166fi
63167
63168
63169    USE_EXTERNAL_LIBJPEG=true
63170  else
63171    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63172  fi
63173
63174
63175
63176
63177
63178# Check whether --with-giflib was given.
63179if test "${with_giflib+set}" = set; then :
63180  withval=$with_giflib;
63181fi
63182
63183
63184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63185$as_echo_n "checking for which giflib to use... " >&6; }
63186  # default is bundled
63187  DEFAULT_GIFLIB=bundled
63188  # if user didn't specify, use DEFAULT_GIFLIB
63189  if test "x${with_giflib}" = "x"; then
63190    with_giflib=${DEFAULT_GIFLIB}
63191  fi
63192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63193$as_echo "${with_giflib}" >&6; }
63194
63195  if test "x${with_giflib}" = "xbundled"; then
63196    USE_EXTERNAL_LIBGIF=false
63197  elif test "x${with_giflib}" = "xsystem"; then
63198    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63199if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63200
63201else
63202   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63203fi
63204
63205
63206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63207$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63208if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63209  $as_echo_n "(cached) " >&6
63210else
63211  ac_check_lib_save_LIBS=$LIBS
63212LIBS="-lgif  $LIBS"
63213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63214/* end confdefs.h.  */
63215
63216/* Override any GCC internal prototype to avoid an error.
63217   Use char because int might match the return type of a GCC
63218   builtin and then its argument prototype would still apply.  */
63219#ifdef __cplusplus
63220extern "C"
63221#endif
63222char DGifGetCode ();
63223int
63224main ()
63225{
63226return DGifGetCode ();
63227  ;
63228  return 0;
63229}
63230_ACEOF
63231if ac_fn_cxx_try_link "$LINENO"; then :
63232  ac_cv_lib_gif_DGifGetCode=yes
63233else
63234  ac_cv_lib_gif_DGifGetCode=no
63235fi
63236rm -f core conftest.err conftest.$ac_objext \
63237    conftest$ac_exeext conftest.$ac_ext
63238LIBS=$ac_check_lib_save_LIBS
63239fi
63240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63241$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63242if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63243  cat >>confdefs.h <<_ACEOF
63244#define HAVE_LIBGIF 1
63245_ACEOF
63246
63247  LIBS="-lgif $LIBS"
63248
63249else
63250   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63251fi
63252
63253
63254    USE_EXTERNAL_LIBGIF=true
63255  else
63256    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63257  fi
63258
63259
63260
63261
63262
63263# Check whether --with-libpng was given.
63264if test "${with_libpng+set}" = set; then :
63265  withval=$with_libpng;
63266fi
63267
63268
63269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63270$as_echo_n "checking for which libpng to use... " >&6; }
63271
63272  # default is bundled
63273  DEFAULT_LIBPNG=bundled
63274  # if user didn't specify, use DEFAULT_LIBPNG
63275  if test "x${with_libpng}" = "x"; then
63276      with_libpng=${DEFAULT_LIBPNG}
63277  fi
63278
63279  if test "x${with_libpng}" = "xbundled"; then
63280      USE_EXTERNAL_LIBPNG=false
63281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63282$as_echo "bundled" >&6; }
63283  elif test "x${with_libpng}" = "xsystem"; then
63284
63285pkg_failed=no
63286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63287$as_echo_n "checking for PNG... " >&6; }
63288
63289if test -n "$PNG_CFLAGS"; then
63290    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63291 elif test -n "$PKG_CONFIG"; then
63292    if test -n "$PKG_CONFIG" && \
63293    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63294  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63295  ac_status=$?
63296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63297  test $ac_status = 0; }; then
63298  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63299else
63300  pkg_failed=yes
63301fi
63302 else
63303    pkg_failed=untried
63304fi
63305if test -n "$PNG_LIBS"; then
63306    pkg_cv_PNG_LIBS="$PNG_LIBS"
63307 elif test -n "$PKG_CONFIG"; then
63308    if test -n "$PKG_CONFIG" && \
63309    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63310  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63311  ac_status=$?
63312  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63313  test $ac_status = 0; }; then
63314  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63315else
63316  pkg_failed=yes
63317fi
63318 else
63319    pkg_failed=untried
63320fi
63321
63322
63323
63324if test $pkg_failed = yes; then
63325
63326if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63327        _pkg_short_errors_supported=yes
63328else
63329        _pkg_short_errors_supported=no
63330fi
63331        if test $_pkg_short_errors_supported = yes; then
63332	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63333        else
63334	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63335        fi
63336	# Put the nasty error message in config.log where it belongs
63337	echo "$PNG_PKG_ERRORS" >&5
63338
63339	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63340$as_echo "no" >&6; }
63341                 LIBPNG_FOUND=no
63342elif test $pkg_failed = untried; then
63343	 LIBPNG_FOUND=no
63344else
63345	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63346	PNG_LIBS=$pkg_cv_PNG_LIBS
63347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63348$as_echo "yes" >&6; }
63349	 LIBPNG_FOUND=yes
63350fi
63351      if test "x${LIBPNG_FOUND}" = "xyes"; then
63352          USE_EXTERNAL_LIBPNG=true
63353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63354$as_echo "system" >&6; }
63355      else
63356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63357$as_echo "system not found" >&6; }
63358          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63359      fi
63360  else
63361      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63362  fi
63363
63364
63365
63366
63367
63368# Check whether --with-zlib was given.
63369if test "${with_zlib+set}" = set; then :
63370  withval=$with_zlib;
63371fi
63372
63373
63374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63375$as_echo_n "checking for compress in -lz... " >&6; }
63376if ${ac_cv_lib_z_compress+:} false; then :
63377  $as_echo_n "(cached) " >&6
63378else
63379  ac_check_lib_save_LIBS=$LIBS
63380LIBS="-lz  $LIBS"
63381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63382/* end confdefs.h.  */
63383
63384/* Override any GCC internal prototype to avoid an error.
63385   Use char because int might match the return type of a GCC
63386   builtin and then its argument prototype would still apply.  */
63387#ifdef __cplusplus
63388extern "C"
63389#endif
63390char compress ();
63391int
63392main ()
63393{
63394return compress ();
63395  ;
63396  return 0;
63397}
63398_ACEOF
63399if ac_fn_cxx_try_link "$LINENO"; then :
63400  ac_cv_lib_z_compress=yes
63401else
63402  ac_cv_lib_z_compress=no
63403fi
63404rm -f core conftest.err conftest.$ac_objext \
63405    conftest$ac_exeext conftest.$ac_ext
63406LIBS=$ac_check_lib_save_LIBS
63407fi
63408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63409$as_echo "$ac_cv_lib_z_compress" >&6; }
63410if test "x$ac_cv_lib_z_compress" = xyes; then :
63411   ZLIB_FOUND=yes
63412else
63413   ZLIB_FOUND=no
63414fi
63415
63416
63417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63418$as_echo_n "checking for which zlib to use... " >&6; }
63419
63420  DEFAULT_ZLIB=system
63421  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63422    # On windows default is bundled...on others default is system
63423    DEFAULT_ZLIB=bundled
63424  fi
63425
63426  if test "x${ZLIB_FOUND}" != "xyes"; then
63427    # If we don't find any system...set default to bundled
63428    DEFAULT_ZLIB=bundled
63429  fi
63430
63431  # If user didn't specify, use DEFAULT_ZLIB
63432  if test "x${with_zlib}" = "x"; then
63433    with_zlib=${DEFAULT_ZLIB}
63434  fi
63435
63436  if test "x${with_zlib}" = "xbundled"; then
63437    USE_EXTERNAL_LIBZ=false
63438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63439$as_echo "bundled" >&6; }
63440  elif test "x${with_zlib}" = "xsystem"; then
63441    if test "x${ZLIB_FOUND}" = "xyes"; then
63442      USE_EXTERNAL_LIBZ=true
63443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63444$as_echo "system" >&6; }
63445    else
63446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63447$as_echo "system not found" >&6; }
63448      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63449    fi
63450  else
63451    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63452  fi
63453
63454
63455
63456
63457
63458# Check whether --with-lcms was given.
63459if test "${with_lcms+set}" = set; then :
63460  withval=$with_lcms;
63461fi
63462
63463
63464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63465$as_echo_n "checking for which lcms to use... " >&6; }
63466
63467  DEFAULT_LCMS=bundled
63468  # If user didn't specify, use DEFAULT_LCMS
63469  if test "x${with_lcms}" = "x"; then
63470      with_lcms=${DEFAULT_LCMS}
63471  fi
63472
63473  if test "x${with_lcms}" = "xbundled"; then
63474    USE_EXTERNAL_LCMS=false
63475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63476$as_echo "bundled" >&6; }
63477  elif test "x${with_lcms}" = "xsystem"; then
63478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63479$as_echo "system" >&6; }
63480
63481pkg_failed=no
63482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63483$as_echo_n "checking for LCMS... " >&6; }
63484
63485if test -n "$LCMS_CFLAGS"; then
63486    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63487 elif test -n "$PKG_CONFIG"; then
63488    if test -n "$PKG_CONFIG" && \
63489    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63490  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63491  ac_status=$?
63492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63493  test $ac_status = 0; }; then
63494  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63495else
63496  pkg_failed=yes
63497fi
63498 else
63499    pkg_failed=untried
63500fi
63501if test -n "$LCMS_LIBS"; then
63502    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63503 elif test -n "$PKG_CONFIG"; then
63504    if test -n "$PKG_CONFIG" && \
63505    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63506  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63507  ac_status=$?
63508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63509  test $ac_status = 0; }; then
63510  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63511else
63512  pkg_failed=yes
63513fi
63514 else
63515    pkg_failed=untried
63516fi
63517
63518
63519
63520if test $pkg_failed = yes; then
63521
63522if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63523        _pkg_short_errors_supported=yes
63524else
63525        _pkg_short_errors_supported=no
63526fi
63527        if test $_pkg_short_errors_supported = yes; then
63528	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63529        else
63530	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63531        fi
63532	# Put the nasty error message in config.log where it belongs
63533	echo "$LCMS_PKG_ERRORS" >&5
63534
63535	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63536$as_echo "no" >&6; }
63537                LCMS_FOUND=no
63538elif test $pkg_failed = untried; then
63539	LCMS_FOUND=no
63540else
63541	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63542	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63544$as_echo "yes" >&6; }
63545	LCMS_FOUND=yes
63546fi
63547    if test "x${LCMS_FOUND}" = "xyes"; then
63548      USE_EXTERNAL_LCMS=true
63549    else
63550      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63551    fi
63552  else
63553    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63554  fi
63555
63556
63557
63558
63559
63560
63561
63562
63563
63564
63565
63566  # Setup libm (the maths library)
63567  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63569$as_echo_n "checking for cos in -lm... " >&6; }
63570if ${ac_cv_lib_m_cos+:} false; then :
63571  $as_echo_n "(cached) " >&6
63572else
63573  ac_check_lib_save_LIBS=$LIBS
63574LIBS="-lm  $LIBS"
63575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63576/* end confdefs.h.  */
63577
63578/* Override any GCC internal prototype to avoid an error.
63579   Use char because int might match the return type of a GCC
63580   builtin and then its argument prototype would still apply.  */
63581#ifdef __cplusplus
63582extern "C"
63583#endif
63584char cos ();
63585int
63586main ()
63587{
63588return cos ();
63589  ;
63590  return 0;
63591}
63592_ACEOF
63593if ac_fn_cxx_try_link "$LINENO"; then :
63594  ac_cv_lib_m_cos=yes
63595else
63596  ac_cv_lib_m_cos=no
63597fi
63598rm -f core conftest.err conftest.$ac_objext \
63599    conftest$ac_exeext conftest.$ac_ext
63600LIBS=$ac_check_lib_save_LIBS
63601fi
63602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63603$as_echo "$ac_cv_lib_m_cos" >&6; }
63604if test "x$ac_cv_lib_m_cos" = xyes; then :
63605  cat >>confdefs.h <<_ACEOF
63606#define HAVE_LIBM 1
63607_ACEOF
63608
63609  LIBS="-lm $LIBS"
63610
63611else
63612
63613        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63614$as_echo "$as_me: Maths library was not found" >&6;}
63615
63616fi
63617
63618    LIBM="-lm"
63619  else
63620    LIBM=""
63621  fi
63622
63623
63624  # Setup libdl (for dynamic library loading)
63625  save_LIBS="$LIBS"
63626  LIBS=""
63627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63628$as_echo_n "checking for dlopen in -ldl... " >&6; }
63629if ${ac_cv_lib_dl_dlopen+:} false; then :
63630  $as_echo_n "(cached) " >&6
63631else
63632  ac_check_lib_save_LIBS=$LIBS
63633LIBS="-ldl  $LIBS"
63634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63635/* end confdefs.h.  */
63636
63637/* Override any GCC internal prototype to avoid an error.
63638   Use char because int might match the return type of a GCC
63639   builtin and then its argument prototype would still apply.  */
63640#ifdef __cplusplus
63641extern "C"
63642#endif
63643char dlopen ();
63644int
63645main ()
63646{
63647return dlopen ();
63648  ;
63649  return 0;
63650}
63651_ACEOF
63652if ac_fn_cxx_try_link "$LINENO"; then :
63653  ac_cv_lib_dl_dlopen=yes
63654else
63655  ac_cv_lib_dl_dlopen=no
63656fi
63657rm -f core conftest.err conftest.$ac_objext \
63658    conftest$ac_exeext conftest.$ac_ext
63659LIBS=$ac_check_lib_save_LIBS
63660fi
63661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63662$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63663if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63664  cat >>confdefs.h <<_ACEOF
63665#define HAVE_LIBDL 1
63666_ACEOF
63667
63668  LIBS="-ldl $LIBS"
63669
63670fi
63671
63672  LIBDL="$LIBS"
63673
63674  LIBS="$save_LIBS"
63675
63676  # Deprecated libraries, keep the flags for backwards compatibility
63677  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63678
63679
63680# Check whether --with-dxsdk was given.
63681if test "${with_dxsdk+set}" = set; then :
63682  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63683$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63684fi
63685
63686
63687
63688
63689# Check whether --with-dxsdk-lib was given.
63690if test "${with_dxsdk_lib+set}" = set; then :
63691  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63692$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63693fi
63694
63695
63696
63697
63698# Check whether --with-dxsdk-include was given.
63699if test "${with_dxsdk_include+set}" = set; then :
63700  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63701$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63702fi
63703
63704
63705  fi
63706
63707  # Control if libzip can use mmap. Available for purposes of overriding.
63708  LIBZIP_CAN_USE_MMAP=true
63709
63710
63711
63712
63713
63714
63715
63716
63717
63718
63719
63720
63721
63722
63723###############################################################################
63724#
63725# We need to do some final tweaking, when everything else is done.
63726#
63727###############################################################################
63728
63729
63730  # Check whether --enable-new-hotspot-build was given.
63731if test "${enable_new_hotspot_build+set}" = set; then :
63732  enableval=$enable_new_hotspot_build;
63733fi
63734
63735
63736   if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63737     USE_NEW_HOTSPOT_BUILD=true
63738   else
63739     USE_NEW_HOTSPOT_BUILD=false
63740   fi
63741
63742
63743  case $HOTSPOT_DEBUG_LEVEL in
63744    product )
63745      VARIANT="OPT"
63746      FASTDEBUG="false"
63747      DEBUG_CLASSFILES="false"
63748      ;;
63749    fastdebug )
63750      VARIANT="DBG"
63751      FASTDEBUG="true"
63752      DEBUG_CLASSFILES="true"
63753      ;;
63754    debug )
63755      VARIANT="DBG"
63756      FASTDEBUG="false"
63757      DEBUG_CLASSFILES="true"
63758      ;;
63759    optimized )
63760      VARIANT="OPT"
63761      FASTDEBUG="false"
63762      DEBUG_CLASSFILES="false"
63763      ;;
63764  esac
63765
63766
63767
63768
63769  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63770    MACOSX_UNIVERSAL="true"
63771  fi
63772
63773
63774
63775  # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63776  JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63777
63778  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63779  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63780  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63781  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63782  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63783  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63784  JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63785
63786  #####
63787  # Generate the legacy makefile targets for hotspot.
63788  HOTSPOT_TARGET=""
63789
63790  if test "x$JVM_VARIANT_SERVER" = xtrue; then
63791    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63792  fi
63793
63794  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63795    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63796  fi
63797
63798  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63799    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63800  fi
63801
63802  if test "x$JVM_VARIANT_ZERO" = xtrue; then
63803    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63804  fi
63805
63806  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63807    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63808  fi
63809
63810  if test "x$JVM_VARIANT_CORE" = xtrue; then
63811    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63812  fi
63813
63814  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63815
63816  # On Macosx universal binaries are produced, but they only contain
63817  # 64 bit intel. This invalidates control of which jvms are built
63818  # from configure, but only server is valid anyway. Fix this
63819  # when hotspot makefiles are rewritten.
63820  if test "x$MACOSX_UNIVERSAL" = xtrue; then
63821    HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63822  fi
63823
63824  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63825
63826
63827  # Control wether Hotspot runs Queens test after build.
63828  # Check whether --enable-hotspot-test-in-build was given.
63829if test "${enable_hotspot_test_in_build+set}" = set; then :
63830  enableval=$enable_hotspot_test_in_build;
63831else
63832  enable_hotspot_test_in_build=no
63833fi
63834
63835  if test "x$enable_hotspot_test_in_build" = "xyes"; then
63836    TEST_IN_BUILD=true
63837  else
63838    TEST_IN_BUILD=false
63839  fi
63840
63841
63842  if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63843    if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63844      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63845        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63846      fi
63847    fi
63848    if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63849      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63850        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63851      fi
63852    fi
63853    if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63854        as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63855    fi
63856  fi
63857
63858
63859
63860
63861
63862
63863
63864
63865
63866
63867
63868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63869$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63870
63871  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63872    ENABLE_INTREE_EC=yes
63873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63874$as_echo "yes" >&6; }
63875  else
63876    ENABLE_INTREE_EC=no
63877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63878$as_echo "no" >&6; }
63879  fi
63880
63881
63882
63883
63884###############################################################################
63885#
63886# Configure parts of the build that only affect the build performance,
63887# not the result.
63888#
63889###############################################################################
63890
63891
63892  # How many cores do we have on this build system?
63893
63894# Check whether --with-num-cores was given.
63895if test "${with_num_cores+set}" = set; then :
63896  withval=$with_num_cores;
63897fi
63898
63899  if test "x$with_num_cores" = x; then
63900    # The number of cores were not specified, try to probe them.
63901
63902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63903$as_echo_n "checking for number of cores... " >&6; }
63904  NUM_CORES=1
63905  FOUND_CORES=no
63906
63907  if test -f /proc/cpuinfo; then
63908    # Looks like a Linux (or cygwin) system
63909    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63910    FOUND_CORES=yes
63911  elif test -x /usr/sbin/psrinfo; then
63912    # Looks like a Solaris system
63913    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63914    FOUND_CORES=yes
63915  elif test -x /usr/sbin/sysctl; then
63916    # Looks like a MacOSX system
63917    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63918    FOUND_CORES=yes
63919  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63920    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63921    FOUND_CORES=yes
63922  elif test -n "$NUMBER_OF_PROCESSORS"; then
63923    # On windows, look in the env
63924    NUM_CORES=$NUMBER_OF_PROCESSORS
63925    FOUND_CORES=yes
63926  fi
63927
63928  if test "x$FOUND_CORES" = xyes; then
63929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63930$as_echo "$NUM_CORES" >&6; }
63931  else
63932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63933$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63934    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63935$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63936  fi
63937
63938  else
63939    NUM_CORES=$with_num_cores
63940  fi
63941
63942
63943
63944  # How much memory do we have on this build system?
63945
63946# Check whether --with-memory-size was given.
63947if test "${with_memory_size+set}" = set; then :
63948  withval=$with_memory_size;
63949fi
63950
63951  if test "x$with_memory_size" = x; then
63952    # The memory size was not specified, try to probe it.
63953
63954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63955$as_echo_n "checking for memory size... " >&6; }
63956  # Default to 1024 MB
63957  MEMORY_SIZE=1024
63958  FOUND_MEM=no
63959
63960  if test -f /proc/meminfo; then
63961    # Looks like a Linux (or cygwin) system
63962    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63963    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63964    FOUND_MEM=yes
63965  elif test -x /usr/sbin/prtconf; then
63966    # Looks like a Solaris or AIX system
63967    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63968    FOUND_MEM=yes
63969  elif test -x /usr/sbin/sysctl; then
63970    # Looks like a MacOSX system
63971    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63972    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63973    FOUND_MEM=yes
63974  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63975    # Windows, but without cygwin
63976    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63977    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63978    FOUND_MEM=yes
63979  fi
63980
63981  if test "x$FOUND_MEM" = xyes; then
63982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63983$as_echo "$MEMORY_SIZE MB" >&6; }
63984  else
63985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63986$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63987    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63988$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63989  fi
63990
63991  else
63992    MEMORY_SIZE=$with_memory_size
63993  fi
63994
63995
63996
63997  # Provide a decent default number of parallel jobs for make depending on
63998  # number of cores, amount of memory and machine architecture.
63999
64000# Check whether --with-jobs was given.
64001if test "${with_jobs+set}" = set; then :
64002  withval=$with_jobs;
64003fi
64004
64005  if test "x$with_jobs" = x; then
64006    # Number of jobs was not specified, calculate.
64007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64008$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64009    # Approximate memory in GB.
64010    memory_gb=`expr $MEMORY_SIZE / 1024`
64011    # Pick the lowest of memory in gb and number of cores.
64012    if test "$memory_gb" -lt "$NUM_CORES"; then
64013      JOBS="$memory_gb"
64014    else
64015      JOBS="$NUM_CORES"
64016    fi
64017    if test "$JOBS" -eq "0"; then
64018      JOBS=1
64019    fi
64020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64021$as_echo "$JOBS" >&6; }
64022  else
64023    JOBS=$with_jobs
64024  fi
64025
64026
64027
64028  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64029
64030# Check whether --with-test-jobs was given.
64031if test "${with_test_jobs+set}" = set; then :
64032  withval=$with_test_jobs;
64033fi
64034
64035  if test "x$with_test_jobs" = x; then
64036      TEST_JOBS=0
64037  else
64038      TEST_JOBS=$with_test_jobs
64039  fi
64040
64041
64042
64043# Setup arguments for the boot jdk (after cores and memory have been setup)
64044
64045  ##############################################################################
64046  #
64047  # Specify jvm options for anything that is run with the Boot JDK.
64048  # Not all JVM:s accept the same arguments on the command line.
64049  #
64050
64051# Check whether --with-boot-jdk-jvmargs was given.
64052if test "${with_boot_jdk_jvmargs+set}" = set; then :
64053  withval=$with_boot_jdk_jvmargs;
64054fi
64055
64056
64057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64058$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64059
64060  # Disable special log output when a debug build is used as Boot JDK...
64061
64062  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64063  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64064  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64065  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64066  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64067  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64068    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64069    JVM_ARG_OK=true
64070  else
64071    $ECHO "Arg failed:" >&5
64072    $ECHO "$OUTPUT" >&5
64073    JVM_ARG_OK=false
64074  fi
64075
64076
64077  # Apply user provided options.
64078
64079  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64080  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64081  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64082  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64083  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64084  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64085    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64086    JVM_ARG_OK=true
64087  else
64088    $ECHO "Arg failed:" >&5
64089    $ECHO "$OUTPUT" >&5
64090    JVM_ARG_OK=false
64091  fi
64092
64093
64094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64095$as_echo "$boot_jdk_jvmargs" >&6; }
64096
64097  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64098  JAVA_FLAGS=$boot_jdk_jvmargs
64099
64100
64101
64102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64103$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64104
64105  # Starting amount of heap memory.
64106
64107  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64108  $ECHO "Command: $JAVA -Xms64M -version" >&5
64109  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64113    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64114    JVM_ARG_OK=true
64115  else
64116    $ECHO "Arg failed:" >&5
64117    $ECHO "$OUTPUT" >&5
64118    JVM_ARG_OK=false
64119  fi
64120
64121
64122  # Maximum amount of heap memory.
64123  # Maximum stack size.
64124  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64125  if test "x$BOOT_JDK_BITS" = "x32"; then
64126    if test "$JVM_MAX_HEAP" -gt "1100"; then
64127      JVM_MAX_HEAP=1100
64128    elif test "$JVM_MAX_HEAP" -lt "512"; then
64129      JVM_MAX_HEAP=512
64130    fi
64131    STACK_SIZE=768
64132  else
64133    # Running a 64 bit JVM allows for and requires a bigger heap
64134    if test "$JVM_MAX_HEAP" -gt "1600"; then
64135      JVM_MAX_HEAP=1600
64136    elif test "$JVM_MAX_HEAP" -lt "512"; then
64137      JVM_MAX_HEAP=512
64138    fi
64139    STACK_SIZE=1536
64140  fi
64141
64142  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64143  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64144  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64145  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64146  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64148    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64149    JVM_ARG_OK=true
64150  else
64151    $ECHO "Arg failed:" >&5
64152    $ECHO "$OUTPUT" >&5
64153    JVM_ARG_OK=false
64154  fi
64155
64156
64157  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64158  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64159  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64160  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64161  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64162  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64163    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64164    JVM_ARG_OK=true
64165  else
64166    $ECHO "Arg failed:" >&5
64167    $ECHO "$OUTPUT" >&5
64168    JVM_ARG_OK=false
64169  fi
64170
64171
64172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64173$as_echo "$boot_jdk_jvmargs_big" >&6; }
64174
64175  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64176
64177
64178  # By default, the main javac compilations use big
64179  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64180
64181
64182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64183$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64184
64185  # Use serial gc for small short lived tools if possible
64186
64187  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64188  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64189  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64190  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64191  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64192  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64193    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64194    JVM_ARG_OK=true
64195  else
64196    $ECHO "Arg failed:" >&5
64197    $ECHO "$OUTPUT" >&5
64198    JVM_ARG_OK=false
64199  fi
64200
64201
64202  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64203  $ECHO "Command: $JAVA -Xms32M -version" >&5
64204  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64205  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64206  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64207  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64208    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64209    JVM_ARG_OK=true
64210  else
64211    $ECHO "Arg failed:" >&5
64212    $ECHO "$OUTPUT" >&5
64213    JVM_ARG_OK=false
64214  fi
64215
64216
64217  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64218  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64219  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64220  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64221  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64222  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64223    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64224    JVM_ARG_OK=true
64225  else
64226    $ECHO "Arg failed:" >&5
64227    $ECHO "$OUTPUT" >&5
64228    JVM_ARG_OK=false
64229  fi
64230
64231
64232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64233$as_echo "$boot_jdk_jvmargs_small" >&6; }
64234
64235  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64236
64237
64238  JAVA_TOOL_FLAGS_SMALL=""
64239  for f in $JAVA_FLAGS_SMALL; do
64240    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64241  done
64242
64243
64244
64245# Setup smart javac (after cores and memory have been setup)
64246
64247
64248# Check whether --with-sjavac-server-java was given.
64249if test "${with_sjavac_server_java+set}" = set; then :
64250  withval=$with_sjavac_server_java;
64251fi
64252
64253
64254  if test "x$with_sjavac_server_java" != x; then
64255    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64256    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64257    if test "x$FOUND_VERSION" = x; then
64258      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64259    fi
64260  else
64261    SJAVAC_SERVER_JAVA="$JAVA"
64262  fi
64263
64264
64265  if test "$MEMORY_SIZE" -gt "3000"; then
64266
64267  $ECHO "Check if jvm arg is ok: -d64" >&5
64268  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64269  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64270  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64271  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64272  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64273    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64274    JVM_ARG_OK=true
64275  else
64276    $ECHO "Arg failed:" >&5
64277    $ECHO "$OUTPUT" >&5
64278    JVM_ARG_OK=false
64279  fi
64280
64281    if test "$JVM_ARG_OK" = true; then
64282      JVM_64BIT=true
64283      JVM_ARG_OK=false
64284    fi
64285  fi
64286
64287  MX_VALUE=`expr $MEMORY_SIZE / 2`
64288  if test "$JVM_64BIT" = true; then
64289    # Set ms lower than mx since more than one instance of the server might
64290    # get launched at the same time before they figure out which instance won.
64291    MS_VALUE=512
64292    if test "$MX_VALUE" -gt "2048"; then
64293      MX_VALUE=2048
64294    fi
64295  else
64296    MS_VALUE=256
64297    if test "$MX_VALUE" -gt "1500"; then
64298      MX_VALUE=1500
64299    fi
64300  fi
64301  if test "$MX_VALUE" -lt "512"; then
64302    MX_VALUE=512
64303  fi
64304
64305  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64306  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64307  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64308  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64309  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64310  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64311    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64312    JVM_ARG_OK=true
64313  else
64314    $ECHO "Arg failed:" >&5
64315    $ECHO "$OUTPUT" >&5
64316    JVM_ARG_OK=false
64317  fi
64318
64319
64320
64321  # Check whether --enable-sjavac was given.
64322if test "${enable_sjavac+set}" = set; then :
64323  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64324else
64325  ENABLE_SJAVAC="no"
64326fi
64327
64328  if test "x$JVM_ARG_OK" = "xfalse"; then
64329    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64330$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64331    ENABLE_SJAVAC="no"
64332  fi
64333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64334$as_echo_n "checking whether to use sjavac... " >&6; }
64335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64336$as_echo "$ENABLE_SJAVAC" >&6; }
64337
64338
64339  # Check whether --enable-javac-server was given.
64340if test "${enable_javac_server+set}" = set; then :
64341  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64342else
64343  ENABLE_JAVAC_SERVER="yes"
64344fi
64345
64346  if test "x$JVM_ARG_OK" = "xfalse"; then
64347    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64348$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64349    ENABLE_JAVAC_SERVER="no"
64350  fi
64351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64352$as_echo_n "checking whether to use javac server... " >&6; }
64353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64354$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64355
64356
64357  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
64358    # When using a server javac, the small client instances do not need much
64359    # resources.
64360    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64361  fi
64362
64363
64364# Setup use of icecc if requested
64365
64366  # Check whether --enable-icecc was given.
64367if test "${enable_icecc+set}" = set; then :
64368  enableval=$enable_icecc;
64369fi
64370
64371
64372  if test "x${enable_icecc}" = "xyes"; then
64373
64374
64375
64376  # Publish this variable in the help.
64377
64378
64379  if [ -z "${ICECC_CMD+x}" ]; then
64380    # The variable is not set by user, try to locate tool using the code snippet
64381    for ac_prog in icecc
64382do
64383  # Extract the first word of "$ac_prog", so it can be a program name with args.
64384set dummy $ac_prog; ac_word=$2
64385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64386$as_echo_n "checking for $ac_word... " >&6; }
64387if ${ac_cv_path_ICECC_CMD+:} false; then :
64388  $as_echo_n "(cached) " >&6
64389else
64390  case $ICECC_CMD in
64391  [\\/]* | ?:[\\/]*)
64392  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64393  ;;
64394  *)
64395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64396for as_dir in $PATH
64397do
64398  IFS=$as_save_IFS
64399  test -z "$as_dir" && as_dir=.
64400    for ac_exec_ext in '' $ac_executable_extensions; do
64401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64402    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64404    break 2
64405  fi
64406done
64407  done
64408IFS=$as_save_IFS
64409
64410  ;;
64411esac
64412fi
64413ICECC_CMD=$ac_cv_path_ICECC_CMD
64414if test -n "$ICECC_CMD"; then
64415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64416$as_echo "$ICECC_CMD" >&6; }
64417else
64418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64419$as_echo "no" >&6; }
64420fi
64421
64422
64423  test -n "$ICECC_CMD" && break
64424done
64425
64426  else
64427    # The variable is set, but is it from the command line or the environment?
64428
64429    # Try to remove the string !ICECC_CMD! from our list.
64430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64432      # If it failed, the variable was not from the command line. Ignore it,
64433      # but warn the user (except for BASH, which is always set by the calling BASH).
64434      if test "xICECC_CMD" != xBASH; then
64435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64436$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64437      fi
64438      # Try to locate tool using the code snippet
64439      for ac_prog in icecc
64440do
64441  # Extract the first word of "$ac_prog", so it can be a program name with args.
64442set dummy $ac_prog; ac_word=$2
64443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64444$as_echo_n "checking for $ac_word... " >&6; }
64445if ${ac_cv_path_ICECC_CMD+:} false; then :
64446  $as_echo_n "(cached) " >&6
64447else
64448  case $ICECC_CMD in
64449  [\\/]* | ?:[\\/]*)
64450  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64451  ;;
64452  *)
64453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64454for as_dir in $PATH
64455do
64456  IFS=$as_save_IFS
64457  test -z "$as_dir" && as_dir=.
64458    for ac_exec_ext in '' $ac_executable_extensions; do
64459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64460    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64462    break 2
64463  fi
64464done
64465  done
64466IFS=$as_save_IFS
64467
64468  ;;
64469esac
64470fi
64471ICECC_CMD=$ac_cv_path_ICECC_CMD
64472if test -n "$ICECC_CMD"; then
64473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64474$as_echo "$ICECC_CMD" >&6; }
64475else
64476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64477$as_echo "no" >&6; }
64478fi
64479
64480
64481  test -n "$ICECC_CMD" && break
64482done
64483
64484    else
64485      # If it succeeded, then it was overridden by the user. We will use it
64486      # for the tool.
64487
64488      # First remove it from the list of overridden variables, so we can test
64489      # for unknown variables in the end.
64490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64491
64492      # Check if we try to supply an empty value
64493      if test "x$ICECC_CMD" = x; then
64494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64495$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64497$as_echo_n "checking for ICECC_CMD... " >&6; }
64498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64499$as_echo "disabled" >&6; }
64500      else
64501        # Check if the provided tool contains a complete path.
64502        tool_specified="$ICECC_CMD"
64503        tool_basename="${tool_specified##*/}"
64504        if test "x$tool_basename" = "x$tool_specified"; then
64505          # A command without a complete path is provided, search $PATH.
64506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64507$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64508          # Extract the first word of "$tool_basename", so it can be a program name with args.
64509set dummy $tool_basename; ac_word=$2
64510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64511$as_echo_n "checking for $ac_word... " >&6; }
64512if ${ac_cv_path_ICECC_CMD+:} false; then :
64513  $as_echo_n "(cached) " >&6
64514else
64515  case $ICECC_CMD in
64516  [\\/]* | ?:[\\/]*)
64517  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64518  ;;
64519  *)
64520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64521for as_dir in $PATH
64522do
64523  IFS=$as_save_IFS
64524  test -z "$as_dir" && as_dir=.
64525    for ac_exec_ext in '' $ac_executable_extensions; do
64526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64527    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64529    break 2
64530  fi
64531done
64532  done
64533IFS=$as_save_IFS
64534
64535  ;;
64536esac
64537fi
64538ICECC_CMD=$ac_cv_path_ICECC_CMD
64539if test -n "$ICECC_CMD"; then
64540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64541$as_echo "$ICECC_CMD" >&6; }
64542else
64543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64544$as_echo "no" >&6; }
64545fi
64546
64547
64548          if test "x$ICECC_CMD" = x; then
64549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64550          fi
64551        else
64552          # Otherwise we believe it is a complete path. Use it as it is.
64553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64554$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64556$as_echo_n "checking for ICECC_CMD... " >&6; }
64557          if test ! -x "$tool_specified"; then
64558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64559$as_echo "not found" >&6; }
64560            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64561          fi
64562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64563$as_echo "$tool_specified" >&6; }
64564        fi
64565      fi
64566    fi
64567
64568  fi
64569
64570
64571
64572  if test "x$ICECC_CMD" = x; then
64573    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64574  fi
64575
64576
64577    old_path="$PATH"
64578
64579    # Look for icecc-create-env in some known places
64580    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64581
64582
64583
64584  # Publish this variable in the help.
64585
64586
64587  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64588    # The variable is not set by user, try to locate tool using the code snippet
64589    for ac_prog in icecc-create-env
64590do
64591  # Extract the first word of "$ac_prog", so it can be a program name with args.
64592set dummy $ac_prog; ac_word=$2
64593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64594$as_echo_n "checking for $ac_word... " >&6; }
64595if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64596  $as_echo_n "(cached) " >&6
64597else
64598  case $ICECC_CREATE_ENV in
64599  [\\/]* | ?:[\\/]*)
64600  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64601  ;;
64602  *)
64603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64604for as_dir in $PATH
64605do
64606  IFS=$as_save_IFS
64607  test -z "$as_dir" && as_dir=.
64608    for ac_exec_ext in '' $ac_executable_extensions; do
64609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64610    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64612    break 2
64613  fi
64614done
64615  done
64616IFS=$as_save_IFS
64617
64618  ;;
64619esac
64620fi
64621ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64622if test -n "$ICECC_CREATE_ENV"; then
64623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64624$as_echo "$ICECC_CREATE_ENV" >&6; }
64625else
64626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64627$as_echo "no" >&6; }
64628fi
64629
64630
64631  test -n "$ICECC_CREATE_ENV" && break
64632done
64633
64634  else
64635    # The variable is set, but is it from the command line or the environment?
64636
64637    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64640      # If it failed, the variable was not from the command line. Ignore it,
64641      # but warn the user (except for BASH, which is always set by the calling BASH).
64642      if test "xICECC_CREATE_ENV" != xBASH; then
64643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64644$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64645      fi
64646      # Try to locate tool using the code snippet
64647      for ac_prog in icecc-create-env
64648do
64649  # Extract the first word of "$ac_prog", so it can be a program name with args.
64650set dummy $ac_prog; ac_word=$2
64651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64652$as_echo_n "checking for $ac_word... " >&6; }
64653if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64654  $as_echo_n "(cached) " >&6
64655else
64656  case $ICECC_CREATE_ENV in
64657  [\\/]* | ?:[\\/]*)
64658  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64659  ;;
64660  *)
64661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64662for as_dir in $PATH
64663do
64664  IFS=$as_save_IFS
64665  test -z "$as_dir" && as_dir=.
64666    for ac_exec_ext in '' $ac_executable_extensions; do
64667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64668    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64670    break 2
64671  fi
64672done
64673  done
64674IFS=$as_save_IFS
64675
64676  ;;
64677esac
64678fi
64679ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64680if test -n "$ICECC_CREATE_ENV"; then
64681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64682$as_echo "$ICECC_CREATE_ENV" >&6; }
64683else
64684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64685$as_echo "no" >&6; }
64686fi
64687
64688
64689  test -n "$ICECC_CREATE_ENV" && break
64690done
64691
64692    else
64693      # If it succeeded, then it was overridden by the user. We will use it
64694      # for the tool.
64695
64696      # First remove it from the list of overridden variables, so we can test
64697      # for unknown variables in the end.
64698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64699
64700      # Check if we try to supply an empty value
64701      if test "x$ICECC_CREATE_ENV" = x; then
64702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64703$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64705$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64707$as_echo "disabled" >&6; }
64708      else
64709        # Check if the provided tool contains a complete path.
64710        tool_specified="$ICECC_CREATE_ENV"
64711        tool_basename="${tool_specified##*/}"
64712        if test "x$tool_basename" = "x$tool_specified"; then
64713          # A command without a complete path is provided, search $PATH.
64714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64715$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64716          # Extract the first word of "$tool_basename", so it can be a program name with args.
64717set dummy $tool_basename; ac_word=$2
64718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64719$as_echo_n "checking for $ac_word... " >&6; }
64720if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64721  $as_echo_n "(cached) " >&6
64722else
64723  case $ICECC_CREATE_ENV in
64724  [\\/]* | ?:[\\/]*)
64725  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64726  ;;
64727  *)
64728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64729for as_dir in $PATH
64730do
64731  IFS=$as_save_IFS
64732  test -z "$as_dir" && as_dir=.
64733    for ac_exec_ext in '' $ac_executable_extensions; do
64734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64735    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64737    break 2
64738  fi
64739done
64740  done
64741IFS=$as_save_IFS
64742
64743  ;;
64744esac
64745fi
64746ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64747if test -n "$ICECC_CREATE_ENV"; then
64748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64749$as_echo "$ICECC_CREATE_ENV" >&6; }
64750else
64751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64752$as_echo "no" >&6; }
64753fi
64754
64755
64756          if test "x$ICECC_CREATE_ENV" = x; then
64757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64758          fi
64759        else
64760          # Otherwise we believe it is a complete path. Use it as it is.
64761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64762$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64764$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64765          if test ! -x "$tool_specified"; then
64766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64767$as_echo "not found" >&6; }
64768            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64769          fi
64770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64771$as_echo "$tool_specified" >&6; }
64772        fi
64773      fi
64774    fi
64775
64776  fi
64777
64778
64779
64780  if test "x$ICECC_CREATE_ENV" = x; then
64781    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64782  fi
64783
64784
64785    # Use icecc-create-env to create a minimal compilation environment that can
64786    # be sent to the other hosts in the icecream cluster.
64787    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64788    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64789    # Older versions of icecc does not have the --gcc parameter
64790    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64791      icecc_gcc_arg="--gcc"
64792    fi
64793    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64794
64795  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64796      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64797          ${icecc_create_env_log} 2>&1 )
64798  if test "$?" != "0"; then
64799    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64800$as_echo "$as_me: icecc-create-env output:" >&6;}
64801    cat \
64802          ${icecc_create_env_log}
64803    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64804  fi
64805
64806    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64807      # For clang, the icecc compilerwrapper is needed. It usually resides next
64808      # to icecc-create-env.
64809
64810
64811
64812  # Publish this variable in the help.
64813
64814
64815  if [ -z "${ICECC_WRAPPER+x}" ]; then
64816    # The variable is not set by user, try to locate tool using the code snippet
64817    for ac_prog in compilerwrapper
64818do
64819  # Extract the first word of "$ac_prog", so it can be a program name with args.
64820set dummy $ac_prog; ac_word=$2
64821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64822$as_echo_n "checking for $ac_word... " >&6; }
64823if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64824  $as_echo_n "(cached) " >&6
64825else
64826  case $ICECC_WRAPPER in
64827  [\\/]* | ?:[\\/]*)
64828  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64829  ;;
64830  *)
64831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64832for as_dir in $PATH
64833do
64834  IFS=$as_save_IFS
64835  test -z "$as_dir" && as_dir=.
64836    for ac_exec_ext in '' $ac_executable_extensions; do
64837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64838    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64840    break 2
64841  fi
64842done
64843  done
64844IFS=$as_save_IFS
64845
64846  ;;
64847esac
64848fi
64849ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64850if test -n "$ICECC_WRAPPER"; then
64851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64852$as_echo "$ICECC_WRAPPER" >&6; }
64853else
64854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64855$as_echo "no" >&6; }
64856fi
64857
64858
64859  test -n "$ICECC_WRAPPER" && break
64860done
64861
64862  else
64863    # The variable is set, but is it from the command line or the environment?
64864
64865    # Try to remove the string !ICECC_WRAPPER! from our list.
64866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64868      # If it failed, the variable was not from the command line. Ignore it,
64869      # but warn the user (except for BASH, which is always set by the calling BASH).
64870      if test "xICECC_WRAPPER" != xBASH; then
64871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64872$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64873      fi
64874      # Try to locate tool using the code snippet
64875      for ac_prog in compilerwrapper
64876do
64877  # Extract the first word of "$ac_prog", so it can be a program name with args.
64878set dummy $ac_prog; ac_word=$2
64879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64880$as_echo_n "checking for $ac_word... " >&6; }
64881if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64882  $as_echo_n "(cached) " >&6
64883else
64884  case $ICECC_WRAPPER in
64885  [\\/]* | ?:[\\/]*)
64886  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64887  ;;
64888  *)
64889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64890for as_dir in $PATH
64891do
64892  IFS=$as_save_IFS
64893  test -z "$as_dir" && as_dir=.
64894    for ac_exec_ext in '' $ac_executable_extensions; do
64895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64896    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64898    break 2
64899  fi
64900done
64901  done
64902IFS=$as_save_IFS
64903
64904  ;;
64905esac
64906fi
64907ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64908if test -n "$ICECC_WRAPPER"; then
64909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64910$as_echo "$ICECC_WRAPPER" >&6; }
64911else
64912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64913$as_echo "no" >&6; }
64914fi
64915
64916
64917  test -n "$ICECC_WRAPPER" && break
64918done
64919
64920    else
64921      # If it succeeded, then it was overridden by the user. We will use it
64922      # for the tool.
64923
64924      # First remove it from the list of overridden variables, so we can test
64925      # for unknown variables in the end.
64926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64927
64928      # Check if we try to supply an empty value
64929      if test "x$ICECC_WRAPPER" = x; then
64930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64931$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64933$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64935$as_echo "disabled" >&6; }
64936      else
64937        # Check if the provided tool contains a complete path.
64938        tool_specified="$ICECC_WRAPPER"
64939        tool_basename="${tool_specified##*/}"
64940        if test "x$tool_basename" = "x$tool_specified"; then
64941          # A command without a complete path is provided, search $PATH.
64942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64943$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64944          # Extract the first word of "$tool_basename", so it can be a program name with args.
64945set dummy $tool_basename; ac_word=$2
64946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64947$as_echo_n "checking for $ac_word... " >&6; }
64948if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64949  $as_echo_n "(cached) " >&6
64950else
64951  case $ICECC_WRAPPER in
64952  [\\/]* | ?:[\\/]*)
64953  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64954  ;;
64955  *)
64956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64957for as_dir in $PATH
64958do
64959  IFS=$as_save_IFS
64960  test -z "$as_dir" && as_dir=.
64961    for ac_exec_ext in '' $ac_executable_extensions; do
64962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64963    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64965    break 2
64966  fi
64967done
64968  done
64969IFS=$as_save_IFS
64970
64971  ;;
64972esac
64973fi
64974ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64975if test -n "$ICECC_WRAPPER"; then
64976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64977$as_echo "$ICECC_WRAPPER" >&6; }
64978else
64979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64980$as_echo "no" >&6; }
64981fi
64982
64983
64984          if test "x$ICECC_WRAPPER" = x; then
64985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64986          fi
64987        else
64988          # Otherwise we believe it is a complete path. Use it as it is.
64989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
64990$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
64991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64992$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64993          if test ! -x "$tool_specified"; then
64994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64995$as_echo "not found" >&6; }
64996            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
64997          fi
64998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64999$as_echo "$tool_specified" >&6; }
65000        fi
65001      fi
65002    fi
65003
65004  fi
65005
65006
65007
65008  if test "x$ICECC_WRAPPER" = x; then
65009    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65010  fi
65011
65012
65013
65014  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65015      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65016  if test "$?" != "0"; then
65017    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65018$as_echo "$as_me: icecc-create-env output:" >&6;}
65019    cat ${icecc_create_env_log}
65020    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65021  fi
65022
65023    else
65024      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65025    fi
65026    PATH="$old_path"
65027    # The bundle with the compiler gets a name based on checksums. Parse log file
65028    # to find it.
65029    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65030    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65031    if test ! -f ${ICECC_ENV_BUNDLE}; then
65032      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65033    fi
65034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65035$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65037$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65038    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65039
65040    if test "x${COMPILE_TYPE}" = "xcross"; then
65041      # If cross compiling, create a separate env package for the build compiler
65042      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65043      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65044      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65045
65046  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65047      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65048            ${icecc_create_env_log_build} 2>&1 )
65049  if test "$?" != "0"; then
65050    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65051$as_echo "$as_me: icecc-create-env output:" >&6;}
65052    cat \
65053            ${icecc_create_env_log_build}
65054    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65055  fi
65056
65057      elif test "x${BUILD_CC##*/}" = "xclang"; then
65058
65059  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65060      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65061  if test "$?" != "0"; then
65062    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65063$as_echo "$as_me: icecc-create-env output:" >&6;}
65064    cat ${icecc_create_env_log_build}
65065    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65066  fi
65067
65068      else
65069        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65070      fi
65071      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65072      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65073      if test ! -f ${ICECC_ENV_BUNDLE}; then
65074        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65075      fi
65076      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65077$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65079$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65080      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65081          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65082    else
65083      BUILD_ICECC="${ICECC}"
65084    fi
65085
65086
65087  fi
65088
65089
65090# Can the C/C++ compiler use precompiled headers?
65091
65092
65093  ###############################################################################
65094  #
65095  # Can the C/C++ compiler use precompiled headers?
65096  #
65097  # Check whether --enable-precompiled-headers was given.
65098if test "${enable_precompiled_headers+set}" = set; then :
65099  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65100else
65101  ENABLE_PRECOMPH=yes
65102fi
65103
65104
65105  USE_PRECOMPILED_HEADER=1
65106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65107$as_echo_n "checking If precompiled header is enabled... " >&6; }
65108  if test "x$ENABLE_PRECOMPH" = xno; then
65109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65110$as_echo "no, forced" >&6; }
65111    USE_PRECOMPILED_HEADER=0
65112  elif test "x$ICECC" != "x"; then
65113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65114$as_echo "no, does not work effectively with icecc" >&6; }
65115    USE_PRECOMPILED_HEADER=0
65116  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65118$as_echo "no, does not work with Solaris Studio" >&6; }
65119    USE_PRECOMPILED_HEADER=0
65120  else
65121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65122$as_echo "yes" >&6; }
65123  fi
65124
65125  if test "x$ENABLE_PRECOMPH" = xyes; then
65126    # Check that the compiler actually supports precomp headers.
65127    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65129$as_echo_n "checking that precompiled headers work... " >&6; }
65130      echo "int alfa();" > conftest.h
65131      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65132      if test ! -f conftest.hpp.gch; then
65133        USE_PRECOMPILED_HEADER=0
65134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65135$as_echo "no" >&6; }
65136      else
65137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65138$as_echo "yes" >&6; }
65139      fi
65140      rm -f conftest.h conftest.hpp.gch
65141    fi
65142  fi
65143
65144
65145
65146
65147# Setup use of ccache, if available
65148
65149  # Check whether --enable-ccache was given.
65150if test "${enable_ccache+set}" = set; then :
65151  enableval=$enable_ccache;
65152fi
65153
65154
65155  CCACHE=
65156  CCACHE_STATUS=
65157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65158$as_echo_n "checking is ccache enabled... " >&6; }
65159  if test "x$enable_ccache" = xyes; then
65160    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65162$as_echo "yes" >&6; }
65163      OLD_PATH="$PATH"
65164      if test "x$TOOLCHAIN_PATH" != x; then
65165        PATH=$TOOLCHAIN_PATH:$PATH
65166      fi
65167
65168
65169
65170  # Publish this variable in the help.
65171
65172
65173  if [ -z "${CCACHE+x}" ]; then
65174    # The variable is not set by user, try to locate tool using the code snippet
65175    for ac_prog in ccache
65176do
65177  # Extract the first word of "$ac_prog", so it can be a program name with args.
65178set dummy $ac_prog; ac_word=$2
65179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65180$as_echo_n "checking for $ac_word... " >&6; }
65181if ${ac_cv_path_CCACHE+:} false; then :
65182  $as_echo_n "(cached) " >&6
65183else
65184  case $CCACHE in
65185  [\\/]* | ?:[\\/]*)
65186  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65187  ;;
65188  *)
65189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65190for as_dir in $PATH
65191do
65192  IFS=$as_save_IFS
65193  test -z "$as_dir" && as_dir=.
65194    for ac_exec_ext in '' $ac_executable_extensions; do
65195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65196    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65198    break 2
65199  fi
65200done
65201  done
65202IFS=$as_save_IFS
65203
65204  ;;
65205esac
65206fi
65207CCACHE=$ac_cv_path_CCACHE
65208if test -n "$CCACHE"; then
65209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65210$as_echo "$CCACHE" >&6; }
65211else
65212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65213$as_echo "no" >&6; }
65214fi
65215
65216
65217  test -n "$CCACHE" && break
65218done
65219
65220  else
65221    # The variable is set, but is it from the command line or the environment?
65222
65223    # Try to remove the string !CCACHE! from our list.
65224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65226      # If it failed, the variable was not from the command line. Ignore it,
65227      # but warn the user (except for BASH, which is always set by the calling BASH).
65228      if test "xCCACHE" != xBASH; then
65229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65230$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65231      fi
65232      # Try to locate tool using the code snippet
65233      for ac_prog in ccache
65234do
65235  # Extract the first word of "$ac_prog", so it can be a program name with args.
65236set dummy $ac_prog; ac_word=$2
65237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65238$as_echo_n "checking for $ac_word... " >&6; }
65239if ${ac_cv_path_CCACHE+:} false; then :
65240  $as_echo_n "(cached) " >&6
65241else
65242  case $CCACHE in
65243  [\\/]* | ?:[\\/]*)
65244  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65245  ;;
65246  *)
65247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65248for as_dir in $PATH
65249do
65250  IFS=$as_save_IFS
65251  test -z "$as_dir" && as_dir=.
65252    for ac_exec_ext in '' $ac_executable_extensions; do
65253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65254    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65256    break 2
65257  fi
65258done
65259  done
65260IFS=$as_save_IFS
65261
65262  ;;
65263esac
65264fi
65265CCACHE=$ac_cv_path_CCACHE
65266if test -n "$CCACHE"; then
65267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65268$as_echo "$CCACHE" >&6; }
65269else
65270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65271$as_echo "no" >&6; }
65272fi
65273
65274
65275  test -n "$CCACHE" && break
65276done
65277
65278    else
65279      # If it succeeded, then it was overridden by the user. We will use it
65280      # for the tool.
65281
65282      # First remove it from the list of overridden variables, so we can test
65283      # for unknown variables in the end.
65284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65285
65286      # Check if we try to supply an empty value
65287      if test "x$CCACHE" = x; then
65288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65289$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65291$as_echo_n "checking for CCACHE... " >&6; }
65292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65293$as_echo "disabled" >&6; }
65294      else
65295        # Check if the provided tool contains a complete path.
65296        tool_specified="$CCACHE"
65297        tool_basename="${tool_specified##*/}"
65298        if test "x$tool_basename" = "x$tool_specified"; then
65299          # A command without a complete path is provided, search $PATH.
65300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65301$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65302          # Extract the first word of "$tool_basename", so it can be a program name with args.
65303set dummy $tool_basename; ac_word=$2
65304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65305$as_echo_n "checking for $ac_word... " >&6; }
65306if ${ac_cv_path_CCACHE+:} false; then :
65307  $as_echo_n "(cached) " >&6
65308else
65309  case $CCACHE in
65310  [\\/]* | ?:[\\/]*)
65311  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65312  ;;
65313  *)
65314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65315for as_dir in $PATH
65316do
65317  IFS=$as_save_IFS
65318  test -z "$as_dir" && as_dir=.
65319    for ac_exec_ext in '' $ac_executable_extensions; do
65320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65321    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65323    break 2
65324  fi
65325done
65326  done
65327IFS=$as_save_IFS
65328
65329  ;;
65330esac
65331fi
65332CCACHE=$ac_cv_path_CCACHE
65333if test -n "$CCACHE"; then
65334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65335$as_echo "$CCACHE" >&6; }
65336else
65337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65338$as_echo "no" >&6; }
65339fi
65340
65341
65342          if test "x$CCACHE" = x; then
65343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65344          fi
65345        else
65346          # Otherwise we believe it is a complete path. Use it as it is.
65347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65348$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65350$as_echo_n "checking for CCACHE... " >&6; }
65351          if test ! -x "$tool_specified"; then
65352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65353$as_echo "not found" >&6; }
65354            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65355          fi
65356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65357$as_echo "$tool_specified" >&6; }
65358        fi
65359      fi
65360    fi
65361
65362  fi
65363
65364
65365
65366  if test "x$CCACHE" = x; then
65367    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65368  fi
65369
65370
65371      PATH="$OLD_PATH"
65372      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65373      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65374    else
65375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65376$as_echo "no" >&6; }
65377      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65378$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65379    fi
65380  elif test "x$enable_ccache" = xno; then
65381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65382$as_echo "no, explicitly disabled" >&6; }
65383    CCACHE_STATUS="Disabled"
65384  elif test "x$enable_ccache" = x; then
65385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65386$as_echo "no" >&6; }
65387  else
65388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65389$as_echo "unknown" >&6; }
65390    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65391  fi
65392
65393
65394
65395# Check whether --with-ccache-dir was given.
65396if test "${with_ccache_dir+set}" = set; then :
65397  withval=$with_ccache_dir;
65398fi
65399
65400
65401  if test "x$with_ccache_dir" != x; then
65402    # When using a non home ccache directory, assume the use is to share ccache files
65403    # with other users. Thus change the umask.
65404    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65405    if test "x$CCACHE" = x; then
65406      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65407$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65408    fi
65409  fi
65410
65411  if test "x$CCACHE" != x; then
65412
65413  if test "x$CCACHE" != x; then
65414    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65415      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65416          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65417      if test "x$HAS_BAD_CCACHE" != "x"; then
65418        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65419      fi
65420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65421$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65422      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65423      PUSHED_FLAGS="$CXXFLAGS"
65424      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65425      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65426/* end confdefs.h.  */
65427
65428int
65429main ()
65430{
65431
65432  ;
65433  return 0;
65434}
65435_ACEOF
65436if ac_fn_cxx_try_compile "$LINENO"; then :
65437  CC_KNOWS_CCACHE_TRICK=yes
65438else
65439  CC_KNOWS_CCACHE_TRICK=no
65440fi
65441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65442      CXXFLAGS="$PUSHED_FLAGS"
65443      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65445$as_echo "yes" >&6; }
65446        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65447
65448        CCACHE_SLOPPINESS=pch_defines,time_macros
65449      else
65450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65451$as_echo "no" >&6; }
65452        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65453      fi
65454    fi
65455
65456    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65457        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65458
65459    if test "x$SET_CCACHE_DIR" != x; then
65460      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65461      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65462    fi
65463  fi
65464
65465  fi
65466
65467
65468###############################################################################
65469#
65470# And now the finish...
65471#
65472###############################################################################
65473
65474# Check for some common pitfalls
65475
65476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65477    file_to_test="$SRC_ROOT/LICENSE"
65478    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65479      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
65480    fi
65481  fi
65482
65483
65484  # Did user specify any unknown variables?
65485
65486  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65487    # Replace the separating ! with spaces before presenting for end user.
65488    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65490$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65491  fi
65492
65493
65494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65495$as_echo_n "checking if build directory is on local disk... " >&6; }
65496
65497  # df -l lists only local disks; if the given directory is not found then
65498  # a non-zero exit code is given
65499  if test "x$DF" = x; then
65500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65501      # msys does not have df; use Windows "net use" instead.
65502      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65503      if test "x$IS_NETWORK_DISK" = x; then
65504        OUTPUT_DIR_IS_LOCAL="yes"
65505      else
65506        OUTPUT_DIR_IS_LOCAL="no"
65507      fi
65508    else
65509      # No df here, say it's local
65510      OUTPUT_DIR_IS_LOCAL="yes"
65511    fi
65512  else
65513    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65514      OUTPUT_DIR_IS_LOCAL="yes"
65515    else
65516      OUTPUT_DIR_IS_LOCAL="no"
65517    fi
65518  fi
65519
65520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65521$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65522
65523
65524
65525  # Check if the user has any old-style ALT_ variables set.
65526  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65527
65528  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65529  # Since we can't properly handle the dependencies for this, warn the user about the situation
65530  if test -e $OUTPUT_ROOT/spec.gmk; then
65531    IS_RECONFIGURE=yes
65532  else
65533    IS_RECONFIGURE=no
65534  fi
65535
65536
65537# At the end, call the custom hook. (Dummy macro if no custom sources available)
65538
65539
65540# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65541
65542  # Keep feature lists sorted and free of duplicates
65543  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65544  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65545  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65546  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65547  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65548  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65549  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65550
65551  # Validate features
65552  for variant in $JVM_VARIANTS; do
65553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65554$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65555    features_var_name=JVM_FEATURES_$variant
65556    JVM_FEATURES_TO_TEST=${!features_var_name}
65557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65558$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65559    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
65560    if test "x$INVALID_FEATURES" != x; then
65561      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65562    fi
65563  done
65564
65565
65566# We're messing a bit with internal autoconf variables to put the config.status
65567# in the output directory instead of the current directory.
65568CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65569
65570# Create the actual output files. Now the main work of configure is done.
65571cat >confcache <<\_ACEOF
65572# This file is a shell script that caches the results of configure
65573# tests run on this system so they can be shared between configure
65574# scripts and configure runs, see configure's option --config-cache.
65575# It is not useful on other systems.  If it contains results you don't
65576# want to keep, you may remove or edit it.
65577#
65578# config.status only pays attention to the cache file if you give it
65579# the --recheck option to rerun configure.
65580#
65581# `ac_cv_env_foo' variables (set or unset) will be overridden when
65582# loading this file, other *unset* `ac_cv_foo' will be assigned the
65583# following values.
65584
65585_ACEOF
65586
65587# The following way of writing the cache mishandles newlines in values,
65588# but we know of no workaround that is simple, portable, and efficient.
65589# So, we kill variables containing newlines.
65590# Ultrix sh set writes to stderr and can't be redirected directly,
65591# and sets the high bit in the cache file unless we assign to the vars.
65592(
65593  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65594    eval ac_val=\$$ac_var
65595    case $ac_val in #(
65596    *${as_nl}*)
65597      case $ac_var in #(
65598      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65600      esac
65601      case $ac_var in #(
65602      _ | IFS | as_nl) ;; #(
65603      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65604      *) { eval $ac_var=; unset $ac_var;} ;;
65605      esac ;;
65606    esac
65607  done
65608
65609  (set) 2>&1 |
65610    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65611    *${as_nl}ac_space=\ *)
65612      # `set' does not quote correctly, so add quotes: double-quote
65613      # substitution turns \\\\ into \\, and sed turns \\ into \.
65614      sed -n \
65615	"s/'/'\\\\''/g;
65616	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65617      ;; #(
65618    *)
65619      # `set' quotes correctly as required by POSIX, so do not add quotes.
65620      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65621      ;;
65622    esac |
65623    sort
65624) |
65625  sed '
65626     /^ac_cv_env_/b end
65627     t clear
65628     :clear
65629     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65630     t end
65631     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65632     :end' >>confcache
65633if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65634  if test -w "$cache_file"; then
65635    if test "x$cache_file" != "x/dev/null"; then
65636      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65637$as_echo "$as_me: updating cache $cache_file" >&6;}
65638      if test ! -f "$cache_file" || test -h "$cache_file"; then
65639	cat confcache >"$cache_file"
65640      else
65641        case $cache_file in #(
65642        */* | ?:*)
65643	  mv -f confcache "$cache_file"$$ &&
65644	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65645        *)
65646	  mv -f confcache "$cache_file" ;;
65647	esac
65648      fi
65649    fi
65650  else
65651    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65652$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65653  fi
65654fi
65655rm -f confcache
65656
65657test "x$prefix" = xNONE && prefix=$ac_default_prefix
65658# Let make expand exec_prefix.
65659test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65660
65661# Transform confdefs.h into DEFS.
65662# Protect against shell expansion while executing Makefile rules.
65663# Protect against Makefile macro expansion.
65664#
65665# If the first sed substitution is executed (which looks for macros that
65666# take arguments), then branch to the quote section.  Otherwise,
65667# look for a macro that doesn't take arguments.
65668ac_script='
65669:mline
65670/\\$/{
65671 N
65672 s,\\\n,,
65673 b mline
65674}
65675t clear
65676:clear
65677s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65678t quote
65679s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65680t quote
65681b any
65682:quote
65683s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65684s/\[/\\&/g
65685s/\]/\\&/g
65686s/\$/$$/g
65687H
65688:any
65689${
65690	g
65691	s/^\n//
65692	s/\n/ /g
65693	p
65694}
65695'
65696DEFS=`sed -n "$ac_script" confdefs.h`
65697
65698
65699ac_libobjs=
65700ac_ltlibobjs=
65701U=
65702for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65703  # 1. Remove the extension, and $U if already installed.
65704  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65705  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65706  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65707  #    will be set to the directory where LIBOBJS objects are built.
65708  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65709  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65710done
65711LIBOBJS=$ac_libobjs
65712
65713LTLIBOBJS=$ac_ltlibobjs
65714
65715
65716
65717: "${CONFIG_STATUS=./config.status}"
65718ac_write_fail=0
65719ac_clean_files_save=$ac_clean_files
65720ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65721{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65722$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65723as_write_fail=0
65724cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65725#! $SHELL
65726# Generated by $as_me.
65727# Run this file to recreate the current configuration.
65728# Compiler output produced by configure, useful for debugging
65729# configure, is in config.log if it exists.
65730
65731debug=false
65732ac_cs_recheck=false
65733ac_cs_silent=false
65734
65735SHELL=\${CONFIG_SHELL-$SHELL}
65736export SHELL
65737_ASEOF
65738cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65739## -------------------- ##
65740## M4sh Initialization. ##
65741## -------------------- ##
65742
65743# Be more Bourne compatible
65744DUALCASE=1; export DUALCASE # for MKS sh
65745if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65746  emulate sh
65747  NULLCMD=:
65748  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65749  # is contrary to our usage.  Disable this feature.
65750  alias -g '${1+"$@"}'='"$@"'
65751  setopt NO_GLOB_SUBST
65752else
65753  case `(set -o) 2>/dev/null` in #(
65754  *posix*) :
65755    set -o posix ;; #(
65756  *) :
65757     ;;
65758esac
65759fi
65760
65761
65762as_nl='
65763'
65764export as_nl
65765# Printing a long string crashes Solaris 7 /usr/bin/printf.
65766as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65767as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65768as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65769# Prefer a ksh shell builtin over an external printf program on Solaris,
65770# but without wasting forks for bash or zsh.
65771if test -z "$BASH_VERSION$ZSH_VERSION" \
65772    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65773  as_echo='print -r --'
65774  as_echo_n='print -rn --'
65775elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65776  as_echo='printf %s\n'
65777  as_echo_n='printf %s'
65778else
65779  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65780    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65781    as_echo_n='/usr/ucb/echo -n'
65782  else
65783    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65784    as_echo_n_body='eval
65785      arg=$1;
65786      case $arg in #(
65787      *"$as_nl"*)
65788	expr "X$arg" : "X\\(.*\\)$as_nl";
65789	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65790      esac;
65791      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65792    '
65793    export as_echo_n_body
65794    as_echo_n='sh -c $as_echo_n_body as_echo'
65795  fi
65796  export as_echo_body
65797  as_echo='sh -c $as_echo_body as_echo'
65798fi
65799
65800# The user is always right.
65801if test "${PATH_SEPARATOR+set}" != set; then
65802  PATH_SEPARATOR=:
65803  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65804    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65805      PATH_SEPARATOR=';'
65806  }
65807fi
65808
65809
65810# IFS
65811# We need space, tab and new line, in precisely that order.  Quoting is
65812# there to prevent editors from complaining about space-tab.
65813# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65814# splitting by setting IFS to empty value.)
65815IFS=" ""	$as_nl"
65816
65817# Find who we are.  Look in the path if we contain no directory separator.
65818as_myself=
65819case $0 in #((
65820  *[\\/]* ) as_myself=$0 ;;
65821  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65822for as_dir in $PATH
65823do
65824  IFS=$as_save_IFS
65825  test -z "$as_dir" && as_dir=.
65826    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65827  done
65828IFS=$as_save_IFS
65829
65830     ;;
65831esac
65832# We did not find ourselves, most probably we were run as `sh COMMAND'
65833# in which case we are not to be found in the path.
65834if test "x$as_myself" = x; then
65835  as_myself=$0
65836fi
65837if test ! -f "$as_myself"; then
65838  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65839  exit 1
65840fi
65841
65842# Unset variables that we do not need and which cause bugs (e.g. in
65843# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65844# suppresses any "Segmentation fault" message there.  '((' could
65845# trigger a bug in pdksh 5.2.14.
65846for as_var in BASH_ENV ENV MAIL MAILPATH
65847do eval test x\${$as_var+set} = xset \
65848  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65849done
65850PS1='$ '
65851PS2='> '
65852PS4='+ '
65853
65854# NLS nuisances.
65855LC_ALL=C
65856export LC_ALL
65857LANGUAGE=C
65858export LANGUAGE
65859
65860# CDPATH.
65861(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65862
65863
65864# as_fn_error STATUS ERROR [LINENO LOG_FD]
65865# ----------------------------------------
65866# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65867# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65868# script with STATUS, using 1 if that was 0.
65869as_fn_error ()
65870{
65871  as_status=$1; test $as_status -eq 0 && as_status=1
65872  if test "$4"; then
65873    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65874    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65875  fi
65876  $as_echo "$as_me: error: $2" >&2
65877  as_fn_exit $as_status
65878} # as_fn_error
65879
65880
65881# as_fn_set_status STATUS
65882# -----------------------
65883# Set $? to STATUS, without forking.
65884as_fn_set_status ()
65885{
65886  return $1
65887} # as_fn_set_status
65888
65889# as_fn_exit STATUS
65890# -----------------
65891# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65892as_fn_exit ()
65893{
65894  set +e
65895  as_fn_set_status $1
65896  exit $1
65897} # as_fn_exit
65898
65899# as_fn_unset VAR
65900# ---------------
65901# Portably unset VAR.
65902as_fn_unset ()
65903{
65904  { eval $1=; unset $1;}
65905}
65906as_unset=as_fn_unset
65907# as_fn_append VAR VALUE
65908# ----------------------
65909# Append the text in VALUE to the end of the definition contained in VAR. Take
65910# advantage of any shell optimizations that allow amortized linear growth over
65911# repeated appends, instead of the typical quadratic growth present in naive
65912# implementations.
65913if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65914  eval 'as_fn_append ()
65915  {
65916    eval $1+=\$2
65917  }'
65918else
65919  as_fn_append ()
65920  {
65921    eval $1=\$$1\$2
65922  }
65923fi # as_fn_append
65924
65925# as_fn_arith ARG...
65926# ------------------
65927# Perform arithmetic evaluation on the ARGs, and store the result in the
65928# global $as_val. Take advantage of shells that can avoid forks. The arguments
65929# must be portable across $(()) and expr.
65930if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65931  eval 'as_fn_arith ()
65932  {
65933    as_val=$(( $* ))
65934  }'
65935else
65936  as_fn_arith ()
65937  {
65938    as_val=`expr "$@" || test $? -eq 1`
65939  }
65940fi # as_fn_arith
65941
65942
65943if expr a : '\(a\)' >/dev/null 2>&1 &&
65944   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65945  as_expr=expr
65946else
65947  as_expr=false
65948fi
65949
65950if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65951  as_basename=basename
65952else
65953  as_basename=false
65954fi
65955
65956if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65957  as_dirname=dirname
65958else
65959  as_dirname=false
65960fi
65961
65962as_me=`$as_basename -- "$0" ||
65963$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
65964	 X"$0" : 'X\(//\)$' \| \
65965	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
65966$as_echo X/"$0" |
65967    sed '/^.*\/\([^/][^/]*\)\/*$/{
65968	    s//\1/
65969	    q
65970	  }
65971	  /^X\/\(\/\/\)$/{
65972	    s//\1/
65973	    q
65974	  }
65975	  /^X\/\(\/\).*/{
65976	    s//\1/
65977	    q
65978	  }
65979	  s/.*/./; q'`
65980
65981# Avoid depending upon Character Ranges.
65982as_cr_letters='abcdefghijklmnopqrstuvwxyz'
65983as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
65984as_cr_Letters=$as_cr_letters$as_cr_LETTERS
65985as_cr_digits='0123456789'
65986as_cr_alnum=$as_cr_Letters$as_cr_digits
65987
65988ECHO_C= ECHO_N= ECHO_T=
65989case `echo -n x` in #(((((
65990-n*)
65991  case `echo 'xy\c'` in
65992  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
65993  xy)  ECHO_C='\c';;
65994  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
65995       ECHO_T='	';;
65996  esac;;
65997*)
65998  ECHO_N='-n';;
65999esac
66000
66001rm -f conf$$ conf$$.exe conf$$.file
66002if test -d conf$$.dir; then
66003  rm -f conf$$.dir/conf$$.file
66004else
66005  rm -f conf$$.dir
66006  mkdir conf$$.dir 2>/dev/null
66007fi
66008if (echo >conf$$.file) 2>/dev/null; then
66009  if ln -s conf$$.file conf$$ 2>/dev/null; then
66010    as_ln_s='ln -s'
66011    # ... but there are two gotchas:
66012    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66013    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66014    # In both cases, we have to default to `cp -pR'.
66015    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66016      as_ln_s='cp -pR'
66017  elif ln conf$$.file conf$$ 2>/dev/null; then
66018    as_ln_s=ln
66019  else
66020    as_ln_s='cp -pR'
66021  fi
66022else
66023  as_ln_s='cp -pR'
66024fi
66025rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66026rmdir conf$$.dir 2>/dev/null
66027
66028
66029# as_fn_mkdir_p
66030# -------------
66031# Create "$as_dir" as a directory, including parents if necessary.
66032as_fn_mkdir_p ()
66033{
66034
66035  case $as_dir in #(
66036  -*) as_dir=./$as_dir;;
66037  esac
66038  test -d "$as_dir" || eval $as_mkdir_p || {
66039    as_dirs=
66040    while :; do
66041      case $as_dir in #(
66042      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66043      *) as_qdir=$as_dir;;
66044      esac
66045      as_dirs="'$as_qdir' $as_dirs"
66046      as_dir=`$as_dirname -- "$as_dir" ||
66047$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66048	 X"$as_dir" : 'X\(//\)[^/]' \| \
66049	 X"$as_dir" : 'X\(//\)$' \| \
66050	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66051$as_echo X"$as_dir" |
66052    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66053	    s//\1/
66054	    q
66055	  }
66056	  /^X\(\/\/\)[^/].*/{
66057	    s//\1/
66058	    q
66059	  }
66060	  /^X\(\/\/\)$/{
66061	    s//\1/
66062	    q
66063	  }
66064	  /^X\(\/\).*/{
66065	    s//\1/
66066	    q
66067	  }
66068	  s/.*/./; q'`
66069      test -d "$as_dir" && break
66070    done
66071    test -z "$as_dirs" || eval "mkdir $as_dirs"
66072  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66073
66074
66075} # as_fn_mkdir_p
66076if mkdir -p . 2>/dev/null; then
66077  as_mkdir_p='mkdir -p "$as_dir"'
66078else
66079  test -d ./-p && rmdir ./-p
66080  as_mkdir_p=false
66081fi
66082
66083
66084# as_fn_executable_p FILE
66085# -----------------------
66086# Test if FILE is an executable regular file.
66087as_fn_executable_p ()
66088{
66089  test -f "$1" && test -x "$1"
66090} # as_fn_executable_p
66091as_test_x='test -x'
66092as_executable_p=as_fn_executable_p
66093
66094# Sed expression to map a string onto a valid CPP name.
66095as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66096
66097# Sed expression to map a string onto a valid variable name.
66098as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66099
66100
66101exec 6>&1
66102## ----------------------------------- ##
66103## Main body of $CONFIG_STATUS script. ##
66104## ----------------------------------- ##
66105_ASEOF
66106test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66107
66108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66109# Save the log message, to keep $0 and so on meaningful, and to
66110# report actual input values of CONFIG_FILES etc. instead of their
66111# values after options handling.
66112ac_log="
66113This file was extended by OpenJDK $as_me jdk9, which was
66114generated by GNU Autoconf 2.69.  Invocation command line was
66115
66116  CONFIG_FILES    = $CONFIG_FILES
66117  CONFIG_HEADERS  = $CONFIG_HEADERS
66118  CONFIG_LINKS    = $CONFIG_LINKS
66119  CONFIG_COMMANDS = $CONFIG_COMMANDS
66120  $ $0 $@
66121
66122on `(hostname || uname -n) 2>/dev/null | sed 1q`
66123"
66124
66125_ACEOF
66126
66127case $ac_config_files in *"
66128"*) set x $ac_config_files; shift; ac_config_files=$*;;
66129esac
66130
66131
66132
66133cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66134# Files that config.status was made for.
66135config_files="$ac_config_files"
66136
66137_ACEOF
66138
66139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66140ac_cs_usage="\
66141\`$as_me' instantiates files and other configuration actions
66142from templates according to the current configuration.  Unless the files
66143and actions are specified as TAGs, all are instantiated by default.
66144
66145Usage: $0 [OPTION]... [TAG]...
66146
66147  -h, --help       print this help, then exit
66148  -V, --version    print version number and configuration settings, then exit
66149      --config     print configuration, then exit
66150  -q, --quiet, --silent
66151                   do not print progress messages
66152  -d, --debug      don't remove temporary files
66153      --recheck    update $as_me by reconfiguring in the same conditions
66154      --file=FILE[:TEMPLATE]
66155                   instantiate the configuration file FILE
66156
66157Configuration files:
66158$config_files
66159
66160Report bugs to <build-dev@openjdk.java.net>.
66161OpenJDK home page: <http://openjdk.java.net>."
66162
66163_ACEOF
66164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66165ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66166ac_cs_version="\\
66167OpenJDK config.status jdk9
66168configured by $0, generated by GNU Autoconf 2.69,
66169  with options \\"\$ac_cs_config\\"
66170
66171Copyright (C) 2012 Free Software Foundation, Inc.
66172This config.status script is free software; the Free Software Foundation
66173gives unlimited permission to copy, distribute and modify it."
66174
66175ac_pwd='$ac_pwd'
66176srcdir='$srcdir'
66177AWK='$AWK'
66178test -n "\$AWK" || AWK=awk
66179_ACEOF
66180
66181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66182# The default lists apply if the user does not specify any file.
66183ac_need_defaults=:
66184while test $# != 0
66185do
66186  case $1 in
66187  --*=?*)
66188    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66189    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66190    ac_shift=:
66191    ;;
66192  --*=)
66193    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66194    ac_optarg=
66195    ac_shift=:
66196    ;;
66197  *)
66198    ac_option=$1
66199    ac_optarg=$2
66200    ac_shift=shift
66201    ;;
66202  esac
66203
66204  case $ac_option in
66205  # Handling of the options.
66206  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66207    ac_cs_recheck=: ;;
66208  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66209    $as_echo "$ac_cs_version"; exit ;;
66210  --config | --confi | --conf | --con | --co | --c )
66211    $as_echo "$ac_cs_config"; exit ;;
66212  --debug | --debu | --deb | --de | --d | -d )
66213    debug=: ;;
66214  --file | --fil | --fi | --f )
66215    $ac_shift
66216    case $ac_optarg in
66217    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66218    '') as_fn_error $? "missing file argument" ;;
66219    esac
66220    as_fn_append CONFIG_FILES " '$ac_optarg'"
66221    ac_need_defaults=false;;
66222  --he | --h |  --help | --hel | -h )
66223    $as_echo "$ac_cs_usage"; exit ;;
66224  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66225  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66226    ac_cs_silent=: ;;
66227
66228  # This is an error.
66229  -*) as_fn_error $? "unrecognized option: \`$1'
66230Try \`$0 --help' for more information." ;;
66231
66232  *) as_fn_append ac_config_targets " $1"
66233     ac_need_defaults=false ;;
66234
66235  esac
66236  shift
66237done
66238
66239ac_configure_extra_args=
66240
66241if $ac_cs_silent; then
66242  exec 6>/dev/null
66243  ac_configure_extra_args="$ac_configure_extra_args --silent"
66244fi
66245
66246_ACEOF
66247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66248if \$ac_cs_recheck; then
66249  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66250  shift
66251  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66252  CONFIG_SHELL='$SHELL'
66253  export CONFIG_SHELL
66254  exec "\$@"
66255fi
66256
66257_ACEOF
66258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66259exec 5>>config.log
66260{
66261  echo
66262  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66263## Running $as_me. ##
66264_ASBOX
66265  $as_echo "$ac_log"
66266} >&5
66267
66268_ACEOF
66269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66270_ACEOF
66271
66272cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66273
66274# Handling of arguments.
66275for ac_config_target in $ac_config_targets
66276do
66277  case $ac_config_target in
66278    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66279    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66280    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66281    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66282    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66283    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66284
66285  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66286  esac
66287done
66288
66289
66290# If the user did not use the arguments to specify the items to instantiate,
66291# then the envvar interface is used.  Set only those that are not.
66292# We use the long form for the default assignment because of an extremely
66293# bizarre bug on SunOS 4.1.3.
66294if $ac_need_defaults; then
66295  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66296fi
66297
66298# Have a temporary directory for convenience.  Make it in the build tree
66299# simply because there is no reason against having it here, and in addition,
66300# creating and moving files from /tmp can sometimes cause problems.
66301# Hook for its removal unless debugging.
66302# Note that there is a small window in which the directory will not be cleaned:
66303# after its creation but before its name has been assigned to `$tmp'.
66304$debug ||
66305{
66306  tmp= ac_tmp=
66307  trap 'exit_status=$?
66308  : "${ac_tmp:=$tmp}"
66309  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66310' 0
66311  trap 'as_fn_exit 1' 1 2 13 15
66312}
66313# Create a (secure) tmp directory for tmp files.
66314
66315{
66316  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66317  test -d "$tmp"
66318}  ||
66319{
66320  tmp=./conf$$-$RANDOM
66321  (umask 077 && mkdir "$tmp")
66322} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66323ac_tmp=$tmp
66324
66325# Set up the scripts for CONFIG_FILES section.
66326# No need to generate them if there are no CONFIG_FILES.
66327# This happens for instance with `./config.status config.h'.
66328if test -n "$CONFIG_FILES"; then
66329
66330
66331ac_cr=`echo X | tr X '\015'`
66332# On cygwin, bash can eat \r inside `` if the user requested igncr.
66333# But we know of no other shell where ac_cr would be empty at this
66334# point, so we can use a bashism as a fallback.
66335if test "x$ac_cr" = x; then
66336  eval ac_cr=\$\'\\r\'
66337fi
66338ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66339if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66340  ac_cs_awk_cr='\\r'
66341else
66342  ac_cs_awk_cr=$ac_cr
66343fi
66344
66345echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66346_ACEOF
66347
66348
66349{
66350  echo "cat >conf$$subs.awk <<_ACEOF" &&
66351  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66352  echo "_ACEOF"
66353} >conf$$subs.sh ||
66354  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66355ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66356ac_delim='%!_!# '
66357for ac_last_try in false false false false false :; do
66358  . ./conf$$subs.sh ||
66359    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66360
66361  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66362  if test $ac_delim_n = $ac_delim_num; then
66363    break
66364  elif $ac_last_try; then
66365    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66366  else
66367    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66368  fi
66369done
66370rm -f conf$$subs.sh
66371
66372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66373cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66374_ACEOF
66375sed -n '
66376h
66377s/^/S["/; s/!.*/"]=/
66378p
66379g
66380s/^[^!]*!//
66381:repl
66382t repl
66383s/'"$ac_delim"'$//
66384t delim
66385:nl
66386h
66387s/\(.\{148\}\)..*/\1/
66388t more1
66389s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66390p
66391n
66392b repl
66393:more1
66394s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66395p
66396g
66397s/.\{148\}//
66398t nl
66399:delim
66400h
66401s/\(.\{148\}\)..*/\1/
66402t more2
66403s/["\\]/\\&/g; s/^/"/; s/$/"/
66404p
66405b
66406:more2
66407s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66408p
66409g
66410s/.\{148\}//
66411t delim
66412' <conf$$subs.awk | sed '
66413/^[^""]/{
66414  N
66415  s/\n//
66416}
66417' >>$CONFIG_STATUS || ac_write_fail=1
66418rm -f conf$$subs.awk
66419cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66420_ACAWK
66421cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66422  for (key in S) S_is_set[key] = 1
66423  FS = ""
66424
66425}
66426{
66427  line = $ 0
66428  nfields = split(line, field, "@")
66429  substed = 0
66430  len = length(field[1])
66431  for (i = 2; i < nfields; i++) {
66432    key = field[i]
66433    keylen = length(key)
66434    if (S_is_set[key]) {
66435      value = S[key]
66436      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66437      len += length(value) + length(field[++i])
66438      substed = 1
66439    } else
66440      len += 1 + keylen
66441  }
66442
66443  print line
66444}
66445
66446_ACAWK
66447_ACEOF
66448cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66449if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66450  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66451else
66452  cat
66453fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66454  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66455_ACEOF
66456
66457# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66458# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66459# trailing colons and then remove the whole line if VPATH becomes empty
66460# (actually we leave an empty line to preserve line numbers).
66461if test "x$srcdir" = x.; then
66462  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66463h
66464s///
66465s/^/:/
66466s/[	 ]*$/:/
66467s/:\$(srcdir):/:/g
66468s/:\${srcdir}:/:/g
66469s/:@srcdir@:/:/g
66470s/^:*//
66471s/:*$//
66472x
66473s/\(=[	 ]*\).*/\1/
66474G
66475s/\n//
66476s/^[^=]*=[	 ]*$//
66477}'
66478fi
66479
66480cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66481fi # test -n "$CONFIG_FILES"
66482
66483
66484eval set X "  :F $CONFIG_FILES      "
66485shift
66486for ac_tag
66487do
66488  case $ac_tag in
66489  :[FHLC]) ac_mode=$ac_tag; continue;;
66490  esac
66491  case $ac_mode$ac_tag in
66492  :[FHL]*:*);;
66493  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66494  :[FH]-) ac_tag=-:-;;
66495  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66496  esac
66497  ac_save_IFS=$IFS
66498  IFS=:
66499  set x $ac_tag
66500  IFS=$ac_save_IFS
66501  shift
66502  ac_file=$1
66503  shift
66504
66505  case $ac_mode in
66506  :L) ac_source=$1;;
66507  :[FH])
66508    ac_file_inputs=
66509    for ac_f
66510    do
66511      case $ac_f in
66512      -) ac_f="$ac_tmp/stdin";;
66513      *) # Look for the file first in the build tree, then in the source tree
66514	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66515	 # because $ac_f cannot contain `:'.
66516	 test -f "$ac_f" ||
66517	   case $ac_f in
66518	   [\\/$]*) false;;
66519	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66520	   esac ||
66521	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66522      esac
66523      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66524      as_fn_append ac_file_inputs " '$ac_f'"
66525    done
66526
66527    # Let's still pretend it is `configure' which instantiates (i.e., don't
66528    # use $as_me), people would be surprised to read:
66529    #    /* config.h.  Generated by config.status.  */
66530    configure_input='Generated from '`
66531	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66532	`' by configure.'
66533    if test x"$ac_file" != x-; then
66534      configure_input="$ac_file.  $configure_input"
66535      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66536$as_echo "$as_me: creating $ac_file" >&6;}
66537    fi
66538    # Neutralize special characters interpreted by sed in replacement strings.
66539    case $configure_input in #(
66540    *\&* | *\|* | *\\* )
66541       ac_sed_conf_input=`$as_echo "$configure_input" |
66542       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66543    *) ac_sed_conf_input=$configure_input;;
66544    esac
66545
66546    case $ac_tag in
66547    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66548      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66549    esac
66550    ;;
66551  esac
66552
66553  ac_dir=`$as_dirname -- "$ac_file" ||
66554$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66555	 X"$ac_file" : 'X\(//\)[^/]' \| \
66556	 X"$ac_file" : 'X\(//\)$' \| \
66557	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66558$as_echo X"$ac_file" |
66559    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66560	    s//\1/
66561	    q
66562	  }
66563	  /^X\(\/\/\)[^/].*/{
66564	    s//\1/
66565	    q
66566	  }
66567	  /^X\(\/\/\)$/{
66568	    s//\1/
66569	    q
66570	  }
66571	  /^X\(\/\).*/{
66572	    s//\1/
66573	    q
66574	  }
66575	  s/.*/./; q'`
66576  as_dir="$ac_dir"; as_fn_mkdir_p
66577  ac_builddir=.
66578
66579case "$ac_dir" in
66580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66581*)
66582  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66583  # A ".." for each directory in $ac_dir_suffix.
66584  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66585  case $ac_top_builddir_sub in
66586  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66587  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66588  esac ;;
66589esac
66590ac_abs_top_builddir=$ac_pwd
66591ac_abs_builddir=$ac_pwd$ac_dir_suffix
66592# for backward compatibility:
66593ac_top_builddir=$ac_top_build_prefix
66594
66595case $srcdir in
66596  .)  # We are building in place.
66597    ac_srcdir=.
66598    ac_top_srcdir=$ac_top_builddir_sub
66599    ac_abs_top_srcdir=$ac_pwd ;;
66600  [\\/]* | ?:[\\/]* )  # Absolute name.
66601    ac_srcdir=$srcdir$ac_dir_suffix;
66602    ac_top_srcdir=$srcdir
66603    ac_abs_top_srcdir=$srcdir ;;
66604  *) # Relative name.
66605    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66606    ac_top_srcdir=$ac_top_build_prefix$srcdir
66607    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66608esac
66609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66610
66611
66612  case $ac_mode in
66613  :F)
66614  #
66615  # CONFIG_FILE
66616  #
66617
66618_ACEOF
66619
66620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66621# If the template does not know about datarootdir, expand it.
66622# FIXME: This hack should be removed a few years after 2.60.
66623ac_datarootdir_hack=; ac_datarootdir_seen=
66624ac_sed_dataroot='
66625/datarootdir/ {
66626  p
66627  q
66628}
66629/@datadir@/p
66630/@docdir@/p
66631/@infodir@/p
66632/@localedir@/p
66633/@mandir@/p'
66634case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66635*datarootdir*) ac_datarootdir_seen=yes;;
66636*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66637  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66638$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66639_ACEOF
66640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66641  ac_datarootdir_hack='
66642  s&@datadir@&$datadir&g
66643  s&@docdir@&$docdir&g
66644  s&@infodir@&$infodir&g
66645  s&@localedir@&$localedir&g
66646  s&@mandir@&$mandir&g
66647  s&\\\${datarootdir}&$datarootdir&g' ;;
66648esac
66649_ACEOF
66650
66651# Neutralize VPATH when `$srcdir' = `.'.
66652# Shell code in configure.ac might set extrasub.
66653# FIXME: do we really want to maintain this feature?
66654cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66655ac_sed_extra="$ac_vpsub
66656$extrasub
66657_ACEOF
66658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66659:t
66660/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66661s|@configure_input@|$ac_sed_conf_input|;t t
66662s&@top_builddir@&$ac_top_builddir_sub&;t t
66663s&@top_build_prefix@&$ac_top_build_prefix&;t t
66664s&@srcdir@&$ac_srcdir&;t t
66665s&@abs_srcdir@&$ac_abs_srcdir&;t t
66666s&@top_srcdir@&$ac_top_srcdir&;t t
66667s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66668s&@builddir@&$ac_builddir&;t t
66669s&@abs_builddir@&$ac_abs_builddir&;t t
66670s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66671$ac_datarootdir_hack
66672"
66673eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66674  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66675
66676test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66677  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66678  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66679      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66680  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66681which seems to be undefined.  Please make sure it is defined" >&5
66682$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66683which seems to be undefined.  Please make sure it is defined" >&2;}
66684
66685  rm -f "$ac_tmp/stdin"
66686  case $ac_file in
66687  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66688  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66689  esac \
66690  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66691 ;;
66692
66693
66694
66695  esac
66696
66697done # for ac_tag
66698
66699
66700as_fn_exit 0
66701_ACEOF
66702ac_clean_files=$ac_clean_files_save
66703
66704test $ac_write_fail = 0 ||
66705  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66706
66707
66708# configure is writing to config.log, and then calls config.status.
66709# config.status does its own redirection, appending to config.log.
66710# Unfortunately, on DOS this fails, as config.log is still kept open
66711# by configure, so config.status won't be able to write to it; its
66712# output is simply discarded.  So we exec the FD to /dev/null,
66713# effectively closing config.log, so it can be properly (re)opened and
66714# appended to by config.status.  When coming back to configure, we
66715# need to make the FD available again.
66716if test "$no_create" != yes; then
66717  ac_cs_success=:
66718  ac_config_status_args=
66719  test "$silent" = yes &&
66720    ac_config_status_args="$ac_config_status_args --quiet"
66721  exec 5>/dev/null
66722  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66723  exec 5>>config.log
66724  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66725  # would make configure fail if this is the last instruction.
66726  $ac_cs_success || as_fn_exit 1
66727fi
66728if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66729  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66730$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66731fi
66732
66733
66734# After AC_OUTPUT, we need to do final work
66735
66736
66737  # Try to move config.log (generated by autoconf) to the configure-support directory.
66738  if test -e ./config.log; then
66739    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66740  fi
66741
66742  # Rotate our log file (configure.log)
66743  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66744    $RM -f "$OUTPUT_ROOT/configure.log.old"
66745  fi
66746  if test -e "$OUTPUT_ROOT/configure.log"; then
66747    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66748  fi
66749
66750  # Move configure.log from current directory to the build output root
66751  if test -e ./configure.log; then
66752    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66753  fi
66754
66755  # Make the compare script executable
66756  $CHMOD +x $OUTPUT_ROOT/compare.sh
66757
66758
66759# Finally output some useful information to the user
66760
66761  # Finally output some useful information to the user
66762
66763  printf "\n"
66764  printf "====================================================\n"
66765  if test "x$no_create" != "xyes"; then
66766    if test "x$IS_RECONFIGURE" != "xyes"; then
66767      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66768    else
66769      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66770    fi
66771  else
66772    if test "x$IS_RECONFIGURE" != "xyes"; then
66773      printf "A configuration has been successfully checked but not created\n"
66774    else
66775      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66776    fi
66777  fi
66778  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66779    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66780  else
66781    printf "using default settings.\n"
66782  fi
66783
66784  printf "\n"
66785  printf "Configuration summary:\n"
66786  printf "* Debug level:    $DEBUG_LEVEL\n"
66787  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66788  printf "* JDK variant:    $JDK_VARIANT\n"
66789  printf "* JVM variants:   $JVM_VARIANTS\n"
66790  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66791  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66792
66793  printf "\n"
66794  printf "Tools summary:\n"
66795  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66796    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66797  fi
66798  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66799  if test "x$TOOLCHAIN_VERSION" != "x"; then
66800    print_version=" $TOOLCHAIN_VERSION"
66801  fi
66802  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66803  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66804  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66805
66806  printf "\n"
66807  printf "Build performance summary:\n"
66808  printf "* Cores to use:   $JOBS\n"
66809  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66810  if test "x$CCACHE_STATUS" != "x"; then
66811    printf "* ccache status:  $CCACHE_STATUS\n"
66812  fi
66813  printf "\n"
66814
66815  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66816    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66817    printf "will result in longer build times.\n"
66818    printf "\n"
66819  fi
66820
66821  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66822    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66823    printf "These are not respected, and will be ignored. It is recommended\n"
66824    printf "that you clean your environment. The following variables are set:\n"
66825    printf "$FOUND_ALT_VARIABLES\n"
66826    printf "\n"
66827  fi
66828
66829  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66830    printf "WARNING: Your build output directory is not on a local disk.\n"
66831    printf "This will severely degrade build performance!\n"
66832    printf "It is recommended that you create an output directory on a local disk,\n"
66833    printf "and run the configure script again from that directory.\n"
66834    printf "\n"
66835  fi
66836
66837  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66838    printf "WARNING: The result of this configuration has overridden an older\n"
66839    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66840    printf "proper build. Failure to do so might result in strange build problems.\n"
66841    printf "\n"
66842  fi
66843
66844  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66845    printf "WARNING: The result of this configuration was not saved.\n"
66846    printf "You should run without '--no-create | -n' to create the configuration.\n"
66847    printf "\n"
66848  fi
66849
66850
66851
66852  # Locate config.log.
66853  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66854    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66855  elif test -e "./config.log"; then
66856    CONFIG_LOG_PATH="."
66857  fi
66858
66859  if test -e "$CONFIG_LOG_PATH/config.log"; then
66860    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66861    if test $? -eq 0; then
66862      printf "The following warnings were produced. Repeated here for convenience:\n"
66863      # We must quote sed expression (using []) to stop m4 from eating the [].
66864      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66865      printf "\n"
66866    fi
66867  fi
66868
66869