generated-configure.sh revision 2778:af8f99ad6c15
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_LICENSE
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702FIXPATH_DETACH_FLAG
703FIXPATH
704BUILD_GTEST
705ENABLE_AOT
706GCOV_ENABLED
707ZIP_EXTERNAL_DEBUG_SYMBOLS
708COPY_DEBUG_SYMBOLS
709COMPILE_WITH_DEBUG_SYMBOLS
710CFLAGS_WARNINGS_ARE_ERRORS
711BUILD_CC_DISABLE_WARNING_PREFIX
712DISABLE_WARNING_PREFIX
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MAX
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JIB_JAR
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797BUILD_AS
798BUILD_LDCXX
799BUILD_LD
800BUILD_STRIP
801BUILD_OBJCOPY
802BUILD_AR
803BUILD_NM
804BUILD_CXX
805BUILD_CC
806BUILD_SYSROOT_LDFLAGS
807BUILD_SYSROOT_CFLAGS
808ac_ct_OBJDUMP
809OBJDUMP
810ac_ct_OBJCOPY
811OBJCOPY
812ac_ct_NM
813ac_ct_STRIP
814GNM
815NM
816STRIP
817MSBUILD
818DUMPBIN
819RC
820MT
821LIPO
822ac_ct_AR
823AR
824AS
825LDCXX
826LD
827CXXCPP
828CPP
829CXX_VERSION_NUMBER
830CC_VERSION_NUMBER
831ac_ct_CXX
832CXXFLAGS
833CXX
834TOOLCHAIN_PATH_CXX
835POTENTIAL_CXX
836OBJEXT
837EXEEXT
838ac_ct_CC
839CPPFLAGS
840LDFLAGS
841CFLAGS
842CC
843TOOLCHAIN_PATH_CC
844POTENTIAL_CC
845TOOLCHAIN_VERSION
846VS_LIB
847VS_INCLUDE
848VS_PATH
849CYGWIN_LINK
850SYSROOT_LDFLAGS
851SYSROOT_CFLAGS
852EXTRA_LDFLAGS
853EXTRA_CXXFLAGS
854EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_MAN
867IMPORT_MODULES_LEGAL
868IMPORT_MODULES_CONF
869IMPORT_MODULES_LIBS
870IMPORT_MODULES_CMDS
871IMPORT_MODULES_CLASSES
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885JAVAC_FLAGS
886BOOT_JDK_MODULAR
887BOOT_JDK_SOURCETARGET
888JARSIGNER
889JAR
890JAVAH
891JAVAC
892JAVA
893BOOT_JDK
894JAVA_CHECK
895JAVAC_CHECK
896VERSION_IS_GA
897VERSION_SHORT
898VERSION_STRING
899VERSION_NUMBER_FOUR_POSITIONS
900VERSION_NUMBER
901VERSION_OPT
902VERSION_BUILD
903VERSION_PRE
904VERSION_PATCH
905VERSION_SECURITY
906VERSION_MINOR
907VERSION_MAJOR
908MACOSX_BUNDLE_ID_BASE
909MACOSX_BUNDLE_NAME_BASE
910HOTSPOT_VM_DISTRO
911COMPANY_NAME
912JDK_RC_PLATFORM_NAME
913PRODUCT_SUFFIX
914PRODUCT_NAME
915LAUNCHER_NAME
916JLINK_KEEP_PACKAGED_MODULES
917COPYRIGHT_YEAR
918COMPRESS_JARS
919INCLUDE_SA
920UNLIMITED_CRYPTO
921CACERTS_FILE
922ENABLE_FULL_DOCS
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937FLOCK
938TIME
939STAT
940HG
941DOT
942READELF
943OTOOL
944LDD
945ZIPEXE
946UNZIP
947TAR_SUPPORTS_TRANSFORM
948TAR_INCLUDE_PARAM
949TAR_CREATE_EXTRA_PARAM
950TAR_TYPE
951FIND_DELETE
952OUTPUT_SYNC
953OUTPUT_SYNC_SUPPORTED
954CHECK_TOOLSDIR_MAKE
955CHECK_TOOLSDIR_GMAKE
956CHECK_MAKE
957CHECK_GMAKE
958MAKE
959PKGHANDLER
960CONFIGURESUPPORT_OUTPUTDIR
961OUTPUT_ROOT
962CONF_NAME
963SPEC
964SDKROOT
965XCODEBUILD
966JVM_VARIANT_MAIN
967VALID_JVM_VARIANTS
968JVM_VARIANTS
969DEBUG_LEVEL
970HOTSPOT_DEBUG_LEVEL
971JDK_VARIANT
972USERNAME
973CANONICAL_TOPDIR
974ORIGINAL_TOPDIR
975TOPDIR
976PATH_SEP
977HOTSPOT_BUILD_CPU_DEFINE
978HOTSPOT_BUILD_CPU_ARCH
979HOTSPOT_BUILD_CPU
980HOTSPOT_BUILD_OS_TYPE
981HOTSPOT_BUILD_OS
982OPENJDK_BUILD_BUNDLE_PLATFORM
983OPENJDK_BUILD_OS_EXPORT_DIR
984OPENJDK_BUILD_CPU_OSARCH
985OPENJDK_BUILD_CPU_ISADIR
986OPENJDK_BUILD_CPU_LEGACY_LIB
987OPENJDK_BUILD_CPU_LEGACY
988HOTSPOT_TARGET_CPU_DEFINE
989HOTSPOT_TARGET_CPU_ARCH
990HOTSPOT_TARGET_CPU
991HOTSPOT_TARGET_OS_TYPE
992HOTSPOT_TARGET_OS
993DEFINE_CROSS_COMPILE_ARCH
994OPENJDK_TARGET_BUNDLE_PLATFORM
995OPENJDK_TARGET_OS_EXPORT_DIR
996OPENJDK_TARGET_CPU_OSARCH
997OPENJDK_TARGET_CPU_ISADIR
998OPENJDK_TARGET_CPU_LEGACY_LIB
999OPENJDK_TARGET_CPU_LEGACY
1000RELEASE_FILE_OS_ARCH
1001RELEASE_FILE_OS_NAME
1002OPENJDK_MODULE_TARGET_PLATFORM
1003COMPILE_TYPE
1004OPENJDK_TARGET_CPU_ENDIAN
1005OPENJDK_TARGET_CPU_BITS
1006OPENJDK_TARGET_CPU_ARCH
1007OPENJDK_TARGET_CPU
1008OPENJDK_TARGET_OS_ENV
1009OPENJDK_TARGET_OS_TYPE
1010OPENJDK_TARGET_OS
1011OPENJDK_BUILD_CPU_ENDIAN
1012OPENJDK_BUILD_CPU_BITS
1013OPENJDK_BUILD_CPU_ARCH
1014OPENJDK_BUILD_CPU
1015OPENJDK_BUILD_OS_ENV
1016OPENJDK_BUILD_OS_TYPE
1017OPENJDK_BUILD_OS
1018OPENJDK_BUILD_AUTOCONF_NAME
1019OPENJDK_TARGET_AUTOCONF_NAME
1020target_os
1021target_vendor
1022target_cpu
1023target
1024host_os
1025host_vendor
1026host_cpu
1027host
1028build_os
1029build_vendor
1030build_cpu
1031build
1032PANDOC
1033NICE
1034CPIO
1035DF
1036READLINK
1037CYGPATH
1038SED
1039FGREP
1040EGREP
1041GREP
1042AWK
1043XARGS
1044WHICH
1045WC
1046UNIQ
1047UNAME
1048TR
1049TOUCH
1050TEE
1051TAR
1052TAIL
1053SORT
1054SH
1055RMDIR
1056RM
1057PRINTF
1058NAWK
1059MV
1060MKTEMP
1061MKDIR
1062LS
1063LN
1064GZIP
1065GUNZIP
1066HEAD
1067FIND
1068FILE
1069EXPR
1070ECHO
1071DIRNAME
1072DIFF
1073DATE
1074CUT
1075CP
1076COMM
1077CMP
1078CHMOD
1079CAT
1080BASH
1081BASENAME
1082DATE_WHEN_CONFIGURED
1083ORIGINAL_PATH
1084CONFIGURE_COMMAND_LINE
1085target_alias
1086host_alias
1087build_alias
1088LIBS
1089ECHO_T
1090ECHO_N
1091ECHO_C
1092DEFS
1093mandir
1094localedir
1095libdir
1096psdir
1097pdfdir
1098dvidir
1099htmldir
1100infodir
1101docdir
1102oldincludedir
1103includedir
1104localstatedir
1105sharedstatedir
1106sysconfdir
1107datadir
1108datarootdir
1109libexecdir
1110sbindir
1111bindir
1112program_transform_name
1113prefix
1114exec_prefix
1115PACKAGE_URL
1116PACKAGE_BUGREPORT
1117PACKAGE_STRING
1118PACKAGE_VERSION
1119PACKAGE_TARNAME
1120PACKAGE_NAME
1121PATH_SEPARATOR
1122SHELL'
1123ac_subst_files=''
1124ac_user_opts='
1125enable_option_checking
1126with_target_bits
1127enable_openjdk_only
1128with_custom_make_dir
1129with_jdk_variant
1130enable_debug
1131with_debug_level
1132with_jvm_variants
1133with_cpu_port
1134with_devkit
1135with_sys_root
1136with_sysroot
1137with_tools_dir
1138with_toolchain_path
1139with_extra_path
1140with_sdk_name
1141with_conf_name
1142with_output_sync
1143with_default_make_target
1144enable_headless_only
1145enable_full_docs
1146with_cacerts_file
1147enable_unlimited_crypto
1148with_copyright_year
1149enable_keep_packaged_modules
1150with_milestone
1151with_update_version
1152with_user_release_suffix
1153with_build_number
1154with_version_string
1155with_version_pre
1156with_version_opt
1157with_version_build
1158with_version_major
1159with_version_minor
1160with_version_security
1161with_version_patch
1162with_boot_jdk
1163with_build_jdk
1164with_add_source_root
1165with_override_source_root
1166with_adds_and_overrides
1167with_override_langtools
1168with_override_corba
1169with_override_jaxp
1170with_override_jaxws
1171with_override_hotspot
1172with_override_nashorn
1173with_override_jdk
1174with_import_hotspot
1175with_import_modules
1176enable_static_build
1177with_toolchain_type
1178with_extra_cflags
1179with_extra_cxxflags
1180with_extra_ldflags
1181with_toolchain_version
1182with_build_devkit
1183with_jtreg
1184with_jib
1185with_abi_profile
1186with_macosx_version_max
1187enable_warnings_as_errors
1188with_native_debug_symbols
1189enable_debug_symbols
1190enable_zip_debug_info
1191enable_native_coverage
1192enable_dtrace
1193enable_aot
1194enable_hotspot_gtest
1195with_stdc__lib
1196with_msvcr_dll
1197with_msvcp_dll
1198with_x
1199with_cups
1200with_cups_include
1201with_freetype
1202with_freetype_include
1203with_freetype_lib
1204with_freetype_src
1205enable_freetype_bundling
1206with_freetype_license
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213enable_libffi_bundling
1214with_libjpeg
1215with_giflib
1216with_libpng
1217with_zlib
1218with_lcms
1219with_dxsdk
1220with_dxsdk_lib
1221with_dxsdk_include
1222with_jvm_features
1223with_jvm_interpreter
1224enable_jtreg_failure_handler
1225enable_generate_classlist
1226with_num_cores
1227with_memory_size
1228with_jobs
1229with_test_jobs
1230with_boot_jdk_jvmargs
1231with_sjavac_server_java
1232enable_sjavac
1233enable_javac_server
1234enable_icecc
1235enable_precompiled_headers
1236enable_ccache
1237with_ccache_dir
1238'
1239      ac_precious_vars='build_alias
1240host_alias
1241target_alias
1242BASENAME
1243BASH
1244CAT
1245CHMOD
1246CMP
1247COMM
1248CP
1249CUT
1250DATE
1251DIFF
1252DIRNAME
1253ECHO
1254EXPR
1255FILE
1256FIND
1257HEAD
1258GUNZIP
1259GZIP
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
1291PANDOC
1292MAKE
1293UNZIP
1294ZIPEXE
1295LDD
1296OTOOL
1297READELF
1298DOT
1299HG
1300STAT
1301TIME
1302FLOCK
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393includedir='${prefix}/include'
1394oldincludedir='/usr/include'
1395docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396infodir='${datarootdir}/info'
1397htmldir='${docdir}'
1398dvidir='${docdir}'
1399pdfdir='${docdir}'
1400psdir='${docdir}'
1401libdir='${exec_prefix}/lib'
1402localedir='${datarootdir}/locale'
1403mandir='${datarootdir}/man'
1404
1405ac_prev=
1406ac_dashdash=
1407for ac_option
1408do
1409  # If the previous option needs an argument, assign it.
1410  if test -n "$ac_prev"; then
1411    eval $ac_prev=\$ac_option
1412    ac_prev=
1413    continue
1414  fi
1415
1416  case $ac_option in
1417  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418  *=)   ac_optarg= ;;
1419  *)    ac_optarg=yes ;;
1420  esac
1421
1422  # Accept the important Cygnus configure options, so we can diagnose typos.
1423
1424  case $ac_dashdash$ac_option in
1425  --)
1426    ac_dashdash=yes ;;
1427
1428  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429    ac_prev=bindir ;;
1430  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431    bindir=$ac_optarg ;;
1432
1433  -build | --build | --buil | --bui | --bu)
1434    ac_prev=build_alias ;;
1435  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436    build_alias=$ac_optarg ;;
1437
1438  -cache-file | --cache-file | --cache-fil | --cache-fi \
1439  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440    ac_prev=cache_file ;;
1441  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443    cache_file=$ac_optarg ;;
1444
1445  --config-cache | -C)
1446    cache_file=config.cache ;;
1447
1448  -datadir | --datadir | --datadi | --datad)
1449    ac_prev=datadir ;;
1450  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451    datadir=$ac_optarg ;;
1452
1453  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454  | --dataroo | --dataro | --datar)
1455    ac_prev=datarootdir ;;
1456  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458    datarootdir=$ac_optarg ;;
1459
1460  -disable-* | --disable-*)
1461    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462    # Reject names that are not valid shell variable names.
1463    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464      as_fn_error $? "invalid feature name: $ac_useropt"
1465    ac_useropt_orig=$ac_useropt
1466    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467    case $ac_user_opts in
1468      *"
1469"enable_$ac_useropt"
1470"*) ;;
1471      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472	 ac_unrecognized_sep=', ';;
1473    esac
1474    eval enable_$ac_useropt=no ;;
1475
1476  -docdir | --docdir | --docdi | --doc | --do)
1477    ac_prev=docdir ;;
1478  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479    docdir=$ac_optarg ;;
1480
1481  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482    ac_prev=dvidir ;;
1483  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484    dvidir=$ac_optarg ;;
1485
1486  -enable-* | --enable-*)
1487    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488    # Reject names that are not valid shell variable names.
1489    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490      as_fn_error $? "invalid feature name: $ac_useropt"
1491    ac_useropt_orig=$ac_useropt
1492    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493    case $ac_user_opts in
1494      *"
1495"enable_$ac_useropt"
1496"*) ;;
1497      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498	 ac_unrecognized_sep=', ';;
1499    esac
1500    eval enable_$ac_useropt=\$ac_optarg ;;
1501
1502  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504  | --exec | --exe | --ex)
1505    ac_prev=exec_prefix ;;
1506  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508  | --exec=* | --exe=* | --ex=*)
1509    exec_prefix=$ac_optarg ;;
1510
1511  -gas | --gas | --ga | --g)
1512    # Obsolete; use --with-gas.
1513    with_gas=yes ;;
1514
1515  -help | --help | --hel | --he | -h)
1516    ac_init_help=long ;;
1517  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518    ac_init_help=recursive ;;
1519  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520    ac_init_help=short ;;
1521
1522  -host | --host | --hos | --ho)
1523    ac_prev=host_alias ;;
1524  -host=* | --host=* | --hos=* | --ho=*)
1525    host_alias=$ac_optarg ;;
1526
1527  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528    ac_prev=htmldir ;;
1529  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530  | --ht=*)
1531    htmldir=$ac_optarg ;;
1532
1533  -includedir | --includedir | --includedi | --included | --include \
1534  | --includ | --inclu | --incl | --inc)
1535    ac_prev=includedir ;;
1536  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537  | --includ=* | --inclu=* | --incl=* | --inc=*)
1538    includedir=$ac_optarg ;;
1539
1540  -infodir | --infodir | --infodi | --infod | --info | --inf)
1541    ac_prev=infodir ;;
1542  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543    infodir=$ac_optarg ;;
1544
1545  -libdir | --libdir | --libdi | --libd)
1546    ac_prev=libdir ;;
1547  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548    libdir=$ac_optarg ;;
1549
1550  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551  | --libexe | --libex | --libe)
1552    ac_prev=libexecdir ;;
1553  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554  | --libexe=* | --libex=* | --libe=*)
1555    libexecdir=$ac_optarg ;;
1556
1557  -localedir | --localedir | --localedi | --localed | --locale)
1558    ac_prev=localedir ;;
1559  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560    localedir=$ac_optarg ;;
1561
1562  -localstatedir | --localstatedir | --localstatedi | --localstated \
1563  | --localstate | --localstat | --localsta | --localst | --locals)
1564    ac_prev=localstatedir ;;
1565  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567    localstatedir=$ac_optarg ;;
1568
1569  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570    ac_prev=mandir ;;
1571  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572    mandir=$ac_optarg ;;
1573
1574  -nfp | --nfp | --nf)
1575    # Obsolete; use --without-fp.
1576    with_fp=no ;;
1577
1578  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579  | --no-cr | --no-c | -n)
1580    no_create=yes ;;
1581
1582  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584    no_recursion=yes ;;
1585
1586  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588  | --oldin | --oldi | --old | --ol | --o)
1589    ac_prev=oldincludedir ;;
1590  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593    oldincludedir=$ac_optarg ;;
1594
1595  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596    ac_prev=prefix ;;
1597  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598    prefix=$ac_optarg ;;
1599
1600  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601  | --program-pre | --program-pr | --program-p)
1602    ac_prev=program_prefix ;;
1603  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605    program_prefix=$ac_optarg ;;
1606
1607  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608  | --program-suf | --program-su | --program-s)
1609    ac_prev=program_suffix ;;
1610  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612    program_suffix=$ac_optarg ;;
1613
1614  -program-transform-name | --program-transform-name \
1615  | --program-transform-nam | --program-transform-na \
1616  | --program-transform-n | --program-transform- \
1617  | --program-transform | --program-transfor \
1618  | --program-transfo | --program-transf \
1619  | --program-trans | --program-tran \
1620  | --progr-tra | --program-tr | --program-t)
1621    ac_prev=program_transform_name ;;
1622  -program-transform-name=* | --program-transform-name=* \
1623  | --program-transform-nam=* | --program-transform-na=* \
1624  | --program-transform-n=* | --program-transform-=* \
1625  | --program-transform=* | --program-transfor=* \
1626  | --program-transfo=* | --program-transf=* \
1627  | --program-trans=* | --program-tran=* \
1628  | --progr-tra=* | --program-tr=* | --program-t=*)
1629    program_transform_name=$ac_optarg ;;
1630
1631  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632    ac_prev=pdfdir ;;
1633  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634    pdfdir=$ac_optarg ;;
1635
1636  -psdir | --psdir | --psdi | --psd | --ps)
1637    ac_prev=psdir ;;
1638  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639    psdir=$ac_optarg ;;
1640
1641  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642  | -silent | --silent | --silen | --sile | --sil)
1643    silent=yes ;;
1644
1645  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646    ac_prev=sbindir ;;
1647  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648  | --sbi=* | --sb=*)
1649    sbindir=$ac_optarg ;;
1650
1651  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653  | --sharedst | --shareds | --shared | --share | --shar \
1654  | --sha | --sh)
1655    ac_prev=sharedstatedir ;;
1656  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659  | --sha=* | --sh=*)
1660    sharedstatedir=$ac_optarg ;;
1661
1662  -site | --site | --sit)
1663    ac_prev=site ;;
1664  -site=* | --site=* | --sit=*)
1665    site=$ac_optarg ;;
1666
1667  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668    ac_prev=srcdir ;;
1669  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670    srcdir=$ac_optarg ;;
1671
1672  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673  | --syscon | --sysco | --sysc | --sys | --sy)
1674    ac_prev=sysconfdir ;;
1675  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677    sysconfdir=$ac_optarg ;;
1678
1679  -target | --target | --targe | --targ | --tar | --ta | --t)
1680    ac_prev=target_alias ;;
1681  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682    target_alias=$ac_optarg ;;
1683
1684  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685    verbose=yes ;;
1686
1687  -version | --version | --versio | --versi | --vers | -V)
1688    ac_init_version=: ;;
1689
1690  -with-* | --with-*)
1691    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692    # Reject names that are not valid shell variable names.
1693    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694      as_fn_error $? "invalid package name: $ac_useropt"
1695    ac_useropt_orig=$ac_useropt
1696    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697    case $ac_user_opts in
1698      *"
1699"with_$ac_useropt"
1700"*) ;;
1701      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702	 ac_unrecognized_sep=', ';;
1703    esac
1704    eval with_$ac_useropt=\$ac_optarg ;;
1705
1706  -without-* | --without-*)
1707    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708    # Reject names that are not valid shell variable names.
1709    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710      as_fn_error $? "invalid package name: $ac_useropt"
1711    ac_useropt_orig=$ac_useropt
1712    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713    case $ac_user_opts in
1714      *"
1715"with_$ac_useropt"
1716"*) ;;
1717      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718	 ac_unrecognized_sep=', ';;
1719    esac
1720    eval with_$ac_useropt=no ;;
1721
1722  --x)
1723    # Obsolete; use --with-x.
1724    with_x=yes ;;
1725
1726  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727  | --x-incl | --x-inc | --x-in | --x-i)
1728    ac_prev=x_includes ;;
1729  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731    x_includes=$ac_optarg ;;
1732
1733  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735    ac_prev=x_libraries ;;
1736  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738    x_libraries=$ac_optarg ;;
1739
1740  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741Try \`$0 --help' for more information"
1742    ;;
1743
1744  *=*)
1745    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746    # Reject names that are not valid shell variable names.
1747    case $ac_envvar in #(
1748      '' | [0-9]* | *[!_$as_cr_alnum]* )
1749      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750    esac
1751    eval $ac_envvar=\$ac_optarg
1752    export $ac_envvar ;;
1753
1754  *)
1755    # FIXME: should be removed in autoconf 3.0.
1756    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760    ;;
1761
1762  esac
1763done
1764
1765if test -n "$ac_prev"; then
1766  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767  as_fn_error $? "missing argument to $ac_option"
1768fi
1769
1770if test -n "$ac_unrecognized_opts"; then
1771  case $enable_option_checking in
1772    no) ;;
1773    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775  esac
1776fi
1777
1778# Check all directory arguments for consistency.
1779for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780		datadir sysconfdir sharedstatedir localstatedir includedir \
1781		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782		libdir localedir mandir
1783do
1784  eval ac_val=\$$ac_var
1785  # Remove trailing slashes.
1786  case $ac_val in
1787    */ )
1788      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789      eval $ac_var=\$ac_val;;
1790  esac
1791  # Be sure to have absolute directory names.
1792  case $ac_val in
1793    [\\/$]* | ?:[\\/]* )  continue;;
1794    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795  esac
1796  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797done
1798
1799# There might be people who depend on the old broken behavior: `$host'
1800# used to hold the argument of --host etc.
1801# FIXME: To remove some day.
1802build=$build_alias
1803host=$host_alias
1804target=$target_alias
1805
1806# FIXME: To remove some day.
1807if test "x$host_alias" != x; then
1808  if test "x$build_alias" = x; then
1809    cross_compiling=maybe
1810  elif test "x$build_alias" != "x$host_alias"; then
1811    cross_compiling=yes
1812  fi
1813fi
1814
1815ac_tool_prefix=
1816test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817
1818test "$silent" = yes && exec 6>/dev/null
1819
1820
1821ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822ac_ls_di=`ls -di .` &&
1823ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824  as_fn_error $? "working directory cannot be determined"
1825test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826  as_fn_error $? "pwd does not report name of working directory"
1827
1828
1829# Find the source files, if location was not specified.
1830if test -z "$srcdir"; then
1831  ac_srcdir_defaulted=yes
1832  # Try the directory containing this script, then the parent directory.
1833  ac_confdir=`$as_dirname -- "$as_myself" ||
1834$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835	 X"$as_myself" : 'X\(//\)[^/]' \| \
1836	 X"$as_myself" : 'X\(//\)$' \| \
1837	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838$as_echo X"$as_myself" |
1839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)[^/].*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)$/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\).*/{
1852	    s//\1/
1853	    q
1854	  }
1855	  s/.*/./; q'`
1856  srcdir=$ac_confdir
1857  if test ! -r "$srcdir/$ac_unique_file"; then
1858    srcdir=..
1859  fi
1860else
1861  ac_srcdir_defaulted=no
1862fi
1863if test ! -r "$srcdir/$ac_unique_file"; then
1864  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866fi
1867ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868ac_abs_confdir=`(
1869	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870	pwd)`
1871# When building in place, set srcdir=.
1872if test "$ac_abs_confdir" = "$ac_pwd"; then
1873  srcdir=.
1874fi
1875# Remove unnecessary trailing slashes from srcdir.
1876# Double slashes in file names in object file debugging info
1877# mess up M-x gdb in Emacs.
1878case $srcdir in
1879*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880esac
1881for ac_var in $ac_precious_vars; do
1882  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_env_${ac_var}_value=\$${ac_var}
1884  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886done
1887
1888#
1889# Report the --help message.
1890#
1891if test "$ac_init_help" = "long"; then
1892  # Omit some internal or obsolete options to make the list less imposing.
1893  # This message is too long to be a string in the A/UX 3.1 sh.
1894  cat <<_ACEOF
1895\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896
1897Usage: $0 [OPTION]... [VAR=VALUE]...
1898
1899To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900VAR=VALUE.  See below for descriptions of some of the useful variables.
1901
1902Defaults for the options are specified in brackets.
1903
1904Configuration:
1905  -h, --help              display this help and exit
1906      --help=short        display options specific to this package
1907      --help=recursive    display the short help of all the included packages
1908  -V, --version           display version information and exit
1909  -q, --quiet, --silent   do not print \`checking ...' messages
1910      --cache-file=FILE   cache test results in FILE [disabled]
1911  -C, --config-cache      alias for \`--cache-file=config.cache'
1912  -n, --no-create         do not create output files
1913      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914
1915Installation directories:
1916  --prefix=PREFIX         install architecture-independent files in PREFIX
1917                          [$ac_default_prefix]
1918  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                          [PREFIX]
1920
1921By default, \`make install' will install all the files in
1922\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924for instance \`--prefix=\$HOME'.
1925
1926For better control, use the options below.
1927
1928Fine tuning of the installation directories:
1929  --bindir=DIR            user executables [EPREFIX/bin]
1930  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931  --libexecdir=DIR        program executables [EPREFIX/libexec]
1932  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935  --libdir=DIR            object code libraries [EPREFIX/lib]
1936  --includedir=DIR        C header files [PREFIX/include]
1937  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940  --infodir=DIR           info documentation [DATAROOTDIR/info]
1941  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942  --mandir=DIR            man documentation [DATAROOTDIR/man]
1943  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944  --htmldir=DIR           html documentation [DOCDIR]
1945  --dvidir=DIR            dvi documentation [DOCDIR]
1946  --pdfdir=DIR            pdf documentation [DOCDIR]
1947  --psdir=DIR             ps documentation [DOCDIR]
1948_ACEOF
1949
1950  cat <<\_ACEOF
1951
1952X features:
1953  --x-includes=DIR    X include files are in DIR
1954  --x-libraries=DIR   X library files are in DIR
1955
1956System types:
1957  --build=BUILD     configure for building on BUILD [guessed]
1958  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959  --target=TARGET   configure for building compilers for TARGET [HOST]
1960_ACEOF
1961fi
1962
1963if test -n "$ac_init_help"; then
1964  case $ac_init_help in
1965     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966   esac
1967  cat <<\_ACEOF
1968
1969Optional Features:
1970  --disable-option-checking  ignore unrecognized --enable/--with options
1971  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973  --enable-openjdk-only   suppress building custom source even if present
1974                          [disabled]
1975  --enable-debug          set the debug level to fastdebug (shorthand for
1976                          --with-debug-level=fastdebug) [disabled]
1977  --enable-headless-only  only build headless (no GUI) support [disabled]
1978  --enable-full-docs      build complete documentation [enabled if all tools
1979                          found]
1980  --disable-unlimited-crypto
1981                          Disable unlimited crypto policy [enabled]
1982  --disable-keep-packaged-modules
1983                          Do not keep packaged modules in jdk image [enable]
1984  --enable-static-build   enable static library build [disabled]
1985  --disable-warnings-as-errors
1986                          do not consider native warnings to be an error
1987                          [enabled]
1988  --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-native-coverage
1993                          enable native compilation with code coverage
1994                          data[disabled]
1995  --enable-dtrace[=yes/no/auto]
1996                          enable dtrace. Default is auto, where dtrace is
1997                          enabled if all dependencies are present.
1998  --enable-aot[=yes/no/auto]
1999                          enable ahead of time compilation feature. Default is
2000                          auto, where aot is enabled if all dependencies are
2001                          present.
2002  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003  --disable-freetype-bundling
2004                          disable bundling of the freetype library with the
2005                          build result [enabled on Windows or when using
2006                          --with-freetype, disabled otherwise]
2007  --enable-libffi-bundling
2008                          enable bundling of libffi.so to make the built JDK
2009                          runnable on more systems
2010  --enable-jtreg-failure-handler
2011                          forces build of the jtreg failure handler to be
2012                          enabled, missing dependencies become fatal errors.
2013                          Default is auto, where the failure handler is built
2014                          if all dependencies are present and otherwise just
2015                          disabled.
2016  --disable-generate-classlist
2017                          forces enabling or disabling of the generation of a
2018                          CDS classlist at build time. Default is to generate
2019                          it when either the server or client JVMs are built.
2020  --enable-sjavac         use sjavac to do fast incremental compiles
2021                          [disabled]
2022  --disable-javac-server  disable javac server [enabled]
2023  --enable-icecc          enable distribted compilation of native code using
2024                          icecc/icecream [disabled]
2025  --disable-precompiled-headers
2026                          disable using precompiled headers when compiling C++
2027                          [enabled]
2028  --enable-ccache         enable using ccache to speed up recompilations
2029                          [disabled]
2030
2031Optional Packages:
2032  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                          support it), e.g. --with-target-bits=32 [guessed]
2036  --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-jdk-variant      JDK variant to build (normal) [normal]
2039  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                          optimized) [release]
2041  --with-jvm-variants     JVM variants (separated by commas) to build
2042                          (server,client,minimal,core,zero,zeroshark,custom)
2043                          [server]
2044  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                          (arm64,aarch64) [aarch64]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import_hotspot   Deprecated. Option is kept for backwards
2114                          compatibility and is ignored
2115  --with-import-modules   import a set of prebuilt modules either as a zip
2116                          file or an exploded directory
2117  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                          to show possible values [platform dependent]
2119  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121  --with-extra-ldflags    extra flags to be used when linking jdk
2122  --with-toolchain-version
2123                          the version of the toolchain to look for, use
2124                          '--help' to show possible values [platform
2125                          dependent]
2126  --with-build-devkit     Devkit to use for the build platform toolchain
2127  --with-jtreg            Regression Test Harness [probed]
2128  --with-jib              Jib dependency management tool [not used]
2129  --with-abi-profile      specify ABI profile for ARM builds
2130                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2131                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2132                          [toolchain dependent]
2133  --with-macosx-version-max
2134                          error on use of newer functionality. [macosx]
2135  --with-native-debug-symbols
2136                          set the native debug symbol configuration (none,
2137                          internal, external, zipped) [varying]
2138  --with-stdc++lib=<static>,<dynamic>,<default>
2139                          force linking of the C++ runtime on Linux to either
2140                          static or dynamic, default is static with dynamic as
2141                          fallback
2142  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2143                          (Windows only) [probed]
2144  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2145                          (Windows only) [probed]
2146  --with-x                use the X Window System
2147  --with-cups             specify prefix directory for the cups package
2148                          (expecting the headers under PATH/include)
2149  --with-cups-include     specify directory for the cups include files
2150  --with-freetype         specify prefix directory for the freetype package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-freetype-include specify directory for the freetype include files
2154  --with-freetype-lib     specify directory for the freetype library
2155  --with-freetype-src     specify directory with freetype sources to
2156                          automatically build the library (experimental,
2157                          Windows-only)
2158  --with-freetype-license if bundling freetype, also bundle this license file
2159  --with-alsa             specify prefix directory for the alsa package
2160                          (expecting the libraries under PATH/lib and the
2161                          headers under PATH/include)
2162  --with-alsa-include     specify directory for the alsa include files
2163  --with-alsa-lib         specify directory for the alsa library
2164  --with-libffi           specify prefix directory for the libffi package
2165                          (expecting the libraries under PATH/lib and the
2166                          headers under PATH/include)
2167  --with-libffi-include   specify directory for the libffi include files
2168  --with-libffi-lib       specify directory for the libffi library
2169  --with-libjpeg          use libjpeg from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-giflib           use giflib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-libpng           use libpng from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-zlib             use zlib from build system or OpenJDK source
2176                          (system, bundled) [bundled]
2177  --with-lcms             use lcms2 from build system or OpenJDK source
2178                          (system, bundled) [bundled]
2179  --with-dxsdk            Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2182                          compatibility and is ignored
2183  --with-dxsdk-include    Deprecated. Option is kept for backwards
2184                          compatibility and is ignored
2185  --with-jvm-features     additional JVM features to enable (separated by
2186                          comma), use '--help' to show possible values [none]
2187  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2188                          compatibility and is ignored
2189  --with-num-cores        number of cores in the build system, e.g.
2190                          --with-num-cores=8 [probed]
2191  --with-memory-size      memory (in MB) available in the build system, e.g.
2192                          --with-memory-size=1024 [probed]
2193  --with-jobs             number of parallel jobs to let make run [calculated
2194                          based on cores and memory]
2195  --with-test-jobs        number of parallel tests jobs to run [based on build
2196                          jobs]
2197  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2198                          invocations of boot JDK, overriding the default
2199                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2200                          -enableassertions"
2201  --with-sjavac-server-java
2202                          use this java binary for running the sjavac
2203                          background server [Boot JDK java]
2204  --with-ccache-dir       where to store ccache files [~/.ccache]
2205
2206Some influential environment variables:
2207  BASENAME    Override default value for BASENAME
2208  BASH        Override default value for BASH
2209  CAT         Override default value for CAT
2210  CHMOD       Override default value for CHMOD
2211  CMP         Override default value for CMP
2212  COMM        Override default value for COMM
2213  CP          Override default value for CP
2214  CUT         Override default value for CUT
2215  DATE        Override default value for DATE
2216  DIFF        Override default value for DIFF
2217  DIRNAME     Override default value for DIRNAME
2218  ECHO        Override default value for ECHO
2219  EXPR        Override default value for EXPR
2220  FILE        Override default value for FILE
2221  FIND        Override default value for FIND
2222  HEAD        Override default value for HEAD
2223  GUNZIP      Override default value for GUNZIP
2224  GZIP        Override default value for GZIP
2225  LN          Override default value for LN
2226  LS          Override default value for LS
2227  MKDIR       Override default value for MKDIR
2228  MKTEMP      Override default value for MKTEMP
2229  MV          Override default value for MV
2230  NAWK        Override default value for NAWK
2231  PRINTF      Override default value for PRINTF
2232  RM          Override default value for RM
2233  RMDIR       Override default value for RMDIR
2234  SH          Override default value for SH
2235  SORT        Override default value for SORT
2236  TAIL        Override default value for TAIL
2237  TAR         Override default value for TAR
2238  TEE         Override default value for TEE
2239  TOUCH       Override default value for TOUCH
2240  TR          Override default value for TR
2241  UNAME       Override default value for UNAME
2242  UNIQ        Override default value for UNIQ
2243  WC          Override default value for WC
2244  WHICH       Override default value for WHICH
2245  XARGS       Override default value for XARGS
2246  AWK         Override default value for AWK
2247  GREP        Override default value for GREP
2248  EGREP       Override default value for EGREP
2249  FGREP       Override default value for FGREP
2250  SED         Override default value for SED
2251  CYGPATH     Override default value for CYGPATH
2252  READLINK    Override default value for READLINK
2253  DF          Override default value for DF
2254  CPIO        Override default value for CPIO
2255  NICE        Override default value for NICE
2256  PANDOC      Override default value for PANDOC
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  DOT         Override default value for DOT
2264  HG          Override default value for HG
2265  STAT        Override default value for STAT
2266  TIME        Override default value for TIME
2267  FLOCK       Override default value for FLOCK
2268  DTRACE      Override default value for DTRACE
2269  PATCH       Override default value for PATCH
2270  DSYMUTIL    Override default value for DSYMUTIL
2271  XATTR       Override default value for XATTR
2272  CODESIGN    Override default value for CODESIGN
2273  SETFILE     Override default value for SETFILE
2274  PKG_CONFIG  path to pkg-config utility
2275  JAVA        Override default value for JAVA
2276  JAVAC       Override default value for JAVAC
2277  JAVAH       Override default value for JAVAH
2278  JAR         Override default value for JAR
2279  JARSIGNER   Override default value for JARSIGNER
2280  CC          C compiler command
2281  CFLAGS      C compiler flags
2282  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2283              nonstandard directory <lib dir>
2284  LIBS        libraries to pass to the linker, e.g. -l<library>
2285  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2286              you have headers in a nonstandard directory <include dir>
2287  CXX         C++ compiler command
2288  CXXFLAGS    C++ compiler flags
2289  CPP         C preprocessor
2290  CXXCPP      C++ preprocessor
2291  AS          Override default value for AS
2292  AR          Override default value for AR
2293  LIPO        Override default value for LIPO
2294  STRIP       Override default value for STRIP
2295  NM          Override default value for NM
2296  GNM         Override default value for GNM
2297  OBJCOPY     Override default value for OBJCOPY
2298  OBJDUMP     Override default value for OBJDUMP
2299  BUILD_CC    Override default value for BUILD_CC
2300  BUILD_CXX   Override default value for BUILD_CXX
2301  BUILD_NM    Override default value for BUILD_NM
2302  BUILD_AR    Override default value for BUILD_AR
2303  BUILD_OBJCOPY
2304              Override default value for BUILD_OBJCOPY
2305  BUILD_STRIP Override default value for BUILD_STRIP
2306  JTREGEXE    Override default value for JTREGEXE
2307  XMKMF       Path to xmkmf, Makefile generator for X Window System
2308  FREETYPE_CFLAGS
2309              C compiler flags for FREETYPE, overriding pkg-config
2310  FREETYPE_LIBS
2311              linker flags for FREETYPE, overriding pkg-config
2312  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2313  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2314  LIBFFI_CFLAGS
2315              C compiler flags for LIBFFI, overriding pkg-config
2316  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2317  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2318  PNG_LIBS    linker flags for PNG, overriding pkg-config
2319  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2320  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2321  ICECC_CMD   Override default value for ICECC_CMD
2322  ICECC_CREATE_ENV
2323              Override default value for ICECC_CREATE_ENV
2324  ICECC_WRAPPER
2325              Override default value for ICECC_WRAPPER
2326  CCACHE      Override default value for CCACHE
2327
2328Use these variables to override the choices made by `configure' or to help
2329it to find libraries and programs with nonstandard names/locations.
2330
2331Report bugs to <build-dev@openjdk.java.net>.
2332OpenJDK home page: <http://openjdk.java.net>.
2333_ACEOF
2334ac_status=$?
2335fi
2336
2337if test "$ac_init_help" = "recursive"; then
2338  # If there are subdirs, report their specific --help.
2339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340    test -d "$ac_dir" ||
2341      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342      continue
2343    ac_builddir=.
2344
2345case "$ac_dir" in
2346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347*)
2348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349  # A ".." for each directory in $ac_dir_suffix.
2350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351  case $ac_top_builddir_sub in
2352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354  esac ;;
2355esac
2356ac_abs_top_builddir=$ac_pwd
2357ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358# for backward compatibility:
2359ac_top_builddir=$ac_top_build_prefix
2360
2361case $srcdir in
2362  .)  # We are building in place.
2363    ac_srcdir=.
2364    ac_top_srcdir=$ac_top_builddir_sub
2365    ac_abs_top_srcdir=$ac_pwd ;;
2366  [\\/]* | ?:[\\/]* )  # Absolute name.
2367    ac_srcdir=$srcdir$ac_dir_suffix;
2368    ac_top_srcdir=$srcdir
2369    ac_abs_top_srcdir=$srcdir ;;
2370  *) # Relative name.
2371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372    ac_top_srcdir=$ac_top_build_prefix$srcdir
2373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374esac
2375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376
2377    cd "$ac_dir" || { ac_status=$?; continue; }
2378    # Check for guested configure.
2379    if test -f "$ac_srcdir/configure.gnu"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382    elif test -f "$ac_srcdir/configure"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure" --help=recursive
2385    else
2386      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387    fi || ac_status=$?
2388    cd "$ac_pwd" || { ac_status=$?; break; }
2389  done
2390fi
2391
2392test -n "$ac_init_help" && exit $ac_status
2393if $ac_init_version; then
2394  cat <<\_ACEOF
2395OpenJDK configure jdk9
2396generated by GNU Autoconf 2.69
2397
2398Copyright (C) 2012 Free Software Foundation, Inc.
2399This configure script is free software; the Free Software Foundation
2400gives unlimited permission to copy, distribute and modify it.
2401_ACEOF
2402  exit
2403fi
2404
2405## ------------------------ ##
2406## Autoconf initialization. ##
2407## ------------------------ ##
2408
2409# ac_fn_c_try_compile LINENO
2410# --------------------------
2411# Try to compile conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_compile ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext
2416  if { { ac_try="$ac_compile"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_compile") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest.$ac_objext; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_c_try_compile
2446
2447# ac_fn_cxx_try_compile LINENO
2448# ----------------------------
2449# Try to compile conftest.$ac_ext, and return whether this succeeded.
2450ac_fn_cxx_try_compile ()
2451{
2452  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453  rm -f conftest.$ac_objext
2454  if { { ac_try="$ac_compile"
2455case "(($ac_try" in
2456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457  *) ac_try_echo=$ac_try;;
2458esac
2459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460$as_echo "$ac_try_echo"; } >&5
2461  (eval "$ac_compile") 2>conftest.err
2462  ac_status=$?
2463  if test -s conftest.err; then
2464    grep -v '^ *+' conftest.err >conftest.er1
2465    cat conftest.er1 >&5
2466    mv -f conftest.er1 conftest.err
2467  fi
2468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469  test $ac_status = 0; } && {
2470	 test -z "$ac_cxx_werror_flag" ||
2471	 test ! -s conftest.err
2472       } && test -s conftest.$ac_objext; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_compile
2484
2485# ac_fn_c_try_cpp LINENO
2486# ----------------------
2487# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_c_try_cpp ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_cpp conftest.$ac_ext"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } > conftest.i && {
2507	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508	 test ! -s conftest.err
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515    ac_retval=1
2516fi
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_c_try_cpp
2521
2522# ac_fn_cxx_try_cpp LINENO
2523# ------------------------
2524# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_cpp ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  if { { ac_try="$ac_cpp conftest.$ac_ext"
2529case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536  ac_status=$?
2537  if test -s conftest.err; then
2538    grep -v '^ *+' conftest.err >conftest.er1
2539    cat conftest.er1 >&5
2540    mv -f conftest.er1 conftest.err
2541  fi
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; } > conftest.i && {
2544	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545	 test ! -s conftest.err
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552    ac_retval=1
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_cpp
2558
2559# ac_fn_c_try_link LINENO
2560# -----------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded.
2562ac_fn_c_try_link ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  rm -f conftest.$ac_objext conftest$ac_exeext
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>conftest.err
2574  ac_status=$?
2575  if test -s conftest.err; then
2576    grep -v '^ *+' conftest.err >conftest.er1
2577    cat conftest.er1 >&5
2578    mv -f conftest.er1 conftest.err
2579  fi
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && {
2582	 test -z "$ac_c_werror_flag" ||
2583	 test ! -s conftest.err
2584       } && test -s conftest$ac_exeext && {
2585	 test "$cross_compiling" = yes ||
2586	 test -x conftest$ac_exeext
2587       }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593	ac_retval=1
2594fi
2595  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597  # interfere with the next link command; also delete a directory that is
2598  # left behind by Apple's compiler.  We do this before executing the actions.
2599  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601  as_fn_set_status $ac_retval
2602
2603} # ac_fn_c_try_link
2604
2605# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606# ---------------------------------------------------------
2607# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608# the include files in INCLUDES and setting the cache variable VAR
2609# accordingly.
2610ac_fn_cxx_check_header_mongrel ()
2611{
2612  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613  if eval \${$3+:} false; then :
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if eval \${$3+:} false; then :
2617  $as_echo_n "(cached) " >&6
2618fi
2619eval ac_res=\$$3
2620	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622else
2623  # Is the header compilable?
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625$as_echo_n "checking $2 usability... " >&6; }
2626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_header_compiler=yes
2633else
2634  ac_header_compiler=no
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638$as_echo "$ac_header_compiler" >&6; }
2639
2640# Is the header present?
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642$as_echo_n "checking $2 presence... " >&6; }
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645#include <$2>
2646_ACEOF
2647if ac_fn_cxx_try_cpp "$LINENO"; then :
2648  ac_header_preproc=yes
2649else
2650  ac_header_preproc=no
2651fi
2652rm -f conftest.err conftest.i conftest.$ac_ext
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654$as_echo "$ac_header_preproc" >&6; }
2655
2656# So?  What about this header?
2657case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658  yes:no: )
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663    ;;
2664  no:yes:* )
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675( $as_echo "## ----------------------------------------- ##
2676## Report this to build-dev@openjdk.java.net ##
2677## ----------------------------------------- ##"
2678     ) | sed "s/^/$as_me: WARNING:     /" >&2
2679    ;;
2680esac
2681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682$as_echo_n "checking for $2... " >&6; }
2683if eval \${$3+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  eval "$3=\$ac_header_compiler"
2687fi
2688eval ac_res=\$$3
2689	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690$as_echo "$ac_res" >&6; }
2691fi
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693
2694} # ac_fn_cxx_check_header_mongrel
2695
2696# ac_fn_cxx_try_run LINENO
2697# ------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699# that executables *can* be run.
2700ac_fn_cxx_try_run ()
2701{
2702  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703  if { { ac_try="$ac_link"
2704case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_link") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714  { { case "(($ac_try" in
2715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716  *) ac_try_echo=$ac_try;;
2717esac
2718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719$as_echo "$ac_try_echo"; } >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723  test $ac_status = 0; }; }; then :
2724  ac_retval=0
2725else
2726  $as_echo "$as_me: program exited with status $ac_status" >&5
2727       $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730       ac_retval=$ac_status
2731fi
2732  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_try_run
2737
2738# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739# ---------------------------------------------------------
2740# Tests whether HEADER exists and can be compiled using the include files in
2741# INCLUDES, setting the cache variable VAR accordingly.
2742ac_fn_cxx_check_header_compile ()
2743{
2744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746$as_echo_n "checking for $2... " >&6; }
2747if eval \${$3+:} false; then :
2748  $as_echo_n "(cached) " >&6
2749else
2750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753#include <$2>
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  eval "$3=yes"
2757else
2758  eval "$3=no"
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767} # ac_fn_cxx_check_header_compile
2768
2769# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770# ----------------------------------------------
2771# Tries to find the compile-time value of EXPR in a program that includes
2772# INCLUDES, setting VAR accordingly. Returns whether the value could be
2773# computed
2774ac_fn_cxx_compute_int ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  if test "$cross_compiling" = yes; then
2778    # Depending upon the size, compute the lo and hi bounds.
2779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_lo=0 ac_mid=0
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=$ac_mid; break
2812else
2813  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814			if test $ac_lo -le $ac_mid; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) < 0)];
2830test_array [0] = 0;
2831return test_array [0];
2832
2833  ;
2834  return 0;
2835}
2836_ACEOF
2837if ac_fn_cxx_try_compile "$LINENO"; then :
2838  ac_hi=-1 ac_mid=-1
2839  while :; do
2840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h.  */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847test_array [0] = 0;
2848return test_array [0];
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854if ac_fn_cxx_try_compile "$LINENO"; then :
2855  ac_lo=$ac_mid; break
2856else
2857  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858			if test $ac_mid -le $ac_hi; then
2859			  ac_lo= ac_hi=
2860			  break
2861			fi
2862			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865  done
2866else
2867  ac_lo= ac_hi=
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872# Binary search between lo and hi bounds.
2873while test "x$ac_lo" != "x$ac_hi"; do
2874  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876/* end confdefs.h.  */
2877$4
2878int
2879main ()
2880{
2881static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882test_array [0] = 0;
2883return test_array [0];
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889if ac_fn_cxx_try_compile "$LINENO"; then :
2890  ac_hi=$ac_mid
2891else
2892  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893fi
2894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895done
2896case $ac_lo in #((
2897?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898'') ac_retval=1 ;;
2899esac
2900  else
2901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902/* end confdefs.h.  */
2903$4
2904static long int longval () { return $2; }
2905static unsigned long int ulongval () { return $2; }
2906#include <stdio.h>
2907#include <stdlib.h>
2908int
2909main ()
2910{
2911
2912  FILE *f = fopen ("conftest.val", "w");
2913  if (! f)
2914    return 1;
2915  if (($2) < 0)
2916    {
2917      long int i = longval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%ld", i);
2921    }
2922  else
2923    {
2924      unsigned long int i = ulongval ();
2925      if (i != ($2))
2926	return 1;
2927      fprintf (f, "%lu", i);
2928    }
2929  /* Do not output a trailing newline, as this causes \r\n confusion
2930     on some platforms.  */
2931  return ferror (f) || fclose (f) != 0;
2932
2933  ;
2934  return 0;
2935}
2936_ACEOF
2937if ac_fn_cxx_try_run "$LINENO"; then :
2938  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939else
2940  ac_retval=1
2941fi
2942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943  conftest.$ac_objext conftest.beam conftest.$ac_ext
2944rm -f conftest.val
2945
2946  fi
2947  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948  as_fn_set_status $ac_retval
2949
2950} # ac_fn_cxx_compute_int
2951
2952# ac_fn_cxx_try_link LINENO
2953# -------------------------
2954# Try to link conftest.$ac_ext, and return whether this succeeded.
2955ac_fn_cxx_try_link ()
2956{
2957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958  rm -f conftest.$ac_objext conftest$ac_exeext
2959  if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>conftest.err
2967  ac_status=$?
2968  if test -s conftest.err; then
2969    grep -v '^ *+' conftest.err >conftest.er1
2970    cat conftest.er1 >&5
2971    mv -f conftest.er1 conftest.err
2972  fi
2973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974  test $ac_status = 0; } && {
2975	 test -z "$ac_cxx_werror_flag" ||
2976	 test ! -s conftest.err
2977       } && test -s conftest$ac_exeext && {
2978	 test "$cross_compiling" = yes ||
2979	 test -x conftest$ac_exeext
2980       }; then :
2981  ac_retval=0
2982else
2983  $as_echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986	ac_retval=1
2987fi
2988  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990  # interfere with the next link command; also delete a directory that is
2991  # left behind by Apple's compiler.  We do this before executing the actions.
2992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994  as_fn_set_status $ac_retval
2995
2996} # ac_fn_cxx_try_link
2997
2998# ac_fn_cxx_check_func LINENO FUNC VAR
2999# ------------------------------------
3000# Tests whether FUNC exists, setting the cache variable VAR accordingly
3001ac_fn_cxx_check_func ()
3002{
3003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005$as_echo_n "checking for $2... " >&6; }
3006if eval \${$3+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010/* end confdefs.h.  */
3011/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013#define $2 innocuous_$2
3014
3015/* System header to define __stub macros and hopefully few prototypes,
3016    which can conflict with char $2 (); below.
3017    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018    <limits.h> exists even on freestanding compilers.  */
3019
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
3025
3026#undef $2
3027
3028/* Override any GCC internal prototype to avoid an error.
3029   Use char because int might match the return type of a GCC
3030   builtin and then its argument prototype would still apply.  */
3031#ifdef __cplusplus
3032extern "C"
3033#endif
3034char $2 ();
3035/* The GNU C library defines this for functions which it implements
3036    to always fail with ENOSYS.  Some functions are actually named
3037    something starting with __ and the normal name is an alias.  */
3038#if defined __stub_$2 || defined __stub___$2
3039choke me
3040#endif
3041
3042int
3043main ()
3044{
3045return $2 ();
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050if ac_fn_cxx_try_link "$LINENO"; then :
3051  eval "$3=yes"
3052else
3053  eval "$3=no"
3054fi
3055rm -f core conftest.err conftest.$ac_objext \
3056    conftest$ac_exeext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_cxx_check_func
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073$as_echo_n "checking for $2... " >&6; }
3074if eval \${$3+:} false; then :
3075  $as_echo_n "(cached) " >&6
3076else
3077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078/* end confdefs.h.  */
3079$4
3080#include <$2>
3081_ACEOF
3082if ac_fn_c_try_compile "$LINENO"; then :
3083  eval "$3=yes"
3084else
3085  eval "$3=no"
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093
3094} # ac_fn_c_check_header_compile
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
3099It was created by OpenJDK $as_me jdk9, which was
3100generated by GNU Autoconf 2.69.  Invocation command line was
3101
3102  $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120
3121/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134  IFS=$as_save_IFS
3135  test -z "$as_dir" && as_dir=.
3136    $as_echo "PATH: $as_dir"
3137  done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163  for ac_arg
3164  do
3165    case $ac_arg in
3166    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168    | -silent | --silent | --silen | --sile | --sil)
3169      continue ;;
3170    *\'*)
3171      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172    esac
3173    case $ac_pass in
3174    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175    2)
3176      as_fn_append ac_configure_args1 " '$ac_arg'"
3177      if test $ac_must_keep_next = true; then
3178	ac_must_keep_next=false # Got value, back to normal.
3179      else
3180	case $ac_arg in
3181	  *=* | --config-cache | -C | -disable-* | --disable-* \
3182	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184	  | -with-* | --with-* | -without-* | --without-* | --x)
3185	    case "$ac_configure_args0 " in
3186	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187	    esac
3188	    ;;
3189	  -* ) ac_must_keep_next=true ;;
3190	esac
3191      fi
3192      as_fn_append ac_configure_args " '$ac_arg'"
3193      ;;
3194    esac
3195  done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log.  We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206  # Save into config.log some information that might help in debugging.
3207  {
3208    echo
3209
3210    $as_echo "## ---------------- ##
3211## Cache variables. ##
3212## ---------------- ##"
3213    echo
3214    # The following way of writing the cache mishandles newlines in values,
3215(
3216  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217    eval ac_val=\$$ac_var
3218    case $ac_val in #(
3219    *${as_nl}*)
3220      case $ac_var in #(
3221      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223      esac
3224      case $ac_var in #(
3225      _ | IFS | as_nl) ;; #(
3226      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227      *) { eval $ac_var=; unset $ac_var;} ;;
3228      esac ;;
3229    esac
3230  done
3231  (set) 2>&1 |
3232    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233    *${as_nl}ac_space=\ *)
3234      sed -n \
3235	"s/'\''/'\''\\\\'\'''\''/g;
3236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237      ;; #(
3238    *)
3239      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240      ;;
3241    esac |
3242    sort
3243)
3244    echo
3245
3246    $as_echo "## ----------------- ##
3247## Output variables. ##
3248## ----------------- ##"
3249    echo
3250    for ac_var in $ac_subst_vars
3251    do
3252      eval ac_val=\$$ac_var
3253      case $ac_val in
3254      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255      esac
3256      $as_echo "$ac_var='\''$ac_val'\''"
3257    done | sort
3258    echo
3259
3260    if test -n "$ac_subst_files"; then
3261      $as_echo "## ------------------- ##
3262## File substitutions. ##
3263## ------------------- ##"
3264      echo
3265      for ac_var in $ac_subst_files
3266      do
3267	eval ac_val=\$$ac_var
3268	case $ac_val in
3269	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270	esac
3271	$as_echo "$ac_var='\''$ac_val'\''"
3272      done | sort
3273      echo
3274    fi
3275
3276    if test -s confdefs.h; then
3277      $as_echo "## ----------- ##
3278## confdefs.h. ##
3279## ----------- ##"
3280      echo
3281      cat confdefs.h
3282      echo
3283    fi
3284    test "$ac_signal" != 0 &&
3285      $as_echo "$as_me: caught signal $ac_signal"
3286    $as_echo "$as_me: exit $exit_status"
3287  } >&5
3288  rm -f core *.core core.conftest.* &&
3289    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290    exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
3334  # We do not want a PATH search for config.site.
3335  case $CONFIG_SITE in #((
3336    -*)  ac_site_file1=./$CONFIG_SITE;;
3337    */*) ac_site_file1=$CONFIG_SITE;;
3338    *)   ac_site_file1=./$CONFIG_SITE;;
3339  esac
3340elif test "x$prefix" != xNONE; then
3341  ac_site_file1=$prefix/share/config.site
3342  ac_site_file2=$prefix/etc/config.site
3343else
3344  ac_site_file1=$ac_default_prefix/share/config.site
3345  ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349  test "x$ac_site_file" = xNONE && continue
3350  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353    sed 's/^/| /' "$ac_site_file" >&5
3354    . "$ac_site_file" \
3355      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
3359  fi
3360done
3361
3362if test -r "$cache_file"; then
3363  # Some versions of bash will fail to source /dev/null (special files
3364  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368    case $cache_file in
3369      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370      *)                      . "./$cache_file";;
3371    esac
3372  fi
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376  >$cache_file
3377fi
3378
3379# Check that the precious variables saved in the cache have kept the same
3380# value.
3381ac_cache_corrupted=false
3382for ac_var in $ac_precious_vars; do
3383  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384  eval ac_new_set=\$ac_env_${ac_var}_set
3385  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386  eval ac_new_val=\$ac_env_${ac_var}_value
3387  case $ac_old_set,$ac_new_set in
3388    set,)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,set)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,);;
3397    *)
3398      if test "x$ac_old_val" != "x$ac_new_val"; then
3399	# differences in whitespace do not lead to failure.
3400	ac_old_val_w=`echo x $ac_old_val`
3401	ac_new_val_w=`echo x $ac_new_val`
3402	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405	  ac_cache_corrupted=:
3406	else
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409	  eval $ac_var=\$ac_old_val
3410	fi
3411	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415      fi;;
3416  esac
3417  # Pass precious variables to config.status.
3418  if test "$ac_new_set" = set; then
3419    case $ac_new_val in
3420    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421    *) ac_arg=$ac_var=$ac_new_val ;;
3422    esac
3423    case " $ac_configure_args " in
3424      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426    esac
3427  fi
3428done
3429if $ac_cache_corrupted; then
3430  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435fi
3436## -------------------- ##
3437## Main body of script. ##
3438## -------------------- ##
3439
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446
3447
3448ac_aux_dir=
3449for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450  if test -f "$ac_dir/install-sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install-sh -c"
3453    break
3454  elif test -f "$ac_dir/install.sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install.sh -c"
3457    break
3458  elif test -f "$ac_dir/shtool"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/shtool install -c"
3461    break
3462  fi
3463done
3464if test -z "$ac_aux_dir"; then
3465  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3466fi
3467
3468# These three variables are undocumented and unsupported,
3469# and are intended to be withdrawn in a future Autoconf release.
3470# They can cause serious problems if a builder's source tree is in a directory
3471# whose full name contains unusual characters.
3472ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475
3476
3477# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478
3479#
3480# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504#
3505# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3506#
3507# This program is free software; you can redistribute it and/or modify
3508# it under the terms of the GNU General Public License as published by
3509# the Free Software Foundation; either version 2 of the License, or
3510# (at your option) any later version.
3511#
3512# This program is distributed in the hope that it will be useful, but
3513# WITHOUT ANY WARRANTY; without even the implied warranty of
3514# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515# General Public License for more details.
3516#
3517# You should have received a copy of the GNU General Public License
3518# along with this program; if not, write to the Free Software
3519# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520#
3521# As a special exception to the GNU General Public License, if you
3522# distribute this file as part of a program that contains a
3523# configuration script generated by Autoconf, you may include it under
3524# the same distribution terms that you use for the rest of that program.
3525
3526# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527# ----------------------------------
3528# PKG_PROG_PKG_CONFIG
3529
3530# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531#
3532# Check to see whether a particular set of modules exists.  Similar
3533# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534#
3535#
3536# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537# this or PKG_CHECK_MODULES is called, or make sure to call
3538# PKG_CHECK_EXISTS manually
3539# --------------------------------------------------------------
3540
3541
3542
3543# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544# ---------------------------------------------
3545# _PKG_CONFIG
3546
3547# _PKG_SHORT_ERRORS_SUPPORTED
3548# -----------------------------
3549# _PKG_SHORT_ERRORS_SUPPORTED
3550
3551
3552# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553# [ACTION-IF-NOT-FOUND])
3554#
3555#
3556# Note that if there is a possibility the first call to
3557# PKG_CHECK_MODULES might not happen, you should be sure to include an
3558# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559#
3560#
3561# --------------------------------------------------------------
3562# PKG_CHECK_MODULES
3563
3564
3565# Include these first...
3566#
3567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591# Create a function/macro that takes a series of named arguments. The call is
3592# similar to AC_DEFUN, but the setup of the function looks like this:
3593# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594# ... do something
3595#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596# ])
3597# A star (*) in front of a named argument means that it is required and it's
3598# presence will be verified. To pass e.g. the first value as a normal indexed
3599# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601# "ARG_FOO".
3602#
3603# The generated function can be called like this:
3604# MYFUNC(FOO: [foo-val],
3605#     BAR: [
3606#         $ECHO hello world
3607#     ])
3608# Note that the argument value must start on the same line as the argument name.
3609#
3610# Argument 1: Name of the function to define
3611# Argument 2: List of legal named arguments, with a * prefix for required arguments
3612# Argument 3: Argument array to treat as named, typically $@
3613# Argument 4: The main function body
3614
3615
3616# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617# If so, then append $1 to $2 \
3618# Also set JVM_ARG_OK to true/false depending on outcome.
3619
3620
3621# Appends a string to a path variable, only adding the : when needed.
3622
3623
3624# Prepends a string to a path variable, only adding the : when needed.
3625
3626
3627# This will make sure the given variable points to a full and proper
3628# path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# $1: The name of the variable to fix
3635
3636
3637# This will make sure the given variable points to a executable
3638# with a full and proper path. This means:
3639# 1) There will be no spaces in the path. On unix platforms,
3640#    spaces in the path will result in an error. On Windows,
3641#    the path will be rewritten using short-style to be space-free.
3642# 2) The path will be absolute, and it will be in unix-style (on
3643#     cygwin).
3644# Any arguments given to the executable is preserved.
3645# If the input variable does not have a directory specification, then
3646# it need to be in the PATH.
3647# $1: The name of the variable to fix
3648
3649
3650
3651
3652# Register a --with argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --with-
3654
3655
3656# Register a --enable argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --enable-
3658# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659# $3: Messages to user.
3660
3661
3662
3663
3664# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665# $1: variable to check
3666
3667
3668# Check that there are no unprocessed overridden variables left.
3669# If so, they are an incorrect argument and we will exit with an error.
3670
3671
3672# Setup a tool for the given variable. If correctly specified by the user,
3673# use that value, otherwise search for the tool using the supplied code snippet.
3674# $1: variable to set
3675# $2: code snippet to call to look for the tool
3676# $3: code snippet to call if variable was used to find tool
3677
3678
3679# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682# $3: [path]
3683
3684
3685# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686# $1: variable to set
3687# $2: executable name (or list of names) to look for
3688
3689
3690# Like BASIC_PATH_PROGS but fails if no tool was found.
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693# $3: [path]
3694
3695
3696# Like BASIC_SETUP_TOOL but fails if no tool was found.
3697# $1: variable to set
3698# $2: autoconf macro to call to look for the special tool
3699
3700
3701# Setup the most fundamental tools that relies on not much else to set up,
3702# but is used by much of the early bootstrap code.
3703
3704
3705# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706
3707
3708# Evaluates platform specific overrides for devkit variables.
3709# $1: Name of variable
3710
3711
3712
3713
3714
3715
3716#%%% Simple tools %%%
3717
3718# Check if we have found a usable version of make
3719# $1: the path to a potential make binary (or empty)
3720# $2: the description on how we found this
3721
3722
3723
3724
3725# Goes looking for a usable version of GNU make.
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# Check if build directory is on local disk. If not possible to determine,
3737# we prefer to claim it's local.
3738# Argument 1: directory to test
3739# Argument 2: what to do if it is on local disk
3740# Argument 3: what to do otherwise (remote disk or failure)
3741
3742
3743# Check that source files have basic read permissions set. This might
3744# not be the case in cygwin in certain conditions.
3745
3746
3747
3748
3749# Check for support for specific options in bash
3750
3751
3752################################################################################
3753#
3754# Default make target
3755#
3756
3757
3758# Code to run after AC_OUTPUT
3759
3760
3761#
3762# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764#
3765# This code is free software; you can redistribute it and/or modify it
3766# under the terms of the GNU General Public License version 2 only, as
3767# published by the Free Software Foundation.  Oracle designates this
3768# particular file as subject to the "Classpath" exception as provided
3769# by Oracle in the LICENSE file that accompanied this code.
3770#
3771# This code is distributed in the hope that it will be useful, but WITHOUT
3772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774# version 2 for more details (a copy is included in the LICENSE file that
3775# accompanied this code).
3776#
3777# You should have received a copy of the GNU General Public License version
3778# 2 along with this work; if not, write to the Free Software Foundation,
3779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780#
3781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782# or visit www.oracle.com if you need additional information or have any
3783# questions.
3784#
3785
3786
3787
3788
3789
3790# Helper function which possibly converts a path using DOS-style short mode.
3791# If so, the updated path is stored in $new_path.
3792# $1: The path to check
3793
3794
3795# Helper function which possibly converts a path using DOS-style short mode.
3796# If so, the updated path is stored in $new_path.
3797# $1: The path to check
3798
3799
3800# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3801# and could probably be heavily simplified. However, all changes in this
3802# area tend to need lot of testing in different scenarios, and in lack of
3803# proper unit testing, cleaning this up has not been deemed worth the effort
3804# at the moment.
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3815
3816
3817
3818
3819# ... then the rest
3820#
3821# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845########################################################################
3846# This file handles detection of the Boot JDK. The Boot JDK detection
3847# process has been developed as a response to solve a complex real-world
3848# problem. Initially, it was simple, but it has grown as platform after
3849# platform, idiosyncracy after idiosyncracy has been supported.
3850#
3851# The basic idea is this:
3852# 1) You need an acceptable *) JDK to use as a Boot JDK
3853# 2) There are several ways to locate a JDK, that are mostly platform
3854#    dependent **)
3855# 3) You can have multiple JDKs installed
3856# 4) If possible, configure should try to dig out an acceptable JDK
3857#    automatically, without having to resort to command-line options
3858#
3859# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3860#     javac) and not a JRE, etc.
3861#
3862# **) On Windows we typically use a well-known path.
3863#     On MacOSX we typically use the tool java_home.
3864#     On Linux we typically find javac in the $PATH, and then follow a
3865#     chain of symlinks that often ends up in a real JDK.
3866#
3867# This leads to the code where we check in different ways to locate a
3868# JDK, and if one is found, check if it is acceptable. If not, we print
3869# our reasons for rejecting it (useful when debugging non-working
3870# configure situations) and continue checking the next one.
3871########################################################################
3872
3873# Execute the check given as argument, and verify the result
3874# If the Boot JDK was previously found, do nothing
3875# $1 A command line (typically autoconf macro) to execute
3876
3877
3878# Test: Is bootjdk explicitly set by command line arguments?
3879
3880
3881# Test: Is $JAVA_HOME set?
3882
3883
3884# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3885
3886
3887# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3888# $1: Argument to the java_home binary (optional)
3889
3890
3891# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3892
3893
3894# Look for a jdk in the given path. If there are multiple, try to select the newest.
3895# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3896# $1 = Path to directory containing jdk installations.
3897# $2 = String to append to the found JDK directory to get the proper JDK home
3898
3899
3900# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3901# environmental variable as base for where to look.
3902# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3903
3904
3905# Test: Is there a JDK installed in default, well-known locations?
3906
3907
3908# Check that a command-line tool in the Boot JDK is correct
3909# $1 = name of variable to assign
3910# $2 = name of binary
3911
3912
3913###############################################################################
3914#
3915# We need a Boot JDK to bootstrap the build.
3916#
3917
3918
3919
3920
3921
3922# BUILD_JDK: the location of the latest JDK that can run
3923#   on the host system and supports the target class file version
3924#   generated in this JDK build.  This variable should only be
3925#   used after the launchers are built.
3926#
3927
3928# Execute the check given as argument, and verify the result.
3929# If the JDK was previously found, do nothing.
3930# $1 A command line (typically autoconf macro) to execute
3931
3932
3933# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3934# is different than the host system doing the build (e.g. cross-compilation),
3935# a special BUILD_JDK is built as part of the build process.  An external
3936# prebuilt BUILD_JDK can also be supplied.
3937
3938
3939#
3940# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3942#
3943# This code is free software; you can redistribute it and/or modify it
3944# under the terms of the GNU General Public License version 2 only, as
3945# published by the Free Software Foundation.  Oracle designates this
3946# particular file as subject to the "Classpath" exception as provided
3947# by Oracle in the LICENSE file that accompanied this code.
3948#
3949# This code is distributed in the hope that it will be useful, but WITHOUT
3950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3952# version 2 for more details (a copy is included in the LICENSE file that
3953# accompanied this code).
3954#
3955# You should have received a copy of the GNU General Public License version
3956# 2 along with this work; if not, write to the Free Software Foundation,
3957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3958#
3959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3960# or visit www.oracle.com if you need additional information or have any
3961# questions.
3962#
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980################################################################################
3981#
3982# Runs icecc-create-env once and prints the error if it fails
3983#
3984# $1: arguments to icecc-create-env
3985# $2: log file
3986#
3987
3988
3989################################################################################
3990#
3991# Optionally enable distributed compilation of native code using icecc/icecream
3992#
3993
3994
3995
3996
3997
3998
3999
4000#
4001# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4002# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4003#
4004# This code is free software; you can redistribute it and/or modify it
4005# under the terms of the GNU General Public License version 2 only, as
4006# published by the Free Software Foundation.  Oracle designates this
4007# particular file as subject to the "Classpath" exception as provided
4008# by Oracle in the LICENSE file that accompanied this code.
4009#
4010# This code is distributed in the hope that it will be useful, but WITHOUT
4011# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4012# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4013# version 2 for more details (a copy is included in the LICENSE file that
4014# accompanied this code).
4015#
4016# You should have received a copy of the GNU General Public License version
4017# 2 along with this work; if not, write to the Free Software Foundation,
4018# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4019#
4020# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4021# or visit www.oracle.com if you need additional information or have any
4022# questions.
4023#
4024
4025################################################################################
4026#
4027# Setup ABI profile (for arm)
4028#
4029
4030
4031# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4032# corresponding configure arguments instead
4033
4034
4035# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4036# that configure can use them while detecting compilers.
4037# TOOLCHAIN_TYPE is available here.
4038# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4039
4040
4041
4042
4043
4044
4045# Documentation on common flags used for solstudio in HIGHEST.
4046#
4047# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4048#          done with care, there are some assumptions below that need to
4049#          be understood about the use of pointers, and IEEE behavior.
4050#
4051# -fns: Use non-standard floating point mode (not IEEE 754)
4052# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4053# -fsingle: Use single precision floating point with 'float'
4054# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4055#   (Source with excessing pointer casting and data access with mixed
4056#    pointer types are not recommended)
4057# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4058#   (If you expect perfect errno behavior, do not use this)
4059# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4060# -xrestrict: Pointer parameters to functions do not overlap
4061#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4062#    If you pass in multiple pointers to the same data, do not use this)
4063# -xlibmil: Inline some library routines
4064#   (If you expect perfect errno behavior, do not use this)
4065# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4066#   (If you expect perfect errno behavior, do not use this)
4067#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4068
4069    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4070    # Bug?
4071    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4072    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4073    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4074    #fi
4075
4076
4077
4078
4079
4080
4081################################################################################
4082# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4083#      conditionals against.
4084# $2 - Optional prefix for each variable defined.
4085
4086
4087# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4088#                                  IF_FALSE: [RUN-IF-FALSE])
4089# ------------------------------------------------------------
4090# Check that the C compiler supports an argument
4091
4092
4093
4094
4095# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4096#                                    IF_FALSE: [RUN-IF-FALSE])
4097# ------------------------------------------------------------
4098# Check that the C++ compiler supports an argument
4099
4100
4101
4102
4103# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4104#                                IF_FALSE: [RUN-IF-FALSE])
4105# ------------------------------------------------------------
4106# Check that the C and C++ compilers support an argument
4107
4108
4109
4110
4111# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4112#                                   IF_FALSE: [RUN-IF-FALSE])
4113# ------------------------------------------------------------
4114# Check that the linker support an argument
4115
4116
4117
4118
4119
4120
4121# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4122# Arguments:
4123# $1 - Optional prefix for each variable defined.
4124
4125
4126#
4127# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4129#
4130# This code is free software; you can redistribute it and/or modify it
4131# under the terms of the GNU General Public License version 2 only, as
4132# published by the Free Software Foundation.  Oracle designates this
4133# particular file as subject to the "Classpath" exception as provided
4134# by Oracle in the LICENSE file that accompanied this code.
4135#
4136# This code is distributed in the hope that it will be useful, but WITHOUT
4137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4139# version 2 for more details (a copy is included in the LICENSE file that
4140# accompanied this code).
4141#
4142# You should have received a copy of the GNU General Public License version
4143# 2 along with this work; if not, write to the Free Software Foundation,
4144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4145#
4146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4147# or visit www.oracle.com if you need additional information or have any
4148# questions.
4149#
4150
4151
4152
4153
4154
4155cygwin_help() {
4156  case $1 in
4157    unzip)
4158      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160      ;;
4161    zip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    make)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    freetype)
4170      HELP_MSG="
4171The freetype library can now be build during the configure process.
4172Download the freetype sources and unpack them into an arbitrary directory:
4173
4174wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4175tar -xzf freetype-2.5.3.tar.gz
4176
4177Then run configure with '--with-freetype-src=<freetype_src>'. This will
4178automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4179builds or into '<freetype_src>/lib32' for 32-bit builds.
4180Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4181and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4182
4183Alternatively you can unpack the sources like this to use the default directory:
4184
4185tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4186      ;;
4187  esac
4188}
4189
4190msys_help() {
4191  PKGHANDLER_COMMAND=""
4192}
4193
4194apt_help() {
4195  case $1 in
4196    reduced)
4197      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4198    devkit)
4199      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4200    openjdk)
4201      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4202    alsa)
4203      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4204    cups)
4205      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4206    freetype)
4207      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4208    ffi)
4209      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4210    x11)
4211      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4212    ccache)
4213      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4214    dtrace)
4215      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4216  esac
4217}
4218
4219yum_help() {
4220  case $1 in
4221    devkit)
4222      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4223    openjdk)
4224      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4225    alsa)
4226      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4227    cups)
4228      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4229    freetype)
4230      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4231    x11)
4232      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4233    ccache)
4234      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4235  esac
4236}
4237
4238brew_help() {
4239  case $1 in
4240    openjdk)
4241      PKGHANDLER_COMMAND="brew cask install java" ;;
4242    freetype)
4243      PKGHANDLER_COMMAND="brew install freetype" ;;
4244    ccache)
4245      PKGHANDLER_COMMAND="brew install ccache" ;;
4246  esac
4247}
4248
4249port_help() {
4250  PKGHANDLER_COMMAND=""
4251}
4252
4253pkgutil_help() {
4254  PKGHANDLER_COMMAND=""
4255}
4256
4257pkgadd_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261# This function will check if we're called from the "configure" wrapper while
4262# printing --help. If so, we will print out additional information that can
4263# only be extracted within the autoconf script, and then exit. This must be
4264# called at the very beginning in configure.ac.
4265
4266
4267
4268
4269
4270
4271#
4272# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4273# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4274#
4275# This code is free software; you can redistribute it and/or modify it
4276# under the terms of the GNU General Public License version 2 only, as
4277# published by the Free Software Foundation.  Oracle designates this
4278# particular file as subject to the "Classpath" exception as provided
4279# by Oracle in the LICENSE file that accompanied this code.
4280#
4281# This code is distributed in the hope that it will be useful, but WITHOUT
4282# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4283# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4284# version 2 for more details (a copy is included in the LICENSE file that
4285# accompanied this code).
4286#
4287# You should have received a copy of the GNU General Public License version
4288# 2 along with this work; if not, write to the Free Software Foundation,
4289# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4290#
4291# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4292# or visit www.oracle.com if you need additional information or have any
4293# questions.
4294#
4295
4296# All valid JVM features, regardless of platform
4297VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4298    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4299    static-build link-time-opt aot"
4300
4301# All valid JVM variants
4302VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4303
4304###############################################################################
4305# Check if the specified JVM variant should be built. To be used in shell if
4306# constructs, like this:
4307# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4308#
4309# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4310
4311# Definition kept in one line to allow inlining in if statements.
4312# Additional [] needed to keep m4 from mangling shell constructs.
4313
4314
4315###############################################################################
4316# Check if the specified JVM features are explicitly enabled. To be used in
4317# shell if constructs, like this:
4318# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4319#
4320# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4321
4322# Definition kept in one line to allow inlining in if statements.
4323# Additional [] needed to keep m4 from mangling shell constructs.
4324
4325
4326###############################################################################
4327# Check which variants of the JVM that we want to build. Available variants are:
4328#   server: normal interpreter, and a tiered C1/C2 compiler
4329#   client: normal interpreter, and C1 (no C2 compiler)
4330#   minimal: reduced form of client with optional features stripped out
4331#   core: normal interpreter only, no compiler
4332#   zero: C++ based interpreter only, no compiler
4333#   zeroshark: C++ based interpreter, and a llvm-based compiler
4334#   custom: baseline JVM with no default features
4335#
4336
4337
4338###############################################################################
4339# Check if dtrace should be enabled and has all prerequisites present.
4340#
4341
4342
4343################################################################################
4344# Check if AOT should be enabled
4345#
4346
4347
4348###############################################################################
4349# Set up all JVM features for each JVM variant.
4350#
4351
4352
4353###############################################################################
4354# Validate JVM features once all setup is complete, including custom setup.
4355#
4356
4357
4358################################################################################
4359#
4360# Specify which sources will be used to build the 64-bit ARM port
4361#
4362# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4363# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4364#
4365
4366
4367
4368################################################################################
4369# Check if gtest should be built
4370#
4371
4372
4373#
4374# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4375# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4376#
4377# This code is free software; you can redistribute it and/or modify it
4378# under the terms of the GNU General Public License version 2 only, as
4379# published by the Free Software Foundation.  Oracle designates this
4380# particular file as subject to the "Classpath" exception as provided
4381# by Oracle in the LICENSE file that accompanied this code.
4382#
4383# This code is distributed in the hope that it will be useful, but WITHOUT
4384# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4385# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4386# version 2 for more details (a copy is included in the LICENSE file that
4387# accompanied this code).
4388#
4389# You should have received a copy of the GNU General Public License version
4390# 2 along with this work; if not, write to the Free Software Foundation,
4391# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4392#
4393# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4394# or visit www.oracle.com if you need additional information or have any
4395# questions.
4396#
4397
4398###############################################################################
4399# Check which variant of the JDK that we want to build.
4400# Currently we have:
4401#    normal:   standard edition
4402# but the custom make system may add other variants
4403#
4404# Effectively the JDK variant gives a name to a specific set of
4405# modules to compile into the JDK.
4406
4407
4408###############################################################################
4409# Set the debug level
4410#    release: no debug information, all optimizations, no asserts.
4411#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4412#    fastdebug: debug information (-g), all optimizations, all asserts
4413#    slowdebug: debug information (-g), no optimizations, all asserts
4414
4415
4416###############################################################################
4417#
4418# Should we build only OpenJDK even if closed sources are present?
4419#
4420
4421
4422
4423
4424###############################################################################
4425#
4426# Enable or disable the elliptic curve crypto implementation
4427#
4428
4429
4430
4431
4432################################################################################
4433#
4434# Gcov coverage data for hotspot
4435#
4436
4437
4438################################################################################
4439#
4440# Static build support.  When enabled will generate static
4441# libraries instead of shared libraries for all JDK libs.
4442#
4443
4444
4445################################################################################
4446#
4447# jlink options.
4448# We always keep packaged modules in JDK image.
4449#
4450
4451
4452################################################################################
4453#
4454# Check if building of the jtreg failure handler should be enabled.
4455#
4456
4457
4458################################################################################
4459#
4460# Enable or disable generation of the classlist at build time
4461#
4462
4463
4464#
4465# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4466# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4467#
4468# This code is free software; you can redistribute it and/or modify it
4469# under the terms of the GNU General Public License version 2 only, as
4470# published by the Free Software Foundation.  Oracle designates this
4471# particular file as subject to the "Classpath" exception as provided
4472# by Oracle in the LICENSE file that accompanied this code.
4473#
4474# This code is distributed in the hope that it will be useful, but WITHOUT
4475# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4476# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4477# version 2 for more details (a copy is included in the LICENSE file that
4478# accompanied this code).
4479#
4480# You should have received a copy of the GNU General Public License version
4481# 2 along with this work; if not, write to the Free Software Foundation,
4482# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4483#
4484# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4485# or visit www.oracle.com if you need additional information or have any
4486# questions.
4487#
4488
4489###############################################################################
4490#
4491# Setup version numbers
4492#
4493
4494# Verify that a given string represents a valid version number, and assign it
4495# to a variable.
4496
4497# Argument 1: the variable to assign to
4498# Argument 2: the value given by the user
4499
4500
4501
4502
4503#
4504# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528# Major library component reside in separate files.
4529#
4530# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4532#
4533# This code is free software; you can redistribute it and/or modify it
4534# under the terms of the GNU General Public License version 2 only, as
4535# published by the Free Software Foundation.  Oracle designates this
4536# particular file as subject to the "Classpath" exception as provided
4537# by Oracle in the LICENSE file that accompanied this code.
4538#
4539# This code is distributed in the hope that it will be useful, but WITHOUT
4540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4542# version 2 for more details (a copy is included in the LICENSE file that
4543# accompanied this code).
4544#
4545# You should have received a copy of the GNU General Public License version
4546# 2 along with this work; if not, write to the Free Software Foundation,
4547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4548#
4549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4550# or visit www.oracle.com if you need additional information or have any
4551# questions.
4552#
4553
4554################################################################################
4555# Setup alsa (Advanced Linux Sound Architecture)
4556################################################################################
4557
4558
4559#
4560# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4562#
4563# This code is free software; you can redistribute it and/or modify it
4564# under the terms of the GNU General Public License version 2 only, as
4565# published by the Free Software Foundation.  Oracle designates this
4566# particular file as subject to the "Classpath" exception as provided
4567# by Oracle in the LICENSE file that accompanied this code.
4568#
4569# This code is distributed in the hope that it will be useful, but WITHOUT
4570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4572# version 2 for more details (a copy is included in the LICENSE file that
4573# accompanied this code).
4574#
4575# You should have received a copy of the GNU General Public License version
4576# 2 along with this work; if not, write to the Free Software Foundation,
4577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4578#
4579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4580# or visit www.oracle.com if you need additional information or have any
4581# questions.
4582#
4583
4584################################################################################
4585# Setup bundled libraries.
4586#
4587# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4588# OpenJDK repository. Default is to use these libraries as bundled, but they
4589# might be replaced by en external version by the user.
4590################################################################################
4591
4592
4593################################################################################
4594# Setup libjpeg
4595################################################################################
4596
4597
4598################################################################################
4599# Setup giflib
4600################################################################################
4601
4602
4603################################################################################
4604# Setup libpng
4605################################################################################
4606
4607
4608################################################################################
4609# Setup zlib
4610################################################################################
4611
4612
4613################################################################################
4614# Setup lcms (Little CMS)
4615################################################################################
4616
4617
4618#
4619# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4621#
4622# This code is free software; you can redistribute it and/or modify it
4623# under the terms of the GNU General Public License version 2 only, as
4624# published by the Free Software Foundation.  Oracle designates this
4625# particular file as subject to the "Classpath" exception as provided
4626# by Oracle in the LICENSE file that accompanied this code.
4627#
4628# This code is distributed in the hope that it will be useful, but WITHOUT
4629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4631# version 2 for more details (a copy is included in the LICENSE file that
4632# accompanied this code).
4633#
4634# You should have received a copy of the GNU General Public License version
4635# 2 along with this work; if not, write to the Free Software Foundation,
4636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4637#
4638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639# or visit www.oracle.com if you need additional information or have any
4640# questions.
4641#
4642
4643################################################################################
4644# Setup cups (Common Unix Printing System)
4645################################################################################
4646
4647
4648#
4649# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4651#
4652# This code is free software; you can redistribute it and/or modify it
4653# under the terms of the GNU General Public License version 2 only, as
4654# published by the Free Software Foundation.  Oracle designates this
4655# particular file as subject to the "Classpath" exception as provided
4656# by Oracle in the LICENSE file that accompanied this code.
4657#
4658# This code is distributed in the hope that it will be useful, but WITHOUT
4659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4661# version 2 for more details (a copy is included in the LICENSE file that
4662# accompanied this code).
4663#
4664# You should have received a copy of the GNU General Public License version
4665# 2 along with this work; if not, write to the Free Software Foundation,
4666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4667#
4668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4669# or visit www.oracle.com if you need additional information or have any
4670# questions.
4671#
4672
4673################################################################################
4674# Setup libffi (Foreign Function Interface)
4675################################################################################
4676
4677
4678#
4679# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4680# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4681#
4682# This code is free software; you can redistribute it and/or modify it
4683# under the terms of the GNU General Public License version 2 only, as
4684# published by the Free Software Foundation.  Oracle designates this
4685# particular file as subject to the "Classpath" exception as provided
4686# by Oracle in the LICENSE file that accompanied this code.
4687#
4688# This code is distributed in the hope that it will be useful, but WITHOUT
4689# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4690# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4691# version 2 for more details (a copy is included in the LICENSE file that
4692# accompanied this code).
4693#
4694# You should have received a copy of the GNU General Public License version
4695# 2 along with this work; if not, write to the Free Software Foundation,
4696# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4697#
4698# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4699# or visit www.oracle.com if you need additional information or have any
4700# questions.
4701#
4702
4703################################################################################
4704# Build the freetype lib from source
4705################################################################################
4706
4707
4708################################################################################
4709# Check if a potential freeype library match is correct and usable
4710################################################################################
4711
4712
4713################################################################################
4714# Setup freetype (The FreeType2 font rendering library)
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################################################################################
4744# Setup the standard C/C++ runtime libraries.
4745#
4746# Most importantly, determine if stdc++ should be linked statically or
4747# dynamically.
4748################################################################################
4749
4750
4751#
4752# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754#
4755# This code is free software; you can redistribute it and/or modify it
4756# under the terms of the GNU General Public License version 2 only, as
4757# published by the Free Software Foundation.  Oracle designates this
4758# particular file as subject to the "Classpath" exception as provided
4759# by Oracle in the LICENSE file that accompanied this code.
4760#
4761# This code is distributed in the hope that it will be useful, but WITHOUT
4762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764# version 2 for more details (a copy is included in the LICENSE file that
4765# accompanied this code).
4766#
4767# You should have received a copy of the GNU General Public License version
4768# 2 along with this work; if not, write to the Free Software Foundation,
4769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770#
4771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772# or visit www.oracle.com if you need additional information or have any
4773# questions.
4774#
4775
4776################################################################################
4777# Setup X11 Windows system
4778################################################################################
4779
4780
4781
4782################################################################################
4783# Determine which libraries are needed for this configuration
4784################################################################################
4785
4786
4787################################################################################
4788# Parse library options, and setup needed libraries
4789################################################################################
4790
4791
4792################################################################################
4793# Setup llvm (Low-Level VM)
4794################################################################################
4795
4796
4797################################################################################
4798# Setup various libraries, typically small system libraries
4799################################################################################
4800
4801
4802################################################################################
4803# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4804# redistribute it in the test image.
4805################################################################################
4806
4807
4808
4809#
4810# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4811# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4812#
4813# This code is free software; you can redistribute it and/or modify it
4814# under the terms of the GNU General Public License version 2 only, as
4815# published by the Free Software Foundation.  Oracle designates this
4816# particular file as subject to the "Classpath" exception as provided
4817# by Oracle in the LICENSE file that accompanied this code.
4818#
4819# This code is distributed in the hope that it will be useful, but WITHOUT
4820# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4821# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4822# version 2 for more details (a copy is included in the LICENSE file that
4823# accompanied this code).
4824#
4825# You should have received a copy of the GNU General Public License version
4826# 2 along with this work; if not, write to the Free Software Foundation,
4827# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4828#
4829# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4830# or visit www.oracle.com if you need additional information or have any
4831# questions.
4832#
4833
4834# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4835# Converts autoconf style CPU name to OpenJDK style, into
4836# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4837
4838
4839# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4840# Converts autoconf style OS name to OpenJDK style, into
4841# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4842
4843
4844# Expects $host_os $host_cpu $build_os and $build_cpu
4845# and $with_target_bits to have been setup!
4846#
4847# Translate the standard triplet(quadruplet) definition
4848# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4849# OPENJDK_BUILD_OS, etc.
4850
4851
4852# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4853# accordingly. Must be done after setting up build and target system, but before
4854# doing anything else with these values.
4855
4856
4857# Setup the legacy variables, for controlling the old makefiles.
4858#
4859
4860
4861# $1 - Either TARGET or BUILD to setup the variables for.
4862
4863
4864
4865
4866
4867
4868#%%% Build and target systems %%%
4869
4870
4871
4872
4873# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4874# Add -mX to various FLAGS variables.
4875
4876
4877
4878
4879
4880
4881#
4882# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4883# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4884#
4885# This code is free software; you can redistribute it and/or modify it
4886# under the terms of the GNU General Public License version 2 only, as
4887# published by the Free Software Foundation.  Oracle designates this
4888# particular file as subject to the "Classpath" exception as provided
4889# by Oracle in the LICENSE file that accompanied this code.
4890#
4891# This code is distributed in the hope that it will be useful, but WITHOUT
4892# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4893# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4894# version 2 for more details (a copy is included in the LICENSE file that
4895# accompanied this code).
4896#
4897# You should have received a copy of the GNU General Public License version
4898# 2 along with this work; if not, write to the Free Software Foundation,
4899# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4900#
4901# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4902# or visit www.oracle.com if you need additional information or have any
4903# questions.
4904#
4905
4906
4907
4908
4909
4910
4911
4912################################################################################
4913# Define a mechanism for importing extra prebuilt modules
4914#
4915
4916
4917
4918#
4919# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4920# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4921#
4922# This code is free software; you can redistribute it and/or modify it
4923# under the terms of the GNU General Public License version 2 only, as
4924# published by the Free Software Foundation.  Oracle designates this
4925# particular file as subject to the "Classpath" exception as provided
4926# by Oracle in the LICENSE file that accompanied this code.
4927#
4928# This code is distributed in the hope that it will be useful, but WITHOUT
4929# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4930# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4931# version 2 for more details (a copy is included in the LICENSE file that
4932# accompanied this code).
4933#
4934# You should have received a copy of the GNU General Public License version
4935# 2 along with this work; if not, write to the Free Software Foundation,
4936# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4937#
4938# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4939# or visit www.oracle.com if you need additional information or have any
4940# questions.
4941#
4942
4943########################################################################
4944# This file is responsible for detecting, verifying and setting up the
4945# toolchain, i.e. the compiler, linker and related utilities. It will setup
4946# proper paths to the binaries, but it will not setup any flags.
4947#
4948# The binaries used is determined by the toolchain type, which is the family of
4949# compilers and related tools that are used.
4950########################################################################
4951
4952
4953# All valid toolchains, regardless of platform (used by help.m4)
4954VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4955
4956# These toolchains are valid on different platforms
4957VALID_TOOLCHAINS_linux="gcc clang"
4958VALID_TOOLCHAINS_solaris="solstudio"
4959VALID_TOOLCHAINS_macosx="gcc clang"
4960VALID_TOOLCHAINS_aix="xlc"
4961VALID_TOOLCHAINS_windows="microsoft"
4962
4963# Toolchain descriptions
4964TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4965TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4966TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4967TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4968TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4969
4970# Minimum supported versions, empty means unspecified
4971TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4972TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4973TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4974TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4975TOOLCHAIN_MINIMUM_VERSION_xlc=""
4976
4977# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4978# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4979# $1 - optional variable prefix for compiler and version variables (BUILD_)
4980# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4981
4982
4983# Check if the configured compiler (C and C++) is of a specific version or
4984# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4985#
4986# Arguments:
4987#   VERSION:   The version string to check against the found version
4988#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4989#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4990#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4991
4992
4993
4994
4995# Setup a number of variables describing how native output files are
4996# named on this platform/toolchain.
4997
4998
4999# Determine which toolchain type to use, and make sure it is valid for this
5000# platform. Setup various information about the selected toolchain.
5001
5002
5003# Before we start detecting the toolchain executables, we might need some
5004# special setup, e.g. additional paths etc.
5005
5006
5007# Restore path, etc
5008
5009
5010# Check if a compiler is of the toolchain type we expect, and save the version
5011# information from it. If the compiler does not match the expected type,
5012# this function will abort using AC_MSG_ERROR. If it matches, the version will
5013# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5014# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5015#
5016# $1 = compiler to test (CC or CXX)
5017# $2 = human readable name of compiler (C or C++)
5018
5019
5020# Try to locate the given C or C++ compiler in the path, or otherwise.
5021#
5022# $1 = compiler to test (CC or CXX)
5023# $2 = human readable name of compiler (C or C++)
5024# $3 = compiler name to search for
5025
5026
5027# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5028# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5029# archiver (AR). Verify that the compilers are correct according to the
5030# toolchain type.
5031
5032
5033# Setup additional tools that is considered a part of the toolchain, but not the
5034# core part. Many of these are highly platform-specific and do not exist,
5035# and/or are not needed on all platforms.
5036
5037
5038# Setup the build tools (i.e, the compiler and linker used to build programs
5039# that should be run on the build platform, not the target platform, as a build
5040# helper). Since the non-cross-compile case uses the normal, target compilers
5041# for this, we can only do this after these have been setup.
5042
5043
5044# Do some additional checks on the detected tools.
5045
5046
5047# Setup the JTReg Regression Test Harness.
5048
5049
5050# Setup the JIB dependency resolver
5051
5052
5053#
5054# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5055# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5056#
5057# This code is free software; you can redistribute it and/or modify it
5058# under the terms of the GNU General Public License version 2 only, as
5059# published by the Free Software Foundation.  Oracle designates this
5060# particular file as subject to the "Classpath" exception as provided
5061# by Oracle in the LICENSE file that accompanied this code.
5062#
5063# This code is distributed in the hope that it will be useful, but WITHOUT
5064# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5065# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5066# version 2 for more details (a copy is included in the LICENSE file that
5067# accompanied this code).
5068#
5069# You should have received a copy of the GNU General Public License version
5070# 2 along with this work; if not, write to the Free Software Foundation,
5071# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5072#
5073# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5074# or visit www.oracle.com if you need additional information or have any
5075# questions.
5076#
5077
5078################################################################################
5079# The order of these defines the priority by which we try to find them.
5080VALID_VS_VERSIONS="2013 2012 2010"
5081
5082VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5083VS_VERSION_INTERNAL_2010=100
5084VS_MSVCR_2010=msvcr100.dll
5085# We don't use msvcp on Visual Studio 2010
5086#VS_MSVCP_2010=msvcp100.dll
5087VS_ENVVAR_2010="VS100COMNTOOLS"
5088VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5089VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5090VS_VS_PLATFORM_NAME_2010="v100"
5091VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5092
5093VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5094VS_VERSION_INTERNAL_2012=110
5095VS_MSVCR_2012=msvcr110.dll
5096VS_MSVCP_2012=msvcp110.dll
5097VS_ENVVAR_2012="VS110COMNTOOLS"
5098VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5099VS_SDK_INSTALLDIR_2012=
5100VS_VS_PLATFORM_NAME_2012="v110"
5101VS_SDK_PLATFORM_NAME_2012=
5102
5103VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5104VS_VERSION_INTERNAL_2013=120
5105VS_MSVCR_2013=msvcr120.dll
5106VS_MSVCP_2013=msvcp120.dll
5107VS_ENVVAR_2013="VS120COMNTOOLS"
5108VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5109VS_SDK_INSTALLDIR_2013=
5110VS_VS_PLATFORM_NAME_2013="v120"
5111VS_SDK_PLATFORM_NAME_2013=
5112
5113################################################################################
5114
5115
5116
5117################################################################################
5118
5119
5120
5121################################################################################
5122# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5123# build environment and assigns it to VS_ENV_CMD
5124
5125
5126################################################################################
5127
5128
5129
5130################################################################################
5131# Check if the VS env variables were setup prior to running configure.
5132# If not, then find vcvarsall.bat and run it automatically, and integrate
5133# the set env variables into the spec file.
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148# This line needs to be here, verbatim, after all includes and the dummy hook
5149# definitions. It is replaced with custom functionality when building
5150# custom sources.
5151#CUSTOM_AUTOCONF_INCLUDE
5152
5153# Do not change or remove the following line, it is needed for consistency checks:
5154DATE_WHEN_GENERATED=1503331668
5155
5156###############################################################################
5157#
5158# Initialization / Boot-strapping
5159#
5160# The bootstrapping process needs to solve the "chicken or the egg" problem,
5161# thus it jumps back and forth, each time gaining something needed later on.
5162#
5163###############################################################################
5164
5165# If we are requested to print additional help, do that and then exit.
5166# This must be the very first call.
5167
5168  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5169
5170    # Print available toolchains
5171    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5172    $PRINTF "Which are valid to use depends on the build platform.\n"
5173    for toolchain in $VALID_TOOLCHAINS_all; do
5174      # Use indirect variable referencing
5175      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5176      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5177      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5178    done
5179    $PRINTF "\n"
5180
5181    # Print available jvm features
5182    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5183    $PRINTF "Which are valid to use depends on the target platform.\n  "
5184    $PRINTF "%s " $VALID_JVM_FEATURES
5185    $PRINTF "\n"
5186
5187    # And now exit directly
5188    exit 0
5189  fi
5190
5191
5192# Basic initialization that must happen first of all in the normal process.
5193
5194  # Save the original command line. This is passed to us by the wrapper configure script.
5195
5196  # Save the path variable before it gets changed
5197  ORIGINAL_PATH="$PATH"
5198
5199  DATE_WHEN_CONFIGURED=`LANG=C date`
5200
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5202$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5204$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5205
5206
5207  # Start with tools that do not need have cross compilation support
5208  # and can be expected to be found in the default PATH. These tools are
5209  # used by configure.
5210
5211  # First are all the simple required tools.
5212
5213
5214
5215  # Publish this variable in the help.
5216
5217
5218  if [ -z "${BASENAME+x}" ]; then
5219    # The variable is not set by user, try to locate tool using the code snippet
5220    for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265  else
5266    # The variable is set, but is it from the command line or the environment?
5267
5268    # Try to remove the string !BASENAME! from our list.
5269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5271      # If it failed, the variable was not from the command line. Ignore it,
5272      # but warn the user (except for BASH, which is always set by the calling BASH).
5273      if test "xBASENAME" != xBASH; then
5274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5275$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5276      fi
5277      # Try to locate tool using the code snippet
5278      for ac_prog in basename
5279do
5280  # Extract the first word of "$ac_prog", so it can be a program name with args.
5281set dummy $ac_prog; ac_word=$2
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5283$as_echo_n "checking for $ac_word... " >&6; }
5284if ${ac_cv_path_BASENAME+:} false; then :
5285  $as_echo_n "(cached) " >&6
5286else
5287  case $BASENAME in
5288  [\\/]* | ?:[\\/]*)
5289  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5290  ;;
5291  *)
5292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5293for as_dir in $PATH
5294do
5295  IFS=$as_save_IFS
5296  test -z "$as_dir" && as_dir=.
5297    for ac_exec_ext in '' $ac_executable_extensions; do
5298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5299    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307  ;;
5308esac
5309fi
5310BASENAME=$ac_cv_path_BASENAME
5311if test -n "$BASENAME"; then
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5313$as_echo "$BASENAME" >&6; }
5314else
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316$as_echo "no" >&6; }
5317fi
5318
5319
5320  test -n "$BASENAME" && break
5321done
5322
5323    else
5324      # If it succeeded, then it was overridden by the user. We will use it
5325      # for the tool.
5326
5327      # First remove it from the list of overridden variables, so we can test
5328      # for unknown variables in the end.
5329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5330
5331      # Check if we try to supply an empty value
5332      if test "x$BASENAME" = x; then
5333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5334$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5336$as_echo_n "checking for BASENAME... " >&6; }
5337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5338$as_echo "disabled" >&6; }
5339      else
5340        # Check if the provided tool contains a complete path.
5341        tool_specified="$BASENAME"
5342        tool_basename="${tool_specified##*/}"
5343        if test "x$tool_basename" = "x$tool_specified"; then
5344          # A command without a complete path is provided, search $PATH.
5345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5346$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5347          # Extract the first word of "$tool_basename", so it can be a program name with args.
5348set dummy $tool_basename; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if ${ac_cv_path_BASENAME+:} false; then :
5352  $as_echo_n "(cached) " >&6
5353else
5354  case $BASENAME in
5355  [\\/]* | ?:[\\/]*)
5356  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5357  ;;
5358  *)
5359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362  IFS=$as_save_IFS
5363  test -z "$as_dir" && as_dir=.
5364    for ac_exec_ext in '' $ac_executable_extensions; do
5365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5366    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368    break 2
5369  fi
5370done
5371  done
5372IFS=$as_save_IFS
5373
5374  ;;
5375esac
5376fi
5377BASENAME=$ac_cv_path_BASENAME
5378if test -n "$BASENAME"; then
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5380$as_echo "$BASENAME" >&6; }
5381else
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385
5386
5387          if test "x$BASENAME" = x; then
5388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5389          fi
5390        else
5391          # Otherwise we believe it is a complete path. Use it as it is.
5392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5393$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5395$as_echo_n "checking for BASENAME... " >&6; }
5396          if test ! -x "$tool_specified"; then
5397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5398$as_echo "not found" >&6; }
5399            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5400          fi
5401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5402$as_echo "$tool_specified" >&6; }
5403        fi
5404      fi
5405    fi
5406
5407  fi
5408
5409
5410
5411  if test "x$BASENAME" = x; then
5412    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5413  fi
5414
5415
5416
5417
5418
5419  # Publish this variable in the help.
5420
5421
5422  if [ -z "${BASH+x}" ]; then
5423    # The variable is not set by user, try to locate tool using the code snippet
5424    for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469  else
5470    # The variable is set, but is it from the command line or the environment?
5471
5472    # Try to remove the string !BASH! from our list.
5473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5475      # If it failed, the variable was not from the command line. Ignore it,
5476      # but warn the user (except for BASH, which is always set by the calling BASH).
5477      if test "xBASH" != xBASH; then
5478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5479$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5480      fi
5481      # Try to locate tool using the code snippet
5482      for ac_prog in bash
5483do
5484  # Extract the first word of "$ac_prog", so it can be a program name with args.
5485set dummy $ac_prog; ac_word=$2
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487$as_echo_n "checking for $ac_word... " >&6; }
5488if ${ac_cv_path_BASH+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491  case $BASH in
5492  [\\/]* | ?:[\\/]*)
5493  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5494  ;;
5495  *)
5496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  test -z "$as_dir" && as_dir=.
5501    for ac_exec_ext in '' $ac_executable_extensions; do
5502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5503    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505    break 2
5506  fi
5507done
5508  done
5509IFS=$as_save_IFS
5510
5511  ;;
5512esac
5513fi
5514BASH=$ac_cv_path_BASH
5515if test -n "$BASH"; then
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5517$as_echo "$BASH" >&6; }
5518else
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524  test -n "$BASH" && break
5525done
5526
5527    else
5528      # If it succeeded, then it was overridden by the user. We will use it
5529      # for the tool.
5530
5531      # First remove it from the list of overridden variables, so we can test
5532      # for unknown variables in the end.
5533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5534
5535      # Check if we try to supply an empty value
5536      if test "x$BASH" = x; then
5537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5538$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5540$as_echo_n "checking for BASH... " >&6; }
5541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5542$as_echo "disabled" >&6; }
5543      else
5544        # Check if the provided tool contains a complete path.
5545        tool_specified="$BASH"
5546        tool_basename="${tool_specified##*/}"
5547        if test "x$tool_basename" = "x$tool_specified"; then
5548          # A command without a complete path is provided, search $PATH.
5549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5550$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5551          # Extract the first word of "$tool_basename", so it can be a program name with args.
5552set dummy $tool_basename; ac_word=$2
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554$as_echo_n "checking for $ac_word... " >&6; }
5555if ${ac_cv_path_BASH+:} false; then :
5556  $as_echo_n "(cached) " >&6
5557else
5558  case $BASH in
5559  [\\/]* | ?:[\\/]*)
5560  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5561  ;;
5562  *)
5563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564for as_dir in $PATH
5565do
5566  IFS=$as_save_IFS
5567  test -z "$as_dir" && as_dir=.
5568    for ac_exec_ext in '' $ac_executable_extensions; do
5569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5570    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5572    break 2
5573  fi
5574done
5575  done
5576IFS=$as_save_IFS
5577
5578  ;;
5579esac
5580fi
5581BASH=$ac_cv_path_BASH
5582if test -n "$BASH"; then
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5584$as_echo "$BASH" >&6; }
5585else
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587$as_echo "no" >&6; }
5588fi
5589
5590
5591          if test "x$BASH" = x; then
5592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5593          fi
5594        else
5595          # Otherwise we believe it is a complete path. Use it as it is.
5596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5597$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5599$as_echo_n "checking for BASH... " >&6; }
5600          if test ! -x "$tool_specified"; then
5601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5602$as_echo "not found" >&6; }
5603            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5604          fi
5605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5606$as_echo "$tool_specified" >&6; }
5607        fi
5608      fi
5609    fi
5610
5611  fi
5612
5613
5614
5615  if test "x$BASH" = x; then
5616    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5617  fi
5618
5619
5620
5621
5622
5623  # Publish this variable in the help.
5624
5625
5626  if [ -z "${CAT+x}" ]; then
5627    # The variable is not set by user, try to locate tool using the code snippet
5628    for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673  else
5674    # The variable is set, but is it from the command line or the environment?
5675
5676    # Try to remove the string !CAT! from our list.
5677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5679      # If it failed, the variable was not from the command line. Ignore it,
5680      # but warn the user (except for BASH, which is always set by the calling BASH).
5681      if test "xCAT" != xBASH; then
5682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5683$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5684      fi
5685      # Try to locate tool using the code snippet
5686      for ac_prog in cat
5687do
5688  # Extract the first word of "$ac_prog", so it can be a program name with args.
5689set dummy $ac_prog; ac_word=$2
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5691$as_echo_n "checking for $ac_word... " >&6; }
5692if ${ac_cv_path_CAT+:} false; then :
5693  $as_echo_n "(cached) " >&6
5694else
5695  case $CAT in
5696  [\\/]* | ?:[\\/]*)
5697  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5698  ;;
5699  *)
5700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715  ;;
5716esac
5717fi
5718CAT=$ac_cv_path_CAT
5719if test -n "$CAT"; then
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5721$as_echo "$CAT" >&6; }
5722else
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725fi
5726
5727
5728  test -n "$CAT" && break
5729done
5730
5731    else
5732      # If it succeeded, then it was overridden by the user. We will use it
5733      # for the tool.
5734
5735      # First remove it from the list of overridden variables, so we can test
5736      # for unknown variables in the end.
5737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5738
5739      # Check if we try to supply an empty value
5740      if test "x$CAT" = x; then
5741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5742$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5744$as_echo_n "checking for CAT... " >&6; }
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5746$as_echo "disabled" >&6; }
5747      else
5748        # Check if the provided tool contains a complete path.
5749        tool_specified="$CAT"
5750        tool_basename="${tool_specified##*/}"
5751        if test "x$tool_basename" = "x$tool_specified"; then
5752          # A command without a complete path is provided, search $PATH.
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5754$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5755          # Extract the first word of "$tool_basename", so it can be a program name with args.
5756set dummy $tool_basename; ac_word=$2
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if ${ac_cv_path_CAT+:} false; then :
5760  $as_echo_n "(cached) " >&6
5761else
5762  case $CAT in
5763  [\\/]* | ?:[\\/]*)
5764  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5765  ;;
5766  *)
5767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770  IFS=$as_save_IFS
5771  test -z "$as_dir" && as_dir=.
5772    for ac_exec_ext in '' $ac_executable_extensions; do
5773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5774    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5776    break 2
5777  fi
5778done
5779  done
5780IFS=$as_save_IFS
5781
5782  ;;
5783esac
5784fi
5785CAT=$ac_cv_path_CAT
5786if test -n "$CAT"; then
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5788$as_echo "$CAT" >&6; }
5789else
5790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792fi
5793
5794
5795          if test "x$CAT" = x; then
5796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5797          fi
5798        else
5799          # Otherwise we believe it is a complete path. Use it as it is.
5800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5801$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5803$as_echo_n "checking for CAT... " >&6; }
5804          if test ! -x "$tool_specified"; then
5805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5806$as_echo "not found" >&6; }
5807            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5808          fi
5809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5810$as_echo "$tool_specified" >&6; }
5811        fi
5812      fi
5813    fi
5814
5815  fi
5816
5817
5818
5819  if test "x$CAT" = x; then
5820    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5821  fi
5822
5823
5824
5825
5826
5827  # Publish this variable in the help.
5828
5829
5830  if [ -z "${CHMOD+x}" ]; then
5831    # The variable is not set by user, try to locate tool using the code snippet
5832    for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877  else
5878    # The variable is set, but is it from the command line or the environment?
5879
5880    # Try to remove the string !CHMOD! from our list.
5881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5883      # If it failed, the variable was not from the command line. Ignore it,
5884      # but warn the user (except for BASH, which is always set by the calling BASH).
5885      if test "xCHMOD" != xBASH; then
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5887$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5888      fi
5889      # Try to locate tool using the code snippet
5890      for ac_prog in chmod
5891do
5892  # Extract the first word of "$ac_prog", so it can be a program name with args.
5893set dummy $ac_prog; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if ${ac_cv_path_CHMOD+:} false; then :
5897  $as_echo_n "(cached) " >&6
5898else
5899  case $CHMOD in
5900  [\\/]* | ?:[\\/]*)
5901  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5902  ;;
5903  *)
5904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907  IFS=$as_save_IFS
5908  test -z "$as_dir" && as_dir=.
5909    for ac_exec_ext in '' $ac_executable_extensions; do
5910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5911    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913    break 2
5914  fi
5915done
5916  done
5917IFS=$as_save_IFS
5918
5919  ;;
5920esac
5921fi
5922CHMOD=$ac_cv_path_CHMOD
5923if test -n "$CHMOD"; then
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5925$as_echo "$CHMOD" >&6; }
5926else
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932  test -n "$CHMOD" && break
5933done
5934
5935    else
5936      # If it succeeded, then it was overridden by the user. We will use it
5937      # for the tool.
5938
5939      # First remove it from the list of overridden variables, so we can test
5940      # for unknown variables in the end.
5941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5942
5943      # Check if we try to supply an empty value
5944      if test "x$CHMOD" = x; then
5945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5946$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5948$as_echo_n "checking for CHMOD... " >&6; }
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5950$as_echo "disabled" >&6; }
5951      else
5952        # Check if the provided tool contains a complete path.
5953        tool_specified="$CHMOD"
5954        tool_basename="${tool_specified##*/}"
5955        if test "x$tool_basename" = "x$tool_specified"; then
5956          # A command without a complete path is provided, search $PATH.
5957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5958$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5959          # Extract the first word of "$tool_basename", so it can be a program name with args.
5960set dummy $tool_basename; ac_word=$2
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5962$as_echo_n "checking for $ac_word... " >&6; }
5963if ${ac_cv_path_CHMOD+:} false; then :
5964  $as_echo_n "(cached) " >&6
5965else
5966  case $CHMOD in
5967  [\\/]* | ?:[\\/]*)
5968  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5969  ;;
5970  *)
5971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972for as_dir in $PATH
5973do
5974  IFS=$as_save_IFS
5975  test -z "$as_dir" && as_dir=.
5976    for ac_exec_ext in '' $ac_executable_extensions; do
5977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5978    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5980    break 2
5981  fi
5982done
5983  done
5984IFS=$as_save_IFS
5985
5986  ;;
5987esac
5988fi
5989CHMOD=$ac_cv_path_CHMOD
5990if test -n "$CHMOD"; then
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5992$as_echo "$CHMOD" >&6; }
5993else
5994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
5996fi
5997
5998
5999          if test "x$CHMOD" = x; then
6000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6001          fi
6002        else
6003          # Otherwise we believe it is a complete path. Use it as it is.
6004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6005$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6007$as_echo_n "checking for CHMOD... " >&6; }
6008          if test ! -x "$tool_specified"; then
6009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6010$as_echo "not found" >&6; }
6011            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6012          fi
6013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6014$as_echo "$tool_specified" >&6; }
6015        fi
6016      fi
6017    fi
6018
6019  fi
6020
6021
6022
6023  if test "x$CHMOD" = x; then
6024    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6025  fi
6026
6027
6028
6029
6030
6031  # Publish this variable in the help.
6032
6033
6034  if [ -z "${CMP+x}" ]; then
6035    # The variable is not set by user, try to locate tool using the code snippet
6036    for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081  else
6082    # The variable is set, but is it from the command line or the environment?
6083
6084    # Try to remove the string !CMP! from our list.
6085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6087      # If it failed, the variable was not from the command line. Ignore it,
6088      # but warn the user (except for BASH, which is always set by the calling BASH).
6089      if test "xCMP" != xBASH; then
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6091$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6092      fi
6093      # Try to locate tool using the code snippet
6094      for ac_prog in cmp
6095do
6096  # Extract the first word of "$ac_prog", so it can be a program name with args.
6097set dummy $ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_path_CMP+:} false; then :
6101  $as_echo_n "(cached) " >&6
6102else
6103  case $CMP in
6104  [\\/]* | ?:[\\/]*)
6105  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6106  ;;
6107  *)
6108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111  IFS=$as_save_IFS
6112  test -z "$as_dir" && as_dir=.
6113    for ac_exec_ext in '' $ac_executable_extensions; do
6114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6115    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117    break 2
6118  fi
6119done
6120  done
6121IFS=$as_save_IFS
6122
6123  ;;
6124esac
6125fi
6126CMP=$ac_cv_path_CMP
6127if test -n "$CMP"; then
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6129$as_echo "$CMP" >&6; }
6130else
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
6133fi
6134
6135
6136  test -n "$CMP" && break
6137done
6138
6139    else
6140      # If it succeeded, then it was overridden by the user. We will use it
6141      # for the tool.
6142
6143      # First remove it from the list of overridden variables, so we can test
6144      # for unknown variables in the end.
6145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6146
6147      # Check if we try to supply an empty value
6148      if test "x$CMP" = x; then
6149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6150$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6152$as_echo_n "checking for CMP... " >&6; }
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6154$as_echo "disabled" >&6; }
6155      else
6156        # Check if the provided tool contains a complete path.
6157        tool_specified="$CMP"
6158        tool_basename="${tool_specified##*/}"
6159        if test "x$tool_basename" = "x$tool_specified"; then
6160          # A command without a complete path is provided, search $PATH.
6161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6162$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6163          # Extract the first word of "$tool_basename", so it can be a program name with args.
6164set dummy $tool_basename; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_CMP+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $CMP in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193CMP=$ac_cv_path_CMP
6194if test -n "$CMP"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6196$as_echo "$CMP" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203          if test "x$CMP" = x; then
6204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6205          fi
6206        else
6207          # Otherwise we believe it is a complete path. Use it as it is.
6208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6209$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6211$as_echo_n "checking for CMP... " >&6; }
6212          if test ! -x "$tool_specified"; then
6213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6214$as_echo "not found" >&6; }
6215            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6216          fi
6217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6218$as_echo "$tool_specified" >&6; }
6219        fi
6220      fi
6221    fi
6222
6223  fi
6224
6225
6226
6227  if test "x$CMP" = x; then
6228    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6229  fi
6230
6231
6232
6233
6234
6235  # Publish this variable in the help.
6236
6237
6238  if [ -z "${COMM+x}" ]; then
6239    # The variable is not set by user, try to locate tool using the code snippet
6240    for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285  else
6286    # The variable is set, but is it from the command line or the environment?
6287
6288    # Try to remove the string !COMM! from our list.
6289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6291      # If it failed, the variable was not from the command line. Ignore it,
6292      # but warn the user (except for BASH, which is always set by the calling BASH).
6293      if test "xCOMM" != xBASH; then
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6295$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6296      fi
6297      # Try to locate tool using the code snippet
6298      for ac_prog in comm
6299do
6300  # Extract the first word of "$ac_prog", so it can be a program name with args.
6301set dummy $ac_prog; ac_word=$2
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6303$as_echo_n "checking for $ac_word... " >&6; }
6304if ${ac_cv_path_COMM+:} false; then :
6305  $as_echo_n "(cached) " >&6
6306else
6307  case $COMM in
6308  [\\/]* | ?:[\\/]*)
6309  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6310  ;;
6311  *)
6312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315  IFS=$as_save_IFS
6316  test -z "$as_dir" && as_dir=.
6317    for ac_exec_ext in '' $ac_executable_extensions; do
6318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6319    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321    break 2
6322  fi
6323done
6324  done
6325IFS=$as_save_IFS
6326
6327  ;;
6328esac
6329fi
6330COMM=$ac_cv_path_COMM
6331if test -n "$COMM"; then
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6333$as_echo "$COMM" >&6; }
6334else
6335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
6337fi
6338
6339
6340  test -n "$COMM" && break
6341done
6342
6343    else
6344      # If it succeeded, then it was overridden by the user. We will use it
6345      # for the tool.
6346
6347      # First remove it from the list of overridden variables, so we can test
6348      # for unknown variables in the end.
6349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6350
6351      # Check if we try to supply an empty value
6352      if test "x$COMM" = x; then
6353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6354$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6356$as_echo_n "checking for COMM... " >&6; }
6357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6358$as_echo "disabled" >&6; }
6359      else
6360        # Check if the provided tool contains a complete path.
6361        tool_specified="$COMM"
6362        tool_basename="${tool_specified##*/}"
6363        if test "x$tool_basename" = "x$tool_specified"; then
6364          # A command without a complete path is provided, search $PATH.
6365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6366$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6367          # Extract the first word of "$tool_basename", so it can be a program name with args.
6368set dummy $tool_basename; ac_word=$2
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370$as_echo_n "checking for $ac_word... " >&6; }
6371if ${ac_cv_path_COMM+:} false; then :
6372  $as_echo_n "(cached) " >&6
6373else
6374  case $COMM in
6375  [\\/]* | ?:[\\/]*)
6376  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6377  ;;
6378  *)
6379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380for as_dir in $PATH
6381do
6382  IFS=$as_save_IFS
6383  test -z "$as_dir" && as_dir=.
6384    for ac_exec_ext in '' $ac_executable_extensions; do
6385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6386    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6388    break 2
6389  fi
6390done
6391  done
6392IFS=$as_save_IFS
6393
6394  ;;
6395esac
6396fi
6397COMM=$ac_cv_path_COMM
6398if test -n "$COMM"; then
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6400$as_echo "$COMM" >&6; }
6401else
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6403$as_echo "no" >&6; }
6404fi
6405
6406
6407          if test "x$COMM" = x; then
6408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6409          fi
6410        else
6411          # Otherwise we believe it is a complete path. Use it as it is.
6412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6413$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6415$as_echo_n "checking for COMM... " >&6; }
6416          if test ! -x "$tool_specified"; then
6417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6418$as_echo "not found" >&6; }
6419            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6420          fi
6421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6422$as_echo "$tool_specified" >&6; }
6423        fi
6424      fi
6425    fi
6426
6427  fi
6428
6429
6430
6431  if test "x$COMM" = x; then
6432    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6433  fi
6434
6435
6436
6437
6438
6439  # Publish this variable in the help.
6440
6441
6442  if [ -z "${CP+x}" ]; then
6443    # The variable is not set by user, try to locate tool using the code snippet
6444    for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489  else
6490    # The variable is set, but is it from the command line or the environment?
6491
6492    # Try to remove the string !CP! from our list.
6493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6495      # If it failed, the variable was not from the command line. Ignore it,
6496      # but warn the user (except for BASH, which is always set by the calling BASH).
6497      if test "xCP" != xBASH; then
6498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6499$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6500      fi
6501      # Try to locate tool using the code snippet
6502      for ac_prog in cp
6503do
6504  # Extract the first word of "$ac_prog", so it can be a program name with args.
6505set dummy $ac_prog; ac_word=$2
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6507$as_echo_n "checking for $ac_word... " >&6; }
6508if ${ac_cv_path_CP+:} false; then :
6509  $as_echo_n "(cached) " >&6
6510else
6511  case $CP in
6512  [\\/]* | ?:[\\/]*)
6513  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6514  ;;
6515  *)
6516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH
6518do
6519  IFS=$as_save_IFS
6520  test -z "$as_dir" && as_dir=.
6521    for ac_exec_ext in '' $ac_executable_extensions; do
6522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525    break 2
6526  fi
6527done
6528  done
6529IFS=$as_save_IFS
6530
6531  ;;
6532esac
6533fi
6534CP=$ac_cv_path_CP
6535if test -n "$CP"; then
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6537$as_echo "$CP" >&6; }
6538else
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544  test -n "$CP" && break
6545done
6546
6547    else
6548      # If it succeeded, then it was overridden by the user. We will use it
6549      # for the tool.
6550
6551      # First remove it from the list of overridden variables, so we can test
6552      # for unknown variables in the end.
6553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6554
6555      # Check if we try to supply an empty value
6556      if test "x$CP" = x; then
6557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6558$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6560$as_echo_n "checking for CP... " >&6; }
6561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6562$as_echo "disabled" >&6; }
6563      else
6564        # Check if the provided tool contains a complete path.
6565        tool_specified="$CP"
6566        tool_basename="${tool_specified##*/}"
6567        if test "x$tool_basename" = "x$tool_specified"; then
6568          # A command without a complete path is provided, search $PATH.
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6570$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6571          # Extract the first word of "$tool_basename", so it can be a program name with args.
6572set dummy $tool_basename; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_CP+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $CP in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601CP=$ac_cv_path_CP
6602if test -n "$CP"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6604$as_echo "$CP" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611          if test "x$CP" = x; then
6612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6613          fi
6614        else
6615          # Otherwise we believe it is a complete path. Use it as it is.
6616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6617$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6619$as_echo_n "checking for CP... " >&6; }
6620          if test ! -x "$tool_specified"; then
6621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6622$as_echo "not found" >&6; }
6623            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6624          fi
6625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6626$as_echo "$tool_specified" >&6; }
6627        fi
6628      fi
6629    fi
6630
6631  fi
6632
6633
6634
6635  if test "x$CP" = x; then
6636    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6637  fi
6638
6639
6640
6641
6642
6643  # Publish this variable in the help.
6644
6645
6646  if [ -z "${CUT+x}" ]; then
6647    # The variable is not set by user, try to locate tool using the code snippet
6648    for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693  else
6694    # The variable is set, but is it from the command line or the environment?
6695
6696    # Try to remove the string !CUT! from our list.
6697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6699      # If it failed, the variable was not from the command line. Ignore it,
6700      # but warn the user (except for BASH, which is always set by the calling BASH).
6701      if test "xCUT" != xBASH; then
6702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6703$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6704      fi
6705      # Try to locate tool using the code snippet
6706      for ac_prog in cut
6707do
6708  # Extract the first word of "$ac_prog", so it can be a program name with args.
6709set dummy $ac_prog; ac_word=$2
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_CUT+:} false; then :
6713  $as_echo_n "(cached) " >&6
6714else
6715  case $CUT in
6716  [\\/]* | ?:[\\/]*)
6717  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6718  ;;
6719  *)
6720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in $PATH
6722do
6723  IFS=$as_save_IFS
6724  test -z "$as_dir" && as_dir=.
6725    for ac_exec_ext in '' $ac_executable_extensions; do
6726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6727    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729    break 2
6730  fi
6731done
6732  done
6733IFS=$as_save_IFS
6734
6735  ;;
6736esac
6737fi
6738CUT=$ac_cv_path_CUT
6739if test -n "$CUT"; then
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6741$as_echo "$CUT" >&6; }
6742else
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
6748  test -n "$CUT" && break
6749done
6750
6751    else
6752      # If it succeeded, then it was overridden by the user. We will use it
6753      # for the tool.
6754
6755      # First remove it from the list of overridden variables, so we can test
6756      # for unknown variables in the end.
6757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6758
6759      # Check if we try to supply an empty value
6760      if test "x$CUT" = x; then
6761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6762$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6764$as_echo_n "checking for CUT... " >&6; }
6765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6766$as_echo "disabled" >&6; }
6767      else
6768        # Check if the provided tool contains a complete path.
6769        tool_specified="$CUT"
6770        tool_basename="${tool_specified##*/}"
6771        if test "x$tool_basename" = "x$tool_specified"; then
6772          # A command without a complete path is provided, search $PATH.
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6774$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6775          # Extract the first word of "$tool_basename", so it can be a program name with args.
6776set dummy $tool_basename; ac_word=$2
6777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6778$as_echo_n "checking for $ac_word... " >&6; }
6779if ${ac_cv_path_CUT+:} false; then :
6780  $as_echo_n "(cached) " >&6
6781else
6782  case $CUT in
6783  [\\/]* | ?:[\\/]*)
6784  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6785  ;;
6786  *)
6787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6788for as_dir in $PATH
6789do
6790  IFS=$as_save_IFS
6791  test -z "$as_dir" && as_dir=.
6792    for ac_exec_ext in '' $ac_executable_extensions; do
6793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6794    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6796    break 2
6797  fi
6798done
6799  done
6800IFS=$as_save_IFS
6801
6802  ;;
6803esac
6804fi
6805CUT=$ac_cv_path_CUT
6806if test -n "$CUT"; then
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6808$as_echo "$CUT" >&6; }
6809else
6810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811$as_echo "no" >&6; }
6812fi
6813
6814
6815          if test "x$CUT" = x; then
6816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6817          fi
6818        else
6819          # Otherwise we believe it is a complete path. Use it as it is.
6820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6821$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6823$as_echo_n "checking for CUT... " >&6; }
6824          if test ! -x "$tool_specified"; then
6825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6826$as_echo "not found" >&6; }
6827            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6828          fi
6829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6830$as_echo "$tool_specified" >&6; }
6831        fi
6832      fi
6833    fi
6834
6835  fi
6836
6837
6838
6839  if test "x$CUT" = x; then
6840    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6841  fi
6842
6843
6844
6845
6846
6847  # Publish this variable in the help.
6848
6849
6850  if [ -z "${DATE+x}" ]; then
6851    # The variable is not set by user, try to locate tool using the code snippet
6852    for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897  else
6898    # The variable is set, but is it from the command line or the environment?
6899
6900    # Try to remove the string !DATE! from our list.
6901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6903      # If it failed, the variable was not from the command line. Ignore it,
6904      # but warn the user (except for BASH, which is always set by the calling BASH).
6905      if test "xDATE" != xBASH; then
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6907$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6908      fi
6909      # Try to locate tool using the code snippet
6910      for ac_prog in date
6911do
6912  # Extract the first word of "$ac_prog", so it can be a program name with args.
6913set dummy $ac_prog; ac_word=$2
6914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6915$as_echo_n "checking for $ac_word... " >&6; }
6916if ${ac_cv_path_DATE+:} false; then :
6917  $as_echo_n "(cached) " >&6
6918else
6919  case $DATE in
6920  [\\/]* | ?:[\\/]*)
6921  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6922  ;;
6923  *)
6924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6925for as_dir in $PATH
6926do
6927  IFS=$as_save_IFS
6928  test -z "$as_dir" && as_dir=.
6929    for ac_exec_ext in '' $ac_executable_extensions; do
6930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6931    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6933    break 2
6934  fi
6935done
6936  done
6937IFS=$as_save_IFS
6938
6939  ;;
6940esac
6941fi
6942DATE=$ac_cv_path_DATE
6943if test -n "$DATE"; then
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6945$as_echo "$DATE" >&6; }
6946else
6947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6948$as_echo "no" >&6; }
6949fi
6950
6951
6952  test -n "$DATE" && break
6953done
6954
6955    else
6956      # If it succeeded, then it was overridden by the user. We will use it
6957      # for the tool.
6958
6959      # First remove it from the list of overridden variables, so we can test
6960      # for unknown variables in the end.
6961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6962
6963      # Check if we try to supply an empty value
6964      if test "x$DATE" = x; then
6965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6966$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6968$as_echo_n "checking for DATE... " >&6; }
6969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6970$as_echo "disabled" >&6; }
6971      else
6972        # Check if the provided tool contains a complete path.
6973        tool_specified="$DATE"
6974        tool_basename="${tool_specified##*/}"
6975        if test "x$tool_basename" = "x$tool_specified"; then
6976          # A command without a complete path is provided, search $PATH.
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6978$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6979          # Extract the first word of "$tool_basename", so it can be a program name with args.
6980set dummy $tool_basename; ac_word=$2
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6982$as_echo_n "checking for $ac_word... " >&6; }
6983if ${ac_cv_path_DATE+:} false; then :
6984  $as_echo_n "(cached) " >&6
6985else
6986  case $DATE in
6987  [\\/]* | ?:[\\/]*)
6988  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6989  ;;
6990  *)
6991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6992for as_dir in $PATH
6993do
6994  IFS=$as_save_IFS
6995  test -z "$as_dir" && as_dir=.
6996    for ac_exec_ext in '' $ac_executable_extensions; do
6997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6998    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7000    break 2
7001  fi
7002done
7003  done
7004IFS=$as_save_IFS
7005
7006  ;;
7007esac
7008fi
7009DATE=$ac_cv_path_DATE
7010if test -n "$DATE"; then
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7012$as_echo "$DATE" >&6; }
7013else
7014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015$as_echo "no" >&6; }
7016fi
7017
7018
7019          if test "x$DATE" = x; then
7020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7021          fi
7022        else
7023          # Otherwise we believe it is a complete path. Use it as it is.
7024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7025$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7027$as_echo_n "checking for DATE... " >&6; }
7028          if test ! -x "$tool_specified"; then
7029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7030$as_echo "not found" >&6; }
7031            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7032          fi
7033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7034$as_echo "$tool_specified" >&6; }
7035        fi
7036      fi
7037    fi
7038
7039  fi
7040
7041
7042
7043  if test "x$DATE" = x; then
7044    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7045  fi
7046
7047
7048
7049
7050
7051  # Publish this variable in the help.
7052
7053
7054  if [ -z "${DIFF+x}" ]; then
7055    # The variable is not set by user, try to locate tool using the code snippet
7056    for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101  else
7102    # The variable is set, but is it from the command line or the environment?
7103
7104    # Try to remove the string !DIFF! from our list.
7105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7107      # If it failed, the variable was not from the command line. Ignore it,
7108      # but warn the user (except for BASH, which is always set by the calling BASH).
7109      if test "xDIFF" != xBASH; then
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7111$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7112      fi
7113      # Try to locate tool using the code snippet
7114      for ac_prog in gdiff diff
7115do
7116  # Extract the first word of "$ac_prog", so it can be a program name with args.
7117set dummy $ac_prog; ac_word=$2
7118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7119$as_echo_n "checking for $ac_word... " >&6; }
7120if ${ac_cv_path_DIFF+:} false; then :
7121  $as_echo_n "(cached) " >&6
7122else
7123  case $DIFF in
7124  [\\/]* | ?:[\\/]*)
7125  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7126  ;;
7127  *)
7128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129for as_dir in $PATH
7130do
7131  IFS=$as_save_IFS
7132  test -z "$as_dir" && as_dir=.
7133    for ac_exec_ext in '' $ac_executable_extensions; do
7134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7135    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7137    break 2
7138  fi
7139done
7140  done
7141IFS=$as_save_IFS
7142
7143  ;;
7144esac
7145fi
7146DIFF=$ac_cv_path_DIFF
7147if test -n "$DIFF"; then
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7149$as_echo "$DIFF" >&6; }
7150else
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152$as_echo "no" >&6; }
7153fi
7154
7155
7156  test -n "$DIFF" && break
7157done
7158
7159    else
7160      # If it succeeded, then it was overridden by the user. We will use it
7161      # for the tool.
7162
7163      # First remove it from the list of overridden variables, so we can test
7164      # for unknown variables in the end.
7165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7166
7167      # Check if we try to supply an empty value
7168      if test "x$DIFF" = x; then
7169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7170$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7172$as_echo_n "checking for DIFF... " >&6; }
7173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7174$as_echo "disabled" >&6; }
7175      else
7176        # Check if the provided tool contains a complete path.
7177        tool_specified="$DIFF"
7178        tool_basename="${tool_specified##*/}"
7179        if test "x$tool_basename" = "x$tool_specified"; then
7180          # A command without a complete path is provided, search $PATH.
7181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7182$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7183          # Extract the first word of "$tool_basename", so it can be a program name with args.
7184set dummy $tool_basename; ac_word=$2
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7186$as_echo_n "checking for $ac_word... " >&6; }
7187if ${ac_cv_path_DIFF+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  case $DIFF in
7191  [\\/]* | ?:[\\/]*)
7192  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7193  ;;
7194  *)
7195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196for as_dir in $PATH
7197do
7198  IFS=$as_save_IFS
7199  test -z "$as_dir" && as_dir=.
7200    for ac_exec_ext in '' $ac_executable_extensions; do
7201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7202    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7204    break 2
7205  fi
7206done
7207  done
7208IFS=$as_save_IFS
7209
7210  ;;
7211esac
7212fi
7213DIFF=$ac_cv_path_DIFF
7214if test -n "$DIFF"; then
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7216$as_echo "$DIFF" >&6; }
7217else
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221
7222
7223          if test "x$DIFF" = x; then
7224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7225          fi
7226        else
7227          # Otherwise we believe it is a complete path. Use it as it is.
7228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7229$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7231$as_echo_n "checking for DIFF... " >&6; }
7232          if test ! -x "$tool_specified"; then
7233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7234$as_echo "not found" >&6; }
7235            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7236          fi
7237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7238$as_echo "$tool_specified" >&6; }
7239        fi
7240      fi
7241    fi
7242
7243  fi
7244
7245
7246
7247  if test "x$DIFF" = x; then
7248    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7249  fi
7250
7251
7252
7253
7254
7255  # Publish this variable in the help.
7256
7257
7258  if [ -z "${DIRNAME+x}" ]; then
7259    # The variable is not set by user, try to locate tool using the code snippet
7260    for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305  else
7306    # The variable is set, but is it from the command line or the environment?
7307
7308    # Try to remove the string !DIRNAME! from our list.
7309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7311      # If it failed, the variable was not from the command line. Ignore it,
7312      # but warn the user (except for BASH, which is always set by the calling BASH).
7313      if test "xDIRNAME" != xBASH; then
7314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7315$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7316      fi
7317      # Try to locate tool using the code snippet
7318      for ac_prog in dirname
7319do
7320  # Extract the first word of "$ac_prog", so it can be a program name with args.
7321set dummy $ac_prog; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_DIRNAME+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $DIRNAME in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350DIRNAME=$ac_cv_path_DIRNAME
7351if test -n "$DIRNAME"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7353$as_echo "$DIRNAME" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360  test -n "$DIRNAME" && break
7361done
7362
7363    else
7364      # If it succeeded, then it was overridden by the user. We will use it
7365      # for the tool.
7366
7367      # First remove it from the list of overridden variables, so we can test
7368      # for unknown variables in the end.
7369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7370
7371      # Check if we try to supply an empty value
7372      if test "x$DIRNAME" = x; then
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7374$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7376$as_echo_n "checking for DIRNAME... " >&6; }
7377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7378$as_echo "disabled" >&6; }
7379      else
7380        # Check if the provided tool contains a complete path.
7381        tool_specified="$DIRNAME"
7382        tool_basename="${tool_specified##*/}"
7383        if test "x$tool_basename" = "x$tool_specified"; then
7384          # A command without a complete path is provided, search $PATH.
7385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7386$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7387          # Extract the first word of "$tool_basename", so it can be a program name with args.
7388set dummy $tool_basename; ac_word=$2
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7390$as_echo_n "checking for $ac_word... " >&6; }
7391if ${ac_cv_path_DIRNAME+:} false; then :
7392  $as_echo_n "(cached) " >&6
7393else
7394  case $DIRNAME in
7395  [\\/]* | ?:[\\/]*)
7396  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7397  ;;
7398  *)
7399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402  IFS=$as_save_IFS
7403  test -z "$as_dir" && as_dir=.
7404    for ac_exec_ext in '' $ac_executable_extensions; do
7405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7406    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7408    break 2
7409  fi
7410done
7411  done
7412IFS=$as_save_IFS
7413
7414  ;;
7415esac
7416fi
7417DIRNAME=$ac_cv_path_DIRNAME
7418if test -n "$DIRNAME"; then
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7420$as_echo "$DIRNAME" >&6; }
7421else
7422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423$as_echo "no" >&6; }
7424fi
7425
7426
7427          if test "x$DIRNAME" = x; then
7428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7429          fi
7430        else
7431          # Otherwise we believe it is a complete path. Use it as it is.
7432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7433$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7435$as_echo_n "checking for DIRNAME... " >&6; }
7436          if test ! -x "$tool_specified"; then
7437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7438$as_echo "not found" >&6; }
7439            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7440          fi
7441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7442$as_echo "$tool_specified" >&6; }
7443        fi
7444      fi
7445    fi
7446
7447  fi
7448
7449
7450
7451  if test "x$DIRNAME" = x; then
7452    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7453  fi
7454
7455
7456
7457
7458
7459  # Publish this variable in the help.
7460
7461
7462  if [ -z "${ECHO+x}" ]; then
7463    # The variable is not set by user, try to locate tool using the code snippet
7464    for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509  else
7510    # The variable is set, but is it from the command line or the environment?
7511
7512    # Try to remove the string !ECHO! from our list.
7513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7515      # If it failed, the variable was not from the command line. Ignore it,
7516      # but warn the user (except for BASH, which is always set by the calling BASH).
7517      if test "xECHO" != xBASH; then
7518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7519$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7520      fi
7521      # Try to locate tool using the code snippet
7522      for ac_prog in echo
7523do
7524  # Extract the first word of "$ac_prog", so it can be a program name with args.
7525set dummy $ac_prog; ac_word=$2
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527$as_echo_n "checking for $ac_word... " >&6; }
7528if ${ac_cv_path_ECHO+:} false; then :
7529  $as_echo_n "(cached) " >&6
7530else
7531  case $ECHO in
7532  [\\/]* | ?:[\\/]*)
7533  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7534  ;;
7535  *)
7536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537for as_dir in $PATH
7538do
7539  IFS=$as_save_IFS
7540  test -z "$as_dir" && as_dir=.
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551  ;;
7552esac
7553fi
7554ECHO=$ac_cv_path_ECHO
7555if test -n "$ECHO"; then
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7557$as_echo "$ECHO" >&6; }
7558else
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7560$as_echo "no" >&6; }
7561fi
7562
7563
7564  test -n "$ECHO" && break
7565done
7566
7567    else
7568      # If it succeeded, then it was overridden by the user. We will use it
7569      # for the tool.
7570
7571      # First remove it from the list of overridden variables, so we can test
7572      # for unknown variables in the end.
7573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7574
7575      # Check if we try to supply an empty value
7576      if test "x$ECHO" = x; then
7577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7578$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7580$as_echo_n "checking for ECHO... " >&6; }
7581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7582$as_echo "disabled" >&6; }
7583      else
7584        # Check if the provided tool contains a complete path.
7585        tool_specified="$ECHO"
7586        tool_basename="${tool_specified##*/}"
7587        if test "x$tool_basename" = "x$tool_specified"; then
7588          # A command without a complete path is provided, search $PATH.
7589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7590$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7591          # Extract the first word of "$tool_basename", so it can be a program name with args.
7592set dummy $tool_basename; ac_word=$2
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594$as_echo_n "checking for $ac_word... " >&6; }
7595if ${ac_cv_path_ECHO+:} false; then :
7596  $as_echo_n "(cached) " >&6
7597else
7598  case $ECHO in
7599  [\\/]* | ?:[\\/]*)
7600  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7601  ;;
7602  *)
7603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7604for as_dir in $PATH
7605do
7606  IFS=$as_save_IFS
7607  test -z "$as_dir" && as_dir=.
7608    for ac_exec_ext in '' $ac_executable_extensions; do
7609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7610    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7612    break 2
7613  fi
7614done
7615  done
7616IFS=$as_save_IFS
7617
7618  ;;
7619esac
7620fi
7621ECHO=$ac_cv_path_ECHO
7622if test -n "$ECHO"; then
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7624$as_echo "$ECHO" >&6; }
7625else
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7627$as_echo "no" >&6; }
7628fi
7629
7630
7631          if test "x$ECHO" = x; then
7632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7633          fi
7634        else
7635          # Otherwise we believe it is a complete path. Use it as it is.
7636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7637$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7639$as_echo_n "checking for ECHO... " >&6; }
7640          if test ! -x "$tool_specified"; then
7641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7642$as_echo "not found" >&6; }
7643            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7644          fi
7645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7646$as_echo "$tool_specified" >&6; }
7647        fi
7648      fi
7649    fi
7650
7651  fi
7652
7653
7654
7655  if test "x$ECHO" = x; then
7656    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7657  fi
7658
7659
7660
7661
7662
7663  # Publish this variable in the help.
7664
7665
7666  if [ -z "${EXPR+x}" ]; then
7667    # The variable is not set by user, try to locate tool using the code snippet
7668    for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713  else
7714    # The variable is set, but is it from the command line or the environment?
7715
7716    # Try to remove the string !EXPR! from our list.
7717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7719      # If it failed, the variable was not from the command line. Ignore it,
7720      # but warn the user (except for BASH, which is always set by the calling BASH).
7721      if test "xEXPR" != xBASH; then
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7723$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7724      fi
7725      # Try to locate tool using the code snippet
7726      for ac_prog in expr
7727do
7728  # Extract the first word of "$ac_prog", so it can be a program name with args.
7729set dummy $ac_prog; ac_word=$2
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731$as_echo_n "checking for $ac_word... " >&6; }
7732if ${ac_cv_path_EXPR+:} false; then :
7733  $as_echo_n "(cached) " >&6
7734else
7735  case $EXPR in
7736  [\\/]* | ?:[\\/]*)
7737  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7738  ;;
7739  *)
7740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7741for as_dir in $PATH
7742do
7743  IFS=$as_save_IFS
7744  test -z "$as_dir" && as_dir=.
7745    for ac_exec_ext in '' $ac_executable_extensions; do
7746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7747    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7749    break 2
7750  fi
7751done
7752  done
7753IFS=$as_save_IFS
7754
7755  ;;
7756esac
7757fi
7758EXPR=$ac_cv_path_EXPR
7759if test -n "$EXPR"; then
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7761$as_echo "$EXPR" >&6; }
7762else
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7764$as_echo "no" >&6; }
7765fi
7766
7767
7768  test -n "$EXPR" && break
7769done
7770
7771    else
7772      # If it succeeded, then it was overridden by the user. We will use it
7773      # for the tool.
7774
7775      # First remove it from the list of overridden variables, so we can test
7776      # for unknown variables in the end.
7777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7778
7779      # Check if we try to supply an empty value
7780      if test "x$EXPR" = x; then
7781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7782$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7784$as_echo_n "checking for EXPR... " >&6; }
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7786$as_echo "disabled" >&6; }
7787      else
7788        # Check if the provided tool contains a complete path.
7789        tool_specified="$EXPR"
7790        tool_basename="${tool_specified##*/}"
7791        if test "x$tool_basename" = "x$tool_specified"; then
7792          # A command without a complete path is provided, search $PATH.
7793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7794$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7795          # Extract the first word of "$tool_basename", so it can be a program name with args.
7796set dummy $tool_basename; ac_word=$2
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798$as_echo_n "checking for $ac_word... " >&6; }
7799if ${ac_cv_path_EXPR+:} false; then :
7800  $as_echo_n "(cached) " >&6
7801else
7802  case $EXPR in
7803  [\\/]* | ?:[\\/]*)
7804  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7805  ;;
7806  *)
7807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808for as_dir in $PATH
7809do
7810  IFS=$as_save_IFS
7811  test -z "$as_dir" && as_dir=.
7812    for ac_exec_ext in '' $ac_executable_extensions; do
7813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816    break 2
7817  fi
7818done
7819  done
7820IFS=$as_save_IFS
7821
7822  ;;
7823esac
7824fi
7825EXPR=$ac_cv_path_EXPR
7826if test -n "$EXPR"; then
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7828$as_echo "$EXPR" >&6; }
7829else
7830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831$as_echo "no" >&6; }
7832fi
7833
7834
7835          if test "x$EXPR" = x; then
7836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7837          fi
7838        else
7839          # Otherwise we believe it is a complete path. Use it as it is.
7840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7841$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7843$as_echo_n "checking for EXPR... " >&6; }
7844          if test ! -x "$tool_specified"; then
7845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7846$as_echo "not found" >&6; }
7847            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7848          fi
7849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7850$as_echo "$tool_specified" >&6; }
7851        fi
7852      fi
7853    fi
7854
7855  fi
7856
7857
7858
7859  if test "x$EXPR" = x; then
7860    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7861  fi
7862
7863
7864
7865
7866
7867  # Publish this variable in the help.
7868
7869
7870  if [ -z "${FILE+x}" ]; then
7871    # The variable is not set by user, try to locate tool using the code snippet
7872    for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917  else
7918    # The variable is set, but is it from the command line or the environment?
7919
7920    # Try to remove the string !FILE! from our list.
7921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7923      # If it failed, the variable was not from the command line. Ignore it,
7924      # but warn the user (except for BASH, which is always set by the calling BASH).
7925      if test "xFILE" != xBASH; then
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7927$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7928      fi
7929      # Try to locate tool using the code snippet
7930      for ac_prog in file
7931do
7932  # Extract the first word of "$ac_prog", so it can be a program name with args.
7933set dummy $ac_prog; ac_word=$2
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7935$as_echo_n "checking for $ac_word... " >&6; }
7936if ${ac_cv_path_FILE+:} false; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  case $FILE in
7940  [\\/]* | ?:[\\/]*)
7941  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7942  ;;
7943  *)
7944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945for as_dir in $PATH
7946do
7947  IFS=$as_save_IFS
7948  test -z "$as_dir" && as_dir=.
7949    for ac_exec_ext in '' $ac_executable_extensions; do
7950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7951    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7953    break 2
7954  fi
7955done
7956  done
7957IFS=$as_save_IFS
7958
7959  ;;
7960esac
7961fi
7962FILE=$ac_cv_path_FILE
7963if test -n "$FILE"; then
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7965$as_echo "$FILE" >&6; }
7966else
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7968$as_echo "no" >&6; }
7969fi
7970
7971
7972  test -n "$FILE" && break
7973done
7974
7975    else
7976      # If it succeeded, then it was overridden by the user. We will use it
7977      # for the tool.
7978
7979      # First remove it from the list of overridden variables, so we can test
7980      # for unknown variables in the end.
7981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7982
7983      # Check if we try to supply an empty value
7984      if test "x$FILE" = x; then
7985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7986$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7988$as_echo_n "checking for FILE... " >&6; }
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7990$as_echo "disabled" >&6; }
7991      else
7992        # Check if the provided tool contains a complete path.
7993        tool_specified="$FILE"
7994        tool_basename="${tool_specified##*/}"
7995        if test "x$tool_basename" = "x$tool_specified"; then
7996          # A command without a complete path is provided, search $PATH.
7997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7998$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7999          # Extract the first word of "$tool_basename", so it can be a program name with args.
8000set dummy $tool_basename; ac_word=$2
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8002$as_echo_n "checking for $ac_word... " >&6; }
8003if ${ac_cv_path_FILE+:} false; then :
8004  $as_echo_n "(cached) " >&6
8005else
8006  case $FILE in
8007  [\\/]* | ?:[\\/]*)
8008  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8009  ;;
8010  *)
8011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8012for as_dir in $PATH
8013do
8014  IFS=$as_save_IFS
8015  test -z "$as_dir" && as_dir=.
8016    for ac_exec_ext in '' $ac_executable_extensions; do
8017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8018    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8020    break 2
8021  fi
8022done
8023  done
8024IFS=$as_save_IFS
8025
8026  ;;
8027esac
8028fi
8029FILE=$ac_cv_path_FILE
8030if test -n "$FILE"; then
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8032$as_echo "$FILE" >&6; }
8033else
8034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035$as_echo "no" >&6; }
8036fi
8037
8038
8039          if test "x$FILE" = x; then
8040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8041          fi
8042        else
8043          # Otherwise we believe it is a complete path. Use it as it is.
8044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8045$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8047$as_echo_n "checking for FILE... " >&6; }
8048          if test ! -x "$tool_specified"; then
8049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8050$as_echo "not found" >&6; }
8051            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8052          fi
8053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8054$as_echo "$tool_specified" >&6; }
8055        fi
8056      fi
8057    fi
8058
8059  fi
8060
8061
8062
8063  if test "x$FILE" = x; then
8064    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8065  fi
8066
8067
8068
8069
8070
8071  # Publish this variable in the help.
8072
8073
8074  if [ -z "${FIND+x}" ]; then
8075    # The variable is not set by user, try to locate tool using the code snippet
8076    for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121  else
8122    # The variable is set, but is it from the command line or the environment?
8123
8124    # Try to remove the string !FIND! from our list.
8125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8127      # If it failed, the variable was not from the command line. Ignore it,
8128      # but warn the user (except for BASH, which is always set by the calling BASH).
8129      if test "xFIND" != xBASH; then
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8131$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8132      fi
8133      # Try to locate tool using the code snippet
8134      for ac_prog in find
8135do
8136  # Extract the first word of "$ac_prog", so it can be a program name with args.
8137set dummy $ac_prog; ac_word=$2
8138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8139$as_echo_n "checking for $ac_word... " >&6; }
8140if ${ac_cv_path_FIND+:} false; then :
8141  $as_echo_n "(cached) " >&6
8142else
8143  case $FIND in
8144  [\\/]* | ?:[\\/]*)
8145  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8146  ;;
8147  *)
8148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149for as_dir in $PATH
8150do
8151  IFS=$as_save_IFS
8152  test -z "$as_dir" && as_dir=.
8153    for ac_exec_ext in '' $ac_executable_extensions; do
8154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8155    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8157    break 2
8158  fi
8159done
8160  done
8161IFS=$as_save_IFS
8162
8163  ;;
8164esac
8165fi
8166FIND=$ac_cv_path_FIND
8167if test -n "$FIND"; then
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8169$as_echo "$FIND" >&6; }
8170else
8171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172$as_echo "no" >&6; }
8173fi
8174
8175
8176  test -n "$FIND" && break
8177done
8178
8179    else
8180      # If it succeeded, then it was overridden by the user. We will use it
8181      # for the tool.
8182
8183      # First remove it from the list of overridden variables, so we can test
8184      # for unknown variables in the end.
8185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8186
8187      # Check if we try to supply an empty value
8188      if test "x$FIND" = x; then
8189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8190$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8192$as_echo_n "checking for FIND... " >&6; }
8193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8194$as_echo "disabled" >&6; }
8195      else
8196        # Check if the provided tool contains a complete path.
8197        tool_specified="$FIND"
8198        tool_basename="${tool_specified##*/}"
8199        if test "x$tool_basename" = "x$tool_specified"; then
8200          # A command without a complete path is provided, search $PATH.
8201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8202$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8203          # Extract the first word of "$tool_basename", so it can be a program name with args.
8204set dummy $tool_basename; ac_word=$2
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8206$as_echo_n "checking for $ac_word... " >&6; }
8207if ${ac_cv_path_FIND+:} false; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  case $FIND in
8211  [\\/]* | ?:[\\/]*)
8212  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8213  ;;
8214  *)
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH
8217do
8218  IFS=$as_save_IFS
8219  test -z "$as_dir" && as_dir=.
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8222    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8224    break 2
8225  fi
8226done
8227  done
8228IFS=$as_save_IFS
8229
8230  ;;
8231esac
8232fi
8233FIND=$ac_cv_path_FIND
8234if test -n "$FIND"; then
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8236$as_echo "$FIND" >&6; }
8237else
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243          if test "x$FIND" = x; then
8244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8245          fi
8246        else
8247          # Otherwise we believe it is a complete path. Use it as it is.
8248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8249$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8251$as_echo_n "checking for FIND... " >&6; }
8252          if test ! -x "$tool_specified"; then
8253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8254$as_echo "not found" >&6; }
8255            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8256          fi
8257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8258$as_echo "$tool_specified" >&6; }
8259        fi
8260      fi
8261    fi
8262
8263  fi
8264
8265
8266
8267  if test "x$FIND" = x; then
8268    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8269  fi
8270
8271
8272
8273
8274
8275  # Publish this variable in the help.
8276
8277
8278  if [ -z "${HEAD+x}" ]; then
8279    # The variable is not set by user, try to locate tool using the code snippet
8280    for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325  else
8326    # The variable is set, but is it from the command line or the environment?
8327
8328    # Try to remove the string !HEAD! from our list.
8329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8331      # If it failed, the variable was not from the command line. Ignore it,
8332      # but warn the user (except for BASH, which is always set by the calling BASH).
8333      if test "xHEAD" != xBASH; then
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8335$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8336      fi
8337      # Try to locate tool using the code snippet
8338      for ac_prog in head
8339do
8340  # Extract the first word of "$ac_prog", so it can be a program name with args.
8341set dummy $ac_prog; ac_word=$2
8342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8343$as_echo_n "checking for $ac_word... " >&6; }
8344if ${ac_cv_path_HEAD+:} false; then :
8345  $as_echo_n "(cached) " >&6
8346else
8347  case $HEAD in
8348  [\\/]* | ?:[\\/]*)
8349  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8350  ;;
8351  *)
8352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8353for as_dir in $PATH
8354do
8355  IFS=$as_save_IFS
8356  test -z "$as_dir" && as_dir=.
8357    for ac_exec_ext in '' $ac_executable_extensions; do
8358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8359    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8361    break 2
8362  fi
8363done
8364  done
8365IFS=$as_save_IFS
8366
8367  ;;
8368esac
8369fi
8370HEAD=$ac_cv_path_HEAD
8371if test -n "$HEAD"; then
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8373$as_echo "$HEAD" >&6; }
8374else
8375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8376$as_echo "no" >&6; }
8377fi
8378
8379
8380  test -n "$HEAD" && break
8381done
8382
8383    else
8384      # If it succeeded, then it was overridden by the user. We will use it
8385      # for the tool.
8386
8387      # First remove it from the list of overridden variables, so we can test
8388      # for unknown variables in the end.
8389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8390
8391      # Check if we try to supply an empty value
8392      if test "x$HEAD" = x; then
8393        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8394$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8396$as_echo_n "checking for HEAD... " >&6; }
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8398$as_echo "disabled" >&6; }
8399      else
8400        # Check if the provided tool contains a complete path.
8401        tool_specified="$HEAD"
8402        tool_basename="${tool_specified##*/}"
8403        if test "x$tool_basename" = "x$tool_specified"; then
8404          # A command without a complete path is provided, search $PATH.
8405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8406$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8407          # Extract the first word of "$tool_basename", so it can be a program name with args.
8408set dummy $tool_basename; ac_word=$2
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8410$as_echo_n "checking for $ac_word... " >&6; }
8411if ${ac_cv_path_HEAD+:} false; then :
8412  $as_echo_n "(cached) " >&6
8413else
8414  case $HEAD in
8415  [\\/]* | ?:[\\/]*)
8416  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8417  ;;
8418  *)
8419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8420for as_dir in $PATH
8421do
8422  IFS=$as_save_IFS
8423  test -z "$as_dir" && as_dir=.
8424    for ac_exec_ext in '' $ac_executable_extensions; do
8425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8426    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8428    break 2
8429  fi
8430done
8431  done
8432IFS=$as_save_IFS
8433
8434  ;;
8435esac
8436fi
8437HEAD=$ac_cv_path_HEAD
8438if test -n "$HEAD"; then
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8440$as_echo "$HEAD" >&6; }
8441else
8442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443$as_echo "no" >&6; }
8444fi
8445
8446
8447          if test "x$HEAD" = x; then
8448            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8449          fi
8450        else
8451          # Otherwise we believe it is a complete path. Use it as it is.
8452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8453$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8455$as_echo_n "checking for HEAD... " >&6; }
8456          if test ! -x "$tool_specified"; then
8457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8458$as_echo "not found" >&6; }
8459            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8460          fi
8461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8462$as_echo "$tool_specified" >&6; }
8463        fi
8464      fi
8465    fi
8466
8467  fi
8468
8469
8470
8471  if test "x$HEAD" = x; then
8472    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8473  fi
8474
8475
8476
8477
8478
8479  # Publish this variable in the help.
8480
8481
8482  if [ -z "${GUNZIP+x}" ]; then
8483    # The variable is not set by user, try to locate tool using the code snippet
8484    for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529  else
8530    # The variable is set, but is it from the command line or the environment?
8531
8532    # Try to remove the string !GUNZIP! from our list.
8533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8535      # If it failed, the variable was not from the command line. Ignore it,
8536      # but warn the user (except for BASH, which is always set by the calling BASH).
8537      if test "xGUNZIP" != xBASH; then
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8539$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8540      fi
8541      # Try to locate tool using the code snippet
8542      for ac_prog in gunzip
8543do
8544  # Extract the first word of "$ac_prog", so it can be a program name with args.
8545set dummy $ac_prog; ac_word=$2
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if ${ac_cv_path_GUNZIP+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  case $GUNZIP in
8552  [\\/]* | ?:[\\/]*)
8553  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8554  ;;
8555  *)
8556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557for as_dir in $PATH
8558do
8559  IFS=$as_save_IFS
8560  test -z "$as_dir" && as_dir=.
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571  ;;
8572esac
8573fi
8574GUNZIP=$ac_cv_path_GUNZIP
8575if test -n "$GUNZIP"; then
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8577$as_echo "$GUNZIP" >&6; }
8578else
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8580$as_echo "no" >&6; }
8581fi
8582
8583
8584  test -n "$GUNZIP" && break
8585done
8586
8587    else
8588      # If it succeeded, then it was overridden by the user. We will use it
8589      # for the tool.
8590
8591      # First remove it from the list of overridden variables, so we can test
8592      # for unknown variables in the end.
8593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8594
8595      # Check if we try to supply an empty value
8596      if test "x$GUNZIP" = x; then
8597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8598$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8600$as_echo_n "checking for GUNZIP... " >&6; }
8601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8602$as_echo "disabled" >&6; }
8603      else
8604        # Check if the provided tool contains a complete path.
8605        tool_specified="$GUNZIP"
8606        tool_basename="${tool_specified##*/}"
8607        if test "x$tool_basename" = "x$tool_specified"; then
8608          # A command without a complete path is provided, search $PATH.
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8610$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8611          # Extract the first word of "$tool_basename", so it can be a program name with args.
8612set dummy $tool_basename; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
8615if ${ac_cv_path_GUNZIP+:} false; then :
8616  $as_echo_n "(cached) " >&6
8617else
8618  case $GUNZIP in
8619  [\\/]* | ?:[\\/]*)
8620  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8621  ;;
8622  *)
8623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH
8625do
8626  IFS=$as_save_IFS
8627  test -z "$as_dir" && as_dir=.
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8630    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632    break 2
8633  fi
8634done
8635  done
8636IFS=$as_save_IFS
8637
8638  ;;
8639esac
8640fi
8641GUNZIP=$ac_cv_path_GUNZIP
8642if test -n "$GUNZIP"; then
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8644$as_echo "$GUNZIP" >&6; }
8645else
8646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648fi
8649
8650
8651          if test "x$GUNZIP" = x; then
8652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8653          fi
8654        else
8655          # Otherwise we believe it is a complete path. Use it as it is.
8656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8657$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8659$as_echo_n "checking for GUNZIP... " >&6; }
8660          if test ! -x "$tool_specified"; then
8661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8662$as_echo "not found" >&6; }
8663            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8664          fi
8665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8666$as_echo "$tool_specified" >&6; }
8667        fi
8668      fi
8669    fi
8670
8671  fi
8672
8673
8674
8675  if test "x$GUNZIP" = x; then
8676    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8677  fi
8678
8679
8680
8681
8682
8683  # Publish this variable in the help.
8684
8685
8686  if [ -z "${GZIP+x}" ]; then
8687    # The variable is not set by user, try to locate tool using the code snippet
8688    for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733  else
8734    # The variable is set, but is it from the command line or the environment?
8735
8736    # Try to remove the string !GZIP! from our list.
8737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8739      # If it failed, the variable was not from the command line. Ignore it,
8740      # but warn the user (except for BASH, which is always set by the calling BASH).
8741      if test "xGZIP" != xBASH; then
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8743$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8744      fi
8745      # Try to locate tool using the code snippet
8746      for ac_prog in pigz gzip
8747do
8748  # Extract the first word of "$ac_prog", so it can be a program name with args.
8749set dummy $ac_prog; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_GZIP+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $GZIP in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778GZIP=$ac_cv_path_GZIP
8779if test -n "$GZIP"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8781$as_echo "$GZIP" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788  test -n "$GZIP" && break
8789done
8790
8791    else
8792      # If it succeeded, then it was overridden by the user. We will use it
8793      # for the tool.
8794
8795      # First remove it from the list of overridden variables, so we can test
8796      # for unknown variables in the end.
8797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8798
8799      # Check if we try to supply an empty value
8800      if test "x$GZIP" = x; then
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8802$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8804$as_echo_n "checking for GZIP... " >&6; }
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8806$as_echo "disabled" >&6; }
8807      else
8808        # Check if the provided tool contains a complete path.
8809        tool_specified="$GZIP"
8810        tool_basename="${tool_specified##*/}"
8811        if test "x$tool_basename" = "x$tool_specified"; then
8812          # A command without a complete path is provided, search $PATH.
8813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8814$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8815          # Extract the first word of "$tool_basename", so it can be a program name with args.
8816set dummy $tool_basename; ac_word=$2
8817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8818$as_echo_n "checking for $ac_word... " >&6; }
8819if ${ac_cv_path_GZIP+:} false; then :
8820  $as_echo_n "(cached) " >&6
8821else
8822  case $GZIP in
8823  [\\/]* | ?:[\\/]*)
8824  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8825  ;;
8826  *)
8827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8828for as_dir in $PATH
8829do
8830  IFS=$as_save_IFS
8831  test -z "$as_dir" && as_dir=.
8832    for ac_exec_ext in '' $ac_executable_extensions; do
8833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8834    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8836    break 2
8837  fi
8838done
8839  done
8840IFS=$as_save_IFS
8841
8842  ;;
8843esac
8844fi
8845GZIP=$ac_cv_path_GZIP
8846if test -n "$GZIP"; then
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8848$as_echo "$GZIP" >&6; }
8849else
8850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8851$as_echo "no" >&6; }
8852fi
8853
8854
8855          if test "x$GZIP" = x; then
8856            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8857          fi
8858        else
8859          # Otherwise we believe it is a complete path. Use it as it is.
8860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8861$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8862          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8863$as_echo_n "checking for GZIP... " >&6; }
8864          if test ! -x "$tool_specified"; then
8865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8866$as_echo "not found" >&6; }
8867            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8868          fi
8869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8870$as_echo "$tool_specified" >&6; }
8871        fi
8872      fi
8873    fi
8874
8875  fi
8876
8877
8878
8879  if test "x$GZIP" = x; then
8880    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8881  fi
8882
8883
8884
8885
8886
8887  # Publish this variable in the help.
8888
8889
8890  if [ -z "${LN+x}" ]; then
8891    # The variable is not set by user, try to locate tool using the code snippet
8892    for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937  else
8938    # The variable is set, but is it from the command line or the environment?
8939
8940    # Try to remove the string !LN! from our list.
8941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8943      # If it failed, the variable was not from the command line. Ignore it,
8944      # but warn the user (except for BASH, which is always set by the calling BASH).
8945      if test "xLN" != xBASH; then
8946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8947$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8948      fi
8949      # Try to locate tool using the code snippet
8950      for ac_prog in ln
8951do
8952  # Extract the first word of "$ac_prog", so it can be a program name with args.
8953set dummy $ac_prog; ac_word=$2
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8955$as_echo_n "checking for $ac_word... " >&6; }
8956if ${ac_cv_path_LN+:} false; then :
8957  $as_echo_n "(cached) " >&6
8958else
8959  case $LN in
8960  [\\/]* | ?:[\\/]*)
8961  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8962  ;;
8963  *)
8964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965for as_dir in $PATH
8966do
8967  IFS=$as_save_IFS
8968  test -z "$as_dir" && as_dir=.
8969    for ac_exec_ext in '' $ac_executable_extensions; do
8970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8971    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8973    break 2
8974  fi
8975done
8976  done
8977IFS=$as_save_IFS
8978
8979  ;;
8980esac
8981fi
8982LN=$ac_cv_path_LN
8983if test -n "$LN"; then
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8985$as_echo "$LN" >&6; }
8986else
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
8989fi
8990
8991
8992  test -n "$LN" && break
8993done
8994
8995    else
8996      # If it succeeded, then it was overridden by the user. We will use it
8997      # for the tool.
8998
8999      # First remove it from the list of overridden variables, so we can test
9000      # for unknown variables in the end.
9001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9002
9003      # Check if we try to supply an empty value
9004      if test "x$LN" = x; then
9005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9006$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9008$as_echo_n "checking for LN... " >&6; }
9009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9010$as_echo "disabled" >&6; }
9011      else
9012        # Check if the provided tool contains a complete path.
9013        tool_specified="$LN"
9014        tool_basename="${tool_specified##*/}"
9015        if test "x$tool_basename" = "x$tool_specified"; then
9016          # A command without a complete path is provided, search $PATH.
9017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9018$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9019          # Extract the first word of "$tool_basename", so it can be a program name with args.
9020set dummy $tool_basename; ac_word=$2
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9022$as_echo_n "checking for $ac_word... " >&6; }
9023if ${ac_cv_path_LN+:} false; then :
9024  $as_echo_n "(cached) " >&6
9025else
9026  case $LN in
9027  [\\/]* | ?:[\\/]*)
9028  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9029  ;;
9030  *)
9031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032for as_dir in $PATH
9033do
9034  IFS=$as_save_IFS
9035  test -z "$as_dir" && as_dir=.
9036    for ac_exec_ext in '' $ac_executable_extensions; do
9037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9040    break 2
9041  fi
9042done
9043  done
9044IFS=$as_save_IFS
9045
9046  ;;
9047esac
9048fi
9049LN=$ac_cv_path_LN
9050if test -n "$LN"; then
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9052$as_echo "$LN" >&6; }
9053else
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
9056fi
9057
9058
9059          if test "x$LN" = x; then
9060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9061          fi
9062        else
9063          # Otherwise we believe it is a complete path. Use it as it is.
9064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9065$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9067$as_echo_n "checking for LN... " >&6; }
9068          if test ! -x "$tool_specified"; then
9069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9070$as_echo "not found" >&6; }
9071            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9072          fi
9073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9074$as_echo "$tool_specified" >&6; }
9075        fi
9076      fi
9077    fi
9078
9079  fi
9080
9081
9082
9083  if test "x$LN" = x; then
9084    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9085  fi
9086
9087
9088
9089
9090
9091  # Publish this variable in the help.
9092
9093
9094  if [ -z "${LS+x}" ]; then
9095    # The variable is not set by user, try to locate tool using the code snippet
9096    for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141  else
9142    # The variable is set, but is it from the command line or the environment?
9143
9144    # Try to remove the string !LS! from our list.
9145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9147      # If it failed, the variable was not from the command line. Ignore it,
9148      # but warn the user (except for BASH, which is always set by the calling BASH).
9149      if test "xLS" != xBASH; then
9150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9151$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9152      fi
9153      # Try to locate tool using the code snippet
9154      for ac_prog in ls
9155do
9156  # Extract the first word of "$ac_prog", so it can be a program name with args.
9157set dummy $ac_prog; ac_word=$2
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9159$as_echo_n "checking for $ac_word... " >&6; }
9160if ${ac_cv_path_LS+:} false; then :
9161  $as_echo_n "(cached) " >&6
9162else
9163  case $LS in
9164  [\\/]* | ?:[\\/]*)
9165  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9166  ;;
9167  *)
9168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9169for as_dir in $PATH
9170do
9171  IFS=$as_save_IFS
9172  test -z "$as_dir" && as_dir=.
9173    for ac_exec_ext in '' $ac_executable_extensions; do
9174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9175    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9177    break 2
9178  fi
9179done
9180  done
9181IFS=$as_save_IFS
9182
9183  ;;
9184esac
9185fi
9186LS=$ac_cv_path_LS
9187if test -n "$LS"; then
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9189$as_echo "$LS" >&6; }
9190else
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
9194
9195
9196  test -n "$LS" && break
9197done
9198
9199    else
9200      # If it succeeded, then it was overridden by the user. We will use it
9201      # for the tool.
9202
9203      # First remove it from the list of overridden variables, so we can test
9204      # for unknown variables in the end.
9205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9206
9207      # Check if we try to supply an empty value
9208      if test "x$LS" = x; then
9209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9210$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9212$as_echo_n "checking for LS... " >&6; }
9213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9214$as_echo "disabled" >&6; }
9215      else
9216        # Check if the provided tool contains a complete path.
9217        tool_specified="$LS"
9218        tool_basename="${tool_specified##*/}"
9219        if test "x$tool_basename" = "x$tool_specified"; then
9220          # A command without a complete path is provided, search $PATH.
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9222$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9223          # Extract the first word of "$tool_basename", so it can be a program name with args.
9224set dummy $tool_basename; ac_word=$2
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
9227if ${ac_cv_path_LS+:} false; then :
9228  $as_echo_n "(cached) " >&6
9229else
9230  case $LS in
9231  [\\/]* | ?:[\\/]*)
9232  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9233  ;;
9234  *)
9235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250  ;;
9251esac
9252fi
9253LS=$ac_cv_path_LS
9254if test -n "$LS"; then
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9256$as_echo "$LS" >&6; }
9257else
9258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
9260fi
9261
9262
9263          if test "x$LS" = x; then
9264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9265          fi
9266        else
9267          # Otherwise we believe it is a complete path. Use it as it is.
9268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9269$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9271$as_echo_n "checking for LS... " >&6; }
9272          if test ! -x "$tool_specified"; then
9273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9274$as_echo "not found" >&6; }
9275            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9276          fi
9277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9278$as_echo "$tool_specified" >&6; }
9279        fi
9280      fi
9281    fi
9282
9283  fi
9284
9285
9286
9287  if test "x$LS" = x; then
9288    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9289  fi
9290
9291
9292
9293
9294
9295  # Publish this variable in the help.
9296
9297
9298  if [ -z "${MKDIR+x}" ]; then
9299    # The variable is not set by user, try to locate tool using the code snippet
9300    for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345  else
9346    # The variable is set, but is it from the command line or the environment?
9347
9348    # Try to remove the string !MKDIR! from our list.
9349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9351      # If it failed, the variable was not from the command line. Ignore it,
9352      # but warn the user (except for BASH, which is always set by the calling BASH).
9353      if test "xMKDIR" != xBASH; then
9354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9355$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9356      fi
9357      # Try to locate tool using the code snippet
9358      for ac_prog in mkdir
9359do
9360  # Extract the first word of "$ac_prog", so it can be a program name with args.
9361set dummy $ac_prog; ac_word=$2
9362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9363$as_echo_n "checking for $ac_word... " >&6; }
9364if ${ac_cv_path_MKDIR+:} false; then :
9365  $as_echo_n "(cached) " >&6
9366else
9367  case $MKDIR in
9368  [\\/]* | ?:[\\/]*)
9369  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9370  ;;
9371  *)
9372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373for as_dir in $PATH
9374do
9375  IFS=$as_save_IFS
9376  test -z "$as_dir" && as_dir=.
9377    for ac_exec_ext in '' $ac_executable_extensions; do
9378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9379    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9381    break 2
9382  fi
9383done
9384  done
9385IFS=$as_save_IFS
9386
9387  ;;
9388esac
9389fi
9390MKDIR=$ac_cv_path_MKDIR
9391if test -n "$MKDIR"; then
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9393$as_echo "$MKDIR" >&6; }
9394else
9395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
9397fi
9398
9399
9400  test -n "$MKDIR" && break
9401done
9402
9403    else
9404      # If it succeeded, then it was overridden by the user. We will use it
9405      # for the tool.
9406
9407      # First remove it from the list of overridden variables, so we can test
9408      # for unknown variables in the end.
9409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9410
9411      # Check if we try to supply an empty value
9412      if test "x$MKDIR" = x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9414$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9416$as_echo_n "checking for MKDIR... " >&6; }
9417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9418$as_echo "disabled" >&6; }
9419      else
9420        # Check if the provided tool contains a complete path.
9421        tool_specified="$MKDIR"
9422        tool_basename="${tool_specified##*/}"
9423        if test "x$tool_basename" = "x$tool_specified"; then
9424          # A command without a complete path is provided, search $PATH.
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9426$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9427          # Extract the first word of "$tool_basename", so it can be a program name with args.
9428set dummy $tool_basename; ac_word=$2
9429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430$as_echo_n "checking for $ac_word... " >&6; }
9431if ${ac_cv_path_MKDIR+:} false; then :
9432  $as_echo_n "(cached) " >&6
9433else
9434  case $MKDIR in
9435  [\\/]* | ?:[\\/]*)
9436  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9437  ;;
9438  *)
9439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9440for as_dir in $PATH
9441do
9442  IFS=$as_save_IFS
9443  test -z "$as_dir" && as_dir=.
9444    for ac_exec_ext in '' $ac_executable_extensions; do
9445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9446    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9448    break 2
9449  fi
9450done
9451  done
9452IFS=$as_save_IFS
9453
9454  ;;
9455esac
9456fi
9457MKDIR=$ac_cv_path_MKDIR
9458if test -n "$MKDIR"; then
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9460$as_echo "$MKDIR" >&6; }
9461else
9462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464fi
9465
9466
9467          if test "x$MKDIR" = x; then
9468            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9469          fi
9470        else
9471          # Otherwise we believe it is a complete path. Use it as it is.
9472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9473$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9474          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9475$as_echo_n "checking for MKDIR... " >&6; }
9476          if test ! -x "$tool_specified"; then
9477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9478$as_echo "not found" >&6; }
9479            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9480          fi
9481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9482$as_echo "$tool_specified" >&6; }
9483        fi
9484      fi
9485    fi
9486
9487  fi
9488
9489
9490
9491  if test "x$MKDIR" = x; then
9492    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9493  fi
9494
9495
9496
9497
9498
9499  # Publish this variable in the help.
9500
9501
9502  if [ -z "${MKTEMP+x}" ]; then
9503    # The variable is not set by user, try to locate tool using the code snippet
9504    for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549  else
9550    # The variable is set, but is it from the command line or the environment?
9551
9552    # Try to remove the string !MKTEMP! from our list.
9553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9555      # If it failed, the variable was not from the command line. Ignore it,
9556      # but warn the user (except for BASH, which is always set by the calling BASH).
9557      if test "xMKTEMP" != xBASH; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9559$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9560      fi
9561      # Try to locate tool using the code snippet
9562      for ac_prog in mktemp
9563do
9564  # Extract the first word of "$ac_prog", so it can be a program name with args.
9565set dummy $ac_prog; ac_word=$2
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9567$as_echo_n "checking for $ac_word... " >&6; }
9568if ${ac_cv_path_MKTEMP+:} false; then :
9569  $as_echo_n "(cached) " >&6
9570else
9571  case $MKTEMP in
9572  [\\/]* | ?:[\\/]*)
9573  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9574  ;;
9575  *)
9576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9577for as_dir in $PATH
9578do
9579  IFS=$as_save_IFS
9580  test -z "$as_dir" && as_dir=.
9581    for ac_exec_ext in '' $ac_executable_extensions; do
9582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9583    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9585    break 2
9586  fi
9587done
9588  done
9589IFS=$as_save_IFS
9590
9591  ;;
9592esac
9593fi
9594MKTEMP=$ac_cv_path_MKTEMP
9595if test -n "$MKTEMP"; then
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9597$as_echo "$MKTEMP" >&6; }
9598else
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
9601fi
9602
9603
9604  test -n "$MKTEMP" && break
9605done
9606
9607    else
9608      # If it succeeded, then it was overridden by the user. We will use it
9609      # for the tool.
9610
9611      # First remove it from the list of overridden variables, so we can test
9612      # for unknown variables in the end.
9613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9614
9615      # Check if we try to supply an empty value
9616      if test "x$MKTEMP" = x; then
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9618$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9620$as_echo_n "checking for MKTEMP... " >&6; }
9621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9622$as_echo "disabled" >&6; }
9623      else
9624        # Check if the provided tool contains a complete path.
9625        tool_specified="$MKTEMP"
9626        tool_basename="${tool_specified##*/}"
9627        if test "x$tool_basename" = "x$tool_specified"; then
9628          # A command without a complete path is provided, search $PATH.
9629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9630$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9631          # Extract the first word of "$tool_basename", so it can be a program name with args.
9632set dummy $tool_basename; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_MKTEMP+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $MKTEMP in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661MKTEMP=$ac_cv_path_MKTEMP
9662if test -n "$MKTEMP"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9664$as_echo "$MKTEMP" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671          if test "x$MKTEMP" = x; then
9672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673          fi
9674        else
9675          # Otherwise we believe it is a complete path. Use it as it is.
9676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9677$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9679$as_echo_n "checking for MKTEMP... " >&6; }
9680          if test ! -x "$tool_specified"; then
9681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682$as_echo "not found" >&6; }
9683            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9684          fi
9685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686$as_echo "$tool_specified" >&6; }
9687        fi
9688      fi
9689    fi
9690
9691  fi
9692
9693
9694
9695  if test "x$MKTEMP" = x; then
9696    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9697  fi
9698
9699
9700
9701
9702
9703  # Publish this variable in the help.
9704
9705
9706  if [ -z "${MV+x}" ]; then
9707    # The variable is not set by user, try to locate tool using the code snippet
9708    for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753  else
9754    # The variable is set, but is it from the command line or the environment?
9755
9756    # Try to remove the string !MV! from our list.
9757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9759      # If it failed, the variable was not from the command line. Ignore it,
9760      # but warn the user (except for BASH, which is always set by the calling BASH).
9761      if test "xMV" != xBASH; then
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9763$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9764      fi
9765      # Try to locate tool using the code snippet
9766      for ac_prog in mv
9767do
9768  # Extract the first word of "$ac_prog", so it can be a program name with args.
9769set dummy $ac_prog; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if ${ac_cv_path_MV+:} false; then :
9773  $as_echo_n "(cached) " >&6
9774else
9775  case $MV in
9776  [\\/]* | ?:[\\/]*)
9777  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9778  ;;
9779  *)
9780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781for as_dir in $PATH
9782do
9783  IFS=$as_save_IFS
9784  test -z "$as_dir" && as_dir=.
9785    for ac_exec_ext in '' $ac_executable_extensions; do
9786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9787    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789    break 2
9790  fi
9791done
9792  done
9793IFS=$as_save_IFS
9794
9795  ;;
9796esac
9797fi
9798MV=$ac_cv_path_MV
9799if test -n "$MV"; then
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9801$as_echo "$MV" >&6; }
9802else
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805fi
9806
9807
9808  test -n "$MV" && break
9809done
9810
9811    else
9812      # If it succeeded, then it was overridden by the user. We will use it
9813      # for the tool.
9814
9815      # First remove it from the list of overridden variables, so we can test
9816      # for unknown variables in the end.
9817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9818
9819      # Check if we try to supply an empty value
9820      if test "x$MV" = x; then
9821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9822$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9824$as_echo_n "checking for MV... " >&6; }
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9826$as_echo "disabled" >&6; }
9827      else
9828        # Check if the provided tool contains a complete path.
9829        tool_specified="$MV"
9830        tool_basename="${tool_specified##*/}"
9831        if test "x$tool_basename" = "x$tool_specified"; then
9832          # A command without a complete path is provided, search $PATH.
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9834$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9835          # Extract the first word of "$tool_basename", so it can be a program name with args.
9836set dummy $tool_basename; ac_word=$2
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838$as_echo_n "checking for $ac_word... " >&6; }
9839if ${ac_cv_path_MV+:} false; then :
9840  $as_echo_n "(cached) " >&6
9841else
9842  case $MV in
9843  [\\/]* | ?:[\\/]*)
9844  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9845  ;;
9846  *)
9847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9848for as_dir in $PATH
9849do
9850  IFS=$as_save_IFS
9851  test -z "$as_dir" && as_dir=.
9852    for ac_exec_ext in '' $ac_executable_extensions; do
9853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9854    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9856    break 2
9857  fi
9858done
9859  done
9860IFS=$as_save_IFS
9861
9862  ;;
9863esac
9864fi
9865MV=$ac_cv_path_MV
9866if test -n "$MV"; then
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9868$as_echo "$MV" >&6; }
9869else
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
9872fi
9873
9874
9875          if test "x$MV" = x; then
9876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9877          fi
9878        else
9879          # Otherwise we believe it is a complete path. Use it as it is.
9880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9881$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9883$as_echo_n "checking for MV... " >&6; }
9884          if test ! -x "$tool_specified"; then
9885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9886$as_echo "not found" >&6; }
9887            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9888          fi
9889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9890$as_echo "$tool_specified" >&6; }
9891        fi
9892      fi
9893    fi
9894
9895  fi
9896
9897
9898
9899  if test "x$MV" = x; then
9900    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9901  fi
9902
9903
9904
9905
9906
9907  # Publish this variable in the help.
9908
9909
9910  if [ -z "${NAWK+x}" ]; then
9911    # The variable is not set by user, try to locate tool using the code snippet
9912    for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957  else
9958    # The variable is set, but is it from the command line or the environment?
9959
9960    # Try to remove the string !NAWK! from our list.
9961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9963      # If it failed, the variable was not from the command line. Ignore it,
9964      # but warn the user (except for BASH, which is always set by the calling BASH).
9965      if test "xNAWK" != xBASH; then
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9967$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9968      fi
9969      # Try to locate tool using the code snippet
9970      for ac_prog in nawk gawk awk
9971do
9972  # Extract the first word of "$ac_prog", so it can be a program name with args.
9973set dummy $ac_prog; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if ${ac_cv_path_NAWK+:} false; then :
9977  $as_echo_n "(cached) " >&6
9978else
9979  case $NAWK in
9980  [\\/]* | ?:[\\/]*)
9981  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9982  ;;
9983  *)
9984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987  IFS=$as_save_IFS
9988  test -z "$as_dir" && as_dir=.
9989    for ac_exec_ext in '' $ac_executable_extensions; do
9990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993    break 2
9994  fi
9995done
9996  done
9997IFS=$as_save_IFS
9998
9999  ;;
10000esac
10001fi
10002NAWK=$ac_cv_path_NAWK
10003if test -n "$NAWK"; then
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10005$as_echo "$NAWK" >&6; }
10006else
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009fi
10010
10011
10012  test -n "$NAWK" && break
10013done
10014
10015    else
10016      # If it succeeded, then it was overridden by the user. We will use it
10017      # for the tool.
10018
10019      # First remove it from the list of overridden variables, so we can test
10020      # for unknown variables in the end.
10021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10022
10023      # Check if we try to supply an empty value
10024      if test "x$NAWK" = x; then
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10026$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10028$as_echo_n "checking for NAWK... " >&6; }
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10030$as_echo "disabled" >&6; }
10031      else
10032        # Check if the provided tool contains a complete path.
10033        tool_specified="$NAWK"
10034        tool_basename="${tool_specified##*/}"
10035        if test "x$tool_basename" = "x$tool_specified"; then
10036          # A command without a complete path is provided, search $PATH.
10037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10038$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10039          # Extract the first word of "$tool_basename", so it can be a program name with args.
10040set dummy $tool_basename; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if ${ac_cv_path_NAWK+:} false; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $NAWK in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10058    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069NAWK=$ac_cv_path_NAWK
10070if test -n "$NAWK"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10072$as_echo "$NAWK" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079          if test "x$NAWK" = x; then
10080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10081          fi
10082        else
10083          # Otherwise we believe it is a complete path. Use it as it is.
10084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10085$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10087$as_echo_n "checking for NAWK... " >&6; }
10088          if test ! -x "$tool_specified"; then
10089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10090$as_echo "not found" >&6; }
10091            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10092          fi
10093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10094$as_echo "$tool_specified" >&6; }
10095        fi
10096      fi
10097    fi
10098
10099  fi
10100
10101
10102
10103  if test "x$NAWK" = x; then
10104    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10105  fi
10106
10107
10108
10109
10110
10111  # Publish this variable in the help.
10112
10113
10114  if [ -z "${PRINTF+x}" ]; then
10115    # The variable is not set by user, try to locate tool using the code snippet
10116    for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161  else
10162    # The variable is set, but is it from the command line or the environment?
10163
10164    # Try to remove the string !PRINTF! from our list.
10165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10167      # If it failed, the variable was not from the command line. Ignore it,
10168      # but warn the user (except for BASH, which is always set by the calling BASH).
10169      if test "xPRINTF" != xBASH; then
10170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10171$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10172      fi
10173      # Try to locate tool using the code snippet
10174      for ac_prog in printf
10175do
10176  # Extract the first word of "$ac_prog", so it can be a program name with args.
10177set dummy $ac_prog; ac_word=$2
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179$as_echo_n "checking for $ac_word... " >&6; }
10180if ${ac_cv_path_PRINTF+:} false; then :
10181  $as_echo_n "(cached) " >&6
10182else
10183  case $PRINTF in
10184  [\\/]* | ?:[\\/]*)
10185  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10186  ;;
10187  *)
10188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189for as_dir in $PATH
10190do
10191  IFS=$as_save_IFS
10192  test -z "$as_dir" && as_dir=.
10193    for ac_exec_ext in '' $ac_executable_extensions; do
10194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10195    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197    break 2
10198  fi
10199done
10200  done
10201IFS=$as_save_IFS
10202
10203  ;;
10204esac
10205fi
10206PRINTF=$ac_cv_path_PRINTF
10207if test -n "$PRINTF"; then
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10209$as_echo "$PRINTF" >&6; }
10210else
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212$as_echo "no" >&6; }
10213fi
10214
10215
10216  test -n "$PRINTF" && break
10217done
10218
10219    else
10220      # If it succeeded, then it was overridden by the user. We will use it
10221      # for the tool.
10222
10223      # First remove it from the list of overridden variables, so we can test
10224      # for unknown variables in the end.
10225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10226
10227      # Check if we try to supply an empty value
10228      if test "x$PRINTF" = x; then
10229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10230$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10232$as_echo_n "checking for PRINTF... " >&6; }
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10234$as_echo "disabled" >&6; }
10235      else
10236        # Check if the provided tool contains a complete path.
10237        tool_specified="$PRINTF"
10238        tool_basename="${tool_specified##*/}"
10239        if test "x$tool_basename" = "x$tool_specified"; then
10240          # A command without a complete path is provided, search $PATH.
10241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10242$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10243          # Extract the first word of "$tool_basename", so it can be a program name with args.
10244set dummy $tool_basename; ac_word=$2
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10246$as_echo_n "checking for $ac_word... " >&6; }
10247if ${ac_cv_path_PRINTF+:} false; then :
10248  $as_echo_n "(cached) " >&6
10249else
10250  case $PRINTF in
10251  [\\/]* | ?:[\\/]*)
10252  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10253  ;;
10254  *)
10255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10256for as_dir in $PATH
10257do
10258  IFS=$as_save_IFS
10259  test -z "$as_dir" && as_dir=.
10260    for ac_exec_ext in '' $ac_executable_extensions; do
10261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10262    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10264    break 2
10265  fi
10266done
10267  done
10268IFS=$as_save_IFS
10269
10270  ;;
10271esac
10272fi
10273PRINTF=$ac_cv_path_PRINTF
10274if test -n "$PRINTF"; then
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10276$as_echo "$PRINTF" >&6; }
10277else
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282
10283          if test "x$PRINTF" = x; then
10284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10285          fi
10286        else
10287          # Otherwise we believe it is a complete path. Use it as it is.
10288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10289$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10291$as_echo_n "checking for PRINTF... " >&6; }
10292          if test ! -x "$tool_specified"; then
10293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10294$as_echo "not found" >&6; }
10295            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10296          fi
10297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10298$as_echo "$tool_specified" >&6; }
10299        fi
10300      fi
10301    fi
10302
10303  fi
10304
10305
10306
10307  if test "x$PRINTF" = x; then
10308    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10309  fi
10310
10311
10312
10313
10314
10315  # Publish this variable in the help.
10316
10317
10318  if [ -z "${RM+x}" ]; then
10319    # The variable is not set by user, try to locate tool using the code snippet
10320    for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365  else
10366    # The variable is set, but is it from the command line or the environment?
10367
10368    # Try to remove the string !RM! from our list.
10369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10371      # If it failed, the variable was not from the command line. Ignore it,
10372      # but warn the user (except for BASH, which is always set by the calling BASH).
10373      if test "xRM" != xBASH; then
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10375$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10376      fi
10377      # Try to locate tool using the code snippet
10378      for ac_prog in rm
10379do
10380  # Extract the first word of "$ac_prog", so it can be a program name with args.
10381set dummy $ac_prog; ac_word=$2
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
10384if ${ac_cv_path_RM+:} false; then :
10385  $as_echo_n "(cached) " >&6
10386else
10387  case $RM in
10388  [\\/]* | ?:[\\/]*)
10389  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10390  ;;
10391  *)
10392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10393for as_dir in $PATH
10394do
10395  IFS=$as_save_IFS
10396  test -z "$as_dir" && as_dir=.
10397    for ac_exec_ext in '' $ac_executable_extensions; do
10398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10399    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10401    break 2
10402  fi
10403done
10404  done
10405IFS=$as_save_IFS
10406
10407  ;;
10408esac
10409fi
10410RM=$ac_cv_path_RM
10411if test -n "$RM"; then
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10413$as_echo "$RM" >&6; }
10414else
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
10417fi
10418
10419
10420  test -n "$RM" && break
10421done
10422
10423    else
10424      # If it succeeded, then it was overridden by the user. We will use it
10425      # for the tool.
10426
10427      # First remove it from the list of overridden variables, so we can test
10428      # for unknown variables in the end.
10429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10430
10431      # Check if we try to supply an empty value
10432      if test "x$RM" = x; then
10433        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10434$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10436$as_echo_n "checking for RM... " >&6; }
10437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10438$as_echo "disabled" >&6; }
10439      else
10440        # Check if the provided tool contains a complete path.
10441        tool_specified="$RM"
10442        tool_basename="${tool_specified##*/}"
10443        if test "x$tool_basename" = "x$tool_specified"; then
10444          # A command without a complete path is provided, search $PATH.
10445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10446$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10447          # Extract the first word of "$tool_basename", so it can be a program name with args.
10448set dummy $tool_basename; ac_word=$2
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10450$as_echo_n "checking for $ac_word... " >&6; }
10451if ${ac_cv_path_RM+:} false; then :
10452  $as_echo_n "(cached) " >&6
10453else
10454  case $RM in
10455  [\\/]* | ?:[\\/]*)
10456  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10457  ;;
10458  *)
10459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460for as_dir in $PATH
10461do
10462  IFS=$as_save_IFS
10463  test -z "$as_dir" && as_dir=.
10464    for ac_exec_ext in '' $ac_executable_extensions; do
10465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10466    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10468    break 2
10469  fi
10470done
10471  done
10472IFS=$as_save_IFS
10473
10474  ;;
10475esac
10476fi
10477RM=$ac_cv_path_RM
10478if test -n "$RM"; then
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10480$as_echo "$RM" >&6; }
10481else
10482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10483$as_echo "no" >&6; }
10484fi
10485
10486
10487          if test "x$RM" = x; then
10488            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10489          fi
10490        else
10491          # Otherwise we believe it is a complete path. Use it as it is.
10492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10493$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10494          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10495$as_echo_n "checking for RM... " >&6; }
10496          if test ! -x "$tool_specified"; then
10497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10498$as_echo "not found" >&6; }
10499            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10500          fi
10501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10502$as_echo "$tool_specified" >&6; }
10503        fi
10504      fi
10505    fi
10506
10507  fi
10508
10509
10510
10511  if test "x$RM" = x; then
10512    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10513  fi
10514
10515
10516
10517
10518
10519  # Publish this variable in the help.
10520
10521
10522  if [ -z "${RMDIR+x}" ]; then
10523    # The variable is not set by user, try to locate tool using the code snippet
10524    for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569  else
10570    # The variable is set, but is it from the command line or the environment?
10571
10572    # Try to remove the string !RMDIR! from our list.
10573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10575      # If it failed, the variable was not from the command line. Ignore it,
10576      # but warn the user (except for BASH, which is always set by the calling BASH).
10577      if test "xRMDIR" != xBASH; then
10578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10579$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10580      fi
10581      # Try to locate tool using the code snippet
10582      for ac_prog in rmdir
10583do
10584  # Extract the first word of "$ac_prog", so it can be a program name with args.
10585set dummy $ac_prog; ac_word=$2
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10587$as_echo_n "checking for $ac_word... " >&6; }
10588if ${ac_cv_path_RMDIR+:} false; then :
10589  $as_echo_n "(cached) " >&6
10590else
10591  case $RMDIR in
10592  [\\/]* | ?:[\\/]*)
10593  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10594  ;;
10595  *)
10596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10597for as_dir in $PATH
10598do
10599  IFS=$as_save_IFS
10600  test -z "$as_dir" && as_dir=.
10601    for ac_exec_ext in '' $ac_executable_extensions; do
10602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10603    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10605    break 2
10606  fi
10607done
10608  done
10609IFS=$as_save_IFS
10610
10611  ;;
10612esac
10613fi
10614RMDIR=$ac_cv_path_RMDIR
10615if test -n "$RMDIR"; then
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10617$as_echo "$RMDIR" >&6; }
10618else
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
10621fi
10622
10623
10624  test -n "$RMDIR" && break
10625done
10626
10627    else
10628      # If it succeeded, then it was overridden by the user. We will use it
10629      # for the tool.
10630
10631      # First remove it from the list of overridden variables, so we can test
10632      # for unknown variables in the end.
10633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10634
10635      # Check if we try to supply an empty value
10636      if test "x$RMDIR" = x; then
10637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10638$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10640$as_echo_n "checking for RMDIR... " >&6; }
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10642$as_echo "disabled" >&6; }
10643      else
10644        # Check if the provided tool contains a complete path.
10645        tool_specified="$RMDIR"
10646        tool_basename="${tool_specified##*/}"
10647        if test "x$tool_basename" = "x$tool_specified"; then
10648          # A command without a complete path is provided, search $PATH.
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10650$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10651          # Extract the first word of "$tool_basename", so it can be a program name with args.
10652set dummy $tool_basename; ac_word=$2
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10654$as_echo_n "checking for $ac_word... " >&6; }
10655if ${ac_cv_path_RMDIR+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  case $RMDIR in
10659  [\\/]* | ?:[\\/]*)
10660  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10661  ;;
10662  *)
10663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666  IFS=$as_save_IFS
10667  test -z "$as_dir" && as_dir=.
10668    for ac_exec_ext in '' $ac_executable_extensions; do
10669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10670    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10672    break 2
10673  fi
10674done
10675  done
10676IFS=$as_save_IFS
10677
10678  ;;
10679esac
10680fi
10681RMDIR=$ac_cv_path_RMDIR
10682if test -n "$RMDIR"; then
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10684$as_echo "$RMDIR" >&6; }
10685else
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
10688fi
10689
10690
10691          if test "x$RMDIR" = x; then
10692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10693          fi
10694        else
10695          # Otherwise we believe it is a complete path. Use it as it is.
10696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10697$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10699$as_echo_n "checking for RMDIR... " >&6; }
10700          if test ! -x "$tool_specified"; then
10701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10702$as_echo "not found" >&6; }
10703            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10704          fi
10705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10706$as_echo "$tool_specified" >&6; }
10707        fi
10708      fi
10709    fi
10710
10711  fi
10712
10713
10714
10715  if test "x$RMDIR" = x; then
10716    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10717  fi
10718
10719
10720
10721
10722
10723  # Publish this variable in the help.
10724
10725
10726  if [ -z "${SH+x}" ]; then
10727    # The variable is not set by user, try to locate tool using the code snippet
10728    for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773  else
10774    # The variable is set, but is it from the command line or the environment?
10775
10776    # Try to remove the string !SH! from our list.
10777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10779      # If it failed, the variable was not from the command line. Ignore it,
10780      # but warn the user (except for BASH, which is always set by the calling BASH).
10781      if test "xSH" != xBASH; then
10782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10783$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10784      fi
10785      # Try to locate tool using the code snippet
10786      for ac_prog in sh
10787do
10788  # Extract the first word of "$ac_prog", so it can be a program name with args.
10789set dummy $ac_prog; ac_word=$2
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10791$as_echo_n "checking for $ac_word... " >&6; }
10792if ${ac_cv_path_SH+:} false; then :
10793  $as_echo_n "(cached) " >&6
10794else
10795  case $SH in
10796  [\\/]* | ?:[\\/]*)
10797  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10798  ;;
10799  *)
10800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10801for as_dir in $PATH
10802do
10803  IFS=$as_save_IFS
10804  test -z "$as_dir" && as_dir=.
10805    for ac_exec_ext in '' $ac_executable_extensions; do
10806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10807    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10809    break 2
10810  fi
10811done
10812  done
10813IFS=$as_save_IFS
10814
10815  ;;
10816esac
10817fi
10818SH=$ac_cv_path_SH
10819if test -n "$SH"; then
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10821$as_echo "$SH" >&6; }
10822else
10823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10824$as_echo "no" >&6; }
10825fi
10826
10827
10828  test -n "$SH" && break
10829done
10830
10831    else
10832      # If it succeeded, then it was overridden by the user. We will use it
10833      # for the tool.
10834
10835      # First remove it from the list of overridden variables, so we can test
10836      # for unknown variables in the end.
10837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10838
10839      # Check if we try to supply an empty value
10840      if test "x$SH" = x; then
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10842$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10844$as_echo_n "checking for SH... " >&6; }
10845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10846$as_echo "disabled" >&6; }
10847      else
10848        # Check if the provided tool contains a complete path.
10849        tool_specified="$SH"
10850        tool_basename="${tool_specified##*/}"
10851        if test "x$tool_basename" = "x$tool_specified"; then
10852          # A command without a complete path is provided, search $PATH.
10853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10854$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10855          # Extract the first word of "$tool_basename", so it can be a program name with args.
10856set dummy $tool_basename; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_SH+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $SH in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885SH=$ac_cv_path_SH
10886if test -n "$SH"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10888$as_echo "$SH" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895          if test "x$SH" = x; then
10896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10897          fi
10898        else
10899          # Otherwise we believe it is a complete path. Use it as it is.
10900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10901$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10903$as_echo_n "checking for SH... " >&6; }
10904          if test ! -x "$tool_specified"; then
10905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10906$as_echo "not found" >&6; }
10907            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10908          fi
10909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10910$as_echo "$tool_specified" >&6; }
10911        fi
10912      fi
10913    fi
10914
10915  fi
10916
10917
10918
10919  if test "x$SH" = x; then
10920    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10921  fi
10922
10923
10924
10925
10926
10927  # Publish this variable in the help.
10928
10929
10930  if [ -z "${SORT+x}" ]; then
10931    # The variable is not set by user, try to locate tool using the code snippet
10932    for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977  else
10978    # The variable is set, but is it from the command line or the environment?
10979
10980    # Try to remove the string !SORT! from our list.
10981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10983      # If it failed, the variable was not from the command line. Ignore it,
10984      # but warn the user (except for BASH, which is always set by the calling BASH).
10985      if test "xSORT" != xBASH; then
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10987$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10988      fi
10989      # Try to locate tool using the code snippet
10990      for ac_prog in sort
10991do
10992  # Extract the first word of "$ac_prog", so it can be a program name with args.
10993set dummy $ac_prog; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_SORT+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $SORT in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022SORT=$ac_cv_path_SORT
11023if test -n "$SORT"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11025$as_echo "$SORT" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032  test -n "$SORT" && break
11033done
11034
11035    else
11036      # If it succeeded, then it was overridden by the user. We will use it
11037      # for the tool.
11038
11039      # First remove it from the list of overridden variables, so we can test
11040      # for unknown variables in the end.
11041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11042
11043      # Check if we try to supply an empty value
11044      if test "x$SORT" = x; then
11045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11046$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11048$as_echo_n "checking for SORT... " >&6; }
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11050$as_echo "disabled" >&6; }
11051      else
11052        # Check if the provided tool contains a complete path.
11053        tool_specified="$SORT"
11054        tool_basename="${tool_specified##*/}"
11055        if test "x$tool_basename" = "x$tool_specified"; then
11056          # A command without a complete path is provided, search $PATH.
11057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11058$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11059          # Extract the first word of "$tool_basename", so it can be a program name with args.
11060set dummy $tool_basename; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_SORT+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $SORT in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089SORT=$ac_cv_path_SORT
11090if test -n "$SORT"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11092$as_echo "$SORT" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099          if test "x$SORT" = x; then
11100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11101          fi
11102        else
11103          # Otherwise we believe it is a complete path. Use it as it is.
11104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11105$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11107$as_echo_n "checking for SORT... " >&6; }
11108          if test ! -x "$tool_specified"; then
11109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11110$as_echo "not found" >&6; }
11111            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11112          fi
11113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11114$as_echo "$tool_specified" >&6; }
11115        fi
11116      fi
11117    fi
11118
11119  fi
11120
11121
11122
11123  if test "x$SORT" = x; then
11124    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11125  fi
11126
11127
11128
11129
11130
11131  # Publish this variable in the help.
11132
11133
11134  if [ -z "${TAIL+x}" ]; then
11135    # The variable is not set by user, try to locate tool using the code snippet
11136    for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181  else
11182    # The variable is set, but is it from the command line or the environment?
11183
11184    # Try to remove the string !TAIL! from our list.
11185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11187      # If it failed, the variable was not from the command line. Ignore it,
11188      # but warn the user (except for BASH, which is always set by the calling BASH).
11189      if test "xTAIL" != xBASH; then
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11191$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11192      fi
11193      # Try to locate tool using the code snippet
11194      for ac_prog in tail
11195do
11196  # Extract the first word of "$ac_prog", so it can be a program name with args.
11197set dummy $ac_prog; ac_word=$2
11198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11199$as_echo_n "checking for $ac_word... " >&6; }
11200if ${ac_cv_path_TAIL+:} false; then :
11201  $as_echo_n "(cached) " >&6
11202else
11203  case $TAIL in
11204  [\\/]* | ?:[\\/]*)
11205  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11206  ;;
11207  *)
11208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11209for as_dir in $PATH
11210do
11211  IFS=$as_save_IFS
11212  test -z "$as_dir" && as_dir=.
11213    for ac_exec_ext in '' $ac_executable_extensions; do
11214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11215    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11217    break 2
11218  fi
11219done
11220  done
11221IFS=$as_save_IFS
11222
11223  ;;
11224esac
11225fi
11226TAIL=$ac_cv_path_TAIL
11227if test -n "$TAIL"; then
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11229$as_echo "$TAIL" >&6; }
11230else
11231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
11233fi
11234
11235
11236  test -n "$TAIL" && break
11237done
11238
11239    else
11240      # If it succeeded, then it was overridden by the user. We will use it
11241      # for the tool.
11242
11243      # First remove it from the list of overridden variables, so we can test
11244      # for unknown variables in the end.
11245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11246
11247      # Check if we try to supply an empty value
11248      if test "x$TAIL" = x; then
11249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11250$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11252$as_echo_n "checking for TAIL... " >&6; }
11253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11254$as_echo "disabled" >&6; }
11255      else
11256        # Check if the provided tool contains a complete path.
11257        tool_specified="$TAIL"
11258        tool_basename="${tool_specified##*/}"
11259        if test "x$tool_basename" = "x$tool_specified"; then
11260          # A command without a complete path is provided, search $PATH.
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11262$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11263          # Extract the first word of "$tool_basename", so it can be a program name with args.
11264set dummy $tool_basename; ac_word=$2
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11266$as_echo_n "checking for $ac_word... " >&6; }
11267if ${ac_cv_path_TAIL+:} false; then :
11268  $as_echo_n "(cached) " >&6
11269else
11270  case $TAIL in
11271  [\\/]* | ?:[\\/]*)
11272  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11273  ;;
11274  *)
11275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11276for as_dir in $PATH
11277do
11278  IFS=$as_save_IFS
11279  test -z "$as_dir" && as_dir=.
11280    for ac_exec_ext in '' $ac_executable_extensions; do
11281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11282    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11284    break 2
11285  fi
11286done
11287  done
11288IFS=$as_save_IFS
11289
11290  ;;
11291esac
11292fi
11293TAIL=$ac_cv_path_TAIL
11294if test -n "$TAIL"; then
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11296$as_echo "$TAIL" >&6; }
11297else
11298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300fi
11301
11302
11303          if test "x$TAIL" = x; then
11304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11305          fi
11306        else
11307          # Otherwise we believe it is a complete path. Use it as it is.
11308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11309$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11311$as_echo_n "checking for TAIL... " >&6; }
11312          if test ! -x "$tool_specified"; then
11313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11314$as_echo "not found" >&6; }
11315            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11316          fi
11317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11318$as_echo "$tool_specified" >&6; }
11319        fi
11320      fi
11321    fi
11322
11323  fi
11324
11325
11326
11327  if test "x$TAIL" = x; then
11328    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11329  fi
11330
11331
11332
11333
11334
11335  # Publish this variable in the help.
11336
11337
11338  if [ -z "${TAR+x}" ]; then
11339    # The variable is not set by user, try to locate tool using the code snippet
11340    for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385  else
11386    # The variable is set, but is it from the command line or the environment?
11387
11388    # Try to remove the string !TAR! from our list.
11389    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11390    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11391      # If it failed, the variable was not from the command line. Ignore it,
11392      # but warn the user (except for BASH, which is always set by the calling BASH).
11393      if test "xTAR" != xBASH; then
11394        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11395$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11396      fi
11397      # Try to locate tool using the code snippet
11398      for ac_prog in gtar tar
11399do
11400  # Extract the first word of "$ac_prog", so it can be a program name with args.
11401set dummy $ac_prog; ac_word=$2
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11403$as_echo_n "checking for $ac_word... " >&6; }
11404if ${ac_cv_path_TAR+:} false; then :
11405  $as_echo_n "(cached) " >&6
11406else
11407  case $TAR in
11408  [\\/]* | ?:[\\/]*)
11409  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11410  ;;
11411  *)
11412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413for as_dir in $PATH
11414do
11415  IFS=$as_save_IFS
11416  test -z "$as_dir" && as_dir=.
11417    for ac_exec_ext in '' $ac_executable_extensions; do
11418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11419    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421    break 2
11422  fi
11423done
11424  done
11425IFS=$as_save_IFS
11426
11427  ;;
11428esac
11429fi
11430TAR=$ac_cv_path_TAR
11431if test -n "$TAR"; then
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11433$as_echo "$TAR" >&6; }
11434else
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
11437fi
11438
11439
11440  test -n "$TAR" && break
11441done
11442
11443    else
11444      # If it succeeded, then it was overridden by the user. We will use it
11445      # for the tool.
11446
11447      # First remove it from the list of overridden variables, so we can test
11448      # for unknown variables in the end.
11449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11450
11451      # Check if we try to supply an empty value
11452      if test "x$TAR" = x; then
11453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11454$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11456$as_echo_n "checking for TAR... " >&6; }
11457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11458$as_echo "disabled" >&6; }
11459      else
11460        # Check if the provided tool contains a complete path.
11461        tool_specified="$TAR"
11462        tool_basename="${tool_specified##*/}"
11463        if test "x$tool_basename" = "x$tool_specified"; then
11464          # A command without a complete path is provided, search $PATH.
11465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11466$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11467          # Extract the first word of "$tool_basename", so it can be a program name with args.
11468set dummy $tool_basename; ac_word=$2
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11470$as_echo_n "checking for $ac_word... " >&6; }
11471if ${ac_cv_path_TAR+:} false; then :
11472  $as_echo_n "(cached) " >&6
11473else
11474  case $TAR in
11475  [\\/]* | ?:[\\/]*)
11476  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11477  ;;
11478  *)
11479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11480for as_dir in $PATH
11481do
11482  IFS=$as_save_IFS
11483  test -z "$as_dir" && as_dir=.
11484    for ac_exec_ext in '' $ac_executable_extensions; do
11485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11486    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11488    break 2
11489  fi
11490done
11491  done
11492IFS=$as_save_IFS
11493
11494  ;;
11495esac
11496fi
11497TAR=$ac_cv_path_TAR
11498if test -n "$TAR"; then
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11500$as_echo "$TAR" >&6; }
11501else
11502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11503$as_echo "no" >&6; }
11504fi
11505
11506
11507          if test "x$TAR" = x; then
11508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11509          fi
11510        else
11511          # Otherwise we believe it is a complete path. Use it as it is.
11512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11513$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11515$as_echo_n "checking for TAR... " >&6; }
11516          if test ! -x "$tool_specified"; then
11517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11518$as_echo "not found" >&6; }
11519            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11520          fi
11521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11522$as_echo "$tool_specified" >&6; }
11523        fi
11524      fi
11525    fi
11526
11527  fi
11528
11529
11530
11531  if test "x$TAR" = x; then
11532    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11533  fi
11534
11535
11536
11537
11538
11539  # Publish this variable in the help.
11540
11541
11542  if [ -z "${TEE+x}" ]; then
11543    # The variable is not set by user, try to locate tool using the code snippet
11544    for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589  else
11590    # The variable is set, but is it from the command line or the environment?
11591
11592    # Try to remove the string !TEE! from our list.
11593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11595      # If it failed, the variable was not from the command line. Ignore it,
11596      # but warn the user (except for BASH, which is always set by the calling BASH).
11597      if test "xTEE" != xBASH; then
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11599$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11600      fi
11601      # Try to locate tool using the code snippet
11602      for ac_prog in tee
11603do
11604  # Extract the first word of "$ac_prog", so it can be a program name with args.
11605set dummy $ac_prog; ac_word=$2
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11607$as_echo_n "checking for $ac_word... " >&6; }
11608if ${ac_cv_path_TEE+:} false; then :
11609  $as_echo_n "(cached) " >&6
11610else
11611  case $TEE in
11612  [\\/]* | ?:[\\/]*)
11613  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11614  ;;
11615  *)
11616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617for as_dir in $PATH
11618do
11619  IFS=$as_save_IFS
11620  test -z "$as_dir" && as_dir=.
11621    for ac_exec_ext in '' $ac_executable_extensions; do
11622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11623    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625    break 2
11626  fi
11627done
11628  done
11629IFS=$as_save_IFS
11630
11631  ;;
11632esac
11633fi
11634TEE=$ac_cv_path_TEE
11635if test -n "$TEE"; then
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11637$as_echo "$TEE" >&6; }
11638else
11639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11640$as_echo "no" >&6; }
11641fi
11642
11643
11644  test -n "$TEE" && break
11645done
11646
11647    else
11648      # If it succeeded, then it was overridden by the user. We will use it
11649      # for the tool.
11650
11651      # First remove it from the list of overridden variables, so we can test
11652      # for unknown variables in the end.
11653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11654
11655      # Check if we try to supply an empty value
11656      if test "x$TEE" = x; then
11657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11658$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11660$as_echo_n "checking for TEE... " >&6; }
11661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11662$as_echo "disabled" >&6; }
11663      else
11664        # Check if the provided tool contains a complete path.
11665        tool_specified="$TEE"
11666        tool_basename="${tool_specified##*/}"
11667        if test "x$tool_basename" = "x$tool_specified"; then
11668          # A command without a complete path is provided, search $PATH.
11669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11670$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11671          # Extract the first word of "$tool_basename", so it can be a program name with args.
11672set dummy $tool_basename; ac_word=$2
11673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11674$as_echo_n "checking for $ac_word... " >&6; }
11675if ${ac_cv_path_TEE+:} false; then :
11676  $as_echo_n "(cached) " >&6
11677else
11678  case $TEE in
11679  [\\/]* | ?:[\\/]*)
11680  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11681  ;;
11682  *)
11683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11684for as_dir in $PATH
11685do
11686  IFS=$as_save_IFS
11687  test -z "$as_dir" && as_dir=.
11688    for ac_exec_ext in '' $ac_executable_extensions; do
11689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11690    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11692    break 2
11693  fi
11694done
11695  done
11696IFS=$as_save_IFS
11697
11698  ;;
11699esac
11700fi
11701TEE=$ac_cv_path_TEE
11702if test -n "$TEE"; then
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11704$as_echo "$TEE" >&6; }
11705else
11706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
11708fi
11709
11710
11711          if test "x$TEE" = x; then
11712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11713          fi
11714        else
11715          # Otherwise we believe it is a complete path. Use it as it is.
11716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11717$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11719$as_echo_n "checking for TEE... " >&6; }
11720          if test ! -x "$tool_specified"; then
11721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11722$as_echo "not found" >&6; }
11723            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11724          fi
11725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11726$as_echo "$tool_specified" >&6; }
11727        fi
11728      fi
11729    fi
11730
11731  fi
11732
11733
11734
11735  if test "x$TEE" = x; then
11736    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11737  fi
11738
11739
11740
11741
11742
11743  # Publish this variable in the help.
11744
11745
11746  if [ -z "${TOUCH+x}" ]; then
11747    # The variable is not set by user, try to locate tool using the code snippet
11748    for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793  else
11794    # The variable is set, but is it from the command line or the environment?
11795
11796    # Try to remove the string !TOUCH! from our list.
11797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11799      # If it failed, the variable was not from the command line. Ignore it,
11800      # but warn the user (except for BASH, which is always set by the calling BASH).
11801      if test "xTOUCH" != xBASH; then
11802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11803$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11804      fi
11805      # Try to locate tool using the code snippet
11806      for ac_prog in touch
11807do
11808  # Extract the first word of "$ac_prog", so it can be a program name with args.
11809set dummy $ac_prog; ac_word=$2
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11811$as_echo_n "checking for $ac_word... " >&6; }
11812if ${ac_cv_path_TOUCH+:} false; then :
11813  $as_echo_n "(cached) " >&6
11814else
11815  case $TOUCH in
11816  [\\/]* | ?:[\\/]*)
11817  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11818  ;;
11819  *)
11820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11821for as_dir in $PATH
11822do
11823  IFS=$as_save_IFS
11824  test -z "$as_dir" && as_dir=.
11825    for ac_exec_ext in '' $ac_executable_extensions; do
11826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11827    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11829    break 2
11830  fi
11831done
11832  done
11833IFS=$as_save_IFS
11834
11835  ;;
11836esac
11837fi
11838TOUCH=$ac_cv_path_TOUCH
11839if test -n "$TOUCH"; then
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11841$as_echo "$TOUCH" >&6; }
11842else
11843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11844$as_echo "no" >&6; }
11845fi
11846
11847
11848  test -n "$TOUCH" && break
11849done
11850
11851    else
11852      # If it succeeded, then it was overridden by the user. We will use it
11853      # for the tool.
11854
11855      # First remove it from the list of overridden variables, so we can test
11856      # for unknown variables in the end.
11857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11858
11859      # Check if we try to supply an empty value
11860      if test "x$TOUCH" = x; then
11861        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11862$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11864$as_echo_n "checking for TOUCH... " >&6; }
11865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11866$as_echo "disabled" >&6; }
11867      else
11868        # Check if the provided tool contains a complete path.
11869        tool_specified="$TOUCH"
11870        tool_basename="${tool_specified##*/}"
11871        if test "x$tool_basename" = "x$tool_specified"; then
11872          # A command without a complete path is provided, search $PATH.
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11874$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11875          # Extract the first word of "$tool_basename", so it can be a program name with args.
11876set dummy $tool_basename; ac_word=$2
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11878$as_echo_n "checking for $ac_word... " >&6; }
11879if ${ac_cv_path_TOUCH+:} false; then :
11880  $as_echo_n "(cached) " >&6
11881else
11882  case $TOUCH in
11883  [\\/]* | ?:[\\/]*)
11884  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11885  ;;
11886  *)
11887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11888for as_dir in $PATH
11889do
11890  IFS=$as_save_IFS
11891  test -z "$as_dir" && as_dir=.
11892    for ac_exec_ext in '' $ac_executable_extensions; do
11893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11894    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11896    break 2
11897  fi
11898done
11899  done
11900IFS=$as_save_IFS
11901
11902  ;;
11903esac
11904fi
11905TOUCH=$ac_cv_path_TOUCH
11906if test -n "$TOUCH"; then
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11908$as_echo "$TOUCH" >&6; }
11909else
11910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
11912fi
11913
11914
11915          if test "x$TOUCH" = x; then
11916            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11917          fi
11918        else
11919          # Otherwise we believe it is a complete path. Use it as it is.
11920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11921$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11922          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11923$as_echo_n "checking for TOUCH... " >&6; }
11924          if test ! -x "$tool_specified"; then
11925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11926$as_echo "not found" >&6; }
11927            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11928          fi
11929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11930$as_echo "$tool_specified" >&6; }
11931        fi
11932      fi
11933    fi
11934
11935  fi
11936
11937
11938
11939  if test "x$TOUCH" = x; then
11940    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11941  fi
11942
11943
11944
11945
11946
11947  # Publish this variable in the help.
11948
11949
11950  if [ -z "${TR+x}" ]; then
11951    # The variable is not set by user, try to locate tool using the code snippet
11952    for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997  else
11998    # The variable is set, but is it from the command line or the environment?
11999
12000    # Try to remove the string !TR! from our list.
12001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12003      # If it failed, the variable was not from the command line. Ignore it,
12004      # but warn the user (except for BASH, which is always set by the calling BASH).
12005      if test "xTR" != xBASH; then
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12007$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12008      fi
12009      # Try to locate tool using the code snippet
12010      for ac_prog in tr
12011do
12012  # Extract the first word of "$ac_prog", so it can be a program name with args.
12013set dummy $ac_prog; ac_word=$2
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12015$as_echo_n "checking for $ac_word... " >&6; }
12016if ${ac_cv_path_TR+:} false; then :
12017  $as_echo_n "(cached) " >&6
12018else
12019  case $TR in
12020  [\\/]* | ?:[\\/]*)
12021  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12022  ;;
12023  *)
12024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12025for as_dir in $PATH
12026do
12027  IFS=$as_save_IFS
12028  test -z "$as_dir" && as_dir=.
12029    for ac_exec_ext in '' $ac_executable_extensions; do
12030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12031    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12033    break 2
12034  fi
12035done
12036  done
12037IFS=$as_save_IFS
12038
12039  ;;
12040esac
12041fi
12042TR=$ac_cv_path_TR
12043if test -n "$TR"; then
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12045$as_echo "$TR" >&6; }
12046else
12047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12048$as_echo "no" >&6; }
12049fi
12050
12051
12052  test -n "$TR" && break
12053done
12054
12055    else
12056      # If it succeeded, then it was overridden by the user. We will use it
12057      # for the tool.
12058
12059      # First remove it from the list of overridden variables, so we can test
12060      # for unknown variables in the end.
12061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12062
12063      # Check if we try to supply an empty value
12064      if test "x$TR" = x; then
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12066$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12068$as_echo_n "checking for TR... " >&6; }
12069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12070$as_echo "disabled" >&6; }
12071      else
12072        # Check if the provided tool contains a complete path.
12073        tool_specified="$TR"
12074        tool_basename="${tool_specified##*/}"
12075        if test "x$tool_basename" = "x$tool_specified"; then
12076          # A command without a complete path is provided, search $PATH.
12077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12078$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12079          # Extract the first word of "$tool_basename", so it can be a program name with args.
12080set dummy $tool_basename; ac_word=$2
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12082$as_echo_n "checking for $ac_word... " >&6; }
12083if ${ac_cv_path_TR+:} false; then :
12084  $as_echo_n "(cached) " >&6
12085else
12086  case $TR in
12087  [\\/]* | ?:[\\/]*)
12088  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12089  ;;
12090  *)
12091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092for as_dir in $PATH
12093do
12094  IFS=$as_save_IFS
12095  test -z "$as_dir" && as_dir=.
12096    for ac_exec_ext in '' $ac_executable_extensions; do
12097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12098    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12100    break 2
12101  fi
12102done
12103  done
12104IFS=$as_save_IFS
12105
12106  ;;
12107esac
12108fi
12109TR=$ac_cv_path_TR
12110if test -n "$TR"; then
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12112$as_echo "$TR" >&6; }
12113else
12114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
12116fi
12117
12118
12119          if test "x$TR" = x; then
12120            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12121          fi
12122        else
12123          # Otherwise we believe it is a complete path. Use it as it is.
12124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12125$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12127$as_echo_n "checking for TR... " >&6; }
12128          if test ! -x "$tool_specified"; then
12129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12130$as_echo "not found" >&6; }
12131            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12132          fi
12133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12134$as_echo "$tool_specified" >&6; }
12135        fi
12136      fi
12137    fi
12138
12139  fi
12140
12141
12142
12143  if test "x$TR" = x; then
12144    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12145  fi
12146
12147
12148
12149
12150
12151  # Publish this variable in the help.
12152
12153
12154  if [ -z "${UNAME+x}" ]; then
12155    # The variable is not set by user, try to locate tool using the code snippet
12156    for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201  else
12202    # The variable is set, but is it from the command line or the environment?
12203
12204    # Try to remove the string !UNAME! from our list.
12205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12207      # If it failed, the variable was not from the command line. Ignore it,
12208      # but warn the user (except for BASH, which is always set by the calling BASH).
12209      if test "xUNAME" != xBASH; then
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12211$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12212      fi
12213      # Try to locate tool using the code snippet
12214      for ac_prog in uname
12215do
12216  # Extract the first word of "$ac_prog", so it can be a program name with args.
12217set dummy $ac_prog; ac_word=$2
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12219$as_echo_n "checking for $ac_word... " >&6; }
12220if ${ac_cv_path_UNAME+:} false; then :
12221  $as_echo_n "(cached) " >&6
12222else
12223  case $UNAME in
12224  [\\/]* | ?:[\\/]*)
12225  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12226  ;;
12227  *)
12228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12229for as_dir in $PATH
12230do
12231  IFS=$as_save_IFS
12232  test -z "$as_dir" && as_dir=.
12233    for ac_exec_ext in '' $ac_executable_extensions; do
12234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12235    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12237    break 2
12238  fi
12239done
12240  done
12241IFS=$as_save_IFS
12242
12243  ;;
12244esac
12245fi
12246UNAME=$ac_cv_path_UNAME
12247if test -n "$UNAME"; then
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12249$as_echo "$UNAME" >&6; }
12250else
12251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12252$as_echo "no" >&6; }
12253fi
12254
12255
12256  test -n "$UNAME" && break
12257done
12258
12259    else
12260      # If it succeeded, then it was overridden by the user. We will use it
12261      # for the tool.
12262
12263      # First remove it from the list of overridden variables, so we can test
12264      # for unknown variables in the end.
12265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12266
12267      # Check if we try to supply an empty value
12268      if test "x$UNAME" = x; then
12269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12270$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12272$as_echo_n "checking for UNAME... " >&6; }
12273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12274$as_echo "disabled" >&6; }
12275      else
12276        # Check if the provided tool contains a complete path.
12277        tool_specified="$UNAME"
12278        tool_basename="${tool_specified##*/}"
12279        if test "x$tool_basename" = "x$tool_specified"; then
12280          # A command without a complete path is provided, search $PATH.
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12282$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12283          # Extract the first word of "$tool_basename", so it can be a program name with args.
12284set dummy $tool_basename; ac_word=$2
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12286$as_echo_n "checking for $ac_word... " >&6; }
12287if ${ac_cv_path_UNAME+:} false; then :
12288  $as_echo_n "(cached) " >&6
12289else
12290  case $UNAME in
12291  [\\/]* | ?:[\\/]*)
12292  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12293  ;;
12294  *)
12295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12296for as_dir in $PATH
12297do
12298  IFS=$as_save_IFS
12299  test -z "$as_dir" && as_dir=.
12300    for ac_exec_ext in '' $ac_executable_extensions; do
12301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12302    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12304    break 2
12305  fi
12306done
12307  done
12308IFS=$as_save_IFS
12309
12310  ;;
12311esac
12312fi
12313UNAME=$ac_cv_path_UNAME
12314if test -n "$UNAME"; then
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12316$as_echo "$UNAME" >&6; }
12317else
12318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12319$as_echo "no" >&6; }
12320fi
12321
12322
12323          if test "x$UNAME" = x; then
12324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12325          fi
12326        else
12327          # Otherwise we believe it is a complete path. Use it as it is.
12328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12329$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12331$as_echo_n "checking for UNAME... " >&6; }
12332          if test ! -x "$tool_specified"; then
12333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12334$as_echo "not found" >&6; }
12335            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12336          fi
12337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12338$as_echo "$tool_specified" >&6; }
12339        fi
12340      fi
12341    fi
12342
12343  fi
12344
12345
12346
12347  if test "x$UNAME" = x; then
12348    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12349  fi
12350
12351
12352
12353
12354
12355  # Publish this variable in the help.
12356
12357
12358  if [ -z "${UNIQ+x}" ]; then
12359    # The variable is not set by user, try to locate tool using the code snippet
12360    for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405  else
12406    # The variable is set, but is it from the command line or the environment?
12407
12408    # Try to remove the string !UNIQ! from our list.
12409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12411      # If it failed, the variable was not from the command line. Ignore it,
12412      # but warn the user (except for BASH, which is always set by the calling BASH).
12413      if test "xUNIQ" != xBASH; then
12414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12415$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12416      fi
12417      # Try to locate tool using the code snippet
12418      for ac_prog in uniq
12419do
12420  # Extract the first word of "$ac_prog", so it can be a program name with args.
12421set dummy $ac_prog; ac_word=$2
12422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12423$as_echo_n "checking for $ac_word... " >&6; }
12424if ${ac_cv_path_UNIQ+:} false; then :
12425  $as_echo_n "(cached) " >&6
12426else
12427  case $UNIQ in
12428  [\\/]* | ?:[\\/]*)
12429  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12430  ;;
12431  *)
12432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12433for as_dir in $PATH
12434do
12435  IFS=$as_save_IFS
12436  test -z "$as_dir" && as_dir=.
12437    for ac_exec_ext in '' $ac_executable_extensions; do
12438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12439    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12441    break 2
12442  fi
12443done
12444  done
12445IFS=$as_save_IFS
12446
12447  ;;
12448esac
12449fi
12450UNIQ=$ac_cv_path_UNIQ
12451if test -n "$UNIQ"; then
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12453$as_echo "$UNIQ" >&6; }
12454else
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12456$as_echo "no" >&6; }
12457fi
12458
12459
12460  test -n "$UNIQ" && break
12461done
12462
12463    else
12464      # If it succeeded, then it was overridden by the user. We will use it
12465      # for the tool.
12466
12467      # First remove it from the list of overridden variables, so we can test
12468      # for unknown variables in the end.
12469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12470
12471      # Check if we try to supply an empty value
12472      if test "x$UNIQ" = x; then
12473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12474$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12476$as_echo_n "checking for UNIQ... " >&6; }
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12478$as_echo "disabled" >&6; }
12479      else
12480        # Check if the provided tool contains a complete path.
12481        tool_specified="$UNIQ"
12482        tool_basename="${tool_specified##*/}"
12483        if test "x$tool_basename" = "x$tool_specified"; then
12484          # A command without a complete path is provided, search $PATH.
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12486$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12487          # Extract the first word of "$tool_basename", so it can be a program name with args.
12488set dummy $tool_basename; ac_word=$2
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12490$as_echo_n "checking for $ac_word... " >&6; }
12491if ${ac_cv_path_UNIQ+:} false; then :
12492  $as_echo_n "(cached) " >&6
12493else
12494  case $UNIQ in
12495  [\\/]* | ?:[\\/]*)
12496  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12497  ;;
12498  *)
12499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12500for as_dir in $PATH
12501do
12502  IFS=$as_save_IFS
12503  test -z "$as_dir" && as_dir=.
12504    for ac_exec_ext in '' $ac_executable_extensions; do
12505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12506    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12508    break 2
12509  fi
12510done
12511  done
12512IFS=$as_save_IFS
12513
12514  ;;
12515esac
12516fi
12517UNIQ=$ac_cv_path_UNIQ
12518if test -n "$UNIQ"; then
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12520$as_echo "$UNIQ" >&6; }
12521else
12522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
12524fi
12525
12526
12527          if test "x$UNIQ" = x; then
12528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12529          fi
12530        else
12531          # Otherwise we believe it is a complete path. Use it as it is.
12532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12533$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12535$as_echo_n "checking for UNIQ... " >&6; }
12536          if test ! -x "$tool_specified"; then
12537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12538$as_echo "not found" >&6; }
12539            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12540          fi
12541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12542$as_echo "$tool_specified" >&6; }
12543        fi
12544      fi
12545    fi
12546
12547  fi
12548
12549
12550
12551  if test "x$UNIQ" = x; then
12552    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12553  fi
12554
12555
12556
12557
12558
12559  # Publish this variable in the help.
12560
12561
12562  if [ -z "${WC+x}" ]; then
12563    # The variable is not set by user, try to locate tool using the code snippet
12564    for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609  else
12610    # The variable is set, but is it from the command line or the environment?
12611
12612    # Try to remove the string !WC! from our list.
12613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12615      # If it failed, the variable was not from the command line. Ignore it,
12616      # but warn the user (except for BASH, which is always set by the calling BASH).
12617      if test "xWC" != xBASH; then
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12619$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12620      fi
12621      # Try to locate tool using the code snippet
12622      for ac_prog in wc
12623do
12624  # Extract the first word of "$ac_prog", so it can be a program name with args.
12625set dummy $ac_prog; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_WC+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $WC in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654WC=$ac_cv_path_WC
12655if test -n "$WC"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12657$as_echo "$WC" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664  test -n "$WC" && break
12665done
12666
12667    else
12668      # If it succeeded, then it was overridden by the user. We will use it
12669      # for the tool.
12670
12671      # First remove it from the list of overridden variables, so we can test
12672      # for unknown variables in the end.
12673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12674
12675      # Check if we try to supply an empty value
12676      if test "x$WC" = x; then
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12678$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12680$as_echo_n "checking for WC... " >&6; }
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12682$as_echo "disabled" >&6; }
12683      else
12684        # Check if the provided tool contains a complete path.
12685        tool_specified="$WC"
12686        tool_basename="${tool_specified##*/}"
12687        if test "x$tool_basename" = "x$tool_specified"; then
12688          # A command without a complete path is provided, search $PATH.
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12690$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12691          # Extract the first word of "$tool_basename", so it can be a program name with args.
12692set dummy $tool_basename; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_WC+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $WC in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721WC=$ac_cv_path_WC
12722if test -n "$WC"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12724$as_echo "$WC" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731          if test "x$WC" = x; then
12732            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12733          fi
12734        else
12735          # Otherwise we believe it is a complete path. Use it as it is.
12736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12737$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12738          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12739$as_echo_n "checking for WC... " >&6; }
12740          if test ! -x "$tool_specified"; then
12741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12742$as_echo "not found" >&6; }
12743            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12744          fi
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12746$as_echo "$tool_specified" >&6; }
12747        fi
12748      fi
12749    fi
12750
12751  fi
12752
12753
12754
12755  if test "x$WC" = x; then
12756    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12757  fi
12758
12759
12760
12761
12762
12763  # Publish this variable in the help.
12764
12765
12766  if [ -z "${WHICH+x}" ]; then
12767    # The variable is not set by user, try to locate tool using the code snippet
12768    for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813  else
12814    # The variable is set, but is it from the command line or the environment?
12815
12816    # Try to remove the string !WHICH! from our list.
12817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12819      # If it failed, the variable was not from the command line. Ignore it,
12820      # but warn the user (except for BASH, which is always set by the calling BASH).
12821      if test "xWHICH" != xBASH; then
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12823$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12824      fi
12825      # Try to locate tool using the code snippet
12826      for ac_prog in which
12827do
12828  # Extract the first word of "$ac_prog", so it can be a program name with args.
12829set dummy $ac_prog; ac_word=$2
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12831$as_echo_n "checking for $ac_word... " >&6; }
12832if ${ac_cv_path_WHICH+:} false; then :
12833  $as_echo_n "(cached) " >&6
12834else
12835  case $WHICH in
12836  [\\/]* | ?:[\\/]*)
12837  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12838  ;;
12839  *)
12840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12841for as_dir in $PATH
12842do
12843  IFS=$as_save_IFS
12844  test -z "$as_dir" && as_dir=.
12845    for ac_exec_ext in '' $ac_executable_extensions; do
12846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12847    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12849    break 2
12850  fi
12851done
12852  done
12853IFS=$as_save_IFS
12854
12855  ;;
12856esac
12857fi
12858WHICH=$ac_cv_path_WHICH
12859if test -n "$WHICH"; then
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12861$as_echo "$WHICH" >&6; }
12862else
12863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864$as_echo "no" >&6; }
12865fi
12866
12867
12868  test -n "$WHICH" && break
12869done
12870
12871    else
12872      # If it succeeded, then it was overridden by the user. We will use it
12873      # for the tool.
12874
12875      # First remove it from the list of overridden variables, so we can test
12876      # for unknown variables in the end.
12877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12878
12879      # Check if we try to supply an empty value
12880      if test "x$WHICH" = x; then
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12882$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12884$as_echo_n "checking for WHICH... " >&6; }
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12886$as_echo "disabled" >&6; }
12887      else
12888        # Check if the provided tool contains a complete path.
12889        tool_specified="$WHICH"
12890        tool_basename="${tool_specified##*/}"
12891        if test "x$tool_basename" = "x$tool_specified"; then
12892          # A command without a complete path is provided, search $PATH.
12893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12894$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12895          # Extract the first word of "$tool_basename", so it can be a program name with args.
12896set dummy $tool_basename; ac_word=$2
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12898$as_echo_n "checking for $ac_word... " >&6; }
12899if ${ac_cv_path_WHICH+:} false; then :
12900  $as_echo_n "(cached) " >&6
12901else
12902  case $WHICH in
12903  [\\/]* | ?:[\\/]*)
12904  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12905  ;;
12906  *)
12907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12908for as_dir in $PATH
12909do
12910  IFS=$as_save_IFS
12911  test -z "$as_dir" && as_dir=.
12912    for ac_exec_ext in '' $ac_executable_extensions; do
12913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12914    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12916    break 2
12917  fi
12918done
12919  done
12920IFS=$as_save_IFS
12921
12922  ;;
12923esac
12924fi
12925WHICH=$ac_cv_path_WHICH
12926if test -n "$WHICH"; then
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12928$as_echo "$WHICH" >&6; }
12929else
12930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12931$as_echo "no" >&6; }
12932fi
12933
12934
12935          if test "x$WHICH" = x; then
12936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12937          fi
12938        else
12939          # Otherwise we believe it is a complete path. Use it as it is.
12940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12941$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12943$as_echo_n "checking for WHICH... " >&6; }
12944          if test ! -x "$tool_specified"; then
12945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12946$as_echo "not found" >&6; }
12947            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12948          fi
12949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12950$as_echo "$tool_specified" >&6; }
12951        fi
12952      fi
12953    fi
12954
12955  fi
12956
12957
12958
12959  if test "x$WHICH" = x; then
12960    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12961  fi
12962
12963
12964
12965
12966
12967  # Publish this variable in the help.
12968
12969
12970  if [ -z "${XARGS+x}" ]; then
12971    # The variable is not set by user, try to locate tool using the code snippet
12972    for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017  else
13018    # The variable is set, but is it from the command line or the environment?
13019
13020    # Try to remove the string !XARGS! from our list.
13021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13023      # If it failed, the variable was not from the command line. Ignore it,
13024      # but warn the user (except for BASH, which is always set by the calling BASH).
13025      if test "xXARGS" != xBASH; then
13026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13027$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13028      fi
13029      # Try to locate tool using the code snippet
13030      for ac_prog in xargs
13031do
13032  # Extract the first word of "$ac_prog", so it can be a program name with args.
13033set dummy $ac_prog; ac_word=$2
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13035$as_echo_n "checking for $ac_word... " >&6; }
13036if ${ac_cv_path_XARGS+:} false; then :
13037  $as_echo_n "(cached) " >&6
13038else
13039  case $XARGS in
13040  [\\/]* | ?:[\\/]*)
13041  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13042  ;;
13043  *)
13044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13045for as_dir in $PATH
13046do
13047  IFS=$as_save_IFS
13048  test -z "$as_dir" && as_dir=.
13049    for ac_exec_ext in '' $ac_executable_extensions; do
13050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13051    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13053    break 2
13054  fi
13055done
13056  done
13057IFS=$as_save_IFS
13058
13059  ;;
13060esac
13061fi
13062XARGS=$ac_cv_path_XARGS
13063if test -n "$XARGS"; then
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13065$as_echo "$XARGS" >&6; }
13066else
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13068$as_echo "no" >&6; }
13069fi
13070
13071
13072  test -n "$XARGS" && break
13073done
13074
13075    else
13076      # If it succeeded, then it was overridden by the user. We will use it
13077      # for the tool.
13078
13079      # First remove it from the list of overridden variables, so we can test
13080      # for unknown variables in the end.
13081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13082
13083      # Check if we try to supply an empty value
13084      if test "x$XARGS" = x; then
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13086$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13088$as_echo_n "checking for XARGS... " >&6; }
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13090$as_echo "disabled" >&6; }
13091      else
13092        # Check if the provided tool contains a complete path.
13093        tool_specified="$XARGS"
13094        tool_basename="${tool_specified##*/}"
13095        if test "x$tool_basename" = "x$tool_specified"; then
13096          # A command without a complete path is provided, search $PATH.
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13098$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13099          # Extract the first word of "$tool_basename", so it can be a program name with args.
13100set dummy $tool_basename; ac_word=$2
13101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13102$as_echo_n "checking for $ac_word... " >&6; }
13103if ${ac_cv_path_XARGS+:} false; then :
13104  $as_echo_n "(cached) " >&6
13105else
13106  case $XARGS in
13107  [\\/]* | ?:[\\/]*)
13108  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13109  ;;
13110  *)
13111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13112for as_dir in $PATH
13113do
13114  IFS=$as_save_IFS
13115  test -z "$as_dir" && as_dir=.
13116    for ac_exec_ext in '' $ac_executable_extensions; do
13117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13118    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13120    break 2
13121  fi
13122done
13123  done
13124IFS=$as_save_IFS
13125
13126  ;;
13127esac
13128fi
13129XARGS=$ac_cv_path_XARGS
13130if test -n "$XARGS"; then
13131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13132$as_echo "$XARGS" >&6; }
13133else
13134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13135$as_echo "no" >&6; }
13136fi
13137
13138
13139          if test "x$XARGS" = x; then
13140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13141          fi
13142        else
13143          # Otherwise we believe it is a complete path. Use it as it is.
13144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13145$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13147$as_echo_n "checking for XARGS... " >&6; }
13148          if test ! -x "$tool_specified"; then
13149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13150$as_echo "not found" >&6; }
13151            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13152          fi
13153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13154$as_echo "$tool_specified" >&6; }
13155        fi
13156      fi
13157    fi
13158
13159  fi
13160
13161
13162
13163  if test "x$XARGS" = x; then
13164    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13165  fi
13166
13167
13168
13169  # Then required tools that require some special treatment.
13170
13171
13172  # Publish this variable in the help.
13173
13174
13175  if [ -z "${AWK+x}" ]; then
13176    # The variable is not set by user, try to locate tool using the code snippet
13177    for ac_prog in gawk mawk nawk awk
13178do
13179  # Extract the first word of "$ac_prog", so it can be a program name with args.
13180set dummy $ac_prog; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_prog_AWK+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  if test -n "$AWK"; then
13187  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13188else
13189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13190for as_dir in $PATH
13191do
13192  IFS=$as_save_IFS
13193  test -z "$as_dir" && as_dir=.
13194    for ac_exec_ext in '' $ac_executable_extensions; do
13195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13196    ac_cv_prog_AWK="$ac_prog"
13197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13198    break 2
13199  fi
13200done
13201  done
13202IFS=$as_save_IFS
13203
13204fi
13205fi
13206AWK=$ac_cv_prog_AWK
13207if test -n "$AWK"; then
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13209$as_echo "$AWK" >&6; }
13210else
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
13213fi
13214
13215
13216  test -n "$AWK" && break
13217done
13218
13219  else
13220    # The variable is set, but is it from the command line or the environment?
13221
13222    # Try to remove the string !AWK! from our list.
13223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13225      # If it failed, the variable was not from the command line. Ignore it,
13226      # but warn the user (except for BASH, which is always set by the calling BASH).
13227      if test "xAWK" != xBASH; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13229$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13230      fi
13231      # Try to locate tool using the code snippet
13232      for ac_prog in gawk mawk nawk awk
13233do
13234  # Extract the first word of "$ac_prog", so it can be a program name with args.
13235set dummy $ac_prog; ac_word=$2
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13237$as_echo_n "checking for $ac_word... " >&6; }
13238if ${ac_cv_prog_AWK+:} false; then :
13239  $as_echo_n "(cached) " >&6
13240else
13241  if test -n "$AWK"; then
13242  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13243else
13244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13245for as_dir in $PATH
13246do
13247  IFS=$as_save_IFS
13248  test -z "$as_dir" && as_dir=.
13249    for ac_exec_ext in '' $ac_executable_extensions; do
13250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13251    ac_cv_prog_AWK="$ac_prog"
13252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13253    break 2
13254  fi
13255done
13256  done
13257IFS=$as_save_IFS
13258
13259fi
13260fi
13261AWK=$ac_cv_prog_AWK
13262if test -n "$AWK"; then
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13264$as_echo "$AWK" >&6; }
13265else
13266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13267$as_echo "no" >&6; }
13268fi
13269
13270
13271  test -n "$AWK" && break
13272done
13273
13274    else
13275      # If it succeeded, then it was overridden by the user. We will use it
13276      # for the tool.
13277
13278      # First remove it from the list of overridden variables, so we can test
13279      # for unknown variables in the end.
13280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13281
13282      # Check if we try to supply an empty value
13283      if test "x$AWK" = x; then
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13285$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13287$as_echo_n "checking for AWK... " >&6; }
13288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13289$as_echo "disabled" >&6; }
13290      else
13291        # Check if the provided tool contains a complete path.
13292        tool_specified="$AWK"
13293        tool_basename="${tool_specified##*/}"
13294        if test "x$tool_basename" = "x$tool_specified"; then
13295          # A command without a complete path is provided, search $PATH.
13296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13297$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13298          # Extract the first word of "$tool_basename", so it can be a program name with args.
13299set dummy $tool_basename; ac_word=$2
13300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13301$as_echo_n "checking for $ac_word... " >&6; }
13302if ${ac_cv_path_AWK+:} false; then :
13303  $as_echo_n "(cached) " >&6
13304else
13305  case $AWK in
13306  [\\/]* | ?:[\\/]*)
13307  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13308  ;;
13309  *)
13310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13311for as_dir in $PATH
13312do
13313  IFS=$as_save_IFS
13314  test -z "$as_dir" && as_dir=.
13315    for ac_exec_ext in '' $ac_executable_extensions; do
13316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13317    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13319    break 2
13320  fi
13321done
13322  done
13323IFS=$as_save_IFS
13324
13325  ;;
13326esac
13327fi
13328AWK=$ac_cv_path_AWK
13329if test -n "$AWK"; then
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13331$as_echo "$AWK" >&6; }
13332else
13333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13334$as_echo "no" >&6; }
13335fi
13336
13337
13338          if test "x$AWK" = x; then
13339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13340          fi
13341        else
13342          # Otherwise we believe it is a complete path. Use it as it is.
13343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13344$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13346$as_echo_n "checking for AWK... " >&6; }
13347          if test ! -x "$tool_specified"; then
13348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13349$as_echo "not found" >&6; }
13350            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13351          fi
13352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13353$as_echo "$tool_specified" >&6; }
13354        fi
13355      fi
13356    fi
13357
13358  fi
13359
13360
13361  if test "x$AWK" = x; then
13362    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13363  fi
13364
13365
13366
13367
13368  # Publish this variable in the help.
13369
13370
13371  if [ -z "${GREP+x}" ]; then
13372    # The variable is not set by user, try to locate tool using the code snippet
13373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13374$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13375if ${ac_cv_path_GREP+:} false; then :
13376  $as_echo_n "(cached) " >&6
13377else
13378  if test -z "$GREP"; then
13379  ac_path_GREP_found=false
13380  # Loop through the user's path and test for each of PROGNAME-LIST
13381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13382for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13383do
13384  IFS=$as_save_IFS
13385  test -z "$as_dir" && as_dir=.
13386    for ac_prog in grep ggrep; do
13387    for ac_exec_ext in '' $ac_executable_extensions; do
13388      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13389      as_fn_executable_p "$ac_path_GREP" || continue
13390# Check for GNU ac_path_GREP and select it if it is found.
13391  # Check for GNU $ac_path_GREP
13392case `"$ac_path_GREP" --version 2>&1` in
13393*GNU*)
13394  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13395*)
13396  ac_count=0
13397  $as_echo_n 0123456789 >"conftest.in"
13398  while :
13399  do
13400    cat "conftest.in" "conftest.in" >"conftest.tmp"
13401    mv "conftest.tmp" "conftest.in"
13402    cp "conftest.in" "conftest.nl"
13403    $as_echo 'GREP' >> "conftest.nl"
13404    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13405    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13406    as_fn_arith $ac_count + 1 && ac_count=$as_val
13407    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13408      # Best one so far, save it but keep looking for a better one
13409      ac_cv_path_GREP="$ac_path_GREP"
13410      ac_path_GREP_max=$ac_count
13411    fi
13412    # 10*(2^10) chars as input seems more than enough
13413    test $ac_count -gt 10 && break
13414  done
13415  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13416esac
13417
13418      $ac_path_GREP_found && break 3
13419    done
13420  done
13421  done
13422IFS=$as_save_IFS
13423  if test -z "$ac_cv_path_GREP"; then
13424    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13425  fi
13426else
13427  ac_cv_path_GREP=$GREP
13428fi
13429
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13432$as_echo "$ac_cv_path_GREP" >&6; }
13433 GREP="$ac_cv_path_GREP"
13434
13435
13436  else
13437    # The variable is set, but is it from the command line or the environment?
13438
13439    # Try to remove the string !GREP! from our list.
13440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13442      # If it failed, the variable was not from the command line. Ignore it,
13443      # but warn the user (except for BASH, which is always set by the calling BASH).
13444      if test "xGREP" != xBASH; then
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13446$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13447      fi
13448      # Try to locate tool using the code snippet
13449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13450$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13451if ${ac_cv_path_GREP+:} false; then :
13452  $as_echo_n "(cached) " >&6
13453else
13454  if test -z "$GREP"; then
13455  ac_path_GREP_found=false
13456  # Loop through the user's path and test for each of PROGNAME-LIST
13457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13458for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13459do
13460  IFS=$as_save_IFS
13461  test -z "$as_dir" && as_dir=.
13462    for ac_prog in grep ggrep; do
13463    for ac_exec_ext in '' $ac_executable_extensions; do
13464      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13465      as_fn_executable_p "$ac_path_GREP" || continue
13466# Check for GNU ac_path_GREP and select it if it is found.
13467  # Check for GNU $ac_path_GREP
13468case `"$ac_path_GREP" --version 2>&1` in
13469*GNU*)
13470  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13471*)
13472  ac_count=0
13473  $as_echo_n 0123456789 >"conftest.in"
13474  while :
13475  do
13476    cat "conftest.in" "conftest.in" >"conftest.tmp"
13477    mv "conftest.tmp" "conftest.in"
13478    cp "conftest.in" "conftest.nl"
13479    $as_echo 'GREP' >> "conftest.nl"
13480    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13481    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13482    as_fn_arith $ac_count + 1 && ac_count=$as_val
13483    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13484      # Best one so far, save it but keep looking for a better one
13485      ac_cv_path_GREP="$ac_path_GREP"
13486      ac_path_GREP_max=$ac_count
13487    fi
13488    # 10*(2^10) chars as input seems more than enough
13489    test $ac_count -gt 10 && break
13490  done
13491  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13492esac
13493
13494      $ac_path_GREP_found && break 3
13495    done
13496  done
13497  done
13498IFS=$as_save_IFS
13499  if test -z "$ac_cv_path_GREP"; then
13500    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13501  fi
13502else
13503  ac_cv_path_GREP=$GREP
13504fi
13505
13506fi
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13508$as_echo "$ac_cv_path_GREP" >&6; }
13509 GREP="$ac_cv_path_GREP"
13510
13511
13512    else
13513      # If it succeeded, then it was overridden by the user. We will use it
13514      # for the tool.
13515
13516      # First remove it from the list of overridden variables, so we can test
13517      # for unknown variables in the end.
13518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13519
13520      # Check if we try to supply an empty value
13521      if test "x$GREP" = x; then
13522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13523$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13525$as_echo_n "checking for GREP... " >&6; }
13526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13527$as_echo "disabled" >&6; }
13528      else
13529        # Check if the provided tool contains a complete path.
13530        tool_specified="$GREP"
13531        tool_basename="${tool_specified##*/}"
13532        if test "x$tool_basename" = "x$tool_specified"; then
13533          # A command without a complete path is provided, search $PATH.
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13535$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13536          # Extract the first word of "$tool_basename", so it can be a program name with args.
13537set dummy $tool_basename; ac_word=$2
13538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13539$as_echo_n "checking for $ac_word... " >&6; }
13540if ${ac_cv_path_GREP+:} false; then :
13541  $as_echo_n "(cached) " >&6
13542else
13543  case $GREP in
13544  [\\/]* | ?:[\\/]*)
13545  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13546  ;;
13547  *)
13548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13549for as_dir in $PATH
13550do
13551  IFS=$as_save_IFS
13552  test -z "$as_dir" && as_dir=.
13553    for ac_exec_ext in '' $ac_executable_extensions; do
13554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13555    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13557    break 2
13558  fi
13559done
13560  done
13561IFS=$as_save_IFS
13562
13563  ;;
13564esac
13565fi
13566GREP=$ac_cv_path_GREP
13567if test -n "$GREP"; then
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13569$as_echo "$GREP" >&6; }
13570else
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13572$as_echo "no" >&6; }
13573fi
13574
13575
13576          if test "x$GREP" = x; then
13577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13578          fi
13579        else
13580          # Otherwise we believe it is a complete path. Use it as it is.
13581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13582$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13584$as_echo_n "checking for GREP... " >&6; }
13585          if test ! -x "$tool_specified"; then
13586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13587$as_echo "not found" >&6; }
13588            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13589          fi
13590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13591$as_echo "$tool_specified" >&6; }
13592        fi
13593      fi
13594    fi
13595
13596  fi
13597
13598
13599  if test "x$GREP" = x; then
13600    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13601  fi
13602
13603
13604
13605
13606  # Publish this variable in the help.
13607
13608
13609  if [ -z "${EGREP+x}" ]; then
13610    # The variable is not set by user, try to locate tool using the code snippet
13611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13612$as_echo_n "checking for egrep... " >&6; }
13613if ${ac_cv_path_EGREP+:} false; then :
13614  $as_echo_n "(cached) " >&6
13615else
13616  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13617   then ac_cv_path_EGREP="$GREP -E"
13618   else
13619     if test -z "$EGREP"; then
13620  ac_path_EGREP_found=false
13621  # Loop through the user's path and test for each of PROGNAME-LIST
13622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13623for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13624do
13625  IFS=$as_save_IFS
13626  test -z "$as_dir" && as_dir=.
13627    for ac_prog in egrep; do
13628    for ac_exec_ext in '' $ac_executable_extensions; do
13629      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13630      as_fn_executable_p "$ac_path_EGREP" || continue
13631# Check for GNU ac_path_EGREP and select it if it is found.
13632  # Check for GNU $ac_path_EGREP
13633case `"$ac_path_EGREP" --version 2>&1` in
13634*GNU*)
13635  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13636*)
13637  ac_count=0
13638  $as_echo_n 0123456789 >"conftest.in"
13639  while :
13640  do
13641    cat "conftest.in" "conftest.in" >"conftest.tmp"
13642    mv "conftest.tmp" "conftest.in"
13643    cp "conftest.in" "conftest.nl"
13644    $as_echo 'EGREP' >> "conftest.nl"
13645    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13646    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13647    as_fn_arith $ac_count + 1 && ac_count=$as_val
13648    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13649      # Best one so far, save it but keep looking for a better one
13650      ac_cv_path_EGREP="$ac_path_EGREP"
13651      ac_path_EGREP_max=$ac_count
13652    fi
13653    # 10*(2^10) chars as input seems more than enough
13654    test $ac_count -gt 10 && break
13655  done
13656  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13657esac
13658
13659      $ac_path_EGREP_found && break 3
13660    done
13661  done
13662  done
13663IFS=$as_save_IFS
13664  if test -z "$ac_cv_path_EGREP"; then
13665    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13666  fi
13667else
13668  ac_cv_path_EGREP=$EGREP
13669fi
13670
13671   fi
13672fi
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13674$as_echo "$ac_cv_path_EGREP" >&6; }
13675 EGREP="$ac_cv_path_EGREP"
13676
13677
13678  else
13679    # The variable is set, but is it from the command line or the environment?
13680
13681    # Try to remove the string !EGREP! from our list.
13682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13684      # If it failed, the variable was not from the command line. Ignore it,
13685      # but warn the user (except for BASH, which is always set by the calling BASH).
13686      if test "xEGREP" != xBASH; then
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13688$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13689      fi
13690      # Try to locate tool using the code snippet
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13692$as_echo_n "checking for egrep... " >&6; }
13693if ${ac_cv_path_EGREP+:} false; then :
13694  $as_echo_n "(cached) " >&6
13695else
13696  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13697   then ac_cv_path_EGREP="$GREP -E"
13698   else
13699     if test -z "$EGREP"; then
13700  ac_path_EGREP_found=false
13701  # Loop through the user's path and test for each of PROGNAME-LIST
13702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13704do
13705  IFS=$as_save_IFS
13706  test -z "$as_dir" && as_dir=.
13707    for ac_prog in egrep; do
13708    for ac_exec_ext in '' $ac_executable_extensions; do
13709      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13710      as_fn_executable_p "$ac_path_EGREP" || continue
13711# Check for GNU ac_path_EGREP and select it if it is found.
13712  # Check for GNU $ac_path_EGREP
13713case `"$ac_path_EGREP" --version 2>&1` in
13714*GNU*)
13715  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13716*)
13717  ac_count=0
13718  $as_echo_n 0123456789 >"conftest.in"
13719  while :
13720  do
13721    cat "conftest.in" "conftest.in" >"conftest.tmp"
13722    mv "conftest.tmp" "conftest.in"
13723    cp "conftest.in" "conftest.nl"
13724    $as_echo 'EGREP' >> "conftest.nl"
13725    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13726    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13727    as_fn_arith $ac_count + 1 && ac_count=$as_val
13728    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13729      # Best one so far, save it but keep looking for a better one
13730      ac_cv_path_EGREP="$ac_path_EGREP"
13731      ac_path_EGREP_max=$ac_count
13732    fi
13733    # 10*(2^10) chars as input seems more than enough
13734    test $ac_count -gt 10 && break
13735  done
13736  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13737esac
13738
13739      $ac_path_EGREP_found && break 3
13740    done
13741  done
13742  done
13743IFS=$as_save_IFS
13744  if test -z "$ac_cv_path_EGREP"; then
13745    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13746  fi
13747else
13748  ac_cv_path_EGREP=$EGREP
13749fi
13750
13751   fi
13752fi
13753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13754$as_echo "$ac_cv_path_EGREP" >&6; }
13755 EGREP="$ac_cv_path_EGREP"
13756
13757
13758    else
13759      # If it succeeded, then it was overridden by the user. We will use it
13760      # for the tool.
13761
13762      # First remove it from the list of overridden variables, so we can test
13763      # for unknown variables in the end.
13764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13765
13766      # Check if we try to supply an empty value
13767      if test "x$EGREP" = x; then
13768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13769$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13771$as_echo_n "checking for EGREP... " >&6; }
13772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13773$as_echo "disabled" >&6; }
13774      else
13775        # Check if the provided tool contains a complete path.
13776        tool_specified="$EGREP"
13777        tool_basename="${tool_specified##*/}"
13778        if test "x$tool_basename" = "x$tool_specified"; then
13779          # A command without a complete path is provided, search $PATH.
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13781$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13782          # Extract the first word of "$tool_basename", so it can be a program name with args.
13783set dummy $tool_basename; ac_word=$2
13784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13785$as_echo_n "checking for $ac_word... " >&6; }
13786if ${ac_cv_path_EGREP+:} false; then :
13787  $as_echo_n "(cached) " >&6
13788else
13789  case $EGREP in
13790  [\\/]* | ?:[\\/]*)
13791  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13792  ;;
13793  *)
13794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13795for as_dir in $PATH
13796do
13797  IFS=$as_save_IFS
13798  test -z "$as_dir" && as_dir=.
13799    for ac_exec_ext in '' $ac_executable_extensions; do
13800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13801    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13803    break 2
13804  fi
13805done
13806  done
13807IFS=$as_save_IFS
13808
13809  ;;
13810esac
13811fi
13812EGREP=$ac_cv_path_EGREP
13813if test -n "$EGREP"; then
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13815$as_echo "$EGREP" >&6; }
13816else
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13818$as_echo "no" >&6; }
13819fi
13820
13821
13822          if test "x$EGREP" = x; then
13823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13824          fi
13825        else
13826          # Otherwise we believe it is a complete path. Use it as it is.
13827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13828$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13830$as_echo_n "checking for EGREP... " >&6; }
13831          if test ! -x "$tool_specified"; then
13832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13833$as_echo "not found" >&6; }
13834            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13835          fi
13836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13837$as_echo "$tool_specified" >&6; }
13838        fi
13839      fi
13840    fi
13841
13842  fi
13843
13844
13845  if test "x$EGREP" = x; then
13846    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13847  fi
13848
13849
13850
13851
13852  # Publish this variable in the help.
13853
13854
13855  if [ -z "${FGREP+x}" ]; then
13856    # The variable is not set by user, try to locate tool using the code snippet
13857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13858$as_echo_n "checking for fgrep... " >&6; }
13859if ${ac_cv_path_FGREP+:} false; then :
13860  $as_echo_n "(cached) " >&6
13861else
13862  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13863   then ac_cv_path_FGREP="$GREP -F"
13864   else
13865     if test -z "$FGREP"; then
13866  ac_path_FGREP_found=false
13867  # Loop through the user's path and test for each of PROGNAME-LIST
13868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13869for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13870do
13871  IFS=$as_save_IFS
13872  test -z "$as_dir" && as_dir=.
13873    for ac_prog in fgrep; do
13874    for ac_exec_ext in '' $ac_executable_extensions; do
13875      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13876      as_fn_executable_p "$ac_path_FGREP" || continue
13877# Check for GNU ac_path_FGREP and select it if it is found.
13878  # Check for GNU $ac_path_FGREP
13879case `"$ac_path_FGREP" --version 2>&1` in
13880*GNU*)
13881  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13882*)
13883  ac_count=0
13884  $as_echo_n 0123456789 >"conftest.in"
13885  while :
13886  do
13887    cat "conftest.in" "conftest.in" >"conftest.tmp"
13888    mv "conftest.tmp" "conftest.in"
13889    cp "conftest.in" "conftest.nl"
13890    $as_echo 'FGREP' >> "conftest.nl"
13891    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13892    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13893    as_fn_arith $ac_count + 1 && ac_count=$as_val
13894    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13895      # Best one so far, save it but keep looking for a better one
13896      ac_cv_path_FGREP="$ac_path_FGREP"
13897      ac_path_FGREP_max=$ac_count
13898    fi
13899    # 10*(2^10) chars as input seems more than enough
13900    test $ac_count -gt 10 && break
13901  done
13902  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13903esac
13904
13905      $ac_path_FGREP_found && break 3
13906    done
13907  done
13908  done
13909IFS=$as_save_IFS
13910  if test -z "$ac_cv_path_FGREP"; then
13911    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13912  fi
13913else
13914  ac_cv_path_FGREP=$FGREP
13915fi
13916
13917   fi
13918fi
13919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13920$as_echo "$ac_cv_path_FGREP" >&6; }
13921 FGREP="$ac_cv_path_FGREP"
13922
13923
13924  else
13925    # The variable is set, but is it from the command line or the environment?
13926
13927    # Try to remove the string !FGREP! from our list.
13928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13930      # If it failed, the variable was not from the command line. Ignore it,
13931      # but warn the user (except for BASH, which is always set by the calling BASH).
13932      if test "xFGREP" != xBASH; then
13933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13934$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13935      fi
13936      # Try to locate tool using the code snippet
13937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13938$as_echo_n "checking for fgrep... " >&6; }
13939if ${ac_cv_path_FGREP+:} false; then :
13940  $as_echo_n "(cached) " >&6
13941else
13942  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13943   then ac_cv_path_FGREP="$GREP -F"
13944   else
13945     if test -z "$FGREP"; then
13946  ac_path_FGREP_found=false
13947  # Loop through the user's path and test for each of PROGNAME-LIST
13948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13949for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13950do
13951  IFS=$as_save_IFS
13952  test -z "$as_dir" && as_dir=.
13953    for ac_prog in fgrep; do
13954    for ac_exec_ext in '' $ac_executable_extensions; do
13955      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13956      as_fn_executable_p "$ac_path_FGREP" || continue
13957# Check for GNU ac_path_FGREP and select it if it is found.
13958  # Check for GNU $ac_path_FGREP
13959case `"$ac_path_FGREP" --version 2>&1` in
13960*GNU*)
13961  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13962*)
13963  ac_count=0
13964  $as_echo_n 0123456789 >"conftest.in"
13965  while :
13966  do
13967    cat "conftest.in" "conftest.in" >"conftest.tmp"
13968    mv "conftest.tmp" "conftest.in"
13969    cp "conftest.in" "conftest.nl"
13970    $as_echo 'FGREP' >> "conftest.nl"
13971    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13972    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13973    as_fn_arith $ac_count + 1 && ac_count=$as_val
13974    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13975      # Best one so far, save it but keep looking for a better one
13976      ac_cv_path_FGREP="$ac_path_FGREP"
13977      ac_path_FGREP_max=$ac_count
13978    fi
13979    # 10*(2^10) chars as input seems more than enough
13980    test $ac_count -gt 10 && break
13981  done
13982  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13983esac
13984
13985      $ac_path_FGREP_found && break 3
13986    done
13987  done
13988  done
13989IFS=$as_save_IFS
13990  if test -z "$ac_cv_path_FGREP"; then
13991    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13992  fi
13993else
13994  ac_cv_path_FGREP=$FGREP
13995fi
13996
13997   fi
13998fi
13999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14000$as_echo "$ac_cv_path_FGREP" >&6; }
14001 FGREP="$ac_cv_path_FGREP"
14002
14003
14004    else
14005      # If it succeeded, then it was overridden by the user. We will use it
14006      # for the tool.
14007
14008      # First remove it from the list of overridden variables, so we can test
14009      # for unknown variables in the end.
14010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14011
14012      # Check if we try to supply an empty value
14013      if test "x$FGREP" = x; then
14014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14015$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14017$as_echo_n "checking for FGREP... " >&6; }
14018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14019$as_echo "disabled" >&6; }
14020      else
14021        # Check if the provided tool contains a complete path.
14022        tool_specified="$FGREP"
14023        tool_basename="${tool_specified##*/}"
14024        if test "x$tool_basename" = "x$tool_specified"; then
14025          # A command without a complete path is provided, search $PATH.
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14027$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14028          # Extract the first word of "$tool_basename", so it can be a program name with args.
14029set dummy $tool_basename; ac_word=$2
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14031$as_echo_n "checking for $ac_word... " >&6; }
14032if ${ac_cv_path_FGREP+:} false; then :
14033  $as_echo_n "(cached) " >&6
14034else
14035  case $FGREP in
14036  [\\/]* | ?:[\\/]*)
14037  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14038  ;;
14039  *)
14040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14041for as_dir in $PATH
14042do
14043  IFS=$as_save_IFS
14044  test -z "$as_dir" && as_dir=.
14045    for ac_exec_ext in '' $ac_executable_extensions; do
14046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14047    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14049    break 2
14050  fi
14051done
14052  done
14053IFS=$as_save_IFS
14054
14055  ;;
14056esac
14057fi
14058FGREP=$ac_cv_path_FGREP
14059if test -n "$FGREP"; then
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14061$as_echo "$FGREP" >&6; }
14062else
14063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14064$as_echo "no" >&6; }
14065fi
14066
14067
14068          if test "x$FGREP" = x; then
14069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14070          fi
14071        else
14072          # Otherwise we believe it is a complete path. Use it as it is.
14073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14074$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14076$as_echo_n "checking for FGREP... " >&6; }
14077          if test ! -x "$tool_specified"; then
14078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14079$as_echo "not found" >&6; }
14080            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14081          fi
14082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14083$as_echo "$tool_specified" >&6; }
14084        fi
14085      fi
14086    fi
14087
14088  fi
14089
14090
14091  if test "x$FGREP" = x; then
14092    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14093  fi
14094
14095
14096
14097
14098  # Publish this variable in the help.
14099
14100
14101  if [ -z "${SED+x}" ]; then
14102    # The variable is not set by user, try to locate tool using the code snippet
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14104$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14105if ${ac_cv_path_SED+:} false; then :
14106  $as_echo_n "(cached) " >&6
14107else
14108            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14109     for ac_i in 1 2 3 4 5 6 7; do
14110       ac_script="$ac_script$as_nl$ac_script"
14111     done
14112     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14113     { ac_script=; unset ac_script;}
14114     if test -z "$SED"; then
14115  ac_path_SED_found=false
14116  # Loop through the user's path and test for each of PROGNAME-LIST
14117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14118for as_dir in $PATH
14119do
14120  IFS=$as_save_IFS
14121  test -z "$as_dir" && as_dir=.
14122    for ac_prog in sed gsed; do
14123    for ac_exec_ext in '' $ac_executable_extensions; do
14124      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14125      as_fn_executable_p "$ac_path_SED" || continue
14126# Check for GNU ac_path_SED and select it if it is found.
14127  # Check for GNU $ac_path_SED
14128case `"$ac_path_SED" --version 2>&1` in
14129*GNU*)
14130  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14131*)
14132  ac_count=0
14133  $as_echo_n 0123456789 >"conftest.in"
14134  while :
14135  do
14136    cat "conftest.in" "conftest.in" >"conftest.tmp"
14137    mv "conftest.tmp" "conftest.in"
14138    cp "conftest.in" "conftest.nl"
14139    $as_echo '' >> "conftest.nl"
14140    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14141    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14142    as_fn_arith $ac_count + 1 && ac_count=$as_val
14143    if test $ac_count -gt ${ac_path_SED_max-0}; then
14144      # Best one so far, save it but keep looking for a better one
14145      ac_cv_path_SED="$ac_path_SED"
14146      ac_path_SED_max=$ac_count
14147    fi
14148    # 10*(2^10) chars as input seems more than enough
14149    test $ac_count -gt 10 && break
14150  done
14151  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14152esac
14153
14154      $ac_path_SED_found && break 3
14155    done
14156  done
14157  done
14158IFS=$as_save_IFS
14159  if test -z "$ac_cv_path_SED"; then
14160    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14161  fi
14162else
14163  ac_cv_path_SED=$SED
14164fi
14165
14166fi
14167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14168$as_echo "$ac_cv_path_SED" >&6; }
14169 SED="$ac_cv_path_SED"
14170  rm -f conftest.sed
14171
14172  else
14173    # The variable is set, but is it from the command line or the environment?
14174
14175    # Try to remove the string !SED! from our list.
14176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14178      # If it failed, the variable was not from the command line. Ignore it,
14179      # but warn the user (except for BASH, which is always set by the calling BASH).
14180      if test "xSED" != xBASH; then
14181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14182$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14183      fi
14184      # Try to locate tool using the code snippet
14185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14186$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14187if ${ac_cv_path_SED+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14191     for ac_i in 1 2 3 4 5 6 7; do
14192       ac_script="$ac_script$as_nl$ac_script"
14193     done
14194     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14195     { ac_script=; unset ac_script;}
14196     if test -z "$SED"; then
14197  ac_path_SED_found=false
14198  # Loop through the user's path and test for each of PROGNAME-LIST
14199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14200for as_dir in $PATH
14201do
14202  IFS=$as_save_IFS
14203  test -z "$as_dir" && as_dir=.
14204    for ac_prog in sed gsed; do
14205    for ac_exec_ext in '' $ac_executable_extensions; do
14206      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14207      as_fn_executable_p "$ac_path_SED" || continue
14208# Check for GNU ac_path_SED and select it if it is found.
14209  # Check for GNU $ac_path_SED
14210case `"$ac_path_SED" --version 2>&1` in
14211*GNU*)
14212  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14213*)
14214  ac_count=0
14215  $as_echo_n 0123456789 >"conftest.in"
14216  while :
14217  do
14218    cat "conftest.in" "conftest.in" >"conftest.tmp"
14219    mv "conftest.tmp" "conftest.in"
14220    cp "conftest.in" "conftest.nl"
14221    $as_echo '' >> "conftest.nl"
14222    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14224    as_fn_arith $ac_count + 1 && ac_count=$as_val
14225    if test $ac_count -gt ${ac_path_SED_max-0}; then
14226      # Best one so far, save it but keep looking for a better one
14227      ac_cv_path_SED="$ac_path_SED"
14228      ac_path_SED_max=$ac_count
14229    fi
14230    # 10*(2^10) chars as input seems more than enough
14231    test $ac_count -gt 10 && break
14232  done
14233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14234esac
14235
14236      $ac_path_SED_found && break 3
14237    done
14238  done
14239  done
14240IFS=$as_save_IFS
14241  if test -z "$ac_cv_path_SED"; then
14242    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14243  fi
14244else
14245  ac_cv_path_SED=$SED
14246fi
14247
14248fi
14249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14250$as_echo "$ac_cv_path_SED" >&6; }
14251 SED="$ac_cv_path_SED"
14252  rm -f conftest.sed
14253
14254    else
14255      # If it succeeded, then it was overridden by the user. We will use it
14256      # for the tool.
14257
14258      # First remove it from the list of overridden variables, so we can test
14259      # for unknown variables in the end.
14260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14261
14262      # Check if we try to supply an empty value
14263      if test "x$SED" = x; then
14264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14265$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14267$as_echo_n "checking for SED... " >&6; }
14268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14269$as_echo "disabled" >&6; }
14270      else
14271        # Check if the provided tool contains a complete path.
14272        tool_specified="$SED"
14273        tool_basename="${tool_specified##*/}"
14274        if test "x$tool_basename" = "x$tool_specified"; then
14275          # A command without a complete path is provided, search $PATH.
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14277$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14278          # Extract the first word of "$tool_basename", so it can be a program name with args.
14279set dummy $tool_basename; ac_word=$2
14280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14281$as_echo_n "checking for $ac_word... " >&6; }
14282if ${ac_cv_path_SED+:} false; then :
14283  $as_echo_n "(cached) " >&6
14284else
14285  case $SED in
14286  [\\/]* | ?:[\\/]*)
14287  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14288  ;;
14289  *)
14290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14291for as_dir in $PATH
14292do
14293  IFS=$as_save_IFS
14294  test -z "$as_dir" && as_dir=.
14295    for ac_exec_ext in '' $ac_executable_extensions; do
14296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14297    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14299    break 2
14300  fi
14301done
14302  done
14303IFS=$as_save_IFS
14304
14305  ;;
14306esac
14307fi
14308SED=$ac_cv_path_SED
14309if test -n "$SED"; then
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14311$as_echo "$SED" >&6; }
14312else
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14314$as_echo "no" >&6; }
14315fi
14316
14317
14318          if test "x$SED" = x; then
14319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14320          fi
14321        else
14322          # Otherwise we believe it is a complete path. Use it as it is.
14323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14324$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14326$as_echo_n "checking for SED... " >&6; }
14327          if test ! -x "$tool_specified"; then
14328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14329$as_echo "not found" >&6; }
14330            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14331          fi
14332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14333$as_echo "$tool_specified" >&6; }
14334        fi
14335      fi
14336    fi
14337
14338  fi
14339
14340
14341  if test "x$SED" = x; then
14342    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14343  fi
14344
14345
14346
14347  # Always force rm.
14348  RM="$RM -f"
14349
14350  # pwd behaves differently on various platforms and some don't support the -L flag.
14351  # Always use the bash builtin pwd to get uniform behavior.
14352  THEPWDCMD=pwd
14353
14354  # These are not required on all platforms
14355
14356
14357  # Publish this variable in the help.
14358
14359
14360  if [ -z "${CYGPATH+x}" ]; then
14361    # The variable is not set by user, try to locate tool using the code snippet
14362    for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407  else
14408    # The variable is set, but is it from the command line or the environment?
14409
14410    # Try to remove the string !CYGPATH! from our list.
14411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14413      # If it failed, the variable was not from the command line. Ignore it,
14414      # but warn the user (except for BASH, which is always set by the calling BASH).
14415      if test "xCYGPATH" != xBASH; then
14416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14417$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14418      fi
14419      # Try to locate tool using the code snippet
14420      for ac_prog in cygpath
14421do
14422  # Extract the first word of "$ac_prog", so it can be a program name with args.
14423set dummy $ac_prog; ac_word=$2
14424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14425$as_echo_n "checking for $ac_word... " >&6; }
14426if ${ac_cv_path_CYGPATH+:} false; then :
14427  $as_echo_n "(cached) " >&6
14428else
14429  case $CYGPATH in
14430  [\\/]* | ?:[\\/]*)
14431  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14432  ;;
14433  *)
14434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14435for as_dir in $PATH
14436do
14437  IFS=$as_save_IFS
14438  test -z "$as_dir" && as_dir=.
14439    for ac_exec_ext in '' $ac_executable_extensions; do
14440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14441    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14443    break 2
14444  fi
14445done
14446  done
14447IFS=$as_save_IFS
14448
14449  ;;
14450esac
14451fi
14452CYGPATH=$ac_cv_path_CYGPATH
14453if test -n "$CYGPATH"; then
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14455$as_echo "$CYGPATH" >&6; }
14456else
14457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14458$as_echo "no" >&6; }
14459fi
14460
14461
14462  test -n "$CYGPATH" && break
14463done
14464
14465    else
14466      # If it succeeded, then it was overridden by the user. We will use it
14467      # for the tool.
14468
14469      # First remove it from the list of overridden variables, so we can test
14470      # for unknown variables in the end.
14471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14472
14473      # Check if we try to supply an empty value
14474      if test "x$CYGPATH" = x; then
14475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14476$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14478$as_echo_n "checking for CYGPATH... " >&6; }
14479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14480$as_echo "disabled" >&6; }
14481      else
14482        # Check if the provided tool contains a complete path.
14483        tool_specified="$CYGPATH"
14484        tool_basename="${tool_specified##*/}"
14485        if test "x$tool_basename" = "x$tool_specified"; then
14486          # A command without a complete path is provided, search $PATH.
14487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14488$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14489          # Extract the first word of "$tool_basename", so it can be a program name with args.
14490set dummy $tool_basename; ac_word=$2
14491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14492$as_echo_n "checking for $ac_word... " >&6; }
14493if ${ac_cv_path_CYGPATH+:} false; then :
14494  $as_echo_n "(cached) " >&6
14495else
14496  case $CYGPATH in
14497  [\\/]* | ?:[\\/]*)
14498  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14499  ;;
14500  *)
14501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14502for as_dir in $PATH
14503do
14504  IFS=$as_save_IFS
14505  test -z "$as_dir" && as_dir=.
14506    for ac_exec_ext in '' $ac_executable_extensions; do
14507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14508    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14510    break 2
14511  fi
14512done
14513  done
14514IFS=$as_save_IFS
14515
14516  ;;
14517esac
14518fi
14519CYGPATH=$ac_cv_path_CYGPATH
14520if test -n "$CYGPATH"; then
14521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14522$as_echo "$CYGPATH" >&6; }
14523else
14524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14525$as_echo "no" >&6; }
14526fi
14527
14528
14529          if test "x$CYGPATH" = x; then
14530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14531          fi
14532        else
14533          # Otherwise we believe it is a complete path. Use it as it is.
14534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14535$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14537$as_echo_n "checking for CYGPATH... " >&6; }
14538          if test ! -x "$tool_specified"; then
14539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14540$as_echo "not found" >&6; }
14541            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14542          fi
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14544$as_echo "$tool_specified" >&6; }
14545        fi
14546      fi
14547    fi
14548
14549  fi
14550
14551
14552
14553
14554  # Publish this variable in the help.
14555
14556
14557  if [ -z "${READLINK+x}" ]; then
14558    # The variable is not set by user, try to locate tool using the code snippet
14559    for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604  else
14605    # The variable is set, but is it from the command line or the environment?
14606
14607    # Try to remove the string !READLINK! from our list.
14608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14610      # If it failed, the variable was not from the command line. Ignore it,
14611      # but warn the user (except for BASH, which is always set by the calling BASH).
14612      if test "xREADLINK" != xBASH; then
14613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14614$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14615      fi
14616      # Try to locate tool using the code snippet
14617      for ac_prog in greadlink readlink
14618do
14619  # Extract the first word of "$ac_prog", so it can be a program name with args.
14620set dummy $ac_prog; ac_word=$2
14621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14622$as_echo_n "checking for $ac_word... " >&6; }
14623if ${ac_cv_path_READLINK+:} false; then :
14624  $as_echo_n "(cached) " >&6
14625else
14626  case $READLINK in
14627  [\\/]* | ?:[\\/]*)
14628  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14629  ;;
14630  *)
14631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14632for as_dir in $PATH
14633do
14634  IFS=$as_save_IFS
14635  test -z "$as_dir" && as_dir=.
14636    for ac_exec_ext in '' $ac_executable_extensions; do
14637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14638    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14640    break 2
14641  fi
14642done
14643  done
14644IFS=$as_save_IFS
14645
14646  ;;
14647esac
14648fi
14649READLINK=$ac_cv_path_READLINK
14650if test -n "$READLINK"; then
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14652$as_echo "$READLINK" >&6; }
14653else
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14655$as_echo "no" >&6; }
14656fi
14657
14658
14659  test -n "$READLINK" && break
14660done
14661
14662    else
14663      # If it succeeded, then it was overridden by the user. We will use it
14664      # for the tool.
14665
14666      # First remove it from the list of overridden variables, so we can test
14667      # for unknown variables in the end.
14668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14669
14670      # Check if we try to supply an empty value
14671      if test "x$READLINK" = x; then
14672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14673$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14675$as_echo_n "checking for READLINK... " >&6; }
14676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14677$as_echo "disabled" >&6; }
14678      else
14679        # Check if the provided tool contains a complete path.
14680        tool_specified="$READLINK"
14681        tool_basename="${tool_specified##*/}"
14682        if test "x$tool_basename" = "x$tool_specified"; then
14683          # A command without a complete path is provided, search $PATH.
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14685$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14686          # Extract the first word of "$tool_basename", so it can be a program name with args.
14687set dummy $tool_basename; ac_word=$2
14688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14689$as_echo_n "checking for $ac_word... " >&6; }
14690if ${ac_cv_path_READLINK+:} false; then :
14691  $as_echo_n "(cached) " >&6
14692else
14693  case $READLINK in
14694  [\\/]* | ?:[\\/]*)
14695  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14696  ;;
14697  *)
14698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14699for as_dir in $PATH
14700do
14701  IFS=$as_save_IFS
14702  test -z "$as_dir" && as_dir=.
14703    for ac_exec_ext in '' $ac_executable_extensions; do
14704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14705    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14707    break 2
14708  fi
14709done
14710  done
14711IFS=$as_save_IFS
14712
14713  ;;
14714esac
14715fi
14716READLINK=$ac_cv_path_READLINK
14717if test -n "$READLINK"; then
14718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14719$as_echo "$READLINK" >&6; }
14720else
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14722$as_echo "no" >&6; }
14723fi
14724
14725
14726          if test "x$READLINK" = x; then
14727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14728          fi
14729        else
14730          # Otherwise we believe it is a complete path. Use it as it is.
14731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14732$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14734$as_echo_n "checking for READLINK... " >&6; }
14735          if test ! -x "$tool_specified"; then
14736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14737$as_echo "not found" >&6; }
14738            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14739          fi
14740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14741$as_echo "$tool_specified" >&6; }
14742        fi
14743      fi
14744    fi
14745
14746  fi
14747
14748
14749
14750
14751  # Publish this variable in the help.
14752
14753
14754  if [ -z "${DF+x}" ]; then
14755    # The variable is not set by user, try to locate tool using the code snippet
14756    for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801  else
14802    # The variable is set, but is it from the command line or the environment?
14803
14804    # Try to remove the string !DF! from our list.
14805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14807      # If it failed, the variable was not from the command line. Ignore it,
14808      # but warn the user (except for BASH, which is always set by the calling BASH).
14809      if test "xDF" != xBASH; then
14810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14811$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14812      fi
14813      # Try to locate tool using the code snippet
14814      for ac_prog in df
14815do
14816  # Extract the first word of "$ac_prog", so it can be a program name with args.
14817set dummy $ac_prog; ac_word=$2
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14819$as_echo_n "checking for $ac_word... " >&6; }
14820if ${ac_cv_path_DF+:} false; then :
14821  $as_echo_n "(cached) " >&6
14822else
14823  case $DF in
14824  [\\/]* | ?:[\\/]*)
14825  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14826  ;;
14827  *)
14828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14829for as_dir in $PATH
14830do
14831  IFS=$as_save_IFS
14832  test -z "$as_dir" && as_dir=.
14833    for ac_exec_ext in '' $ac_executable_extensions; do
14834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14835    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14837    break 2
14838  fi
14839done
14840  done
14841IFS=$as_save_IFS
14842
14843  ;;
14844esac
14845fi
14846DF=$ac_cv_path_DF
14847if test -n "$DF"; then
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14849$as_echo "$DF" >&6; }
14850else
14851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14852$as_echo "no" >&6; }
14853fi
14854
14855
14856  test -n "$DF" && break
14857done
14858
14859    else
14860      # If it succeeded, then it was overridden by the user. We will use it
14861      # for the tool.
14862
14863      # First remove it from the list of overridden variables, so we can test
14864      # for unknown variables in the end.
14865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14866
14867      # Check if we try to supply an empty value
14868      if test "x$DF" = x; then
14869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14870$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14872$as_echo_n "checking for DF... " >&6; }
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14874$as_echo "disabled" >&6; }
14875      else
14876        # Check if the provided tool contains a complete path.
14877        tool_specified="$DF"
14878        tool_basename="${tool_specified##*/}"
14879        if test "x$tool_basename" = "x$tool_specified"; then
14880          # A command without a complete path is provided, search $PATH.
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14882$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14883          # Extract the first word of "$tool_basename", so it can be a program name with args.
14884set dummy $tool_basename; ac_word=$2
14885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14886$as_echo_n "checking for $ac_word... " >&6; }
14887if ${ac_cv_path_DF+:} false; then :
14888  $as_echo_n "(cached) " >&6
14889else
14890  case $DF in
14891  [\\/]* | ?:[\\/]*)
14892  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14893  ;;
14894  *)
14895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14896for as_dir in $PATH
14897do
14898  IFS=$as_save_IFS
14899  test -z "$as_dir" && as_dir=.
14900    for ac_exec_ext in '' $ac_executable_extensions; do
14901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14902    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14904    break 2
14905  fi
14906done
14907  done
14908IFS=$as_save_IFS
14909
14910  ;;
14911esac
14912fi
14913DF=$ac_cv_path_DF
14914if test -n "$DF"; then
14915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14916$as_echo "$DF" >&6; }
14917else
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14919$as_echo "no" >&6; }
14920fi
14921
14922
14923          if test "x$DF" = x; then
14924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14925          fi
14926        else
14927          # Otherwise we believe it is a complete path. Use it as it is.
14928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14929$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14931$as_echo_n "checking for DF... " >&6; }
14932          if test ! -x "$tool_specified"; then
14933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14934$as_echo "not found" >&6; }
14935            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14936          fi
14937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14938$as_echo "$tool_specified" >&6; }
14939        fi
14940      fi
14941    fi
14942
14943  fi
14944
14945
14946
14947
14948  # Publish this variable in the help.
14949
14950
14951  if [ -z "${CPIO+x}" ]; then
14952    # The variable is not set by user, try to locate tool using the code snippet
14953    for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998  else
14999    # The variable is set, but is it from the command line or the environment?
15000
15001    # Try to remove the string !CPIO! from our list.
15002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15004      # If it failed, the variable was not from the command line. Ignore it,
15005      # but warn the user (except for BASH, which is always set by the calling BASH).
15006      if test "xCPIO" != xBASH; then
15007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15008$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15009      fi
15010      # Try to locate tool using the code snippet
15011      for ac_prog in cpio bsdcpio
15012do
15013  # Extract the first word of "$ac_prog", so it can be a program name with args.
15014set dummy $ac_prog; ac_word=$2
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15016$as_echo_n "checking for $ac_word... " >&6; }
15017if ${ac_cv_path_CPIO+:} false; then :
15018  $as_echo_n "(cached) " >&6
15019else
15020  case $CPIO in
15021  [\\/]* | ?:[\\/]*)
15022  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15023  ;;
15024  *)
15025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15026for as_dir in $PATH
15027do
15028  IFS=$as_save_IFS
15029  test -z "$as_dir" && as_dir=.
15030    for ac_exec_ext in '' $ac_executable_extensions; do
15031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15032    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15034    break 2
15035  fi
15036done
15037  done
15038IFS=$as_save_IFS
15039
15040  ;;
15041esac
15042fi
15043CPIO=$ac_cv_path_CPIO
15044if test -n "$CPIO"; then
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15046$as_echo "$CPIO" >&6; }
15047else
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
15050fi
15051
15052
15053  test -n "$CPIO" && break
15054done
15055
15056    else
15057      # If it succeeded, then it was overridden by the user. We will use it
15058      # for the tool.
15059
15060      # First remove it from the list of overridden variables, so we can test
15061      # for unknown variables in the end.
15062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15063
15064      # Check if we try to supply an empty value
15065      if test "x$CPIO" = x; then
15066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15067$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15069$as_echo_n "checking for CPIO... " >&6; }
15070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15071$as_echo "disabled" >&6; }
15072      else
15073        # Check if the provided tool contains a complete path.
15074        tool_specified="$CPIO"
15075        tool_basename="${tool_specified##*/}"
15076        if test "x$tool_basename" = "x$tool_specified"; then
15077          # A command without a complete path is provided, search $PATH.
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15079$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15080          # Extract the first word of "$tool_basename", so it can be a program name with args.
15081set dummy $tool_basename; ac_word=$2
15082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15083$as_echo_n "checking for $ac_word... " >&6; }
15084if ${ac_cv_path_CPIO+:} false; then :
15085  $as_echo_n "(cached) " >&6
15086else
15087  case $CPIO in
15088  [\\/]* | ?:[\\/]*)
15089  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15090  ;;
15091  *)
15092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15093for as_dir in $PATH
15094do
15095  IFS=$as_save_IFS
15096  test -z "$as_dir" && as_dir=.
15097    for ac_exec_ext in '' $ac_executable_extensions; do
15098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15099    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15101    break 2
15102  fi
15103done
15104  done
15105IFS=$as_save_IFS
15106
15107  ;;
15108esac
15109fi
15110CPIO=$ac_cv_path_CPIO
15111if test -n "$CPIO"; then
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15113$as_echo "$CPIO" >&6; }
15114else
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15116$as_echo "no" >&6; }
15117fi
15118
15119
15120          if test "x$CPIO" = x; then
15121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15122          fi
15123        else
15124          # Otherwise we believe it is a complete path. Use it as it is.
15125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15126$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15128$as_echo_n "checking for CPIO... " >&6; }
15129          if test ! -x "$tool_specified"; then
15130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15131$as_echo "not found" >&6; }
15132            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15133          fi
15134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15135$as_echo "$tool_specified" >&6; }
15136        fi
15137      fi
15138    fi
15139
15140  fi
15141
15142
15143
15144
15145  # Publish this variable in the help.
15146
15147
15148  if [ -z "${NICE+x}" ]; then
15149    # The variable is not set by user, try to locate tool using the code snippet
15150    for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195  else
15196    # The variable is set, but is it from the command line or the environment?
15197
15198    # Try to remove the string !NICE! from our list.
15199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15201      # If it failed, the variable was not from the command line. Ignore it,
15202      # but warn the user (except for BASH, which is always set by the calling BASH).
15203      if test "xNICE" != xBASH; then
15204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15205$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15206      fi
15207      # Try to locate tool using the code snippet
15208      for ac_prog in nice
15209do
15210  # Extract the first word of "$ac_prog", so it can be a program name with args.
15211set dummy $ac_prog; ac_word=$2
15212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15213$as_echo_n "checking for $ac_word... " >&6; }
15214if ${ac_cv_path_NICE+:} false; then :
15215  $as_echo_n "(cached) " >&6
15216else
15217  case $NICE in
15218  [\\/]* | ?:[\\/]*)
15219  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15220  ;;
15221  *)
15222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15223for as_dir in $PATH
15224do
15225  IFS=$as_save_IFS
15226  test -z "$as_dir" && as_dir=.
15227    for ac_exec_ext in '' $ac_executable_extensions; do
15228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15229    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15231    break 2
15232  fi
15233done
15234  done
15235IFS=$as_save_IFS
15236
15237  ;;
15238esac
15239fi
15240NICE=$ac_cv_path_NICE
15241if test -n "$NICE"; then
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15243$as_echo "$NICE" >&6; }
15244else
15245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15246$as_echo "no" >&6; }
15247fi
15248
15249
15250  test -n "$NICE" && break
15251done
15252
15253    else
15254      # If it succeeded, then it was overridden by the user. We will use it
15255      # for the tool.
15256
15257      # First remove it from the list of overridden variables, so we can test
15258      # for unknown variables in the end.
15259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15260
15261      # Check if we try to supply an empty value
15262      if test "x$NICE" = x; then
15263        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15264$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15265        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15266$as_echo_n "checking for NICE... " >&6; }
15267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15268$as_echo "disabled" >&6; }
15269      else
15270        # Check if the provided tool contains a complete path.
15271        tool_specified="$NICE"
15272        tool_basename="${tool_specified##*/}"
15273        if test "x$tool_basename" = "x$tool_specified"; then
15274          # A command without a complete path is provided, search $PATH.
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15276$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15277          # Extract the first word of "$tool_basename", so it can be a program name with args.
15278set dummy $tool_basename; ac_word=$2
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15280$as_echo_n "checking for $ac_word... " >&6; }
15281if ${ac_cv_path_NICE+:} false; then :
15282  $as_echo_n "(cached) " >&6
15283else
15284  case $NICE in
15285  [\\/]* | ?:[\\/]*)
15286  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15287  ;;
15288  *)
15289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15290for as_dir in $PATH
15291do
15292  IFS=$as_save_IFS
15293  test -z "$as_dir" && as_dir=.
15294    for ac_exec_ext in '' $ac_executable_extensions; do
15295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15296    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15298    break 2
15299  fi
15300done
15301  done
15302IFS=$as_save_IFS
15303
15304  ;;
15305esac
15306fi
15307NICE=$ac_cv_path_NICE
15308if test -n "$NICE"; then
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15310$as_echo "$NICE" >&6; }
15311else
15312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15313$as_echo "no" >&6; }
15314fi
15315
15316
15317          if test "x$NICE" = x; then
15318            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15319          fi
15320        else
15321          # Otherwise we believe it is a complete path. Use it as it is.
15322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15323$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15324          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15325$as_echo_n "checking for NICE... " >&6; }
15326          if test ! -x "$tool_specified"; then
15327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15328$as_echo "not found" >&6; }
15329            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15330          fi
15331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15332$as_echo "$tool_specified" >&6; }
15333        fi
15334      fi
15335    fi
15336
15337  fi
15338
15339
15340
15341
15342  # Publish this variable in the help.
15343
15344
15345  if [ -z "${PANDOC+x}" ]; then
15346    # The variable is not set by user, try to locate tool using the code snippet
15347    for ac_prog in pandoc
15348do
15349  # Extract the first word of "$ac_prog", so it can be a program name with args.
15350set dummy $ac_prog; ac_word=$2
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15352$as_echo_n "checking for $ac_word... " >&6; }
15353if ${ac_cv_path_PANDOC+:} false; then :
15354  $as_echo_n "(cached) " >&6
15355else
15356  case $PANDOC in
15357  [\\/]* | ?:[\\/]*)
15358  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15359  ;;
15360  *)
15361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15362for as_dir in $PATH
15363do
15364  IFS=$as_save_IFS
15365  test -z "$as_dir" && as_dir=.
15366    for ac_exec_ext in '' $ac_executable_extensions; do
15367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15368    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15370    break 2
15371  fi
15372done
15373  done
15374IFS=$as_save_IFS
15375
15376  ;;
15377esac
15378fi
15379PANDOC=$ac_cv_path_PANDOC
15380if test -n "$PANDOC"; then
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15382$as_echo "$PANDOC" >&6; }
15383else
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15385$as_echo "no" >&6; }
15386fi
15387
15388
15389  test -n "$PANDOC" && break
15390done
15391
15392  else
15393    # The variable is set, but is it from the command line or the environment?
15394
15395    # Try to remove the string !PANDOC! from our list.
15396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15398      # If it failed, the variable was not from the command line. Ignore it,
15399      # but warn the user (except for BASH, which is always set by the calling BASH).
15400      if test "xPANDOC" != xBASH; then
15401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15402$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15403      fi
15404      # Try to locate tool using the code snippet
15405      for ac_prog in pandoc
15406do
15407  # Extract the first word of "$ac_prog", so it can be a program name with args.
15408set dummy $ac_prog; ac_word=$2
15409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15410$as_echo_n "checking for $ac_word... " >&6; }
15411if ${ac_cv_path_PANDOC+:} false; then :
15412  $as_echo_n "(cached) " >&6
15413else
15414  case $PANDOC in
15415  [\\/]* | ?:[\\/]*)
15416  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15417  ;;
15418  *)
15419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15420for as_dir in $PATH
15421do
15422  IFS=$as_save_IFS
15423  test -z "$as_dir" && as_dir=.
15424    for ac_exec_ext in '' $ac_executable_extensions; do
15425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15426    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15428    break 2
15429  fi
15430done
15431  done
15432IFS=$as_save_IFS
15433
15434  ;;
15435esac
15436fi
15437PANDOC=$ac_cv_path_PANDOC
15438if test -n "$PANDOC"; then
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15440$as_echo "$PANDOC" >&6; }
15441else
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15443$as_echo "no" >&6; }
15444fi
15445
15446
15447  test -n "$PANDOC" && break
15448done
15449
15450    else
15451      # If it succeeded, then it was overridden by the user. We will use it
15452      # for the tool.
15453
15454      # First remove it from the list of overridden variables, so we can test
15455      # for unknown variables in the end.
15456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15457
15458      # Check if we try to supply an empty value
15459      if test "x$PANDOC" = x; then
15460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15461$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15463$as_echo_n "checking for PANDOC... " >&6; }
15464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15465$as_echo "disabled" >&6; }
15466      else
15467        # Check if the provided tool contains a complete path.
15468        tool_specified="$PANDOC"
15469        tool_basename="${tool_specified##*/}"
15470        if test "x$tool_basename" = "x$tool_specified"; then
15471          # A command without a complete path is provided, search $PATH.
15472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15473$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15474          # Extract the first word of "$tool_basename", so it can be a program name with args.
15475set dummy $tool_basename; ac_word=$2
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15477$as_echo_n "checking for $ac_word... " >&6; }
15478if ${ac_cv_path_PANDOC+:} false; then :
15479  $as_echo_n "(cached) " >&6
15480else
15481  case $PANDOC in
15482  [\\/]* | ?:[\\/]*)
15483  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15484  ;;
15485  *)
15486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15487for as_dir in $PATH
15488do
15489  IFS=$as_save_IFS
15490  test -z "$as_dir" && as_dir=.
15491    for ac_exec_ext in '' $ac_executable_extensions; do
15492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15493    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15495    break 2
15496  fi
15497done
15498  done
15499IFS=$as_save_IFS
15500
15501  ;;
15502esac
15503fi
15504PANDOC=$ac_cv_path_PANDOC
15505if test -n "$PANDOC"; then
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15507$as_echo "$PANDOC" >&6; }
15508else
15509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15510$as_echo "no" >&6; }
15511fi
15512
15513
15514          if test "x$PANDOC" = x; then
15515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15516          fi
15517        else
15518          # Otherwise we believe it is a complete path. Use it as it is.
15519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15520$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15522$as_echo_n "checking for PANDOC... " >&6; }
15523          if test ! -x "$tool_specified"; then
15524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15525$as_echo "not found" >&6; }
15526            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15527          fi
15528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15529$as_echo "$tool_specified" >&6; }
15530        fi
15531      fi
15532    fi
15533
15534  fi
15535
15536
15537
15538
15539# Now we can determine OpenJDK build and target platforms. This is required to
15540# have early on.
15541# Make sure we can run config.sub.
15542$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15543  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15544
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15546$as_echo_n "checking build system type... " >&6; }
15547if ${ac_cv_build+:} false; then :
15548  $as_echo_n "(cached) " >&6
15549else
15550  ac_build_alias=$build_alias
15551test "x$ac_build_alias" = x &&
15552  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15553test "x$ac_build_alias" = x &&
15554  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15555ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15556  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15557
15558fi
15559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15560$as_echo "$ac_cv_build" >&6; }
15561case $ac_cv_build in
15562*-*-*) ;;
15563*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15564esac
15565build=$ac_cv_build
15566ac_save_IFS=$IFS; IFS='-'
15567set x $ac_cv_build
15568shift
15569build_cpu=$1
15570build_vendor=$2
15571shift; shift
15572# Remember, the first character of IFS is used to create $*,
15573# except with old shells:
15574build_os=$*
15575IFS=$ac_save_IFS
15576case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15577
15578
15579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15580$as_echo_n "checking host system type... " >&6; }
15581if ${ac_cv_host+:} false; then :
15582  $as_echo_n "(cached) " >&6
15583else
15584  if test "x$host_alias" = x; then
15585  ac_cv_host=$ac_cv_build
15586else
15587  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15588    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15589fi
15590
15591fi
15592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15593$as_echo "$ac_cv_host" >&6; }
15594case $ac_cv_host in
15595*-*-*) ;;
15596*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15597esac
15598host=$ac_cv_host
15599ac_save_IFS=$IFS; IFS='-'
15600set x $ac_cv_host
15601shift
15602host_cpu=$1
15603host_vendor=$2
15604shift; shift
15605# Remember, the first character of IFS is used to create $*,
15606# except with old shells:
15607host_os=$*
15608IFS=$ac_save_IFS
15609case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15610
15611
15612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15613$as_echo_n "checking target system type... " >&6; }
15614if ${ac_cv_target+:} false; then :
15615  $as_echo_n "(cached) " >&6
15616else
15617  if test "x$target_alias" = x; then
15618  ac_cv_target=$ac_cv_host
15619else
15620  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15621    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15622fi
15623
15624fi
15625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15626$as_echo "$ac_cv_target" >&6; }
15627case $ac_cv_target in
15628*-*-*) ;;
15629*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15630esac
15631target=$ac_cv_target
15632ac_save_IFS=$IFS; IFS='-'
15633set x $ac_cv_target
15634shift
15635target_cpu=$1
15636target_vendor=$2
15637shift; shift
15638# Remember, the first character of IFS is used to create $*,
15639# except with old shells:
15640target_os=$*
15641IFS=$ac_save_IFS
15642case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15643
15644
15645# The aliases save the names the user supplied, while $host etc.
15646# will get canonicalized.
15647test -n "$target_alias" &&
15648  test "$program_prefix$program_suffix$program_transform_name" = \
15649    NONENONEs,x,x, &&
15650  program_prefix=${target_alias}-
15651
15652  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15653  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15654  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15655  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15656  # to use the configure naming style.
15657
15658
15659
15660
15661
15662  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15663  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15664  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15665  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15666  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15667  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15668
15669
15670
15671  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15672
15673  case "$build_os" in
15674    *linux*)
15675      VAR_OS=linux
15676      VAR_OS_TYPE=unix
15677      ;;
15678    *solaris*)
15679      VAR_OS=solaris
15680      VAR_OS_TYPE=unix
15681      ;;
15682    *darwin*)
15683      VAR_OS=macosx
15684      VAR_OS_TYPE=unix
15685      ;;
15686    *bsd*)
15687      VAR_OS=bsd
15688      VAR_OS_TYPE=unix
15689      ;;
15690    *cygwin*)
15691      VAR_OS=windows
15692      VAR_OS_ENV=windows.cygwin
15693      ;;
15694    *mingw*)
15695      VAR_OS=windows
15696      VAR_OS_ENV=windows.msys
15697      ;;
15698    *aix*)
15699      VAR_OS=aix
15700      VAR_OS_TYPE=unix
15701      ;;
15702    *)
15703      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15704      ;;
15705  esac
15706
15707
15708  # First argument is the cpu name from the trip/quad
15709  case "$build_cpu" in
15710    x86_64)
15711      VAR_CPU=x86_64
15712      VAR_CPU_ARCH=x86
15713      VAR_CPU_BITS=64
15714      VAR_CPU_ENDIAN=little
15715      ;;
15716    i?86)
15717      VAR_CPU=x86
15718      VAR_CPU_ARCH=x86
15719      VAR_CPU_BITS=32
15720      VAR_CPU_ENDIAN=little
15721      ;;
15722    alpha*)
15723      VAR_CPU=alpha
15724      VAR_CPU_ARCH=alpha
15725      VAR_CPU_BITS=64
15726      VAR_CPU_ENDIAN=little
15727      ;;
15728    arm*)
15729      VAR_CPU=arm
15730      VAR_CPU_ARCH=arm
15731      VAR_CPU_BITS=32
15732      VAR_CPU_ENDIAN=little
15733      ;;
15734    aarch64)
15735      VAR_CPU=aarch64
15736      VAR_CPU_ARCH=aarch64
15737      VAR_CPU_BITS=64
15738      VAR_CPU_ENDIAN=little
15739      ;;
15740    m68k)
15741      VAR_CPU=m68k
15742      VAR_CPU_ARCH=m68k
15743      VAR_CPU_BITS=32
15744      VAR_CPU_ENDIAN=big
15745      ;;
15746    mips)
15747      VAR_CPU=mips
15748      VAR_CPU_ARCH=mips
15749      VAR_CPU_BITS=32
15750      VAR_CPU_ENDIAN=big
15751      ;;
15752    mipsel)
15753      VAR_CPU=mipsel
15754      VAR_CPU_ARCH=mipsel
15755      VAR_CPU_BITS=32
15756      VAR_CPU_ENDIAN=little
15757      ;;
15758    mips64)
15759      VAR_CPU=mips64
15760      VAR_CPU_ARCH=mips64
15761      VAR_CPU_BITS=64
15762      VAR_CPU_ENDIAN=big
15763      ;;
15764    mips64el)
15765      VAR_CPU=mips64el
15766      VAR_CPU_ARCH=mips64el
15767      VAR_CPU_BITS=64
15768      VAR_CPU_ENDIAN=little
15769      ;;
15770    powerpc)
15771      VAR_CPU=ppc
15772      VAR_CPU_ARCH=ppc
15773      VAR_CPU_BITS=32
15774      VAR_CPU_ENDIAN=big
15775      ;;
15776    powerpc64)
15777      VAR_CPU=ppc64
15778      VAR_CPU_ARCH=ppc
15779      VAR_CPU_BITS=64
15780      VAR_CPU_ENDIAN=big
15781      ;;
15782    powerpc64le)
15783      VAR_CPU=ppc64le
15784      VAR_CPU_ARCH=ppc
15785      VAR_CPU_BITS=64
15786      VAR_CPU_ENDIAN=little
15787      ;;
15788    s390)
15789      VAR_CPU=s390
15790      VAR_CPU_ARCH=s390
15791      VAR_CPU_BITS=32
15792      VAR_CPU_ENDIAN=big
15793      ;;
15794    s390x)
15795      VAR_CPU=s390x
15796      VAR_CPU_ARCH=s390
15797      VAR_CPU_BITS=64
15798      VAR_CPU_ENDIAN=big
15799      ;;
15800    sh*eb)
15801      VAR_CPU=sh
15802      VAR_CPU_ARCH=sh
15803      VAR_CPU_BITS=32
15804      VAR_CPU_ENDIAN=big
15805      ;;
15806    sh*)
15807      VAR_CPU=sh
15808      VAR_CPU_ARCH=sh
15809      VAR_CPU_BITS=32
15810      VAR_CPU_ENDIAN=little
15811      ;;
15812    sparc)
15813      VAR_CPU=sparc
15814      VAR_CPU_ARCH=sparc
15815      VAR_CPU_BITS=32
15816      VAR_CPU_ENDIAN=big
15817      ;;
15818    sparcv9|sparc64)
15819      VAR_CPU=sparcv9
15820      VAR_CPU_ARCH=sparc
15821      VAR_CPU_BITS=64
15822      VAR_CPU_ENDIAN=big
15823      ;;
15824    *)
15825      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15826      ;;
15827  esac
15828
15829  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15830  OPENJDK_BUILD_OS="$VAR_OS"
15831  if test "x$VAR_OS_TYPE" != x; then
15832    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15833  else
15834    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15835  fi
15836  if test "x$VAR_OS_ENV" != x; then
15837    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15838  else
15839    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15840  fi
15841  OPENJDK_BUILD_CPU="$VAR_CPU"
15842  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15843  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15844  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15845
15846
15847
15848
15849
15850
15851
15852
15853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15854$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15856$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15857
15858  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15859
15860  case "$host_os" in
15861    *linux*)
15862      VAR_OS=linux
15863      VAR_OS_TYPE=unix
15864      ;;
15865    *solaris*)
15866      VAR_OS=solaris
15867      VAR_OS_TYPE=unix
15868      ;;
15869    *darwin*)
15870      VAR_OS=macosx
15871      VAR_OS_TYPE=unix
15872      ;;
15873    *bsd*)
15874      VAR_OS=bsd
15875      VAR_OS_TYPE=unix
15876      ;;
15877    *cygwin*)
15878      VAR_OS=windows
15879      VAR_OS_ENV=windows.cygwin
15880      ;;
15881    *mingw*)
15882      VAR_OS=windows
15883      VAR_OS_ENV=windows.msys
15884      ;;
15885    *aix*)
15886      VAR_OS=aix
15887      VAR_OS_TYPE=unix
15888      ;;
15889    *)
15890      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15891      ;;
15892  esac
15893
15894
15895  # First argument is the cpu name from the trip/quad
15896  case "$host_cpu" in
15897    x86_64)
15898      VAR_CPU=x86_64
15899      VAR_CPU_ARCH=x86
15900      VAR_CPU_BITS=64
15901      VAR_CPU_ENDIAN=little
15902      ;;
15903    i?86)
15904      VAR_CPU=x86
15905      VAR_CPU_ARCH=x86
15906      VAR_CPU_BITS=32
15907      VAR_CPU_ENDIAN=little
15908      ;;
15909    alpha*)
15910      VAR_CPU=alpha
15911      VAR_CPU_ARCH=alpha
15912      VAR_CPU_BITS=64
15913      VAR_CPU_ENDIAN=little
15914      ;;
15915    arm*)
15916      VAR_CPU=arm
15917      VAR_CPU_ARCH=arm
15918      VAR_CPU_BITS=32
15919      VAR_CPU_ENDIAN=little
15920      ;;
15921    aarch64)
15922      VAR_CPU=aarch64
15923      VAR_CPU_ARCH=aarch64
15924      VAR_CPU_BITS=64
15925      VAR_CPU_ENDIAN=little
15926      ;;
15927    m68k)
15928      VAR_CPU=m68k
15929      VAR_CPU_ARCH=m68k
15930      VAR_CPU_BITS=32
15931      VAR_CPU_ENDIAN=big
15932      ;;
15933    mips)
15934      VAR_CPU=mips
15935      VAR_CPU_ARCH=mips
15936      VAR_CPU_BITS=32
15937      VAR_CPU_ENDIAN=big
15938      ;;
15939    mipsel)
15940      VAR_CPU=mipsel
15941      VAR_CPU_ARCH=mipsel
15942      VAR_CPU_BITS=32
15943      VAR_CPU_ENDIAN=little
15944      ;;
15945    mips64)
15946      VAR_CPU=mips64
15947      VAR_CPU_ARCH=mips64
15948      VAR_CPU_BITS=64
15949      VAR_CPU_ENDIAN=big
15950      ;;
15951    mips64el)
15952      VAR_CPU=mips64el
15953      VAR_CPU_ARCH=mips64el
15954      VAR_CPU_BITS=64
15955      VAR_CPU_ENDIAN=little
15956      ;;
15957    powerpc)
15958      VAR_CPU=ppc
15959      VAR_CPU_ARCH=ppc
15960      VAR_CPU_BITS=32
15961      VAR_CPU_ENDIAN=big
15962      ;;
15963    powerpc64)
15964      VAR_CPU=ppc64
15965      VAR_CPU_ARCH=ppc
15966      VAR_CPU_BITS=64
15967      VAR_CPU_ENDIAN=big
15968      ;;
15969    powerpc64le)
15970      VAR_CPU=ppc64le
15971      VAR_CPU_ARCH=ppc
15972      VAR_CPU_BITS=64
15973      VAR_CPU_ENDIAN=little
15974      ;;
15975    s390)
15976      VAR_CPU=s390
15977      VAR_CPU_ARCH=s390
15978      VAR_CPU_BITS=32
15979      VAR_CPU_ENDIAN=big
15980      ;;
15981    s390x)
15982      VAR_CPU=s390x
15983      VAR_CPU_ARCH=s390
15984      VAR_CPU_BITS=64
15985      VAR_CPU_ENDIAN=big
15986      ;;
15987    sh*eb)
15988      VAR_CPU=sh
15989      VAR_CPU_ARCH=sh
15990      VAR_CPU_BITS=32
15991      VAR_CPU_ENDIAN=big
15992      ;;
15993    sh*)
15994      VAR_CPU=sh
15995      VAR_CPU_ARCH=sh
15996      VAR_CPU_BITS=32
15997      VAR_CPU_ENDIAN=little
15998      ;;
15999    sparc)
16000      VAR_CPU=sparc
16001      VAR_CPU_ARCH=sparc
16002      VAR_CPU_BITS=32
16003      VAR_CPU_ENDIAN=big
16004      ;;
16005    sparcv9|sparc64)
16006      VAR_CPU=sparcv9
16007      VAR_CPU_ARCH=sparc
16008      VAR_CPU_BITS=64
16009      VAR_CPU_ENDIAN=big
16010      ;;
16011    *)
16012      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
16013      ;;
16014  esac
16015
16016  # ... and setup our own variables. (Do this explicitly to facilitate searching)
16017  OPENJDK_TARGET_OS="$VAR_OS"
16018  if test "x$VAR_OS_TYPE" != x; then
16019    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
16020  else
16021    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
16022  fi
16023  if test "x$VAR_OS_ENV" != x; then
16024    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
16025  else
16026    OPENJDK_TARGET_OS_ENV="$VAR_OS"
16027  fi
16028  OPENJDK_TARGET_CPU="$VAR_CPU"
16029  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
16030  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
16031  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
16032
16033
16034
16035
16036
16037
16038
16039
16040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16041$as_echo_n "checking openjdk-target os-cpu... " >&6; }
16042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16043$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16044
16045
16046
16047# Check whether --with-target-bits was given.
16048if test "${with_target_bits+set}" = set; then :
16049  withval=$with_target_bits;
16050fi
16051
16052
16053  # We have three types of compiles:
16054  # native  == normal compilation, target system == build system
16055  # cross   == traditional cross compilation, target system != build system; special toolchain needed
16056  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16057  #
16058  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16059    # We're doing a proper cross-compilation
16060    COMPILE_TYPE="cross"
16061  else
16062    COMPILE_TYPE="native"
16063  fi
16064
16065  if test "x$with_target_bits" != x; then
16066    if test "x$COMPILE_TYPE" = "xcross"; then
16067      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16068    fi
16069
16070    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16071      # A reduced build is requested
16072      COMPILE_TYPE="reduced"
16073      OPENJDK_TARGET_CPU_BITS=32
16074      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16075        OPENJDK_TARGET_CPU=x86
16076      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16077        OPENJDK_TARGET_CPU=sparc
16078      else
16079        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16080      fi
16081    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16082      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
16083    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16084      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16085$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16086    else
16087      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16088    fi
16089  fi
16090
16091
16092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16093$as_echo_n "checking compilation type... " >&6; }
16094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16095$as_echo "$COMPILE_TYPE" >&6; }
16096
16097
16098  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16099    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16100  else
16101    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16102  fi
16103
16104  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16105    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16106  else
16107    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16108  fi
16109
16110  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16111
16112
16113
16114  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16115    RELEASE_FILE_OS_NAME=SunOS
16116  fi
16117  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16118    RELEASE_FILE_OS_NAME=Linux
16119  fi
16120  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16121    RELEASE_FILE_OS_NAME=Windows
16122  fi
16123  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16124    RELEASE_FILE_OS_NAME="Darwin"
16125  fi
16126  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16127    RELEASE_FILE_OS_NAME="AIX"
16128  fi
16129  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16130
16131
16132
16133
16134
16135
16136  # Also store the legacy naming of the cpu.
16137  # Ie i586 and amd64 instead of x86 and x86_64
16138  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16139  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16140    OPENJDK_TARGET_CPU_LEGACY="i586"
16141  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16142    # On all platforms except MacOSX replace x86_64 with amd64.
16143    OPENJDK_TARGET_CPU_LEGACY="amd64"
16144  fi
16145
16146
16147  # And the second legacy naming of the cpu.
16148  # Ie i386 and amd64 instead of x86 and x86_64.
16149  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16150  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16151    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16152  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16153    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16154  fi
16155
16156
16157  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16158  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16159  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16160  OPENJDK_TARGET_CPU_ISADIR=""
16161  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16162    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16163      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16164    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16165      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16166    fi
16167  fi
16168
16169
16170  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16171  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16172  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16173    # On linux only, we replace x86 with i386.
16174    OPENJDK_TARGET_CPU_OSARCH="i386"
16175  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16176    # On all platforms except macosx, we replace x86_64 with amd64.
16177    OPENJDK_TARGET_CPU_OSARCH="amd64"
16178  fi
16179
16180
16181  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16182  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16183    OPENJDK_TARGET_CPU_JLI="i386"
16184  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16185    # On all platforms except macosx, we replace x86_64 with amd64.
16186    OPENJDK_TARGET_CPU_JLI="amd64"
16187  fi
16188
16189  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16190      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16191  else
16192      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16193  fi
16194
16195
16196  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16197  # Macosx is osx and x86_64 is x64
16198  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16199    OPENJDK_TARGET_OS_BUNDLE="osx"
16200  else
16201    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16202  fi
16203  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16204    OPENJDK_TARGET_CPU_BUNDLE="x64"
16205  else
16206    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16207  fi
16208  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16209
16210
16211  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16212    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16213    # unpack200.exe. This variable is used in
16214    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16215    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16216      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16217    fi
16218  fi
16219
16220  if test "x$COMPILE_TYPE" = "xcross"; then
16221    # FIXME: ... or should this include reduced builds..?
16222    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16223  else
16224    DEFINE_CROSS_COMPILE_ARCH=""
16225  fi
16226
16227
16228  # Convert openjdk platform names to hotspot names
16229
16230  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16231  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16232    HOTSPOT_TARGET_OS=bsd
16233  fi
16234
16235
16236  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16237  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16238    HOTSPOT_TARGET_OS_TYPE=posix
16239  fi
16240
16241
16242  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16243  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16244    HOTSPOT_TARGET_CPU=x86_32
16245  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16246    HOTSPOT_TARGET_CPU=sparc
16247  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16248    HOTSPOT_TARGET_CPU=ppc_64
16249  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16250    HOTSPOT_TARGET_CPU=ppc_64
16251  fi
16252
16253
16254  # This is identical with OPENJDK_*, but define anyway for consistency.
16255  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16256
16257
16258  # Setup HOTSPOT_TARGET_CPU_DEFINE
16259  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16260    HOTSPOT_TARGET_CPU_DEFINE=IA32
16261  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16262    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16263  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16264    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16265  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16266    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16267  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16268    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16269  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16270    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16271
16272  # The cpu defines below are for zero, we don't support them directly.
16273  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16274    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16275  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16276    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16277  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16278    HOTSPOT_TARGET_CPU_DEFINE=S390
16279  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16280    HOTSPOT_TARGET_CPU_DEFINE=S390
16281  elif test "x$OPENJDK_TARGET_CPU" != x; then
16282    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16283  fi
16284
16285
16286
16287
16288  # Also store the legacy naming of the cpu.
16289  # Ie i586 and amd64 instead of x86 and x86_64
16290  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16291  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16292    OPENJDK_BUILD_CPU_LEGACY="i586"
16293  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16294    # On all platforms except MacOSX replace x86_64 with amd64.
16295    OPENJDK_BUILD_CPU_LEGACY="amd64"
16296  fi
16297
16298
16299  # And the second legacy naming of the cpu.
16300  # Ie i386 and amd64 instead of x86 and x86_64.
16301  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16302  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16303    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16304  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16305    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16306  fi
16307
16308
16309  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16310  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16311  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16312  OPENJDK_BUILD_CPU_ISADIR=""
16313  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16314    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16315      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16316    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16317      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16318    fi
16319  fi
16320
16321
16322  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16323  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16324  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16325    # On linux only, we replace x86 with i386.
16326    OPENJDK_BUILD_CPU_OSARCH="i386"
16327  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16328    # On all platforms except macosx, we replace x86_64 with amd64.
16329    OPENJDK_BUILD_CPU_OSARCH="amd64"
16330  fi
16331
16332
16333  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16334  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16335    OPENJDK_BUILD_CPU_JLI="i386"
16336  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16337    # On all platforms except macosx, we replace x86_64 with amd64.
16338    OPENJDK_BUILD_CPU_JLI="amd64"
16339  fi
16340
16341  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16342      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16343  else
16344      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16345  fi
16346
16347
16348  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16349  # Macosx is osx and x86_64 is x64
16350  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16351    OPENJDK_BUILD_OS_BUNDLE="osx"
16352  else
16353    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16354  fi
16355  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16356    OPENJDK_BUILD_CPU_BUNDLE="x64"
16357  else
16358    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16359  fi
16360  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16361
16362
16363  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16364    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16365    # unpack200.exe. This variable is used in
16366    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16367    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16368      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16369    fi
16370  fi
16371
16372  if test "x$COMPILE_TYPE" = "xcross"; then
16373    # FIXME: ... or should this include reduced builds..?
16374    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16375  else
16376    DEFINE_CROSS_COMPILE_ARCH=""
16377  fi
16378
16379
16380  # Convert openjdk platform names to hotspot names
16381
16382  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16383  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16384    HOTSPOT_BUILD_OS=bsd
16385  fi
16386
16387
16388  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16389  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16390    HOTSPOT_BUILD_OS_TYPE=posix
16391  fi
16392
16393
16394  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16395  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16396    HOTSPOT_BUILD_CPU=x86_32
16397  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16398    HOTSPOT_BUILD_CPU=sparc
16399  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16400    HOTSPOT_BUILD_CPU=ppc_64
16401  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16402    HOTSPOT_BUILD_CPU=ppc_64
16403  fi
16404
16405
16406  # This is identical with OPENJDK_*, but define anyway for consistency.
16407  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16408
16409
16410  # Setup HOTSPOT_BUILD_CPU_DEFINE
16411  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16412    HOTSPOT_BUILD_CPU_DEFINE=IA32
16413  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16414    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16415  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16416    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16417  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16418    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16419  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16420    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16421  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16422    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16423
16424  # The cpu defines below are for zero, we don't support them directly.
16425  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16426    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16427  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16428    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16429  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16430    HOTSPOT_BUILD_CPU_DEFINE=S390
16431  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16432    HOTSPOT_BUILD_CPU_DEFINE=S390
16433  elif test "x$OPENJDK_BUILD_CPU" != x; then
16434    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16435  fi
16436
16437
16438
16439
16440
16441
16442# Continue setting up basic stuff. Most remaining code require fundamental tools.
16443
16444  # Save the current directory this script was started from
16445  CURDIR="$PWD"
16446
16447  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16448  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16449  # was not available at that time.
16450  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16451  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16452    ORIGINAL_PATH="$REWRITTEN_PATH"
16453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16454$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16455  fi
16456
16457  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16458    PATH_SEP=";"
16459
16460  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16461  if test $SRC_ROOT_LENGTH -gt 100; then
16462    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16463  fi
16464
16465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16467$as_echo_n "checking cygwin release... " >&6; }
16468    CYGWIN_VERSION=`$UNAME -r`
16469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16470$as_echo "$CYGWIN_VERSION" >&6; }
16471    WINDOWS_ENV_VENDOR='cygwin'
16472    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16473
16474    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16475    if test "x$CYGWIN_VERSION_OLD" != x; then
16476      { $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
16477$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;}
16478      as_fn_error $? "Cannot continue" "$LINENO" 5
16479    fi
16480    if test "x$CYGPATH" = x; then
16481      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16482    fi
16483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16484$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16485    # The cmd output ends with Windows line endings (CR/LF)
16486    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16487    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16488    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16490$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16491    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16492    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16493    if test "x$test_cygdrive_prefix" = x; then
16494      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16495    fi
16496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16498$as_echo_n "checking msys release... " >&6; }
16499    MSYS_VERSION=`$UNAME -r`
16500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16501$as_echo "$MSYS_VERSION" >&6; }
16502
16503    WINDOWS_ENV_VENDOR='msys'
16504    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16505
16506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16507$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16508    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16509    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16510
16511  windows_path="$MSYS_ROOT_PATH"
16512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16513    unix_path=`$CYGPATH -u "$windows_path"`
16514    MSYS_ROOT_PATH="$unix_path"
16515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16517    MSYS_ROOT_PATH="$unix_path"
16518  fi
16519
16520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16521$as_echo "$MSYS_ROOT_PATH" >&6; }
16522    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16523  else
16524    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16525  fi
16526
16527  # Test if windows or unix (cygwin/msys) find is first in path.
16528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16529$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16530  FIND_BINARY_OUTPUT=`find --version 2>&1`
16531  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16533$as_echo "unix style" >&6; }
16534  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16536$as_echo "Windows" >&6; }
16537    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16538$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16539    { $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
16540$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16541    as_fn_error $? "Cannot continue" "$LINENO" 5
16542  else
16543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16544$as_echo "unknown" >&6; }
16545    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16546$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16547  fi
16548
16549  else
16550    PATH_SEP=":"
16551  fi
16552
16553
16554  # We get the top-level directory from the supporting wrappers.
16555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16556$as_echo_n "checking for top-level directory... " >&6; }
16557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16558$as_echo "$TOPDIR" >&6; }
16559
16560
16561  # Save the original version of TOPDIR for string comparisons
16562  ORIGINAL_TOPDIR="$TOPDIR"
16563
16564
16565  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16566
16567  # Only process if variable expands to non-empty
16568
16569  if test "x$CURDIR" != x; then
16570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16571
16572  # Input might be given as Windows format, start by converting to
16573  # unix format.
16574  path="$CURDIR"
16575  new_path=`$CYGPATH -u "$path"`
16576
16577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16580  # "foo.exe" is OK but "foo" is an error.
16581  #
16582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16583  # It is also a way to make sure we got the proper file name for the real test later on.
16584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16585  if test "x$test_shortpath" = x; then
16586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16587$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16588    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16589  fi
16590
16591  # Call helper function which possibly converts this using DOS-style short mode.
16592  # If so, the updated path is stored in $new_path.
16593
16594  input_path="$new_path"
16595  # Check if we need to convert this using DOS-style short mode. If the path
16596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16597  # take no chances and rewrite it.
16598  # Note: m4 eats our [], so we need to use [ and ] instead.
16599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16600  if test "x$has_forbidden_chars" != x; then
16601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16605      # Going to short mode and back again did indeed matter. Since short mode is
16606      # case insensitive, let's make it lowercase to improve readability.
16607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16608      # Now convert it back to Unix-style (cygpath)
16609      input_path=`$CYGPATH -u "$shortmode_path"`
16610      new_path="$input_path"
16611    fi
16612  fi
16613
16614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16615  if test "x$test_cygdrive_prefix" = x; then
16616    # As a simple fix, exclude /usr/bin since it's not a real path.
16617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16619      # a path prefixed by /cygdrive for fixpath to work.
16620      new_path="$CYGWIN_ROOT_PATH$input_path"
16621    fi
16622  fi
16623
16624
16625  if test "x$path" != "x$new_path"; then
16626    CURDIR="$new_path"
16627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16628$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16629  fi
16630
16631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632
16633  path="$CURDIR"
16634  has_colon=`$ECHO $path | $GREP ^.:`
16635  new_path="$path"
16636  if test "x$has_colon" = x; then
16637    # Not in mixed or Windows style, start by that.
16638    new_path=`cmd //c echo $path`
16639  fi
16640
16641
16642  input_path="$new_path"
16643  # Check if we need to convert this using DOS-style short mode. If the path
16644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16645  # take no chances and rewrite it.
16646  # Note: m4 eats our [], so we need to use [ and ] instead.
16647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16648  if test "x$has_forbidden_chars" != x; then
16649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16651  fi
16652
16653
16654  windows_path="$new_path"
16655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16656    unix_path=`$CYGPATH -u "$windows_path"`
16657    new_path="$unix_path"
16658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16660    new_path="$unix_path"
16661  fi
16662
16663  if test "x$path" != "x$new_path"; then
16664    CURDIR="$new_path"
16665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16666$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16667  fi
16668
16669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16671
16672    else
16673      # We're on a unix platform. Hooray! :)
16674      path="$CURDIR"
16675      has_space=`$ECHO "$path" | $GREP " "`
16676      if test "x$has_space" != x; then
16677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16678$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16679        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16680      fi
16681
16682      # Use eval to expand a potential ~
16683      eval path="$path"
16684      if test ! -f "$path" && test ! -d "$path"; then
16685        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16686      fi
16687
16688      if test -d "$path"; then
16689        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16690      else
16691        dir="`$DIRNAME "$path"`"
16692        base="`$BASENAME "$path"`"
16693        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16694      fi
16695    fi
16696  fi
16697
16698
16699  # Only process if variable expands to non-empty
16700
16701  if test "x$TOPDIR" != x; then
16702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16703
16704  # Input might be given as Windows format, start by converting to
16705  # unix format.
16706  path="$TOPDIR"
16707  new_path=`$CYGPATH -u "$path"`
16708
16709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16712  # "foo.exe" is OK but "foo" is an error.
16713  #
16714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16715  # It is also a way to make sure we got the proper file name for the real test later on.
16716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16717  if test "x$test_shortpath" = x; then
16718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16719$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16720    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16721  fi
16722
16723  # Call helper function which possibly converts this using DOS-style short mode.
16724  # If so, the updated path is stored in $new_path.
16725
16726  input_path="$new_path"
16727  # Check if we need to convert this using DOS-style short mode. If the path
16728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16729  # take no chances and rewrite it.
16730  # Note: m4 eats our [], so we need to use [ and ] instead.
16731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16732  if test "x$has_forbidden_chars" != x; then
16733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16737      # Going to short mode and back again did indeed matter. Since short mode is
16738      # case insensitive, let's make it lowercase to improve readability.
16739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16740      # Now convert it back to Unix-style (cygpath)
16741      input_path=`$CYGPATH -u "$shortmode_path"`
16742      new_path="$input_path"
16743    fi
16744  fi
16745
16746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16747  if test "x$test_cygdrive_prefix" = x; then
16748    # As a simple fix, exclude /usr/bin since it's not a real path.
16749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16751      # a path prefixed by /cygdrive for fixpath to work.
16752      new_path="$CYGWIN_ROOT_PATH$input_path"
16753    fi
16754  fi
16755
16756
16757  if test "x$path" != "x$new_path"; then
16758    TOPDIR="$new_path"
16759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16760$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16761  fi
16762
16763    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764
16765  path="$TOPDIR"
16766  has_colon=`$ECHO $path | $GREP ^.:`
16767  new_path="$path"
16768  if test "x$has_colon" = x; then
16769    # Not in mixed or Windows style, start by that.
16770    new_path=`cmd //c echo $path`
16771  fi
16772
16773
16774  input_path="$new_path"
16775  # Check if we need to convert this using DOS-style short mode. If the path
16776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16777  # take no chances and rewrite it.
16778  # Note: m4 eats our [], so we need to use [ and ] instead.
16779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16780  if test "x$has_forbidden_chars" != x; then
16781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16783  fi
16784
16785
16786  windows_path="$new_path"
16787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16788    unix_path=`$CYGPATH -u "$windows_path"`
16789    new_path="$unix_path"
16790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16792    new_path="$unix_path"
16793  fi
16794
16795  if test "x$path" != "x$new_path"; then
16796    TOPDIR="$new_path"
16797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16798$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16799  fi
16800
16801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16803
16804    else
16805      # We're on a unix platform. Hooray! :)
16806      path="$TOPDIR"
16807      has_space=`$ECHO "$path" | $GREP " "`
16808      if test "x$has_space" != x; then
16809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16810$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16811        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16812      fi
16813
16814      # Use eval to expand a potential ~
16815      eval path="$path"
16816      if test ! -f "$path" && test ! -d "$path"; then
16817        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16818      fi
16819
16820      if test -d "$path"; then
16821        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16822      else
16823        dir="`$DIRNAME "$path"`"
16824        base="`$BASENAME "$path"`"
16825        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16826      fi
16827    fi
16828  fi
16829
16830  # SRC_ROOT is a traditional alias for TOPDIR.
16831  SRC_ROOT=$TOPDIR
16832
16833  # Calculate a canonical version of TOPDIR for string comparisons
16834  CANONICAL_TOPDIR=$TOPDIR
16835
16836  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16837    # Follow a chain of symbolic links. Use readlink
16838    # where it exists, else fall back to horribly
16839    # complicated shell code.
16840    if test "x$READLINK_TESTED" != yes; then
16841      # On MacOSX there is a readlink tool with a different
16842      # purpose than the GNU readlink tool. Check the found readlink.
16843      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16844      if test "x$ISGNU" = x; then
16845        # A readlink that we do not know how to use.
16846        # Are there other non-GNU readlinks out there?
16847        READLINK_TESTED=yes
16848        READLINK=
16849      fi
16850    fi
16851
16852    if test "x$READLINK" != x; then
16853      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16854    else
16855      # Save the current directory for restoring afterwards
16856      STARTDIR=$PWD
16857      COUNTER=0
16858      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16859      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16860      cd $sym_link_dir
16861      # Use -P flag to resolve symlinks in directories.
16862      cd `$THEPWDCMD -P`
16863      sym_link_dir=`$THEPWDCMD -P`
16864      # Resolve file symlinks
16865      while test $COUNTER -lt 20; do
16866        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16867        if test "x$ISLINK" == x; then
16868          # This is not a symbolic link! We are done!
16869          break
16870        fi
16871        # Again resolve directory symlinks since the target of the just found
16872        # link could be in a different directory
16873        cd `$DIRNAME $ISLINK`
16874        sym_link_dir=`$THEPWDCMD -P`
16875        sym_link_file=`$BASENAME $ISLINK`
16876        let COUNTER=COUNTER+1
16877      done
16878      cd $STARTDIR
16879      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16880    fi
16881  fi
16882
16883
16884
16885  # Locate the directory of this script.
16886  AUTOCONF_DIR=$TOPDIR/common/autoconf
16887
16888  # Setup username (for use in adhoc version strings etc)
16889  # Outer [ ] to quote m4.
16890   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16891
16892
16893
16894# Check if it's a pure open build or if custom sources are to be used.
16895
16896  # Check whether --enable-openjdk-only was given.
16897if test "${enable_openjdk_only+set}" = set; then :
16898  enableval=$enable_openjdk_only;
16899else
16900  enable_openjdk_only="no"
16901fi
16902
16903
16904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16905$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16907$as_echo "$enable_openjdk_only" >&6; }
16908  if test "x$enable_openjdk_only" = "xyes"; then
16909    SUPPRESS_CUSTOM_EXTENSIONS="true"
16910  elif test "x$enable_openjdk_only" = "xno"; then
16911    SUPPRESS_CUSTOM_EXTENSIONS="false"
16912  else
16913    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16914  fi
16915
16916  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16917  # the IncludeCustomExtension macro.
16918
16919
16920# Check whether --with-custom-make-dir was given.
16921if test "${with_custom_make_dir+set}" = set; then :
16922  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
16923$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16924fi
16925
16926
16927
16928
16929# These are needed to be able to create a configuration name (and thus the output directory)
16930
16931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16932$as_echo_n "checking which variant of the JDK to build... " >&6; }
16933
16934# Check whether --with-jdk-variant was given.
16935if test "${with_jdk_variant+set}" = set; then :
16936  withval=$with_jdk_variant;
16937fi
16938
16939
16940  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16941    JDK_VARIANT="normal"
16942  else
16943    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16944  fi
16945
16946
16947
16948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16949$as_echo "$JDK_VARIANT" >&6; }
16950
16951
16952  DEBUG_LEVEL="release"
16953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16954$as_echo_n "checking which debug level to use... " >&6; }
16955  # Check whether --enable-debug was given.
16956if test "${enable_debug+set}" = set; then :
16957  enableval=$enable_debug;
16958        ENABLE_DEBUG="${enableval}"
16959        DEBUG_LEVEL="fastdebug"
16960
16961else
16962  ENABLE_DEBUG="no"
16963fi
16964
16965
16966
16967# Check whether --with-debug-level was given.
16968if test "${with_debug_level+set}" = set; then :
16969  withval=$with_debug_level;
16970        DEBUG_LEVEL="${withval}"
16971        if test "x$ENABLE_DEBUG" = xyes; then
16972          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16973        fi
16974
16975fi
16976
16977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16978$as_echo "$DEBUG_LEVEL" >&6; }
16979
16980  if test "x$DEBUG_LEVEL" != xrelease && \
16981      test "x$DEBUG_LEVEL" != xoptimized && \
16982      test "x$DEBUG_LEVEL" != xfastdebug && \
16983      test "x$DEBUG_LEVEL" != xslowdebug; then
16984    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16985  fi
16986
16987  # Translate DEBUG_LEVEL to debug level used by Hotspot
16988  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16989  if test "x$DEBUG_LEVEL" = xrelease; then
16990    HOTSPOT_DEBUG_LEVEL="product"
16991  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16992    HOTSPOT_DEBUG_LEVEL="debug"
16993  fi
16994
16995  if test "x$DEBUG_LEVEL" = xoptimized; then
16996    # The debug level 'optimized' is a little special because it is currently only
16997    # applicable to the HotSpot build where it means to build a completely
16998    # optimized version of the VM without any debugging code (like for the
16999    # 'release' debug level which is called 'product' in the HotSpot build) but
17000    # with the exception that it can contain additional code which is otherwise
17001    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
17002    # test new and/or experimental features which are not intended for customer
17003    # shipment. Because these new features need to be tested and benchmarked in
17004    # real world scenarios, we want to build the containing JDK at the 'release'
17005    # debug level.
17006    DEBUG_LEVEL="release"
17007  fi
17008
17009
17010
17011
17012
17013
17014# Check whether --with-jvm-variants was given.
17015if test "${with_jvm_variants+set}" = set; then :
17016  withval=$with_jvm_variants;
17017fi
17018
17019
17020
17021
17022# Check whether --with-cpu-port was given.
17023if test "${with_cpu_port+set}" = set; then :
17024  withval=$with_cpu_port;
17025fi
17026
17027
17028  if test "x$with_cpu_port" != x; then
17029    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17030      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17031    fi
17032    if test "x$with_cpu_port" != xarm64 && \
17033        test "x$with_cpu_port" != xaarch64; then
17034      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17035    fi
17036    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17037  fi
17038
17039
17040  if test "x$with_jvm_variants" = x; then
17041    with_jvm_variants="server"
17042  fi
17043  JVM_VARIANTS_OPT="$with_jvm_variants"
17044
17045  # Has the user listed more than one variant?
17046  # Additional [] needed to keep m4 from mangling shell constructs.
17047  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17048    BUILDING_MULTIPLE_JVM_VARIANTS=true
17049  else
17050    BUILDING_MULTIPLE_JVM_VARIANTS=false
17051  fi
17052  # Replace the commas with AND for use in the build directory name.
17053  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17054
17055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17056$as_echo_n "checking which variants of the JVM to build... " >&6; }
17057  # JVM_VARIANTS is a space-separated list.
17058  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17059  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17061$as_echo "$JVM_VARIANTS" >&6; }
17062
17063  # Check that the selected variants are valid
17064
17065  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17066  # Notice that the original variant failes on SLES 10 and 11
17067  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17068  STACK=${JVM_VARIANTS// /$'\n'}
17069  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17070  if test "x$INVALID_VARIANTS" != x; then
17071    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17072$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17073    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17074  fi
17075
17076  # All "special" variants share the same output directory ("server")
17077  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17078  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17079  STACK=${JVM_VARIANTS// /$'\n'}
17080  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17081  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17082    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17083  fi
17084
17085  # The "main" variant is the one used by other libs to link against during the
17086  # build.
17087  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17088    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17089    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17090      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17091        JVM_VARIANT_MAIN="$variant"
17092        break
17093      fi
17094    done
17095  else
17096    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17097  fi
17098
17099
17100
17101
17102
17103  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17104    # zero behaves as a platform and rewrites these values. This is really weird. :(
17105    # We are guaranteed that we do not build any other variants when building zero.
17106    HOTSPOT_TARGET_CPU=zero
17107    HOTSPOT_TARGET_CPU_ARCH=zero
17108  fi
17109
17110
17111# With basic setup done, call the custom early hook.
17112
17113
17114# Check if we have devkits, extra paths or sysroot set.
17115
17116
17117# Check whether --with-devkit was given.
17118if test "${with_devkit+set}" = set; then :
17119  withval=$with_devkit;
17120
17121  # Only process if variable expands to non-empty
17122
17123  if test "x$with_devkit" != x; then
17124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17125
17126  # Input might be given as Windows format, start by converting to
17127  # unix format.
17128  path="$with_devkit"
17129  new_path=`$CYGPATH -u "$path"`
17130
17131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17134  # "foo.exe" is OK but "foo" is an error.
17135  #
17136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17137  # It is also a way to make sure we got the proper file name for the real test later on.
17138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17139  if test "x$test_shortpath" = x; then
17140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17141$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17142    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17143  fi
17144
17145  # Call helper function which possibly converts this using DOS-style short mode.
17146  # If so, the updated path is stored in $new_path.
17147
17148  input_path="$new_path"
17149  # Check if we need to convert this using DOS-style short mode. If the path
17150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17151  # take no chances and rewrite it.
17152  # Note: m4 eats our [], so we need to use [ and ] instead.
17153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17154  if test "x$has_forbidden_chars" != x; then
17155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17159      # Going to short mode and back again did indeed matter. Since short mode is
17160      # case insensitive, let's make it lowercase to improve readability.
17161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17162      # Now convert it back to Unix-style (cygpath)
17163      input_path=`$CYGPATH -u "$shortmode_path"`
17164      new_path="$input_path"
17165    fi
17166  fi
17167
17168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17169  if test "x$test_cygdrive_prefix" = x; then
17170    # As a simple fix, exclude /usr/bin since it's not a real path.
17171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17173      # a path prefixed by /cygdrive for fixpath to work.
17174      new_path="$CYGWIN_ROOT_PATH$input_path"
17175    fi
17176  fi
17177
17178
17179  if test "x$path" != "x$new_path"; then
17180    with_devkit="$new_path"
17181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17182$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17183  fi
17184
17185    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17186
17187  path="$with_devkit"
17188  has_colon=`$ECHO $path | $GREP ^.:`
17189  new_path="$path"
17190  if test "x$has_colon" = x; then
17191    # Not in mixed or Windows style, start by that.
17192    new_path=`cmd //c echo $path`
17193  fi
17194
17195
17196  input_path="$new_path"
17197  # Check if we need to convert this using DOS-style short mode. If the path
17198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17199  # take no chances and rewrite it.
17200  # Note: m4 eats our [], so we need to use [ and ] instead.
17201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17202  if test "x$has_forbidden_chars" != x; then
17203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17205  fi
17206
17207
17208  windows_path="$new_path"
17209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17210    unix_path=`$CYGPATH -u "$windows_path"`
17211    new_path="$unix_path"
17212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17214    new_path="$unix_path"
17215  fi
17216
17217  if test "x$path" != "x$new_path"; then
17218    with_devkit="$new_path"
17219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17220$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17221  fi
17222
17223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17225
17226    else
17227      # We're on a unix platform. Hooray! :)
17228      path="$with_devkit"
17229      has_space=`$ECHO "$path" | $GREP " "`
17230      if test "x$has_space" != x; then
17231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17232$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17233        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17234      fi
17235
17236      # Use eval to expand a potential ~
17237      eval path="$path"
17238      if test ! -f "$path" && test ! -d "$path"; then
17239        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17240      fi
17241
17242      if test -d "$path"; then
17243        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17244      else
17245        dir="`$DIRNAME "$path"`"
17246        base="`$BASENAME "$path"`"
17247        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17248      fi
17249    fi
17250  fi
17251
17252        DEVKIT_ROOT="$with_devkit"
17253        # Check for a meta data info file in the root of the devkit
17254        if test -f "$DEVKIT_ROOT/devkit.info"; then
17255          . $DEVKIT_ROOT/devkit.info
17256          # This potentially sets the following:
17257          # A descriptive name of the devkit
17258
17259  if test "x$DEVKIT_NAME" = x; then
17260    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17261  fi
17262
17263          # Corresponds to --with-extra-path
17264
17265  if test "x$DEVKIT_EXTRA_PATH" = x; then
17266    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17267  fi
17268
17269          # Corresponds to --with-toolchain-path
17270
17271  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17272    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17273  fi
17274
17275          # Corresponds to --with-sysroot
17276
17277  if test "x$DEVKIT_SYSROOT" = x; then
17278    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17279  fi
17280
17281
17282          # Identifies the Visual Studio version in the devkit
17283
17284  if test "x$DEVKIT_VS_VERSION" = x; then
17285    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17286  fi
17287
17288          # The Visual Studio include environment variable
17289
17290  if test "x$DEVKIT_VS_INCLUDE" = x; then
17291    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17292  fi
17293
17294          # The Visual Studio lib environment variable
17295
17296  if test "x$DEVKIT_VS_LIB" = x; then
17297    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17298  fi
17299
17300          # Corresponds to --with-msvcr-dll
17301
17302  if test "x$DEVKIT_MSVCR_DLL" = x; then
17303    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17304  fi
17305
17306          # Corresponds to --with-msvcp-dll
17307
17308  if test "x$DEVKIT_MSVCP_DLL" = x; then
17309    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17310  fi
17311
17312        fi
17313
17314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17315$as_echo_n "checking for devkit... " >&6; }
17316        if test "x$DEVKIT_NAME" != x; then
17317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17318$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17319        else
17320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17321$as_echo "$DEVKIT_ROOT" >&6; }
17322        fi
17323
17324
17325  if test "x$DEVKIT_EXTRA_PATH" != x; then
17326    if test "x$EXTRA_PATH" = x; then
17327      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17328    else
17329      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17330    fi
17331  fi
17332
17333
17334        # Fallback default of just /bin if DEVKIT_PATH is not defined
17335        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17336          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17337        fi
17338
17339  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17340    if test "x$TOOLCHAIN_PATH" = x; then
17341      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17342    else
17343      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17344    fi
17345  fi
17346
17347
17348        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17349        # places for backwards compatiblity.
17350        if test "x$DEVKIT_SYSROOT" != x; then
17351          SYSROOT="$DEVKIT_SYSROOT"
17352        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17353          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17354        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17355          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17356        fi
17357
17358
17359fi
17360
17361
17362  # You can force the sysroot if the sysroot encoded into the compiler tools
17363  # is not correct.
17364
17365# Check whether --with-sys-root was given.
17366if test "${with_sys_root+set}" = set; then :
17367  withval=$with_sys_root; SYSROOT=$with_sys_root
17368
17369fi
17370
17371
17372
17373# Check whether --with-sysroot was given.
17374if test "${with_sysroot+set}" = set; then :
17375  withval=$with_sysroot; SYSROOT=$with_sysroot
17376
17377fi
17378
17379
17380
17381# Check whether --with-tools-dir was given.
17382if test "${with_tools_dir+set}" = set; then :
17383  withval=$with_tools_dir;
17384  if test "x$with_tools_dir" != x; then
17385    if test "x$TOOLCHAIN_PATH" = x; then
17386      TOOLCHAIN_PATH="$with_tools_dir"
17387    else
17388      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17389    fi
17390  fi
17391
17392
17393fi
17394
17395
17396
17397# Check whether --with-toolchain-path was given.
17398if test "${with_toolchain_path+set}" = set; then :
17399  withval=$with_toolchain_path;
17400  if test "x$with_toolchain_path" != x; then
17401    if test "x$TOOLCHAIN_PATH" = x; then
17402      TOOLCHAIN_PATH="$with_toolchain_path"
17403    else
17404      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17405    fi
17406  fi
17407
17408
17409fi
17410
17411
17412
17413# Check whether --with-extra-path was given.
17414if test "${with_extra_path+set}" = set; then :
17415  withval=$with_extra_path;
17416  if test "x$with_extra_path" != x; then
17417    if test "x$EXTRA_PATH" = x; then
17418      EXTRA_PATH="$with_extra_path"
17419    else
17420      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17421    fi
17422  fi
17423
17424
17425fi
17426
17427
17428  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17429    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17430    # If not, detect if Xcode is installed by running xcodebuild -version
17431    # if no Xcode installed, xcodebuild exits with 1
17432    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17433    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17434      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17435      # fall back on the stub binary in /usr/bin/xcodebuild
17436      # Extract the first word of "xcodebuild", so it can be a program name with args.
17437set dummy xcodebuild; ac_word=$2
17438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17439$as_echo_n "checking for $ac_word... " >&6; }
17440if ${ac_cv_path_XCODEBUILD+:} false; then :
17441  $as_echo_n "(cached) " >&6
17442else
17443  case $XCODEBUILD in
17444  [\\/]* | ?:[\\/]*)
17445  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17446  ;;
17447  *)
17448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17449for as_dir in $TOOLCHAIN_PATH
17450do
17451  IFS=$as_save_IFS
17452  test -z "$as_dir" && as_dir=.
17453    for ac_exec_ext in '' $ac_executable_extensions; do
17454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17455    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17457    break 2
17458  fi
17459done
17460  done
17461IFS=$as_save_IFS
17462
17463  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17464  ;;
17465esac
17466fi
17467XCODEBUILD=$ac_cv_path_XCODEBUILD
17468if test -n "$XCODEBUILD"; then
17469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17470$as_echo "$XCODEBUILD" >&6; }
17471else
17472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17473$as_echo "no" >&6; }
17474fi
17475
17476
17477    else
17478      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17479      # when only the command line tools are installed there are no SDKs, so headers
17480      # are copied into the system frameworks
17481      XCODEBUILD=
17482
17483    fi
17484
17485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17486$as_echo_n "checking for sdk name... " >&6; }
17487
17488# Check whether --with-sdk-name was given.
17489if test "${with_sdk_name+set}" = set; then :
17490  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17491
17492fi
17493
17494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17495$as_echo "$SDKNAME" >&6; }
17496
17497    # if toolchain path is specified then don't rely on system headers, they may not compile
17498    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17499    test -z "$TOOLCHAIN_PATH" && \
17500      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17501
17502    if test -z "$SYSROOT"; then
17503      if test -n "$XCODEBUILD"; then
17504        # if we don't have system headers, use default SDK name (last resort)
17505        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17506          SDKNAME=${SDKNAME:-macosx}
17507        fi
17508
17509        if test -n "$SDKNAME"; then
17510          # Call xcodebuild to determine SYSROOT
17511          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17512        fi
17513      else
17514        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17515          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
17516        fi
17517      fi
17518    else
17519      # warn user if --with-sdk-name was also set
17520      if test -n "$with_sdk_name"; then
17521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17522$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17523      fi
17524    fi
17525
17526    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17527      # If no system framework headers, then SYSROOT must be set, or we won't build
17528      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
17529    fi
17530
17531    # Perform a basic sanity test
17532    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17533      if test -z "$SYSROOT"; then
17534        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
17535      else
17536        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17537      fi
17538    fi
17539
17540    # set SDKROOT too, Xcode tools will pick it up
17541    SDKROOT="$SYSROOT"
17542
17543  fi
17544
17545  # Prepend the extra path to the global path
17546
17547  if test "x$EXTRA_PATH" != x; then
17548    if test "x$PATH" = x; then
17549      PATH="$EXTRA_PATH"
17550    else
17551      PATH="$EXTRA_PATH:$PATH"
17552    fi
17553  fi
17554
17555
17556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17557$as_echo_n "checking for sysroot... " >&6; }
17558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17559$as_echo "$SYSROOT" >&6; }
17560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17561$as_echo_n "checking for toolchain path... " >&6; }
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17563$as_echo "$TOOLCHAIN_PATH" >&6; }
17564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17565$as_echo_n "checking for extra path... " >&6; }
17566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17567$as_echo "$EXTRA_PATH" >&6; }
17568
17569
17570# To properly create a configuration name, we need to have the OpenJDK target
17571# and options (variants and debug level) parsed.
17572
17573
17574
17575# Check whether --with-conf-name was given.
17576if test "${with_conf_name+set}" = set; then :
17577  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17578fi
17579
17580
17581  # Test from where we are running configure, in or outside of src root.
17582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17583$as_echo_n "checking where to store configuration... " >&6; }
17584  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17585      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17586      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17587    # We are running configure from the src root.
17588    # Create a default ./build/target-variant-debuglevel output root.
17589    if test "x${CONF_NAME}" = x; then
17590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17591$as_echo "in default location" >&6; }
17592      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17593    else
17594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17595$as_echo "in build directory with custom name" >&6; }
17596    fi
17597    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17598    $MKDIR -p "$OUTPUT_ROOT"
17599    if test ! -d "$OUTPUT_ROOT"; then
17600      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17601    fi
17602  else
17603    # We are running configure from outside of the src dir.
17604    # Then use the current directory as output dir!
17605    # If configuration is situated in normal build directory, just use the build
17606    # directory name as configuration name, otherwise use the complete path.
17607    if test "x${CONF_NAME}" = x; then
17608      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17609    fi
17610    OUTPUT_ROOT="$CURDIR"
17611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17612$as_echo "in current directory" >&6; }
17613
17614    # WARNING: This might be a bad thing to do. You need to be sure you want to
17615    # have a configuration in this directory. Do some sanity checks!
17616
17617    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17618      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17619      # other files
17620      files_present=`$LS $OUTPUT_ROOT`
17621      # Configure has already touched config.log and confdefs.h in the current dir when this check
17622      # is performed.
17623      filtered_files=`$ECHO "$files_present" \
17624          | $SED -e 's/config.log//g' \
17625              -e 's/configure.log//g' \
17626              -e 's/confdefs.h//g' \
17627              -e 's/ //g' \
17628          | $TR -d '\n'`
17629      if test "x$filtered_files" != x; then
17630        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17631$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17632        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17633$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17634        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17635$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17636        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17637$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17638        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17639$as_echo "$as_me: seriously mess up just about everything." >&6;}
17640        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17641$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17642        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17643$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17644        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17645      fi
17646    fi
17647  fi
17648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17649$as_echo_n "checking what configuration name to use... " >&6; }
17650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17651$as_echo "$CONF_NAME" >&6; }
17652
17653
17654  # Only process if variable expands to non-empty
17655
17656  if test "x$OUTPUT_ROOT" != x; then
17657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17658
17659  # Input might be given as Windows format, start by converting to
17660  # unix format.
17661  path="$OUTPUT_ROOT"
17662  new_path=`$CYGPATH -u "$path"`
17663
17664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17667  # "foo.exe" is OK but "foo" is an error.
17668  #
17669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17670  # It is also a way to make sure we got the proper file name for the real test later on.
17671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17672  if test "x$test_shortpath" = x; then
17673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17674$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17675    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17676  fi
17677
17678  # Call helper function which possibly converts this using DOS-style short mode.
17679  # If so, the updated path is stored in $new_path.
17680
17681  input_path="$new_path"
17682  # Check if we need to convert this using DOS-style short mode. If the path
17683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17684  # take no chances and rewrite it.
17685  # Note: m4 eats our [], so we need to use [ and ] instead.
17686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17687  if test "x$has_forbidden_chars" != x; then
17688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17692      # Going to short mode and back again did indeed matter. Since short mode is
17693      # case insensitive, let's make it lowercase to improve readability.
17694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17695      # Now convert it back to Unix-style (cygpath)
17696      input_path=`$CYGPATH -u "$shortmode_path"`
17697      new_path="$input_path"
17698    fi
17699  fi
17700
17701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17702  if test "x$test_cygdrive_prefix" = x; then
17703    # As a simple fix, exclude /usr/bin since it's not a real path.
17704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17706      # a path prefixed by /cygdrive for fixpath to work.
17707      new_path="$CYGWIN_ROOT_PATH$input_path"
17708    fi
17709  fi
17710
17711
17712  if test "x$path" != "x$new_path"; then
17713    OUTPUT_ROOT="$new_path"
17714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17715$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17716  fi
17717
17718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17719
17720  path="$OUTPUT_ROOT"
17721  has_colon=`$ECHO $path | $GREP ^.:`
17722  new_path="$path"
17723  if test "x$has_colon" = x; then
17724    # Not in mixed or Windows style, start by that.
17725    new_path=`cmd //c echo $path`
17726  fi
17727
17728
17729  input_path="$new_path"
17730  # Check if we need to convert this using DOS-style short mode. If the path
17731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17732  # take no chances and rewrite it.
17733  # Note: m4 eats our [], so we need to use [ and ] instead.
17734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17735  if test "x$has_forbidden_chars" != x; then
17736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17738  fi
17739
17740
17741  windows_path="$new_path"
17742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17743    unix_path=`$CYGPATH -u "$windows_path"`
17744    new_path="$unix_path"
17745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17747    new_path="$unix_path"
17748  fi
17749
17750  if test "x$path" != "x$new_path"; then
17751    OUTPUT_ROOT="$new_path"
17752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17753$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17754  fi
17755
17756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17758
17759    else
17760      # We're on a unix platform. Hooray! :)
17761      path="$OUTPUT_ROOT"
17762      has_space=`$ECHO "$path" | $GREP " "`
17763      if test "x$has_space" != x; then
17764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17765$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17767      fi
17768
17769      # Use eval to expand a potential ~
17770      eval path="$path"
17771      if test ! -f "$path" && test ! -d "$path"; then
17772        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17773      fi
17774
17775      if test -d "$path"; then
17776        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17777      else
17778        dir="`$DIRNAME "$path"`"
17779        base="`$BASENAME "$path"`"
17780        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17781      fi
17782    fi
17783  fi
17784
17785
17786  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17787  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17788
17789  SPEC="$OUTPUT_ROOT/spec.gmk"
17790
17791
17792
17793
17794
17795  # The spec.gmk file contains all variables for the make system.
17796  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17797
17798  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17799  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17800
17801  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17802  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17803
17804  # The compare.sh is used to compare the build output to other builds.
17805  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17806
17807  # The generated Makefile knows where the spec.gmk is and where the source is.
17808  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17809  # which will look for generated configurations
17810  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17811
17812
17813
17814# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17815
17816  for ac_prog in apt-get yum brew port pkgutil pkgadd
17817do
17818  # Extract the first word of "$ac_prog", so it can be a program name with args.
17819set dummy $ac_prog; ac_word=$2
17820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17821$as_echo_n "checking for $ac_word... " >&6; }
17822if ${ac_cv_prog_PKGHANDLER+:} false; then :
17823  $as_echo_n "(cached) " >&6
17824else
17825  if test -n "$PKGHANDLER"; then
17826  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17827else
17828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17829for as_dir in $PATH
17830do
17831  IFS=$as_save_IFS
17832  test -z "$as_dir" && as_dir=.
17833    for ac_exec_ext in '' $ac_executable_extensions; do
17834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17835    ac_cv_prog_PKGHANDLER="$ac_prog"
17836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17837    break 2
17838  fi
17839done
17840  done
17841IFS=$as_save_IFS
17842
17843fi
17844fi
17845PKGHANDLER=$ac_cv_prog_PKGHANDLER
17846if test -n "$PKGHANDLER"; then
17847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17848$as_echo "$PKGHANDLER" >&6; }
17849else
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851$as_echo "no" >&6; }
17852fi
17853
17854
17855  test -n "$PKGHANDLER" && break
17856done
17857
17858
17859
17860# Setup tools that requires more complex handling, or that is not needed by the configure script.
17861
17862
17863
17864  # Publish this variable in the help.
17865
17866
17867  if [ -z "${MAKE+x}" ]; then
17868    # The variable is not set by user, try to locate tool using the code snippet
17869
17870    # Try our hardest to locate a correct version of GNU make
17871    for ac_prog in gmake
17872do
17873  # Extract the first word of "$ac_prog", so it can be a program name with args.
17874set dummy $ac_prog; ac_word=$2
17875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17876$as_echo_n "checking for $ac_word... " >&6; }
17877if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17878  $as_echo_n "(cached) " >&6
17879else
17880  case $CHECK_GMAKE in
17881  [\\/]* | ?:[\\/]*)
17882  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17883  ;;
17884  *)
17885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17886for as_dir in $PATH
17887do
17888  IFS=$as_save_IFS
17889  test -z "$as_dir" && as_dir=.
17890    for ac_exec_ext in '' $ac_executable_extensions; do
17891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17892    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17894    break 2
17895  fi
17896done
17897  done
17898IFS=$as_save_IFS
17899
17900  ;;
17901esac
17902fi
17903CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17904if test -n "$CHECK_GMAKE"; then
17905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17906$as_echo "$CHECK_GMAKE" >&6; }
17907else
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17909$as_echo "no" >&6; }
17910fi
17911
17912
17913  test -n "$CHECK_GMAKE" && break
17914done
17915
17916
17917  MAKE_CANDIDATE=""$CHECK_GMAKE""
17918  DESCRIPTION="gmake in PATH"
17919
17920  # On Cygwin, we require a newer version of make than on other platforms
17921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922    MAKE_VERSION_EXPR="-e 4\."
17923    MAKE_REQUIRED_VERSION="4.0"
17924   else
17925    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17926    MAKE_REQUIRED_VERSION="3.81"
17927  fi
17928
17929  if test "x$MAKE_CANDIDATE" != x; then
17930    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17931$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17932    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17933    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17934    if test "x$IS_GNU_MAKE" = x; then
17935      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17936$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17937    else
17938      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17939      if test "x$IS_MODERN_MAKE" = x; then
17940        { $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
17941$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;}
17942      else
17943        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17944          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17945            MAKE_EXPECTED_ENV='cygwin'
17946          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17947            MAKE_EXPECTED_ENV='msys'
17948          else
17949            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17950          fi
17951          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17952          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17953        else
17954          # Not relevant for non-Windows
17955          IS_MAKE_CORRECT_ENV=true
17956        fi
17957        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17958          { $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
17959$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;}
17960        else
17961          FOUND_MAKE=$MAKE_CANDIDATE
17962
17963  # Only process if variable expands to non-empty
17964
17965  if test "x$FOUND_MAKE" != x; then
17966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17967
17968  # First separate the path from the arguments. This will split at the first
17969  # space.
17970  complete="$FOUND_MAKE"
17971  path="${complete%% *}"
17972  tmp="$complete EOL"
17973  arguments="${tmp#* }"
17974
17975  # Input might be given as Windows format, start by converting to
17976  # unix format.
17977  new_path=`$CYGPATH -u "$path"`
17978
17979  # Now try to locate executable using which
17980  new_path=`$WHICH "$new_path" 2> /dev/null`
17981  # bat and cmd files are not always considered executable in cygwin causing which
17982  # to not find them
17983  if test "x$new_path" = x \
17984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17986    new_path=`$CYGPATH -u "$path"`
17987  fi
17988  if test "x$new_path" = x; then
17989    # Oops. Which didn't find the executable.
17990    # The splitting of arguments from the executable at a space might have been incorrect,
17991    # since paths with space are more likely in Windows. Give it another try with the whole
17992    # argument.
17993    path="$complete"
17994    arguments="EOL"
17995    new_path=`$CYGPATH -u "$path"`
17996    new_path=`$WHICH "$new_path" 2> /dev/null`
17997    # bat and cmd files are not always considered executable in cygwin causing which
17998    # to not find them
17999    if test "x$new_path" = x \
18000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18002      new_path=`$CYGPATH -u "$path"`
18003    fi
18004    if test "x$new_path" = x; then
18005      # It's still not found. Now this is an unrecoverable error.
18006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18007$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18008      has_space=`$ECHO "$complete" | $GREP " "`
18009      if test "x$has_space" != x; then
18010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18012      fi
18013      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18014    fi
18015  fi
18016
18017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18020  # "foo.exe" is OK but "foo" is an error.
18021  #
18022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18023  # It is also a way to make sure we got the proper file name for the real test later on.
18024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18025  if test "x$test_shortpath" = x; then
18026    # Short path failed, file does not exist as specified.
18027    # Try adding .exe or .cmd
18028    if test -f "${new_path}.exe"; then
18029      input_to_shortpath="${new_path}.exe"
18030    elif test -f "${new_path}.cmd"; then
18031      input_to_shortpath="${new_path}.cmd"
18032    else
18033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18034$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18037      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18038    fi
18039  else
18040    input_to_shortpath="$new_path"
18041  fi
18042
18043  # Call helper function which possibly converts this using DOS-style short mode.
18044  # If so, the updated path is stored in $new_path.
18045  new_path="$input_to_shortpath"
18046
18047  input_path="$input_to_shortpath"
18048  # Check if we need to convert this using DOS-style short mode. If the path
18049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18050  # take no chances and rewrite it.
18051  # Note: m4 eats our [], so we need to use [ and ] instead.
18052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18053  if test "x$has_forbidden_chars" != x; then
18054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18058      # Going to short mode and back again did indeed matter. Since short mode is
18059      # case insensitive, let's make it lowercase to improve readability.
18060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18061      # Now convert it back to Unix-style (cygpath)
18062      input_path=`$CYGPATH -u "$shortmode_path"`
18063      new_path="$input_path"
18064    fi
18065  fi
18066
18067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18068  if test "x$test_cygdrive_prefix" = x; then
18069    # As a simple fix, exclude /usr/bin since it's not a real path.
18070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18072      # a path prefixed by /cygdrive for fixpath to work.
18073      new_path="$CYGWIN_ROOT_PATH$input_path"
18074    fi
18075  fi
18076
18077  # remove trailing .exe if any
18078  new_path="${new_path/%.exe/}"
18079
18080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18081
18082  # First separate the path from the arguments. This will split at the first
18083  # space.
18084  complete="$FOUND_MAKE"
18085  path="${complete%% *}"
18086  tmp="$complete EOL"
18087  arguments="${tmp#* }"
18088
18089  # Input might be given as Windows format, start by converting to
18090  # unix format.
18091  new_path="$path"
18092
18093  windows_path="$new_path"
18094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18095    unix_path=`$CYGPATH -u "$windows_path"`
18096    new_path="$unix_path"
18097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18099    new_path="$unix_path"
18100  fi
18101
18102
18103  # Now try to locate executable using which
18104  new_path=`$WHICH "$new_path" 2> /dev/null`
18105
18106  if test "x$new_path" = x; then
18107    # Oops. Which didn't find the executable.
18108    # The splitting of arguments from the executable at a space might have been incorrect,
18109    # since paths with space are more likely in Windows. Give it another try with the whole
18110    # argument.
18111    path="$complete"
18112    arguments="EOL"
18113    new_path="$path"
18114
18115  windows_path="$new_path"
18116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18117    unix_path=`$CYGPATH -u "$windows_path"`
18118    new_path="$unix_path"
18119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18121    new_path="$unix_path"
18122  fi
18123
18124
18125    new_path=`$WHICH "$new_path" 2> /dev/null`
18126    # bat and cmd files are not always considered executable in MSYS causing which
18127    # to not find them
18128    if test "x$new_path" = x \
18129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18131      new_path="$path"
18132
18133  windows_path="$new_path"
18134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18135    unix_path=`$CYGPATH -u "$windows_path"`
18136    new_path="$unix_path"
18137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18139    new_path="$unix_path"
18140  fi
18141
18142    fi
18143
18144    if test "x$new_path" = x; then
18145      # It's still not found. Now this is an unrecoverable error.
18146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18147$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18148      has_space=`$ECHO "$complete" | $GREP " "`
18149      if test "x$has_space" != x; then
18150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18152      fi
18153      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18154    fi
18155  fi
18156
18157  # Now new_path has a complete unix path to the binary
18158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18159    # Keep paths in /bin as-is, but remove trailing .exe if any
18160    new_path="${new_path/%.exe/}"
18161    # Do not save /bin paths to all_fixpath_prefixes!
18162  else
18163    # Not in mixed or Windows style, start by that.
18164    new_path=`cmd //c echo $new_path`
18165
18166  input_path="$new_path"
18167  # Check if we need to convert this using DOS-style short mode. If the path
18168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18169  # take no chances and rewrite it.
18170  # Note: m4 eats our [], so we need to use [ and ] instead.
18171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18172  if test "x$has_forbidden_chars" != x; then
18173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18175  fi
18176
18177    # Output is in $new_path
18178
18179  windows_path="$new_path"
18180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18181    unix_path=`$CYGPATH -u "$windows_path"`
18182    new_path="$unix_path"
18183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18185    new_path="$unix_path"
18186  fi
18187
18188    # remove trailing .exe if any
18189    new_path="${new_path/%.exe/}"
18190
18191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18193  fi
18194
18195    else
18196      # We're on a unix platform. Hooray! :)
18197      # First separate the path from the arguments. This will split at the first
18198      # space.
18199      complete="$FOUND_MAKE"
18200      path="${complete%% *}"
18201      tmp="$complete EOL"
18202      arguments="${tmp#* }"
18203
18204      # Cannot rely on the command "which" here since it doesn't always work.
18205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18206      if test -z "$is_absolute_path"; then
18207        # Path to executable is not absolute. Find it.
18208        IFS_save="$IFS"
18209        IFS=:
18210        for p in $PATH; do
18211          if test -f "$p/$path" && test -x "$p/$path"; then
18212            new_path="$p/$path"
18213            break
18214          fi
18215        done
18216        IFS="$IFS_save"
18217      else
18218        # This is an absolute path, we can use it without further modifications.
18219        new_path="$path"
18220      fi
18221
18222      if test "x$new_path" = x; then
18223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18224$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18225        has_space=`$ECHO "$complete" | $GREP " "`
18226        if test "x$has_space" != x; then
18227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18229        fi
18230        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18231      fi
18232    fi
18233
18234    # Now join together the path and the arguments once again
18235    if test "x$arguments" != xEOL; then
18236      new_complete="$new_path ${arguments% *}"
18237    else
18238      new_complete="$new_path"
18239    fi
18240
18241    if test "x$complete" != "x$new_complete"; then
18242      FOUND_MAKE="$new_complete"
18243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18244$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18245    fi
18246  fi
18247
18248        fi
18249      fi
18250    fi
18251  fi
18252
18253
18254    if test "x$FOUND_MAKE" = x; then
18255      for ac_prog in make
18256do
18257  # Extract the first word of "$ac_prog", so it can be a program name with args.
18258set dummy $ac_prog; ac_word=$2
18259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18260$as_echo_n "checking for $ac_word... " >&6; }
18261if ${ac_cv_path_CHECK_MAKE+:} false; then :
18262  $as_echo_n "(cached) " >&6
18263else
18264  case $CHECK_MAKE in
18265  [\\/]* | ?:[\\/]*)
18266  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18267  ;;
18268  *)
18269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18270for as_dir in $PATH
18271do
18272  IFS=$as_save_IFS
18273  test -z "$as_dir" && as_dir=.
18274    for ac_exec_ext in '' $ac_executable_extensions; do
18275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18276    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18278    break 2
18279  fi
18280done
18281  done
18282IFS=$as_save_IFS
18283
18284  ;;
18285esac
18286fi
18287CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18288if test -n "$CHECK_MAKE"; then
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18290$as_echo "$CHECK_MAKE" >&6; }
18291else
18292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18293$as_echo "no" >&6; }
18294fi
18295
18296
18297  test -n "$CHECK_MAKE" && break
18298done
18299
18300
18301  MAKE_CANDIDATE=""$CHECK_MAKE""
18302  DESCRIPTION="make in PATH"
18303
18304  # On Cygwin, we require a newer version of make than on other platforms
18305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18306    MAKE_VERSION_EXPR="-e 4\."
18307    MAKE_REQUIRED_VERSION="4.0"
18308   else
18309    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18310    MAKE_REQUIRED_VERSION="3.81"
18311  fi
18312
18313  if test "x$MAKE_CANDIDATE" != x; then
18314    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18315$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18316    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18317    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18318    if test "x$IS_GNU_MAKE" = x; then
18319      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18320$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18321    else
18322      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18323      if test "x$IS_MODERN_MAKE" = x; then
18324        { $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
18325$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;}
18326      else
18327        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18328          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18329            MAKE_EXPECTED_ENV='cygwin'
18330          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18331            MAKE_EXPECTED_ENV='msys'
18332          else
18333            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18334          fi
18335          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18336          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18337        else
18338          # Not relevant for non-Windows
18339          IS_MAKE_CORRECT_ENV=true
18340        fi
18341        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18342          { $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
18343$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;}
18344        else
18345          FOUND_MAKE=$MAKE_CANDIDATE
18346
18347  # Only process if variable expands to non-empty
18348
18349  if test "x$FOUND_MAKE" != x; then
18350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18351
18352  # First separate the path from the arguments. This will split at the first
18353  # space.
18354  complete="$FOUND_MAKE"
18355  path="${complete%% *}"
18356  tmp="$complete EOL"
18357  arguments="${tmp#* }"
18358
18359  # Input might be given as Windows format, start by converting to
18360  # unix format.
18361  new_path=`$CYGPATH -u "$path"`
18362
18363  # Now try to locate executable using which
18364  new_path=`$WHICH "$new_path" 2> /dev/null`
18365  # bat and cmd files are not always considered executable in cygwin causing which
18366  # to not find them
18367  if test "x$new_path" = x \
18368      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18369      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18370    new_path=`$CYGPATH -u "$path"`
18371  fi
18372  if test "x$new_path" = x; then
18373    # Oops. Which didn't find the executable.
18374    # The splitting of arguments from the executable at a space might have been incorrect,
18375    # since paths with space are more likely in Windows. Give it another try with the whole
18376    # argument.
18377    path="$complete"
18378    arguments="EOL"
18379    new_path=`$CYGPATH -u "$path"`
18380    new_path=`$WHICH "$new_path" 2> /dev/null`
18381    # bat and cmd files are not always considered executable in cygwin causing which
18382    # to not find them
18383    if test "x$new_path" = x \
18384        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18385        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18386      new_path=`$CYGPATH -u "$path"`
18387    fi
18388    if test "x$new_path" = x; then
18389      # It's still not found. Now this is an unrecoverable error.
18390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18392      has_space=`$ECHO "$complete" | $GREP " "`
18393      if test "x$has_space" != x; then
18394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18396      fi
18397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18398    fi
18399  fi
18400
18401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18404  # "foo.exe" is OK but "foo" is an error.
18405  #
18406  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18407  # It is also a way to make sure we got the proper file name for the real test later on.
18408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18409  if test "x$test_shortpath" = x; then
18410    # Short path failed, file does not exist as specified.
18411    # Try adding .exe or .cmd
18412    if test -f "${new_path}.exe"; then
18413      input_to_shortpath="${new_path}.exe"
18414    elif test -f "${new_path}.cmd"; then
18415      input_to_shortpath="${new_path}.cmd"
18416    else
18417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18419      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18420$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18421      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18422    fi
18423  else
18424    input_to_shortpath="$new_path"
18425  fi
18426
18427  # Call helper function which possibly converts this using DOS-style short mode.
18428  # If so, the updated path is stored in $new_path.
18429  new_path="$input_to_shortpath"
18430
18431  input_path="$input_to_shortpath"
18432  # Check if we need to convert this using DOS-style short mode. If the path
18433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18434  # take no chances and rewrite it.
18435  # Note: m4 eats our [], so we need to use [ and ] instead.
18436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18437  if test "x$has_forbidden_chars" != x; then
18438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18442      # Going to short mode and back again did indeed matter. Since short mode is
18443      # case insensitive, let's make it lowercase to improve readability.
18444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18445      # Now convert it back to Unix-style (cygpath)
18446      input_path=`$CYGPATH -u "$shortmode_path"`
18447      new_path="$input_path"
18448    fi
18449  fi
18450
18451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18452  if test "x$test_cygdrive_prefix" = x; then
18453    # As a simple fix, exclude /usr/bin since it's not a real path.
18454    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18456      # a path prefixed by /cygdrive for fixpath to work.
18457      new_path="$CYGWIN_ROOT_PATH$input_path"
18458    fi
18459  fi
18460
18461  # remove trailing .exe if any
18462  new_path="${new_path/%.exe/}"
18463
18464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18465
18466  # First separate the path from the arguments. This will split at the first
18467  # space.
18468  complete="$FOUND_MAKE"
18469  path="${complete%% *}"
18470  tmp="$complete EOL"
18471  arguments="${tmp#* }"
18472
18473  # Input might be given as Windows format, start by converting to
18474  # unix format.
18475  new_path="$path"
18476
18477  windows_path="$new_path"
18478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18479    unix_path=`$CYGPATH -u "$windows_path"`
18480    new_path="$unix_path"
18481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18483    new_path="$unix_path"
18484  fi
18485
18486
18487  # Now try to locate executable using which
18488  new_path=`$WHICH "$new_path" 2> /dev/null`
18489
18490  if test "x$new_path" = x; then
18491    # Oops. Which didn't find the executable.
18492    # The splitting of arguments from the executable at a space might have been incorrect,
18493    # since paths with space are more likely in Windows. Give it another try with the whole
18494    # argument.
18495    path="$complete"
18496    arguments="EOL"
18497    new_path="$path"
18498
18499  windows_path="$new_path"
18500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18501    unix_path=`$CYGPATH -u "$windows_path"`
18502    new_path="$unix_path"
18503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18505    new_path="$unix_path"
18506  fi
18507
18508
18509    new_path=`$WHICH "$new_path" 2> /dev/null`
18510    # bat and cmd files are not always considered executable in MSYS causing which
18511    # to not find them
18512    if test "x$new_path" = x \
18513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18515      new_path="$path"
18516
18517  windows_path="$new_path"
18518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18519    unix_path=`$CYGPATH -u "$windows_path"`
18520    new_path="$unix_path"
18521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18523    new_path="$unix_path"
18524  fi
18525
18526    fi
18527
18528    if test "x$new_path" = x; then
18529      # It's still not found. Now this is an unrecoverable error.
18530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18531$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18532      has_space=`$ECHO "$complete" | $GREP " "`
18533      if test "x$has_space" != x; then
18534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18536      fi
18537      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18538    fi
18539  fi
18540
18541  # Now new_path has a complete unix path to the binary
18542  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18543    # Keep paths in /bin as-is, but remove trailing .exe if any
18544    new_path="${new_path/%.exe/}"
18545    # Do not save /bin paths to all_fixpath_prefixes!
18546  else
18547    # Not in mixed or Windows style, start by that.
18548    new_path=`cmd //c echo $new_path`
18549
18550  input_path="$new_path"
18551  # Check if we need to convert this using DOS-style short mode. If the path
18552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18553  # take no chances and rewrite it.
18554  # Note: m4 eats our [], so we need to use [ and ] instead.
18555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18556  if test "x$has_forbidden_chars" != x; then
18557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18559  fi
18560
18561    # Output is in $new_path
18562
18563  windows_path="$new_path"
18564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18565    unix_path=`$CYGPATH -u "$windows_path"`
18566    new_path="$unix_path"
18567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18569    new_path="$unix_path"
18570  fi
18571
18572    # remove trailing .exe if any
18573    new_path="${new_path/%.exe/}"
18574
18575    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18576    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18577  fi
18578
18579    else
18580      # We're on a unix platform. Hooray! :)
18581      # First separate the path from the arguments. This will split at the first
18582      # space.
18583      complete="$FOUND_MAKE"
18584      path="${complete%% *}"
18585      tmp="$complete EOL"
18586      arguments="${tmp#* }"
18587
18588      # Cannot rely on the command "which" here since it doesn't always work.
18589      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18590      if test -z "$is_absolute_path"; then
18591        # Path to executable is not absolute. Find it.
18592        IFS_save="$IFS"
18593        IFS=:
18594        for p in $PATH; do
18595          if test -f "$p/$path" && test -x "$p/$path"; then
18596            new_path="$p/$path"
18597            break
18598          fi
18599        done
18600        IFS="$IFS_save"
18601      else
18602        # This is an absolute path, we can use it without further modifications.
18603        new_path="$path"
18604      fi
18605
18606      if test "x$new_path" = x; then
18607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18608$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18609        has_space=`$ECHO "$complete" | $GREP " "`
18610        if test "x$has_space" != x; then
18611          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18612$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18613        fi
18614        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18615      fi
18616    fi
18617
18618    # Now join together the path and the arguments once again
18619    if test "x$arguments" != xEOL; then
18620      new_complete="$new_path ${arguments% *}"
18621    else
18622      new_complete="$new_path"
18623    fi
18624
18625    if test "x$complete" != "x$new_complete"; then
18626      FOUND_MAKE="$new_complete"
18627      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18628$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18629    fi
18630  fi
18631
18632        fi
18633      fi
18634    fi
18635  fi
18636
18637    fi
18638
18639    if test "x$FOUND_MAKE" = x; then
18640      if test "x$TOOLCHAIN_PATH" != x; then
18641        # We have a toolchain path, check that as well before giving up.
18642        OLD_PATH=$PATH
18643        PATH=$TOOLCHAIN_PATH:$PATH
18644        for ac_prog in gmake
18645do
18646  # Extract the first word of "$ac_prog", so it can be a program name with args.
18647set dummy $ac_prog; ac_word=$2
18648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18649$as_echo_n "checking for $ac_word... " >&6; }
18650if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18651  $as_echo_n "(cached) " >&6
18652else
18653  case $CHECK_TOOLSDIR_GMAKE in
18654  [\\/]* | ?:[\\/]*)
18655  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18656  ;;
18657  *)
18658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18659for as_dir in $PATH
18660do
18661  IFS=$as_save_IFS
18662  test -z "$as_dir" && as_dir=.
18663    for ac_exec_ext in '' $ac_executable_extensions; do
18664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18665    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18667    break 2
18668  fi
18669done
18670  done
18671IFS=$as_save_IFS
18672
18673  ;;
18674esac
18675fi
18676CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18677if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18679$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18680else
18681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18682$as_echo "no" >&6; }
18683fi
18684
18685
18686  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18687done
18688
18689
18690  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18691  DESCRIPTION="gmake in tools-dir"
18692
18693  # On Cygwin, we require a newer version of make than on other platforms
18694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18695    MAKE_VERSION_EXPR="-e 4\."
18696    MAKE_REQUIRED_VERSION="4.0"
18697   else
18698    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18699    MAKE_REQUIRED_VERSION="3.81"
18700  fi
18701
18702  if test "x$MAKE_CANDIDATE" != x; then
18703    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18704$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18705    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18706    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18707    if test "x$IS_GNU_MAKE" = x; then
18708      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18709$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18710    else
18711      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18712      if test "x$IS_MODERN_MAKE" = x; then
18713        { $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
18714$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;}
18715      else
18716        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18717          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18718            MAKE_EXPECTED_ENV='cygwin'
18719          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18720            MAKE_EXPECTED_ENV='msys'
18721          else
18722            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18723          fi
18724          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18725          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18726        else
18727          # Not relevant for non-Windows
18728          IS_MAKE_CORRECT_ENV=true
18729        fi
18730        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18731          { $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
18732$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;}
18733        else
18734          FOUND_MAKE=$MAKE_CANDIDATE
18735
18736  # Only process if variable expands to non-empty
18737
18738  if test "x$FOUND_MAKE" != x; then
18739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18740
18741  # First separate the path from the arguments. This will split at the first
18742  # space.
18743  complete="$FOUND_MAKE"
18744  path="${complete%% *}"
18745  tmp="$complete EOL"
18746  arguments="${tmp#* }"
18747
18748  # Input might be given as Windows format, start by converting to
18749  # unix format.
18750  new_path=`$CYGPATH -u "$path"`
18751
18752  # Now try to locate executable using which
18753  new_path=`$WHICH "$new_path" 2> /dev/null`
18754  # bat and cmd files are not always considered executable in cygwin causing which
18755  # to not find them
18756  if test "x$new_path" = x \
18757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18759    new_path=`$CYGPATH -u "$path"`
18760  fi
18761  if test "x$new_path" = x; then
18762    # Oops. Which didn't find the executable.
18763    # The splitting of arguments from the executable at a space might have been incorrect,
18764    # since paths with space are more likely in Windows. Give it another try with the whole
18765    # argument.
18766    path="$complete"
18767    arguments="EOL"
18768    new_path=`$CYGPATH -u "$path"`
18769    new_path=`$WHICH "$new_path" 2> /dev/null`
18770    # bat and cmd files are not always considered executable in cygwin causing which
18771    # to not find them
18772    if test "x$new_path" = x \
18773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18775      new_path=`$CYGPATH -u "$path"`
18776    fi
18777    if test "x$new_path" = x; then
18778      # It's still not found. Now this is an unrecoverable error.
18779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18780$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18781      has_space=`$ECHO "$complete" | $GREP " "`
18782      if test "x$has_space" != x; then
18783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18785      fi
18786      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18787    fi
18788  fi
18789
18790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18793  # "foo.exe" is OK but "foo" is an error.
18794  #
18795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18796  # It is also a way to make sure we got the proper file name for the real test later on.
18797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18798  if test "x$test_shortpath" = x; then
18799    # Short path failed, file does not exist as specified.
18800    # Try adding .exe or .cmd
18801    if test -f "${new_path}.exe"; then
18802      input_to_shortpath="${new_path}.exe"
18803    elif test -f "${new_path}.cmd"; then
18804      input_to_shortpath="${new_path}.cmd"
18805    else
18806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18810      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18811    fi
18812  else
18813    input_to_shortpath="$new_path"
18814  fi
18815
18816  # Call helper function which possibly converts this using DOS-style short mode.
18817  # If so, the updated path is stored in $new_path.
18818  new_path="$input_to_shortpath"
18819
18820  input_path="$input_to_shortpath"
18821  # Check if we need to convert this using DOS-style short mode. If the path
18822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18823  # take no chances and rewrite it.
18824  # Note: m4 eats our [], so we need to use [ and ] instead.
18825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18826  if test "x$has_forbidden_chars" != x; then
18827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18831      # Going to short mode and back again did indeed matter. Since short mode is
18832      # case insensitive, let's make it lowercase to improve readability.
18833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18834      # Now convert it back to Unix-style (cygpath)
18835      input_path=`$CYGPATH -u "$shortmode_path"`
18836      new_path="$input_path"
18837    fi
18838  fi
18839
18840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18841  if test "x$test_cygdrive_prefix" = x; then
18842    # As a simple fix, exclude /usr/bin since it's not a real path.
18843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18845      # a path prefixed by /cygdrive for fixpath to work.
18846      new_path="$CYGWIN_ROOT_PATH$input_path"
18847    fi
18848  fi
18849
18850  # remove trailing .exe if any
18851  new_path="${new_path/%.exe/}"
18852
18853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18854
18855  # First separate the path from the arguments. This will split at the first
18856  # space.
18857  complete="$FOUND_MAKE"
18858  path="${complete%% *}"
18859  tmp="$complete EOL"
18860  arguments="${tmp#* }"
18861
18862  # Input might be given as Windows format, start by converting to
18863  # unix format.
18864  new_path="$path"
18865
18866  windows_path="$new_path"
18867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18868    unix_path=`$CYGPATH -u "$windows_path"`
18869    new_path="$unix_path"
18870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18872    new_path="$unix_path"
18873  fi
18874
18875
18876  # Now try to locate executable using which
18877  new_path=`$WHICH "$new_path" 2> /dev/null`
18878
18879  if test "x$new_path" = x; then
18880    # Oops. Which didn't find the executable.
18881    # The splitting of arguments from the executable at a space might have been incorrect,
18882    # since paths with space are more likely in Windows. Give it another try with the whole
18883    # argument.
18884    path="$complete"
18885    arguments="EOL"
18886    new_path="$path"
18887
18888  windows_path="$new_path"
18889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18890    unix_path=`$CYGPATH -u "$windows_path"`
18891    new_path="$unix_path"
18892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18894    new_path="$unix_path"
18895  fi
18896
18897
18898    new_path=`$WHICH "$new_path" 2> /dev/null`
18899    # bat and cmd files are not always considered executable in MSYS causing which
18900    # to not find them
18901    if test "x$new_path" = x \
18902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18904      new_path="$path"
18905
18906  windows_path="$new_path"
18907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18908    unix_path=`$CYGPATH -u "$windows_path"`
18909    new_path="$unix_path"
18910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18912    new_path="$unix_path"
18913  fi
18914
18915    fi
18916
18917    if test "x$new_path" = x; then
18918      # It's still not found. Now this is an unrecoverable error.
18919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18920$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18921      has_space=`$ECHO "$complete" | $GREP " "`
18922      if test "x$has_space" != x; then
18923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18925      fi
18926      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18927    fi
18928  fi
18929
18930  # Now new_path has a complete unix path to the binary
18931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18932    # Keep paths in /bin as-is, but remove trailing .exe if any
18933    new_path="${new_path/%.exe/}"
18934    # Do not save /bin paths to all_fixpath_prefixes!
18935  else
18936    # Not in mixed or Windows style, start by that.
18937    new_path=`cmd //c echo $new_path`
18938
18939  input_path="$new_path"
18940  # Check if we need to convert this using DOS-style short mode. If the path
18941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18942  # take no chances and rewrite it.
18943  # Note: m4 eats our [], so we need to use [ and ] instead.
18944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18945  if test "x$has_forbidden_chars" != x; then
18946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18948  fi
18949
18950    # Output is in $new_path
18951
18952  windows_path="$new_path"
18953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18954    unix_path=`$CYGPATH -u "$windows_path"`
18955    new_path="$unix_path"
18956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18958    new_path="$unix_path"
18959  fi
18960
18961    # remove trailing .exe if any
18962    new_path="${new_path/%.exe/}"
18963
18964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18966  fi
18967
18968    else
18969      # We're on a unix platform. Hooray! :)
18970      # First separate the path from the arguments. This will split at the first
18971      # space.
18972      complete="$FOUND_MAKE"
18973      path="${complete%% *}"
18974      tmp="$complete EOL"
18975      arguments="${tmp#* }"
18976
18977      # Cannot rely on the command "which" here since it doesn't always work.
18978      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18979      if test -z "$is_absolute_path"; then
18980        # Path to executable is not absolute. Find it.
18981        IFS_save="$IFS"
18982        IFS=:
18983        for p in $PATH; do
18984          if test -f "$p/$path" && test -x "$p/$path"; then
18985            new_path="$p/$path"
18986            break
18987          fi
18988        done
18989        IFS="$IFS_save"
18990      else
18991        # This is an absolute path, we can use it without further modifications.
18992        new_path="$path"
18993      fi
18994
18995      if test "x$new_path" = x; then
18996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18997$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18998        has_space=`$ECHO "$complete" | $GREP " "`
18999        if test "x$has_space" != x; then
19000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19002        fi
19003        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19004      fi
19005    fi
19006
19007    # Now join together the path and the arguments once again
19008    if test "x$arguments" != xEOL; then
19009      new_complete="$new_path ${arguments% *}"
19010    else
19011      new_complete="$new_path"
19012    fi
19013
19014    if test "x$complete" != "x$new_complete"; then
19015      FOUND_MAKE="$new_complete"
19016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19017$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19018    fi
19019  fi
19020
19021        fi
19022      fi
19023    fi
19024  fi
19025
19026        if test "x$FOUND_MAKE" = x; then
19027          for ac_prog in make
19028do
19029  # Extract the first word of "$ac_prog", so it can be a program name with args.
19030set dummy $ac_prog; ac_word=$2
19031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19032$as_echo_n "checking for $ac_word... " >&6; }
19033if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19034  $as_echo_n "(cached) " >&6
19035else
19036  case $CHECK_TOOLSDIR_MAKE in
19037  [\\/]* | ?:[\\/]*)
19038  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19039  ;;
19040  *)
19041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19042for as_dir in $PATH
19043do
19044  IFS=$as_save_IFS
19045  test -z "$as_dir" && as_dir=.
19046    for ac_exec_ext in '' $ac_executable_extensions; do
19047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19048    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19050    break 2
19051  fi
19052done
19053  done
19054IFS=$as_save_IFS
19055
19056  ;;
19057esac
19058fi
19059CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19060if test -n "$CHECK_TOOLSDIR_MAKE"; then
19061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19062$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19063else
19064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19065$as_echo "no" >&6; }
19066fi
19067
19068
19069  test -n "$CHECK_TOOLSDIR_MAKE" && break
19070done
19071
19072
19073  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19074  DESCRIPTION="make in tools-dir"
19075
19076  # On Cygwin, we require a newer version of make than on other platforms
19077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19078    MAKE_VERSION_EXPR="-e 4\."
19079    MAKE_REQUIRED_VERSION="4.0"
19080   else
19081    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19082    MAKE_REQUIRED_VERSION="3.81"
19083  fi
19084
19085  if test "x$MAKE_CANDIDATE" != x; then
19086    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19087$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19088    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19089    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19090    if test "x$IS_GNU_MAKE" = x; then
19091      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19092$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19093    else
19094      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19095      if test "x$IS_MODERN_MAKE" = x; then
19096        { $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
19097$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;}
19098      else
19099        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19100          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19101            MAKE_EXPECTED_ENV='cygwin'
19102          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19103            MAKE_EXPECTED_ENV='msys'
19104          else
19105            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19106          fi
19107          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19108          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19109        else
19110          # Not relevant for non-Windows
19111          IS_MAKE_CORRECT_ENV=true
19112        fi
19113        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19114          { $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
19115$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;}
19116        else
19117          FOUND_MAKE=$MAKE_CANDIDATE
19118
19119  # Only process if variable expands to non-empty
19120
19121  if test "x$FOUND_MAKE" != x; then
19122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19123
19124  # First separate the path from the arguments. This will split at the first
19125  # space.
19126  complete="$FOUND_MAKE"
19127  path="${complete%% *}"
19128  tmp="$complete EOL"
19129  arguments="${tmp#* }"
19130
19131  # Input might be given as Windows format, start by converting to
19132  # unix format.
19133  new_path=`$CYGPATH -u "$path"`
19134
19135  # Now try to locate executable using which
19136  new_path=`$WHICH "$new_path" 2> /dev/null`
19137  # bat and cmd files are not always considered executable in cygwin causing which
19138  # to not find them
19139  if test "x$new_path" = x \
19140      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19141      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19142    new_path=`$CYGPATH -u "$path"`
19143  fi
19144  if test "x$new_path" = x; then
19145    # Oops. Which didn't find the executable.
19146    # The splitting of arguments from the executable at a space might have been incorrect,
19147    # since paths with space are more likely in Windows. Give it another try with the whole
19148    # argument.
19149    path="$complete"
19150    arguments="EOL"
19151    new_path=`$CYGPATH -u "$path"`
19152    new_path=`$WHICH "$new_path" 2> /dev/null`
19153    # bat and cmd files are not always considered executable in cygwin causing which
19154    # to not find them
19155    if test "x$new_path" = x \
19156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19158      new_path=`$CYGPATH -u "$path"`
19159    fi
19160    if test "x$new_path" = x; then
19161      # It's still not found. Now this is an unrecoverable error.
19162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19164      has_space=`$ECHO "$complete" | $GREP " "`
19165      if test "x$has_space" != x; then
19166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19168      fi
19169      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19170    fi
19171  fi
19172
19173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19176  # "foo.exe" is OK but "foo" is an error.
19177  #
19178  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19179  # It is also a way to make sure we got the proper file name for the real test later on.
19180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19181  if test "x$test_shortpath" = x; then
19182    # Short path failed, file does not exist as specified.
19183    # Try adding .exe or .cmd
19184    if test -f "${new_path}.exe"; then
19185      input_to_shortpath="${new_path}.exe"
19186    elif test -f "${new_path}.cmd"; then
19187      input_to_shortpath="${new_path}.cmd"
19188    else
19189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19190$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19191      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19192$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19193      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19194    fi
19195  else
19196    input_to_shortpath="$new_path"
19197  fi
19198
19199  # Call helper function which possibly converts this using DOS-style short mode.
19200  # If so, the updated path is stored in $new_path.
19201  new_path="$input_to_shortpath"
19202
19203  input_path="$input_to_shortpath"
19204  # Check if we need to convert this using DOS-style short mode. If the path
19205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19206  # take no chances and rewrite it.
19207  # Note: m4 eats our [], so we need to use [ and ] instead.
19208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19209  if test "x$has_forbidden_chars" != x; then
19210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19214      # Going to short mode and back again did indeed matter. Since short mode is
19215      # case insensitive, let's make it lowercase to improve readability.
19216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19217      # Now convert it back to Unix-style (cygpath)
19218      input_path=`$CYGPATH -u "$shortmode_path"`
19219      new_path="$input_path"
19220    fi
19221  fi
19222
19223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19224  if test "x$test_cygdrive_prefix" = x; then
19225    # As a simple fix, exclude /usr/bin since it's not a real path.
19226    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19228      # a path prefixed by /cygdrive for fixpath to work.
19229      new_path="$CYGWIN_ROOT_PATH$input_path"
19230    fi
19231  fi
19232
19233  # remove trailing .exe if any
19234  new_path="${new_path/%.exe/}"
19235
19236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19237
19238  # First separate the path from the arguments. This will split at the first
19239  # space.
19240  complete="$FOUND_MAKE"
19241  path="${complete%% *}"
19242  tmp="$complete EOL"
19243  arguments="${tmp#* }"
19244
19245  # Input might be given as Windows format, start by converting to
19246  # unix format.
19247  new_path="$path"
19248
19249  windows_path="$new_path"
19250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19251    unix_path=`$CYGPATH -u "$windows_path"`
19252    new_path="$unix_path"
19253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19255    new_path="$unix_path"
19256  fi
19257
19258
19259  # Now try to locate executable using which
19260  new_path=`$WHICH "$new_path" 2> /dev/null`
19261
19262  if test "x$new_path" = x; then
19263    # Oops. Which didn't find the executable.
19264    # The splitting of arguments from the executable at a space might have been incorrect,
19265    # since paths with space are more likely in Windows. Give it another try with the whole
19266    # argument.
19267    path="$complete"
19268    arguments="EOL"
19269    new_path="$path"
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280
19281    new_path=`$WHICH "$new_path" 2> /dev/null`
19282    # bat and cmd files are not always considered executable in MSYS causing which
19283    # to not find them
19284    if test "x$new_path" = x \
19285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19287      new_path="$path"
19288
19289  windows_path="$new_path"
19290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19291    unix_path=`$CYGPATH -u "$windows_path"`
19292    new_path="$unix_path"
19293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19295    new_path="$unix_path"
19296  fi
19297
19298    fi
19299
19300    if test "x$new_path" = x; then
19301      # It's still not found. Now this is an unrecoverable error.
19302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19304      has_space=`$ECHO "$complete" | $GREP " "`
19305      if test "x$has_space" != x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19308      fi
19309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19310    fi
19311  fi
19312
19313  # Now new_path has a complete unix path to the binary
19314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19315    # Keep paths in /bin as-is, but remove trailing .exe if any
19316    new_path="${new_path/%.exe/}"
19317    # Do not save /bin paths to all_fixpath_prefixes!
19318  else
19319    # Not in mixed or Windows style, start by that.
19320    new_path=`cmd //c echo $new_path`
19321
19322  input_path="$new_path"
19323  # Check if we need to convert this using DOS-style short mode. If the path
19324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19325  # take no chances and rewrite it.
19326  # Note: m4 eats our [], so we need to use [ and ] instead.
19327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19328  if test "x$has_forbidden_chars" != x; then
19329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19331  fi
19332
19333    # Output is in $new_path
19334
19335  windows_path="$new_path"
19336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19337    unix_path=`$CYGPATH -u "$windows_path"`
19338    new_path="$unix_path"
19339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19341    new_path="$unix_path"
19342  fi
19343
19344    # remove trailing .exe if any
19345    new_path="${new_path/%.exe/}"
19346
19347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19349  fi
19350
19351    else
19352      # We're on a unix platform. Hooray! :)
19353      # First separate the path from the arguments. This will split at the first
19354      # space.
19355      complete="$FOUND_MAKE"
19356      path="${complete%% *}"
19357      tmp="$complete EOL"
19358      arguments="${tmp#* }"
19359
19360      # Cannot rely on the command "which" here since it doesn't always work.
19361      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19362      if test -z "$is_absolute_path"; then
19363        # Path to executable is not absolute. Find it.
19364        IFS_save="$IFS"
19365        IFS=:
19366        for p in $PATH; do
19367          if test -f "$p/$path" && test -x "$p/$path"; then
19368            new_path="$p/$path"
19369            break
19370          fi
19371        done
19372        IFS="$IFS_save"
19373      else
19374        # This is an absolute path, we can use it without further modifications.
19375        new_path="$path"
19376      fi
19377
19378      if test "x$new_path" = x; then
19379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19380$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19381        has_space=`$ECHO "$complete" | $GREP " "`
19382        if test "x$has_space" != x; then
19383          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19384$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19385        fi
19386        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19387      fi
19388    fi
19389
19390    # Now join together the path and the arguments once again
19391    if test "x$arguments" != xEOL; then
19392      new_complete="$new_path ${arguments% *}"
19393    else
19394      new_complete="$new_path"
19395    fi
19396
19397    if test "x$complete" != "x$new_complete"; then
19398      FOUND_MAKE="$new_complete"
19399      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19400$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19401    fi
19402  fi
19403
19404        fi
19405      fi
19406    fi
19407  fi
19408
19409        fi
19410        PATH=$OLD_PATH
19411      fi
19412    fi
19413
19414    if test "x$FOUND_MAKE" = x; then
19415      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
19416    fi
19417
19418  else
19419    # The variable is set, but is it from the command line or the environment?
19420
19421    # Try to remove the string !MAKE! from our list.
19422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19424      # If it failed, the variable was not from the command line. Ignore it,
19425      # but warn the user (except for BASH, which is always set by the calling BASH).
19426      if test "xMAKE" != xBASH; then
19427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19428$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19429      fi
19430      # Try to locate tool using the code snippet
19431
19432    # Try our hardest to locate a correct version of GNU make
19433    for ac_prog in gmake
19434do
19435  # Extract the first word of "$ac_prog", so it can be a program name with args.
19436set dummy $ac_prog; ac_word=$2
19437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19438$as_echo_n "checking for $ac_word... " >&6; }
19439if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19440  $as_echo_n "(cached) " >&6
19441else
19442  case $CHECK_GMAKE in
19443  [\\/]* | ?:[\\/]*)
19444  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19445  ;;
19446  *)
19447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19448for as_dir in $PATH
19449do
19450  IFS=$as_save_IFS
19451  test -z "$as_dir" && as_dir=.
19452    for ac_exec_ext in '' $ac_executable_extensions; do
19453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19454    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19456    break 2
19457  fi
19458done
19459  done
19460IFS=$as_save_IFS
19461
19462  ;;
19463esac
19464fi
19465CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19466if test -n "$CHECK_GMAKE"; then
19467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19468$as_echo "$CHECK_GMAKE" >&6; }
19469else
19470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19471$as_echo "no" >&6; }
19472fi
19473
19474
19475  test -n "$CHECK_GMAKE" && break
19476done
19477
19478
19479  MAKE_CANDIDATE=""$CHECK_GMAKE""
19480  DESCRIPTION="gmake in PATH"
19481
19482  # On Cygwin, we require a newer version of make than on other platforms
19483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19484    MAKE_VERSION_EXPR="-e 4\."
19485    MAKE_REQUIRED_VERSION="4.0"
19486   else
19487    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19488    MAKE_REQUIRED_VERSION="3.81"
19489  fi
19490
19491  if test "x$MAKE_CANDIDATE" != x; then
19492    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19493$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19494    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19495    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19496    if test "x$IS_GNU_MAKE" = x; then
19497      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19498$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19499    else
19500      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19501      if test "x$IS_MODERN_MAKE" = x; then
19502        { $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
19503$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;}
19504      else
19505        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19506          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19507            MAKE_EXPECTED_ENV='cygwin'
19508          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19509            MAKE_EXPECTED_ENV='msys'
19510          else
19511            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19512          fi
19513          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19514          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19515        else
19516          # Not relevant for non-Windows
19517          IS_MAKE_CORRECT_ENV=true
19518        fi
19519        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19520          { $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
19521$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;}
19522        else
19523          FOUND_MAKE=$MAKE_CANDIDATE
19524
19525  # Only process if variable expands to non-empty
19526
19527  if test "x$FOUND_MAKE" != x; then
19528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19529
19530  # First separate the path from the arguments. This will split at the first
19531  # space.
19532  complete="$FOUND_MAKE"
19533  path="${complete%% *}"
19534  tmp="$complete EOL"
19535  arguments="${tmp#* }"
19536
19537  # Input might be given as Windows format, start by converting to
19538  # unix format.
19539  new_path=`$CYGPATH -u "$path"`
19540
19541  # Now try to locate executable using which
19542  new_path=`$WHICH "$new_path" 2> /dev/null`
19543  # bat and cmd files are not always considered executable in cygwin causing which
19544  # to not find them
19545  if test "x$new_path" = x \
19546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19548    new_path=`$CYGPATH -u "$path"`
19549  fi
19550  if test "x$new_path" = x; then
19551    # Oops. Which didn't find the executable.
19552    # The splitting of arguments from the executable at a space might have been incorrect,
19553    # since paths with space are more likely in Windows. Give it another try with the whole
19554    # argument.
19555    path="$complete"
19556    arguments="EOL"
19557    new_path=`$CYGPATH -u "$path"`
19558    new_path=`$WHICH "$new_path" 2> /dev/null`
19559    # bat and cmd files are not always considered executable in cygwin causing which
19560    # to not find them
19561    if test "x$new_path" = x \
19562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19564      new_path=`$CYGPATH -u "$path"`
19565    fi
19566    if test "x$new_path" = x; then
19567      # It's still not found. Now this is an unrecoverable error.
19568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19570      has_space=`$ECHO "$complete" | $GREP " "`
19571      if test "x$has_space" != x; then
19572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19574      fi
19575      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19576    fi
19577  fi
19578
19579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19582  # "foo.exe" is OK but "foo" is an error.
19583  #
19584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19585  # It is also a way to make sure we got the proper file name for the real test later on.
19586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19587  if test "x$test_shortpath" = x; then
19588    # Short path failed, file does not exist as specified.
19589    # Try adding .exe or .cmd
19590    if test -f "${new_path}.exe"; then
19591      input_to_shortpath="${new_path}.exe"
19592    elif test -f "${new_path}.cmd"; then
19593      input_to_shortpath="${new_path}.cmd"
19594    else
19595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19596$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19599      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19600    fi
19601  else
19602    input_to_shortpath="$new_path"
19603  fi
19604
19605  # Call helper function which possibly converts this using DOS-style short mode.
19606  # If so, the updated path is stored in $new_path.
19607  new_path="$input_to_shortpath"
19608
19609  input_path="$input_to_shortpath"
19610  # Check if we need to convert this using DOS-style short mode. If the path
19611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19612  # take no chances and rewrite it.
19613  # Note: m4 eats our [], so we need to use [ and ] instead.
19614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19615  if test "x$has_forbidden_chars" != x; then
19616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19620      # Going to short mode and back again did indeed matter. Since short mode is
19621      # case insensitive, let's make it lowercase to improve readability.
19622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19623      # Now convert it back to Unix-style (cygpath)
19624      input_path=`$CYGPATH -u "$shortmode_path"`
19625      new_path="$input_path"
19626    fi
19627  fi
19628
19629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19630  if test "x$test_cygdrive_prefix" = x; then
19631    # As a simple fix, exclude /usr/bin since it's not a real path.
19632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19634      # a path prefixed by /cygdrive for fixpath to work.
19635      new_path="$CYGWIN_ROOT_PATH$input_path"
19636    fi
19637  fi
19638
19639  # remove trailing .exe if any
19640  new_path="${new_path/%.exe/}"
19641
19642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19643
19644  # First separate the path from the arguments. This will split at the first
19645  # space.
19646  complete="$FOUND_MAKE"
19647  path="${complete%% *}"
19648  tmp="$complete EOL"
19649  arguments="${tmp#* }"
19650
19651  # Input might be given as Windows format, start by converting to
19652  # unix format.
19653  new_path="$path"
19654
19655  windows_path="$new_path"
19656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19657    unix_path=`$CYGPATH -u "$windows_path"`
19658    new_path="$unix_path"
19659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19661    new_path="$unix_path"
19662  fi
19663
19664
19665  # Now try to locate executable using which
19666  new_path=`$WHICH "$new_path" 2> /dev/null`
19667
19668  if test "x$new_path" = x; then
19669    # Oops. Which didn't find the executable.
19670    # The splitting of arguments from the executable at a space might have been incorrect,
19671    # since paths with space are more likely in Windows. Give it another try with the whole
19672    # argument.
19673    path="$complete"
19674    arguments="EOL"
19675    new_path="$path"
19676
19677  windows_path="$new_path"
19678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19679    unix_path=`$CYGPATH -u "$windows_path"`
19680    new_path="$unix_path"
19681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19683    new_path="$unix_path"
19684  fi
19685
19686
19687    new_path=`$WHICH "$new_path" 2> /dev/null`
19688    # bat and cmd files are not always considered executable in MSYS causing which
19689    # to not find them
19690    if test "x$new_path" = x \
19691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19693      new_path="$path"
19694
19695  windows_path="$new_path"
19696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19697    unix_path=`$CYGPATH -u "$windows_path"`
19698    new_path="$unix_path"
19699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19701    new_path="$unix_path"
19702  fi
19703
19704    fi
19705
19706    if test "x$new_path" = x; then
19707      # It's still not found. Now this is an unrecoverable error.
19708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19709$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19710      has_space=`$ECHO "$complete" | $GREP " "`
19711      if test "x$has_space" != x; then
19712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19714      fi
19715      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19716    fi
19717  fi
19718
19719  # Now new_path has a complete unix path to the binary
19720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19721    # Keep paths in /bin as-is, but remove trailing .exe if any
19722    new_path="${new_path/%.exe/}"
19723    # Do not save /bin paths to all_fixpath_prefixes!
19724  else
19725    # Not in mixed or Windows style, start by that.
19726    new_path=`cmd //c echo $new_path`
19727
19728  input_path="$new_path"
19729  # Check if we need to convert this using DOS-style short mode. If the path
19730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19731  # take no chances and rewrite it.
19732  # Note: m4 eats our [], so we need to use [ and ] instead.
19733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19734  if test "x$has_forbidden_chars" != x; then
19735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19737  fi
19738
19739    # Output is in $new_path
19740
19741  windows_path="$new_path"
19742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19743    unix_path=`$CYGPATH -u "$windows_path"`
19744    new_path="$unix_path"
19745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19747    new_path="$unix_path"
19748  fi
19749
19750    # remove trailing .exe if any
19751    new_path="${new_path/%.exe/}"
19752
19753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19755  fi
19756
19757    else
19758      # We're on a unix platform. Hooray! :)
19759      # First separate the path from the arguments. This will split at the first
19760      # space.
19761      complete="$FOUND_MAKE"
19762      path="${complete%% *}"
19763      tmp="$complete EOL"
19764      arguments="${tmp#* }"
19765
19766      # Cannot rely on the command "which" here since it doesn't always work.
19767      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19768      if test -z "$is_absolute_path"; then
19769        # Path to executable is not absolute. Find it.
19770        IFS_save="$IFS"
19771        IFS=:
19772        for p in $PATH; do
19773          if test -f "$p/$path" && test -x "$p/$path"; then
19774            new_path="$p/$path"
19775            break
19776          fi
19777        done
19778        IFS="$IFS_save"
19779      else
19780        # This is an absolute path, we can use it without further modifications.
19781        new_path="$path"
19782      fi
19783
19784      if test "x$new_path" = x; then
19785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19786$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19787        has_space=`$ECHO "$complete" | $GREP " "`
19788        if test "x$has_space" != x; then
19789          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19790$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19791        fi
19792        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19793      fi
19794    fi
19795
19796    # Now join together the path and the arguments once again
19797    if test "x$arguments" != xEOL; then
19798      new_complete="$new_path ${arguments% *}"
19799    else
19800      new_complete="$new_path"
19801    fi
19802
19803    if test "x$complete" != "x$new_complete"; then
19804      FOUND_MAKE="$new_complete"
19805      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19806$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19807    fi
19808  fi
19809
19810        fi
19811      fi
19812    fi
19813  fi
19814
19815
19816    if test "x$FOUND_MAKE" = x; then
19817      for ac_prog in make
19818do
19819  # Extract the first word of "$ac_prog", so it can be a program name with args.
19820set dummy $ac_prog; ac_word=$2
19821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19822$as_echo_n "checking for $ac_word... " >&6; }
19823if ${ac_cv_path_CHECK_MAKE+:} false; then :
19824  $as_echo_n "(cached) " >&6
19825else
19826  case $CHECK_MAKE in
19827  [\\/]* | ?:[\\/]*)
19828  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19829  ;;
19830  *)
19831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19832for as_dir in $PATH
19833do
19834  IFS=$as_save_IFS
19835  test -z "$as_dir" && as_dir=.
19836    for ac_exec_ext in '' $ac_executable_extensions; do
19837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19838    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19840    break 2
19841  fi
19842done
19843  done
19844IFS=$as_save_IFS
19845
19846  ;;
19847esac
19848fi
19849CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19850if test -n "$CHECK_MAKE"; then
19851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19852$as_echo "$CHECK_MAKE" >&6; }
19853else
19854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19855$as_echo "no" >&6; }
19856fi
19857
19858
19859  test -n "$CHECK_MAKE" && break
19860done
19861
19862
19863  MAKE_CANDIDATE=""$CHECK_MAKE""
19864  DESCRIPTION="make in PATH"
19865
19866  # On Cygwin, we require a newer version of make than on other platforms
19867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19868    MAKE_VERSION_EXPR="-e 4\."
19869    MAKE_REQUIRED_VERSION="4.0"
19870   else
19871    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19872    MAKE_REQUIRED_VERSION="3.81"
19873  fi
19874
19875  if test "x$MAKE_CANDIDATE" != x; then
19876    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19877$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19878    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19879    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19880    if test "x$IS_GNU_MAKE" = x; then
19881      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19882$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19883    else
19884      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19885      if test "x$IS_MODERN_MAKE" = x; then
19886        { $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
19887$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;}
19888      else
19889        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19890          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19891            MAKE_EXPECTED_ENV='cygwin'
19892          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19893            MAKE_EXPECTED_ENV='msys'
19894          else
19895            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19896          fi
19897          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19898          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19899        else
19900          # Not relevant for non-Windows
19901          IS_MAKE_CORRECT_ENV=true
19902        fi
19903        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19904          { $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
19905$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;}
19906        else
19907          FOUND_MAKE=$MAKE_CANDIDATE
19908
19909  # Only process if variable expands to non-empty
19910
19911  if test "x$FOUND_MAKE" != x; then
19912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19913
19914  # First separate the path from the arguments. This will split at the first
19915  # space.
19916  complete="$FOUND_MAKE"
19917  path="${complete%% *}"
19918  tmp="$complete EOL"
19919  arguments="${tmp#* }"
19920
19921  # Input might be given as Windows format, start by converting to
19922  # unix format.
19923  new_path=`$CYGPATH -u "$path"`
19924
19925  # Now try to locate executable using which
19926  new_path=`$WHICH "$new_path" 2> /dev/null`
19927  # bat and cmd files are not always considered executable in cygwin causing which
19928  # to not find them
19929  if test "x$new_path" = x \
19930      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19931      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19932    new_path=`$CYGPATH -u "$path"`
19933  fi
19934  if test "x$new_path" = x; then
19935    # Oops. Which didn't find the executable.
19936    # The splitting of arguments from the executable at a space might have been incorrect,
19937    # since paths with space are more likely in Windows. Give it another try with the whole
19938    # argument.
19939    path="$complete"
19940    arguments="EOL"
19941    new_path=`$CYGPATH -u "$path"`
19942    new_path=`$WHICH "$new_path" 2> /dev/null`
19943    # bat and cmd files are not always considered executable in cygwin causing which
19944    # to not find them
19945    if test "x$new_path" = x \
19946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19948      new_path=`$CYGPATH -u "$path"`
19949    fi
19950    if test "x$new_path" = x; then
19951      # It's still not found. Now this is an unrecoverable error.
19952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19953$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19954      has_space=`$ECHO "$complete" | $GREP " "`
19955      if test "x$has_space" != x; then
19956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19958      fi
19959      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19960    fi
19961  fi
19962
19963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19966  # "foo.exe" is OK but "foo" is an error.
19967  #
19968  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19969  # It is also a way to make sure we got the proper file name for the real test later on.
19970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19971  if test "x$test_shortpath" = x; then
19972    # Short path failed, file does not exist as specified.
19973    # Try adding .exe or .cmd
19974    if test -f "${new_path}.exe"; then
19975      input_to_shortpath="${new_path}.exe"
19976    elif test -f "${new_path}.cmd"; then
19977      input_to_shortpath="${new_path}.cmd"
19978    else
19979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19980$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19984    fi
19985  else
19986    input_to_shortpath="$new_path"
19987  fi
19988
19989  # Call helper function which possibly converts this using DOS-style short mode.
19990  # If so, the updated path is stored in $new_path.
19991  new_path="$input_to_shortpath"
19992
19993  input_path="$input_to_shortpath"
19994  # Check if we need to convert this using DOS-style short mode. If the path
19995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19996  # take no chances and rewrite it.
19997  # Note: m4 eats our [], so we need to use [ and ] instead.
19998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19999  if test "x$has_forbidden_chars" != x; then
20000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20004      # Going to short mode and back again did indeed matter. Since short mode is
20005      # case insensitive, let's make it lowercase to improve readability.
20006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20007      # Now convert it back to Unix-style (cygpath)
20008      input_path=`$CYGPATH -u "$shortmode_path"`
20009      new_path="$input_path"
20010    fi
20011  fi
20012
20013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20014  if test "x$test_cygdrive_prefix" = x; then
20015    # As a simple fix, exclude /usr/bin since it's not a real path.
20016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20018      # a path prefixed by /cygdrive for fixpath to work.
20019      new_path="$CYGWIN_ROOT_PATH$input_path"
20020    fi
20021  fi
20022
20023  # remove trailing .exe if any
20024  new_path="${new_path/%.exe/}"
20025
20026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20027
20028  # First separate the path from the arguments. This will split at the first
20029  # space.
20030  complete="$FOUND_MAKE"
20031  path="${complete%% *}"
20032  tmp="$complete EOL"
20033  arguments="${tmp#* }"
20034
20035  # Input might be given as Windows format, start by converting to
20036  # unix format.
20037  new_path="$path"
20038
20039  windows_path="$new_path"
20040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20041    unix_path=`$CYGPATH -u "$windows_path"`
20042    new_path="$unix_path"
20043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20045    new_path="$unix_path"
20046  fi
20047
20048
20049  # Now try to locate executable using which
20050  new_path=`$WHICH "$new_path" 2> /dev/null`
20051
20052  if test "x$new_path" = x; then
20053    # Oops. Which didn't find the executable.
20054    # The splitting of arguments from the executable at a space might have been incorrect,
20055    # since paths with space are more likely in Windows. Give it another try with the whole
20056    # argument.
20057    path="$complete"
20058    arguments="EOL"
20059    new_path="$path"
20060
20061  windows_path="$new_path"
20062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20063    unix_path=`$CYGPATH -u "$windows_path"`
20064    new_path="$unix_path"
20065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20067    new_path="$unix_path"
20068  fi
20069
20070
20071    new_path=`$WHICH "$new_path" 2> /dev/null`
20072    # bat and cmd files are not always considered executable in MSYS causing which
20073    # to not find them
20074    if test "x$new_path" = x \
20075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20077      new_path="$path"
20078
20079  windows_path="$new_path"
20080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20081    unix_path=`$CYGPATH -u "$windows_path"`
20082    new_path="$unix_path"
20083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20085    new_path="$unix_path"
20086  fi
20087
20088    fi
20089
20090    if test "x$new_path" = x; then
20091      # It's still not found. Now this is an unrecoverable error.
20092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20094      has_space=`$ECHO "$complete" | $GREP " "`
20095      if test "x$has_space" != x; then
20096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20098      fi
20099      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20100    fi
20101  fi
20102
20103  # Now new_path has a complete unix path to the binary
20104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20105    # Keep paths in /bin as-is, but remove trailing .exe if any
20106    new_path="${new_path/%.exe/}"
20107    # Do not save /bin paths to all_fixpath_prefixes!
20108  else
20109    # Not in mixed or Windows style, start by that.
20110    new_path=`cmd //c echo $new_path`
20111
20112  input_path="$new_path"
20113  # Check if we need to convert this using DOS-style short mode. If the path
20114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20115  # take no chances and rewrite it.
20116  # Note: m4 eats our [], so we need to use [ and ] instead.
20117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20118  if test "x$has_forbidden_chars" != x; then
20119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20121  fi
20122
20123    # Output is in $new_path
20124
20125  windows_path="$new_path"
20126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20127    unix_path=`$CYGPATH -u "$windows_path"`
20128    new_path="$unix_path"
20129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20131    new_path="$unix_path"
20132  fi
20133
20134    # remove trailing .exe if any
20135    new_path="${new_path/%.exe/}"
20136
20137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20139  fi
20140
20141    else
20142      # We're on a unix platform. Hooray! :)
20143      # First separate the path from the arguments. This will split at the first
20144      # space.
20145      complete="$FOUND_MAKE"
20146      path="${complete%% *}"
20147      tmp="$complete EOL"
20148      arguments="${tmp#* }"
20149
20150      # Cannot rely on the command "which" here since it doesn't always work.
20151      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20152      if test -z "$is_absolute_path"; then
20153        # Path to executable is not absolute. Find it.
20154        IFS_save="$IFS"
20155        IFS=:
20156        for p in $PATH; do
20157          if test -f "$p/$path" && test -x "$p/$path"; then
20158            new_path="$p/$path"
20159            break
20160          fi
20161        done
20162        IFS="$IFS_save"
20163      else
20164        # This is an absolute path, we can use it without further modifications.
20165        new_path="$path"
20166      fi
20167
20168      if test "x$new_path" = x; then
20169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20170$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20171        has_space=`$ECHO "$complete" | $GREP " "`
20172        if test "x$has_space" != x; then
20173          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20175        fi
20176        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20177      fi
20178    fi
20179
20180    # Now join together the path and the arguments once again
20181    if test "x$arguments" != xEOL; then
20182      new_complete="$new_path ${arguments% *}"
20183    else
20184      new_complete="$new_path"
20185    fi
20186
20187    if test "x$complete" != "x$new_complete"; then
20188      FOUND_MAKE="$new_complete"
20189      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20190$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20191    fi
20192  fi
20193
20194        fi
20195      fi
20196    fi
20197  fi
20198
20199    fi
20200
20201    if test "x$FOUND_MAKE" = x; then
20202      if test "x$TOOLCHAIN_PATH" != x; then
20203        # We have a toolchain path, check that as well before giving up.
20204        OLD_PATH=$PATH
20205        PATH=$TOOLCHAIN_PATH:$PATH
20206        for ac_prog in gmake
20207do
20208  # Extract the first word of "$ac_prog", so it can be a program name with args.
20209set dummy $ac_prog; 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_CHECK_TOOLSDIR_GMAKE+:} false; then :
20213  $as_echo_n "(cached) " >&6
20214else
20215  case $CHECK_TOOLSDIR_GMAKE in
20216  [\\/]* | ?:[\\/]*)
20217  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # 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_CHECK_TOOLSDIR_GMAKE="$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
20238CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20239if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20241$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20242else
20243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20244$as_echo "no" >&6; }
20245fi
20246
20247
20248  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20249done
20250
20251
20252  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20253  DESCRIPTION="gmake in tools-dir"
20254
20255  # On Cygwin, we require a newer version of make than on other platforms
20256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20257    MAKE_VERSION_EXPR="-e 4\."
20258    MAKE_REQUIRED_VERSION="4.0"
20259   else
20260    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20261    MAKE_REQUIRED_VERSION="3.81"
20262  fi
20263
20264  if test "x$MAKE_CANDIDATE" != x; then
20265    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20266$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20267    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20268    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20269    if test "x$IS_GNU_MAKE" = x; then
20270      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20271$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20272    else
20273      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20274      if test "x$IS_MODERN_MAKE" = x; then
20275        { $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
20276$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;}
20277      else
20278        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20279          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20280            MAKE_EXPECTED_ENV='cygwin'
20281          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20282            MAKE_EXPECTED_ENV='msys'
20283          else
20284            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20285          fi
20286          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20287          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20288        else
20289          # Not relevant for non-Windows
20290          IS_MAKE_CORRECT_ENV=true
20291        fi
20292        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20293          { $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
20294$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;}
20295        else
20296          FOUND_MAKE=$MAKE_CANDIDATE
20297
20298  # Only process if variable expands to non-empty
20299
20300  if test "x$FOUND_MAKE" != x; then
20301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20302
20303  # First separate the path from the arguments. This will split at the first
20304  # space.
20305  complete="$FOUND_MAKE"
20306  path="${complete%% *}"
20307  tmp="$complete EOL"
20308  arguments="${tmp#* }"
20309
20310  # Input might be given as Windows format, start by converting to
20311  # unix format.
20312  new_path=`$CYGPATH -u "$path"`
20313
20314  # Now try to locate executable using which
20315  new_path=`$WHICH "$new_path" 2> /dev/null`
20316  # bat and cmd files are not always considered executable in cygwin causing which
20317  # to not find them
20318  if test "x$new_path" = x \
20319      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20320      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20321    new_path=`$CYGPATH -u "$path"`
20322  fi
20323  if test "x$new_path" = x; then
20324    # Oops. Which didn't find the executable.
20325    # The splitting of arguments from the executable at a space might have been incorrect,
20326    # since paths with space are more likely in Windows. Give it another try with the whole
20327    # argument.
20328    path="$complete"
20329    arguments="EOL"
20330    new_path=`$CYGPATH -u "$path"`
20331    new_path=`$WHICH "$new_path" 2> /dev/null`
20332    # bat and cmd files are not always considered executable in cygwin causing which
20333    # to not find them
20334    if test "x$new_path" = x \
20335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20337      new_path=`$CYGPATH -u "$path"`
20338    fi
20339    if test "x$new_path" = x; then
20340      # It's still not found. Now this is an unrecoverable error.
20341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20343      has_space=`$ECHO "$complete" | $GREP " "`
20344      if test "x$has_space" != x; then
20345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20347      fi
20348      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20349    fi
20350  fi
20351
20352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20355  # "foo.exe" is OK but "foo" is an error.
20356  #
20357  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20358  # It is also a way to make sure we got the proper file name for the real test later on.
20359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20360  if test "x$test_shortpath" = x; then
20361    # Short path failed, file does not exist as specified.
20362    # Try adding .exe or .cmd
20363    if test -f "${new_path}.exe"; then
20364      input_to_shortpath="${new_path}.exe"
20365    elif test -f "${new_path}.cmd"; then
20366      input_to_shortpath="${new_path}.cmd"
20367    else
20368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20370      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20371$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20372      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20373    fi
20374  else
20375    input_to_shortpath="$new_path"
20376  fi
20377
20378  # Call helper function which possibly converts this using DOS-style short mode.
20379  # If so, the updated path is stored in $new_path.
20380  new_path="$input_to_shortpath"
20381
20382  input_path="$input_to_shortpath"
20383  # Check if we need to convert this using DOS-style short mode. If the path
20384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20385  # take no chances and rewrite it.
20386  # Note: m4 eats our [], so we need to use [ and ] instead.
20387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20388  if test "x$has_forbidden_chars" != x; then
20389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20393      # Going to short mode and back again did indeed matter. Since short mode is
20394      # case insensitive, let's make it lowercase to improve readability.
20395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20396      # Now convert it back to Unix-style (cygpath)
20397      input_path=`$CYGPATH -u "$shortmode_path"`
20398      new_path="$input_path"
20399    fi
20400  fi
20401
20402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20403  if test "x$test_cygdrive_prefix" = x; then
20404    # As a simple fix, exclude /usr/bin since it's not a real path.
20405    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20407      # a path prefixed by /cygdrive for fixpath to work.
20408      new_path="$CYGWIN_ROOT_PATH$input_path"
20409    fi
20410  fi
20411
20412  # remove trailing .exe if any
20413  new_path="${new_path/%.exe/}"
20414
20415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20416
20417  # First separate the path from the arguments. This will split at the first
20418  # space.
20419  complete="$FOUND_MAKE"
20420  path="${complete%% *}"
20421  tmp="$complete EOL"
20422  arguments="${tmp#* }"
20423
20424  # Input might be given as Windows format, start by converting to
20425  # unix format.
20426  new_path="$path"
20427
20428  windows_path="$new_path"
20429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20430    unix_path=`$CYGPATH -u "$windows_path"`
20431    new_path="$unix_path"
20432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20434    new_path="$unix_path"
20435  fi
20436
20437
20438  # Now try to locate executable using which
20439  new_path=`$WHICH "$new_path" 2> /dev/null`
20440
20441  if test "x$new_path" = x; then
20442    # Oops. Which didn't find the executable.
20443    # The splitting of arguments from the executable at a space might have been incorrect,
20444    # since paths with space are more likely in Windows. Give it another try with the whole
20445    # argument.
20446    path="$complete"
20447    arguments="EOL"
20448    new_path="$path"
20449
20450  windows_path="$new_path"
20451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20452    unix_path=`$CYGPATH -u "$windows_path"`
20453    new_path="$unix_path"
20454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20456    new_path="$unix_path"
20457  fi
20458
20459
20460    new_path=`$WHICH "$new_path" 2> /dev/null`
20461    # bat and cmd files are not always considered executable in MSYS causing which
20462    # to not find them
20463    if test "x$new_path" = x \
20464        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20465        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
20478
20479    if test "x$new_path" = x; then
20480      # It's still not found. Now this is an unrecoverable error.
20481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20482$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20483      has_space=`$ECHO "$complete" | $GREP " "`
20484      if test "x$has_space" != x; then
20485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20487      fi
20488      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20489    fi
20490  fi
20491
20492  # Now new_path has a complete unix path to the binary
20493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20494    # Keep paths in /bin as-is, but remove trailing .exe if any
20495    new_path="${new_path/%.exe/}"
20496    # Do not save /bin paths to all_fixpath_prefixes!
20497  else
20498    # Not in mixed or Windows style, start by that.
20499    new_path=`cmd //c echo $new_path`
20500
20501  input_path="$new_path"
20502  # Check if we need to convert this using DOS-style short mode. If the path
20503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20504  # take no chances and rewrite it.
20505  # Note: m4 eats our [], so we need to use [ and ] instead.
20506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20507  if test "x$has_forbidden_chars" != x; then
20508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20510  fi
20511
20512    # Output is in $new_path
20513
20514  windows_path="$new_path"
20515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20516    unix_path=`$CYGPATH -u "$windows_path"`
20517    new_path="$unix_path"
20518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20520    new_path="$unix_path"
20521  fi
20522
20523    # remove trailing .exe if any
20524    new_path="${new_path/%.exe/}"
20525
20526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20528  fi
20529
20530    else
20531      # We're on a unix platform. Hooray! :)
20532      # First separate the path from the arguments. This will split at the first
20533      # space.
20534      complete="$FOUND_MAKE"
20535      path="${complete%% *}"
20536      tmp="$complete EOL"
20537      arguments="${tmp#* }"
20538
20539      # Cannot rely on the command "which" here since it doesn't always work.
20540      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20541      if test -z "$is_absolute_path"; then
20542        # Path to executable is not absolute. Find it.
20543        IFS_save="$IFS"
20544        IFS=:
20545        for p in $PATH; do
20546          if test -f "$p/$path" && test -x "$p/$path"; then
20547            new_path="$p/$path"
20548            break
20549          fi
20550        done
20551        IFS="$IFS_save"
20552      else
20553        # This is an absolute path, we can use it without further modifications.
20554        new_path="$path"
20555      fi
20556
20557      if test "x$new_path" = x; then
20558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20559$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20560        has_space=`$ECHO "$complete" | $GREP " "`
20561        if test "x$has_space" != x; then
20562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20564        fi
20565        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20566      fi
20567    fi
20568
20569    # Now join together the path and the arguments once again
20570    if test "x$arguments" != xEOL; then
20571      new_complete="$new_path ${arguments% *}"
20572    else
20573      new_complete="$new_path"
20574    fi
20575
20576    if test "x$complete" != "x$new_complete"; then
20577      FOUND_MAKE="$new_complete"
20578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20579$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20580    fi
20581  fi
20582
20583        fi
20584      fi
20585    fi
20586  fi
20587
20588        if test "x$FOUND_MAKE" = x; then
20589          for ac_prog in make
20590do
20591  # Extract the first word of "$ac_prog", so it can be a program name with args.
20592set dummy $ac_prog; ac_word=$2
20593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20594$as_echo_n "checking for $ac_word... " >&6; }
20595if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20596  $as_echo_n "(cached) " >&6
20597else
20598  case $CHECK_TOOLSDIR_MAKE in
20599  [\\/]* | ?:[\\/]*)
20600  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20601  ;;
20602  *)
20603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20604for as_dir in $PATH
20605do
20606  IFS=$as_save_IFS
20607  test -z "$as_dir" && as_dir=.
20608    for ac_exec_ext in '' $ac_executable_extensions; do
20609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20610    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20612    break 2
20613  fi
20614done
20615  done
20616IFS=$as_save_IFS
20617
20618  ;;
20619esac
20620fi
20621CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20622if test -n "$CHECK_TOOLSDIR_MAKE"; then
20623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20624$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20625else
20626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20627$as_echo "no" >&6; }
20628fi
20629
20630
20631  test -n "$CHECK_TOOLSDIR_MAKE" && break
20632done
20633
20634
20635  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20636  DESCRIPTION="make in tools-dir"
20637
20638  # On Cygwin, we require a newer version of make than on other platforms
20639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20640    MAKE_VERSION_EXPR="-e 4\."
20641    MAKE_REQUIRED_VERSION="4.0"
20642   else
20643    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20644    MAKE_REQUIRED_VERSION="3.81"
20645  fi
20646
20647  if test "x$MAKE_CANDIDATE" != x; then
20648    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20649$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20650    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20651    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20652    if test "x$IS_GNU_MAKE" = x; then
20653      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20654$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20655    else
20656      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20657      if test "x$IS_MODERN_MAKE" = x; then
20658        { $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
20659$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;}
20660      else
20661        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20662          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20663            MAKE_EXPECTED_ENV='cygwin'
20664          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20665            MAKE_EXPECTED_ENV='msys'
20666          else
20667            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20668          fi
20669          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20670          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20671        else
20672          # Not relevant for non-Windows
20673          IS_MAKE_CORRECT_ENV=true
20674        fi
20675        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20676          { $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
20677$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;}
20678        else
20679          FOUND_MAKE=$MAKE_CANDIDATE
20680
20681  # Only process if variable expands to non-empty
20682
20683  if test "x$FOUND_MAKE" != x; then
20684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20685
20686  # First separate the path from the arguments. This will split at the first
20687  # space.
20688  complete="$FOUND_MAKE"
20689  path="${complete%% *}"
20690  tmp="$complete EOL"
20691  arguments="${tmp#* }"
20692
20693  # Input might be given as Windows format, start by converting to
20694  # unix format.
20695  new_path=`$CYGPATH -u "$path"`
20696
20697  # Now try to locate executable using which
20698  new_path=`$WHICH "$new_path" 2> /dev/null`
20699  # bat and cmd files are not always considered executable in cygwin causing which
20700  # to not find them
20701  if test "x$new_path" = x \
20702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20704    new_path=`$CYGPATH -u "$path"`
20705  fi
20706  if test "x$new_path" = x; then
20707    # Oops. Which didn't find the executable.
20708    # The splitting of arguments from the executable at a space might have been incorrect,
20709    # since paths with space are more likely in Windows. Give it another try with the whole
20710    # argument.
20711    path="$complete"
20712    arguments="EOL"
20713    new_path=`$CYGPATH -u "$path"`
20714    new_path=`$WHICH "$new_path" 2> /dev/null`
20715    # bat and cmd files are not always considered executable in cygwin causing which
20716    # to not find them
20717    if test "x$new_path" = x \
20718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20720      new_path=`$CYGPATH -u "$path"`
20721    fi
20722    if test "x$new_path" = x; then
20723      # It's still not found. Now this is an unrecoverable error.
20724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20726      has_space=`$ECHO "$complete" | $GREP " "`
20727      if test "x$has_space" != x; then
20728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20730      fi
20731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20732    fi
20733  fi
20734
20735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20738  # "foo.exe" is OK but "foo" is an error.
20739  #
20740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20741  # It is also a way to make sure we got the proper file name for the real test later on.
20742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20743  if test "x$test_shortpath" = x; then
20744    # Short path failed, file does not exist as specified.
20745    # Try adding .exe or .cmd
20746    if test -f "${new_path}.exe"; then
20747      input_to_shortpath="${new_path}.exe"
20748    elif test -f "${new_path}.cmd"; then
20749      input_to_shortpath="${new_path}.cmd"
20750    else
20751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20752$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20756    fi
20757  else
20758    input_to_shortpath="$new_path"
20759  fi
20760
20761  # Call helper function which possibly converts this using DOS-style short mode.
20762  # If so, the updated path is stored in $new_path.
20763  new_path="$input_to_shortpath"
20764
20765  input_path="$input_to_shortpath"
20766  # Check if we need to convert this using DOS-style short mode. If the path
20767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20768  # take no chances and rewrite it.
20769  # Note: m4 eats our [], so we need to use [ and ] instead.
20770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20771  if test "x$has_forbidden_chars" != x; then
20772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20776      # Going to short mode and back again did indeed matter. Since short mode is
20777      # case insensitive, let's make it lowercase to improve readability.
20778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20779      # Now convert it back to Unix-style (cygpath)
20780      input_path=`$CYGPATH -u "$shortmode_path"`
20781      new_path="$input_path"
20782    fi
20783  fi
20784
20785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20786  if test "x$test_cygdrive_prefix" = x; then
20787    # As a simple fix, exclude /usr/bin since it's not a real path.
20788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20790      # a path prefixed by /cygdrive for fixpath to work.
20791      new_path="$CYGWIN_ROOT_PATH$input_path"
20792    fi
20793  fi
20794
20795  # remove trailing .exe if any
20796  new_path="${new_path/%.exe/}"
20797
20798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20799
20800  # First separate the path from the arguments. This will split at the first
20801  # space.
20802  complete="$FOUND_MAKE"
20803  path="${complete%% *}"
20804  tmp="$complete EOL"
20805  arguments="${tmp#* }"
20806
20807  # Input might be given as Windows format, start by converting to
20808  # unix format.
20809  new_path="$path"
20810
20811  windows_path="$new_path"
20812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20813    unix_path=`$CYGPATH -u "$windows_path"`
20814    new_path="$unix_path"
20815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20817    new_path="$unix_path"
20818  fi
20819
20820
20821  # Now try to locate executable using which
20822  new_path=`$WHICH "$new_path" 2> /dev/null`
20823
20824  if test "x$new_path" = x; then
20825    # Oops. Which didn't find the executable.
20826    # The splitting of arguments from the executable at a space might have been incorrect,
20827    # since paths with space are more likely in Windows. Give it another try with the whole
20828    # argument.
20829    path="$complete"
20830    arguments="EOL"
20831    new_path="$path"
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842
20843    new_path=`$WHICH "$new_path" 2> /dev/null`
20844    # bat and cmd files are not always considered executable in MSYS causing which
20845    # to not find them
20846    if test "x$new_path" = x \
20847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20849      new_path="$path"
20850
20851  windows_path="$new_path"
20852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20853    unix_path=`$CYGPATH -u "$windows_path"`
20854    new_path="$unix_path"
20855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20857    new_path="$unix_path"
20858  fi
20859
20860    fi
20861
20862    if test "x$new_path" = x; then
20863      # It's still not found. Now this is an unrecoverable error.
20864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20866      has_space=`$ECHO "$complete" | $GREP " "`
20867      if test "x$has_space" != x; then
20868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20870      fi
20871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20872    fi
20873  fi
20874
20875  # Now new_path has a complete unix path to the binary
20876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20877    # Keep paths in /bin as-is, but remove trailing .exe if any
20878    new_path="${new_path/%.exe/}"
20879    # Do not save /bin paths to all_fixpath_prefixes!
20880  else
20881    # Not in mixed or Windows style, start by that.
20882    new_path=`cmd //c echo $new_path`
20883
20884  input_path="$new_path"
20885  # Check if we need to convert this using DOS-style short mode. If the path
20886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20887  # take no chances and rewrite it.
20888  # Note: m4 eats our [], so we need to use [ and ] instead.
20889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20890  if test "x$has_forbidden_chars" != x; then
20891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20893  fi
20894
20895    # Output is in $new_path
20896
20897  windows_path="$new_path"
20898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20899    unix_path=`$CYGPATH -u "$windows_path"`
20900    new_path="$unix_path"
20901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20903    new_path="$unix_path"
20904  fi
20905
20906    # remove trailing .exe if any
20907    new_path="${new_path/%.exe/}"
20908
20909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20911  fi
20912
20913    else
20914      # We're on a unix platform. Hooray! :)
20915      # First separate the path from the arguments. This will split at the first
20916      # space.
20917      complete="$FOUND_MAKE"
20918      path="${complete%% *}"
20919      tmp="$complete EOL"
20920      arguments="${tmp#* }"
20921
20922      # Cannot rely on the command "which" here since it doesn't always work.
20923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20924      if test -z "$is_absolute_path"; then
20925        # Path to executable is not absolute. Find it.
20926        IFS_save="$IFS"
20927        IFS=:
20928        for p in $PATH; do
20929          if test -f "$p/$path" && test -x "$p/$path"; then
20930            new_path="$p/$path"
20931            break
20932          fi
20933        done
20934        IFS="$IFS_save"
20935      else
20936        # This is an absolute path, we can use it without further modifications.
20937        new_path="$path"
20938      fi
20939
20940      if test "x$new_path" = x; then
20941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20943        has_space=`$ECHO "$complete" | $GREP " "`
20944        if test "x$has_space" != x; then
20945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20947        fi
20948        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20949      fi
20950    fi
20951
20952    # Now join together the path and the arguments once again
20953    if test "x$arguments" != xEOL; then
20954      new_complete="$new_path ${arguments% *}"
20955    else
20956      new_complete="$new_path"
20957    fi
20958
20959    if test "x$complete" != "x$new_complete"; then
20960      FOUND_MAKE="$new_complete"
20961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20962$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20963    fi
20964  fi
20965
20966        fi
20967      fi
20968    fi
20969  fi
20970
20971        fi
20972        PATH=$OLD_PATH
20973      fi
20974    fi
20975
20976    if test "x$FOUND_MAKE" = x; then
20977      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
20978    fi
20979
20980    else
20981      # If it succeeded, then it was overridden by the user. We will use it
20982      # for the tool.
20983
20984      # First remove it from the list of overridden variables, so we can test
20985      # for unknown variables in the end.
20986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20987
20988      # Check if we try to supply an empty value
20989      if test "x$MAKE" = x; then
20990        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20991$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20993$as_echo_n "checking for MAKE... " >&6; }
20994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20995$as_echo "disabled" >&6; }
20996      else
20997        # Check if the provided tool contains a complete path.
20998        tool_specified="$MAKE"
20999        tool_basename="${tool_specified##*/}"
21000        if test "x$tool_basename" = "x$tool_specified"; then
21001          # A command without a complete path is provided, search $PATH.
21002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
21003$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
21004          # Extract the first word of "$tool_basename", so it can be a program name with args.
21005set dummy $tool_basename; ac_word=$2
21006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21007$as_echo_n "checking for $ac_word... " >&6; }
21008if ${ac_cv_path_MAKE+:} false; then :
21009  $as_echo_n "(cached) " >&6
21010else
21011  case $MAKE in
21012  [\\/]* | ?:[\\/]*)
21013  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
21014  ;;
21015  *)
21016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21017for as_dir in $PATH
21018do
21019  IFS=$as_save_IFS
21020  test -z "$as_dir" && as_dir=.
21021    for ac_exec_ext in '' $ac_executable_extensions; do
21022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21023    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21025    break 2
21026  fi
21027done
21028  done
21029IFS=$as_save_IFS
21030
21031  ;;
21032esac
21033fi
21034MAKE=$ac_cv_path_MAKE
21035if test -n "$MAKE"; then
21036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21037$as_echo "$MAKE" >&6; }
21038else
21039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21040$as_echo "no" >&6; }
21041fi
21042
21043
21044          if test "x$MAKE" = x; then
21045            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21046          fi
21047        else
21048          # Otherwise we believe it is a complete path. Use it as it is.
21049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21050$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21051          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21052$as_echo_n "checking for MAKE... " >&6; }
21053          if test ! -x "$tool_specified"; then
21054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21055$as_echo "not found" >&6; }
21056            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21057          fi
21058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21059$as_echo "$tool_specified" >&6; }
21060        fi
21061      fi
21062    fi
21063
21064    # If MAKE was set by user, verify the version
21065
21066  MAKE_CANDIDATE=""$MAKE""
21067  DESCRIPTION="user supplied MAKE=$MAKE"
21068
21069  # On Cygwin, we require a newer version of make than on other platforms
21070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21071    MAKE_VERSION_EXPR="-e 4\."
21072    MAKE_REQUIRED_VERSION="4.0"
21073   else
21074    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21075    MAKE_REQUIRED_VERSION="3.81"
21076  fi
21077
21078  if test "x$MAKE_CANDIDATE" != x; then
21079    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21080$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21081    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21082    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21083    if test "x$IS_GNU_MAKE" = x; then
21084      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21085$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21086    else
21087      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21088      if test "x$IS_MODERN_MAKE" = x; then
21089        { $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
21090$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;}
21091      else
21092        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21093          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21094            MAKE_EXPECTED_ENV='cygwin'
21095          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21096            MAKE_EXPECTED_ENV='msys'
21097          else
21098            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21099          fi
21100          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21101          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21102        else
21103          # Not relevant for non-Windows
21104          IS_MAKE_CORRECT_ENV=true
21105        fi
21106        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21107          { $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
21108$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;}
21109        else
21110          FOUND_MAKE=$MAKE_CANDIDATE
21111
21112  # Only process if variable expands to non-empty
21113
21114  if test "x$FOUND_MAKE" != x; then
21115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21116
21117  # First separate the path from the arguments. This will split at the first
21118  # space.
21119  complete="$FOUND_MAKE"
21120  path="${complete%% *}"
21121  tmp="$complete EOL"
21122  arguments="${tmp#* }"
21123
21124  # Input might be given as Windows format, start by converting to
21125  # unix format.
21126  new_path=`$CYGPATH -u "$path"`
21127
21128  # Now try to locate executable using which
21129  new_path=`$WHICH "$new_path" 2> /dev/null`
21130  # bat and cmd files are not always considered executable in cygwin causing which
21131  # to not find them
21132  if test "x$new_path" = x \
21133      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21134      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21135    new_path=`$CYGPATH -u "$path"`
21136  fi
21137  if test "x$new_path" = x; then
21138    # Oops. Which didn't find the executable.
21139    # The splitting of arguments from the executable at a space might have been incorrect,
21140    # since paths with space are more likely in Windows. Give it another try with the whole
21141    # argument.
21142    path="$complete"
21143    arguments="EOL"
21144    new_path=`$CYGPATH -u "$path"`
21145    new_path=`$WHICH "$new_path" 2> /dev/null`
21146    # bat and cmd files are not always considered executable in cygwin causing which
21147    # to not find them
21148    if test "x$new_path" = x \
21149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21151      new_path=`$CYGPATH -u "$path"`
21152    fi
21153    if test "x$new_path" = x; then
21154      # It's still not found. Now this is an unrecoverable error.
21155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21156$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21157      has_space=`$ECHO "$complete" | $GREP " "`
21158      if test "x$has_space" != x; then
21159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21161      fi
21162      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21163    fi
21164  fi
21165
21166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21169  # "foo.exe" is OK but "foo" is an error.
21170  #
21171  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21172  # It is also a way to make sure we got the proper file name for the real test later on.
21173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21174  if test "x$test_shortpath" = x; then
21175    # Short path failed, file does not exist as specified.
21176    # Try adding .exe or .cmd
21177    if test -f "${new_path}.exe"; then
21178      input_to_shortpath="${new_path}.exe"
21179    elif test -f "${new_path}.cmd"; then
21180      input_to_shortpath="${new_path}.cmd"
21181    else
21182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21183$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21184      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21185$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21187    fi
21188  else
21189    input_to_shortpath="$new_path"
21190  fi
21191
21192  # Call helper function which possibly converts this using DOS-style short mode.
21193  # If so, the updated path is stored in $new_path.
21194  new_path="$input_to_shortpath"
21195
21196  input_path="$input_to_shortpath"
21197  # Check if we need to convert this using DOS-style short mode. If the path
21198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21199  # take no chances and rewrite it.
21200  # Note: m4 eats our [], so we need to use [ and ] instead.
21201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21202  if test "x$has_forbidden_chars" != x; then
21203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21207      # Going to short mode and back again did indeed matter. Since short mode is
21208      # case insensitive, let's make it lowercase to improve readability.
21209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21210      # Now convert it back to Unix-style (cygpath)
21211      input_path=`$CYGPATH -u "$shortmode_path"`
21212      new_path="$input_path"
21213    fi
21214  fi
21215
21216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21217  if test "x$test_cygdrive_prefix" = x; then
21218    # As a simple fix, exclude /usr/bin since it's not a real path.
21219    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21221      # a path prefixed by /cygdrive for fixpath to work.
21222      new_path="$CYGWIN_ROOT_PATH$input_path"
21223    fi
21224  fi
21225
21226  # remove trailing .exe if any
21227  new_path="${new_path/%.exe/}"
21228
21229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21230
21231  # First separate the path from the arguments. This will split at the first
21232  # space.
21233  complete="$FOUND_MAKE"
21234  path="${complete%% *}"
21235  tmp="$complete EOL"
21236  arguments="${tmp#* }"
21237
21238  # Input might be given as Windows format, start by converting to
21239  # unix format.
21240  new_path="$path"
21241
21242  windows_path="$new_path"
21243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21244    unix_path=`$CYGPATH -u "$windows_path"`
21245    new_path="$unix_path"
21246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21248    new_path="$unix_path"
21249  fi
21250
21251
21252  # Now try to locate executable using which
21253  new_path=`$WHICH "$new_path" 2> /dev/null`
21254
21255  if test "x$new_path" = x; then
21256    # Oops. Which didn't find the executable.
21257    # The splitting of arguments from the executable at a space might have been incorrect,
21258    # since paths with space are more likely in Windows. Give it another try with the whole
21259    # argument.
21260    path="$complete"
21261    arguments="EOL"
21262    new_path="$path"
21263
21264  windows_path="$new_path"
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266    unix_path=`$CYGPATH -u "$windows_path"`
21267    new_path="$unix_path"
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21270    new_path="$unix_path"
21271  fi
21272
21273
21274    new_path=`$WHICH "$new_path" 2> /dev/null`
21275    # bat and cmd files are not always considered executable in MSYS causing which
21276    # to not find them
21277    if test "x$new_path" = x \
21278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21280      new_path="$path"
21281
21282  windows_path="$new_path"
21283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21284    unix_path=`$CYGPATH -u "$windows_path"`
21285    new_path="$unix_path"
21286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21288    new_path="$unix_path"
21289  fi
21290
21291    fi
21292
21293    if test "x$new_path" = x; then
21294      # It's still not found. Now this is an unrecoverable error.
21295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21296$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21297      has_space=`$ECHO "$complete" | $GREP " "`
21298      if test "x$has_space" != x; then
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21301      fi
21302      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21303    fi
21304  fi
21305
21306  # Now new_path has a complete unix path to the binary
21307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21308    # Keep paths in /bin as-is, but remove trailing .exe if any
21309    new_path="${new_path/%.exe/}"
21310    # Do not save /bin paths to all_fixpath_prefixes!
21311  else
21312    # Not in mixed or Windows style, start by that.
21313    new_path=`cmd //c echo $new_path`
21314
21315  input_path="$new_path"
21316  # Check if we need to convert this using DOS-style short mode. If the path
21317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21318  # take no chances and rewrite it.
21319  # Note: m4 eats our [], so we need to use [ and ] instead.
21320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21321  if test "x$has_forbidden_chars" != x; then
21322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21324  fi
21325
21326    # Output is in $new_path
21327
21328  windows_path="$new_path"
21329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21330    unix_path=`$CYGPATH -u "$windows_path"`
21331    new_path="$unix_path"
21332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21334    new_path="$unix_path"
21335  fi
21336
21337    # remove trailing .exe if any
21338    new_path="${new_path/%.exe/}"
21339
21340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21342  fi
21343
21344    else
21345      # We're on a unix platform. Hooray! :)
21346      # First separate the path from the arguments. This will split at the first
21347      # space.
21348      complete="$FOUND_MAKE"
21349      path="${complete%% *}"
21350      tmp="$complete EOL"
21351      arguments="${tmp#* }"
21352
21353      # Cannot rely on the command "which" here since it doesn't always work.
21354      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21355      if test -z "$is_absolute_path"; then
21356        # Path to executable is not absolute. Find it.
21357        IFS_save="$IFS"
21358        IFS=:
21359        for p in $PATH; do
21360          if test -f "$p/$path" && test -x "$p/$path"; then
21361            new_path="$p/$path"
21362            break
21363          fi
21364        done
21365        IFS="$IFS_save"
21366      else
21367        # This is an absolute path, we can use it without further modifications.
21368        new_path="$path"
21369      fi
21370
21371      if test "x$new_path" = x; then
21372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21373$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21374        has_space=`$ECHO "$complete" | $GREP " "`
21375        if test "x$has_space" != x; then
21376          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21378        fi
21379        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21380      fi
21381    fi
21382
21383    # Now join together the path and the arguments once again
21384    if test "x$arguments" != xEOL; then
21385      new_complete="$new_path ${arguments% *}"
21386    else
21387      new_complete="$new_path"
21388    fi
21389
21390    if test "x$complete" != "x$new_complete"; then
21391      FOUND_MAKE="$new_complete"
21392      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21393$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21394    fi
21395  fi
21396
21397        fi
21398      fi
21399    fi
21400  fi
21401
21402    if test "x$FOUND_MAKE" = x; then
21403      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21404    fi
21405
21406  fi
21407
21408
21409  MAKE=$FOUND_MAKE
21410
21411  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21412$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21413
21414
21415  # Check if make supports the output sync option and if so, setup using it.
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21417$as_echo_n "checking if make --output-sync is supported... " >&6; }
21418  if $MAKE --version -O > /dev/null 2>&1; then
21419    OUTPUT_SYNC_SUPPORTED=true
21420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21421$as_echo "yes" >&6; }
21422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21423$as_echo_n "checking for output-sync value... " >&6; }
21424
21425# Check whether --with-output-sync was given.
21426if test "${with_output_sync+set}" = set; then :
21427  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21428fi
21429
21430    if test "x$OUTPUT_SYNC" = "x"; then
21431      OUTPUT_SYNC=none
21432    fi
21433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21434$as_echo "$OUTPUT_SYNC" >&6; }
21435    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21436      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21437    fi
21438  else
21439    OUTPUT_SYNC_SUPPORTED=false
21440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21441$as_echo "no" >&6; }
21442  fi
21443
21444
21445
21446
21447
21448
21449  # Test if find supports -delete
21450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21451$as_echo_n "checking if find supports -delete... " >&6; }
21452  FIND_DELETE="-delete"
21453
21454  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21455
21456  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21457
21458  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21459  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21460    # No, it does not.
21461    $RM $DELETEDIR/TestIfFindSupportsDelete
21462    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21463      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21464      FIND_DELETE="-print | $XARGS $RM"
21465    else
21466      FIND_DELETE="-exec $RM \{\} \+"
21467    fi
21468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21469$as_echo "no" >&6; }
21470  else
21471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21472$as_echo "yes" >&6; }
21473  fi
21474  $RMDIR $DELETEDIR
21475
21476
21477
21478  # Test which kind of tar was found
21479  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21480    TAR_TYPE="gnu"
21481  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21482    TAR_TYPE="bsd"
21483  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21484    TAR_TYPE="bsd"
21485  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21486    TAR_TYPE="solaris"
21487  fi
21488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21489$as_echo_n "checking what type of tar was found... " >&6; }
21490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21491$as_echo "$TAR_TYPE" >&6; }
21492
21493  TAR_CREATE_FILE_PARAM=""
21494
21495  if test "x$TAR_TYPE" = "xgnu"; then
21496    TAR_INCLUDE_PARAM="T"
21497    TAR_SUPPORTS_TRANSFORM="true"
21498    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21499      # When using gnu tar for Solaris targets, need to use compatibility mode
21500      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21501    fi
21502  else
21503    TAR_INCLUDE_PARAM="I"
21504    TAR_SUPPORTS_TRANSFORM="false"
21505  fi
21506
21507
21508
21509
21510
21511
21512  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21513  # This is a problem for the grep resident on AIX.
21514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21515$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21516  # Multiple subsequent spaces..
21517  STACK_SPACES='aaa   bbb   ccc'
21518  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21519  # patterns in it.
21520  STACK_LIST=${STACK_SPACES// /$'\n'}
21521  NEEDLE_SPACES='ccc bbb aaa'
21522  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21523  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21524  if test "x$RESULT" == "x"; then
21525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21526$as_echo "yes" >&6; }
21527  else
21528    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21529      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21530    fi
21531    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21532  fi
21533
21534
21535  # These tools might not be installed by default,
21536  # need hint on how to install them.
21537
21538
21539
21540  # Publish this variable in the help.
21541
21542
21543  if [ -z "${UNZIP+x}" ]; then
21544    # The variable is not set by user, try to locate tool using the code snippet
21545    for ac_prog in unzip
21546do
21547  # Extract the first word of "$ac_prog", so it can be a program name with args.
21548set dummy $ac_prog; ac_word=$2
21549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21550$as_echo_n "checking for $ac_word... " >&6; }
21551if ${ac_cv_path_UNZIP+:} false; then :
21552  $as_echo_n "(cached) " >&6
21553else
21554  case $UNZIP in
21555  [\\/]* | ?:[\\/]*)
21556  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21557  ;;
21558  *)
21559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21560for as_dir in $PATH
21561do
21562  IFS=$as_save_IFS
21563  test -z "$as_dir" && as_dir=.
21564    for ac_exec_ext in '' $ac_executable_extensions; do
21565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21566    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21568    break 2
21569  fi
21570done
21571  done
21572IFS=$as_save_IFS
21573
21574  ;;
21575esac
21576fi
21577UNZIP=$ac_cv_path_UNZIP
21578if test -n "$UNZIP"; then
21579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21580$as_echo "$UNZIP" >&6; }
21581else
21582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21583$as_echo "no" >&6; }
21584fi
21585
21586
21587  test -n "$UNZIP" && break
21588done
21589
21590  else
21591    # The variable is set, but is it from the command line or the environment?
21592
21593    # Try to remove the string !UNZIP! from our list.
21594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21596      # If it failed, the variable was not from the command line. Ignore it,
21597      # but warn the user (except for BASH, which is always set by the calling BASH).
21598      if test "xUNZIP" != xBASH; then
21599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21600$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21601      fi
21602      # Try to locate tool using the code snippet
21603      for ac_prog in unzip
21604do
21605  # Extract the first word of "$ac_prog", so it can be a program name with args.
21606set dummy $ac_prog; ac_word=$2
21607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21608$as_echo_n "checking for $ac_word... " >&6; }
21609if ${ac_cv_path_UNZIP+:} false; then :
21610  $as_echo_n "(cached) " >&6
21611else
21612  case $UNZIP in
21613  [\\/]* | ?:[\\/]*)
21614  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21615  ;;
21616  *)
21617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21618for as_dir in $PATH
21619do
21620  IFS=$as_save_IFS
21621  test -z "$as_dir" && as_dir=.
21622    for ac_exec_ext in '' $ac_executable_extensions; do
21623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21624    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21626    break 2
21627  fi
21628done
21629  done
21630IFS=$as_save_IFS
21631
21632  ;;
21633esac
21634fi
21635UNZIP=$ac_cv_path_UNZIP
21636if test -n "$UNZIP"; then
21637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21638$as_echo "$UNZIP" >&6; }
21639else
21640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21641$as_echo "no" >&6; }
21642fi
21643
21644
21645  test -n "$UNZIP" && break
21646done
21647
21648    else
21649      # If it succeeded, then it was overridden by the user. We will use it
21650      # for the tool.
21651
21652      # First remove it from the list of overridden variables, so we can test
21653      # for unknown variables in the end.
21654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21655
21656      # Check if we try to supply an empty value
21657      if test "x$UNZIP" = x; then
21658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21659$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21661$as_echo_n "checking for UNZIP... " >&6; }
21662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21663$as_echo "disabled" >&6; }
21664      else
21665        # Check if the provided tool contains a complete path.
21666        tool_specified="$UNZIP"
21667        tool_basename="${tool_specified##*/}"
21668        if test "x$tool_basename" = "x$tool_specified"; then
21669          # A command without a complete path is provided, search $PATH.
21670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21671$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21672          # Extract the first word of "$tool_basename", so it can be a program name with args.
21673set dummy $tool_basename; ac_word=$2
21674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21675$as_echo_n "checking for $ac_word... " >&6; }
21676if ${ac_cv_path_UNZIP+:} false; then :
21677  $as_echo_n "(cached) " >&6
21678else
21679  case $UNZIP in
21680  [\\/]* | ?:[\\/]*)
21681  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21682  ;;
21683  *)
21684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21685for as_dir in $PATH
21686do
21687  IFS=$as_save_IFS
21688  test -z "$as_dir" && as_dir=.
21689    for ac_exec_ext in '' $ac_executable_extensions; do
21690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21691    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21693    break 2
21694  fi
21695done
21696  done
21697IFS=$as_save_IFS
21698
21699  ;;
21700esac
21701fi
21702UNZIP=$ac_cv_path_UNZIP
21703if test -n "$UNZIP"; then
21704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21705$as_echo "$UNZIP" >&6; }
21706else
21707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21708$as_echo "no" >&6; }
21709fi
21710
21711
21712          if test "x$UNZIP" = x; then
21713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21714          fi
21715        else
21716          # Otherwise we believe it is a complete path. Use it as it is.
21717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21718$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21720$as_echo_n "checking for UNZIP... " >&6; }
21721          if test ! -x "$tool_specified"; then
21722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21723$as_echo "not found" >&6; }
21724            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21725          fi
21726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21727$as_echo "$tool_specified" >&6; }
21728        fi
21729      fi
21730    fi
21731
21732  fi
21733
21734
21735
21736  if test "x$UNZIP" = x; then
21737    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21738  fi
21739
21740
21741  # Since zip uses "ZIP" as a environment variable for passing options, we need
21742  # to name our variable differently, hence ZIPEXE.
21743
21744
21745
21746  # Publish this variable in the help.
21747
21748
21749  if [ -z "${ZIPEXE+x}" ]; then
21750    # The variable is not set by user, try to locate tool using the code snippet
21751    for ac_prog in zip
21752do
21753  # Extract the first word of "$ac_prog", so it can be a program name with args.
21754set dummy $ac_prog; ac_word=$2
21755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21756$as_echo_n "checking for $ac_word... " >&6; }
21757if ${ac_cv_path_ZIPEXE+:} false; then :
21758  $as_echo_n "(cached) " >&6
21759else
21760  case $ZIPEXE in
21761  [\\/]* | ?:[\\/]*)
21762  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21763  ;;
21764  *)
21765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21766for as_dir in $PATH
21767do
21768  IFS=$as_save_IFS
21769  test -z "$as_dir" && as_dir=.
21770    for ac_exec_ext in '' $ac_executable_extensions; do
21771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21772    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21774    break 2
21775  fi
21776done
21777  done
21778IFS=$as_save_IFS
21779
21780  ;;
21781esac
21782fi
21783ZIPEXE=$ac_cv_path_ZIPEXE
21784if test -n "$ZIPEXE"; then
21785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21786$as_echo "$ZIPEXE" >&6; }
21787else
21788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21789$as_echo "no" >&6; }
21790fi
21791
21792
21793  test -n "$ZIPEXE" && break
21794done
21795
21796  else
21797    # The variable is set, but is it from the command line or the environment?
21798
21799    # Try to remove the string !ZIPEXE! from our list.
21800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21802      # If it failed, the variable was not from the command line. Ignore it,
21803      # but warn the user (except for BASH, which is always set by the calling BASH).
21804      if test "xZIPEXE" != xBASH; then
21805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21806$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21807      fi
21808      # Try to locate tool using the code snippet
21809      for ac_prog in zip
21810do
21811  # Extract the first word of "$ac_prog", so it can be a program name with args.
21812set dummy $ac_prog; ac_word=$2
21813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21814$as_echo_n "checking for $ac_word... " >&6; }
21815if ${ac_cv_path_ZIPEXE+:} false; then :
21816  $as_echo_n "(cached) " >&6
21817else
21818  case $ZIPEXE in
21819  [\\/]* | ?:[\\/]*)
21820  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21821  ;;
21822  *)
21823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21824for as_dir in $PATH
21825do
21826  IFS=$as_save_IFS
21827  test -z "$as_dir" && as_dir=.
21828    for ac_exec_ext in '' $ac_executable_extensions; do
21829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21830    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21832    break 2
21833  fi
21834done
21835  done
21836IFS=$as_save_IFS
21837
21838  ;;
21839esac
21840fi
21841ZIPEXE=$ac_cv_path_ZIPEXE
21842if test -n "$ZIPEXE"; then
21843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21844$as_echo "$ZIPEXE" >&6; }
21845else
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21847$as_echo "no" >&6; }
21848fi
21849
21850
21851  test -n "$ZIPEXE" && break
21852done
21853
21854    else
21855      # If it succeeded, then it was overridden by the user. We will use it
21856      # for the tool.
21857
21858      # First remove it from the list of overridden variables, so we can test
21859      # for unknown variables in the end.
21860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21861
21862      # Check if we try to supply an empty value
21863      if test "x$ZIPEXE" = x; then
21864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21865$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21867$as_echo_n "checking for ZIPEXE... " >&6; }
21868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21869$as_echo "disabled" >&6; }
21870      else
21871        # Check if the provided tool contains a complete path.
21872        tool_specified="$ZIPEXE"
21873        tool_basename="${tool_specified##*/}"
21874        if test "x$tool_basename" = "x$tool_specified"; then
21875          # A command without a complete path is provided, search $PATH.
21876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21877$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21878          # Extract the first word of "$tool_basename", so it can be a program name with args.
21879set dummy $tool_basename; ac_word=$2
21880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21881$as_echo_n "checking for $ac_word... " >&6; }
21882if ${ac_cv_path_ZIPEXE+:} false; then :
21883  $as_echo_n "(cached) " >&6
21884else
21885  case $ZIPEXE in
21886  [\\/]* | ?:[\\/]*)
21887  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21888  ;;
21889  *)
21890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21891for as_dir in $PATH
21892do
21893  IFS=$as_save_IFS
21894  test -z "$as_dir" && as_dir=.
21895    for ac_exec_ext in '' $ac_executable_extensions; do
21896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21897    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21899    break 2
21900  fi
21901done
21902  done
21903IFS=$as_save_IFS
21904
21905  ;;
21906esac
21907fi
21908ZIPEXE=$ac_cv_path_ZIPEXE
21909if test -n "$ZIPEXE"; then
21910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21911$as_echo "$ZIPEXE" >&6; }
21912else
21913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21914$as_echo "no" >&6; }
21915fi
21916
21917
21918          if test "x$ZIPEXE" = x; then
21919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21920          fi
21921        else
21922          # Otherwise we believe it is a complete path. Use it as it is.
21923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21924$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21926$as_echo_n "checking for ZIPEXE... " >&6; }
21927          if test ! -x "$tool_specified"; then
21928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21929$as_echo "not found" >&6; }
21930            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21931          fi
21932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21933$as_echo "$tool_specified" >&6; }
21934        fi
21935      fi
21936    fi
21937
21938  fi
21939
21940
21941
21942  if test "x$ZIPEXE" = x; then
21943    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21944  fi
21945
21946
21947
21948  # Non-required basic tools
21949
21950
21951
21952  # Publish this variable in the help.
21953
21954
21955  if [ -z "${LDD+x}" ]; then
21956    # The variable is not set by user, try to locate tool using the code snippet
21957    for ac_prog in ldd
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_LDD+:} false; then :
21964  $as_echo_n "(cached) " >&6
21965else
21966  case $LDD in
21967  [\\/]* | ?:[\\/]*)
21968  ac_cv_path_LDD="$LDD" # 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_LDD="$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
21989LDD=$ac_cv_path_LDD
21990if test -n "$LDD"; then
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21992$as_echo "$LDD" >&6; }
21993else
21994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21995$as_echo "no" >&6; }
21996fi
21997
21998
21999  test -n "$LDD" && break
22000done
22001
22002  else
22003    # The variable is set, but is it from the command line or the environment?
22004
22005    # Try to remove the string !LDD! from our list.
22006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
22007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22008      # If it failed, the variable was not from the command line. Ignore it,
22009      # but warn the user (except for BASH, which is always set by the calling BASH).
22010      if test "xLDD" != xBASH; then
22011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
22012$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
22013      fi
22014      # Try to locate tool using the code snippet
22015      for ac_prog in ldd
22016do
22017  # Extract the first word of "$ac_prog", so it can be a program name with args.
22018set dummy $ac_prog; ac_word=$2
22019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22020$as_echo_n "checking for $ac_word... " >&6; }
22021if ${ac_cv_path_LDD+:} false; then :
22022  $as_echo_n "(cached) " >&6
22023else
22024  case $LDD in
22025  [\\/]* | ?:[\\/]*)
22026  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22027  ;;
22028  *)
22029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22030for as_dir in $PATH
22031do
22032  IFS=$as_save_IFS
22033  test -z "$as_dir" && as_dir=.
22034    for ac_exec_ext in '' $ac_executable_extensions; do
22035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22036    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22038    break 2
22039  fi
22040done
22041  done
22042IFS=$as_save_IFS
22043
22044  ;;
22045esac
22046fi
22047LDD=$ac_cv_path_LDD
22048if test -n "$LDD"; then
22049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22050$as_echo "$LDD" >&6; }
22051else
22052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22053$as_echo "no" >&6; }
22054fi
22055
22056
22057  test -n "$LDD" && break
22058done
22059
22060    else
22061      # If it succeeded, then it was overridden by the user. We will use it
22062      # for the tool.
22063
22064      # First remove it from the list of overridden variables, so we can test
22065      # for unknown variables in the end.
22066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22067
22068      # Check if we try to supply an empty value
22069      if test "x$LDD" = x; then
22070        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22071$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22073$as_echo_n "checking for LDD... " >&6; }
22074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22075$as_echo "disabled" >&6; }
22076      else
22077        # Check if the provided tool contains a complete path.
22078        tool_specified="$LDD"
22079        tool_basename="${tool_specified##*/}"
22080        if test "x$tool_basename" = "x$tool_specified"; then
22081          # A command without a complete path is provided, search $PATH.
22082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22083$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22084          # Extract the first word of "$tool_basename", so it can be a program name with args.
22085set dummy $tool_basename; ac_word=$2
22086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22087$as_echo_n "checking for $ac_word... " >&6; }
22088if ${ac_cv_path_LDD+:} false; then :
22089  $as_echo_n "(cached) " >&6
22090else
22091  case $LDD in
22092  [\\/]* | ?:[\\/]*)
22093  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22094  ;;
22095  *)
22096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22097for as_dir in $PATH
22098do
22099  IFS=$as_save_IFS
22100  test -z "$as_dir" && as_dir=.
22101    for ac_exec_ext in '' $ac_executable_extensions; do
22102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22103    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22105    break 2
22106  fi
22107done
22108  done
22109IFS=$as_save_IFS
22110
22111  ;;
22112esac
22113fi
22114LDD=$ac_cv_path_LDD
22115if test -n "$LDD"; then
22116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22117$as_echo "$LDD" >&6; }
22118else
22119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22120$as_echo "no" >&6; }
22121fi
22122
22123
22124          if test "x$LDD" = x; then
22125            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22126          fi
22127        else
22128          # Otherwise we believe it is a complete path. Use it as it is.
22129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22130$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22131          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22132$as_echo_n "checking for LDD... " >&6; }
22133          if test ! -x "$tool_specified"; then
22134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22135$as_echo "not found" >&6; }
22136            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22137          fi
22138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22139$as_echo "$tool_specified" >&6; }
22140        fi
22141      fi
22142    fi
22143
22144  fi
22145
22146
22147  if test "x$LDD" = "x"; then
22148    # List shared lib dependencies is used for
22149    # debug output and checking for forbidden dependencies.
22150    # We can build without it.
22151    LDD="true"
22152  fi
22153
22154
22155  # Publish this variable in the help.
22156
22157
22158  if [ -z "${OTOOL+x}" ]; then
22159    # The variable is not set by user, try to locate tool using the code snippet
22160    for ac_prog in otool
22161do
22162  # Extract the first word of "$ac_prog", so it can be a program name with args.
22163set dummy $ac_prog; ac_word=$2
22164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22165$as_echo_n "checking for $ac_word... " >&6; }
22166if ${ac_cv_path_OTOOL+:} false; then :
22167  $as_echo_n "(cached) " >&6
22168else
22169  case $OTOOL in
22170  [\\/]* | ?:[\\/]*)
22171  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22172  ;;
22173  *)
22174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22175for as_dir in $PATH
22176do
22177  IFS=$as_save_IFS
22178  test -z "$as_dir" && as_dir=.
22179    for ac_exec_ext in '' $ac_executable_extensions; do
22180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22181    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22183    break 2
22184  fi
22185done
22186  done
22187IFS=$as_save_IFS
22188
22189  ;;
22190esac
22191fi
22192OTOOL=$ac_cv_path_OTOOL
22193if test -n "$OTOOL"; then
22194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22195$as_echo "$OTOOL" >&6; }
22196else
22197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22198$as_echo "no" >&6; }
22199fi
22200
22201
22202  test -n "$OTOOL" && break
22203done
22204
22205  else
22206    # The variable is set, but is it from the command line or the environment?
22207
22208    # Try to remove the string !OTOOL! from our list.
22209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22211      # If it failed, the variable was not from the command line. Ignore it,
22212      # but warn the user (except for BASH, which is always set by the calling BASH).
22213      if test "xOTOOL" != xBASH; then
22214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22215$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22216      fi
22217      # Try to locate tool using the code snippet
22218      for ac_prog in otool
22219do
22220  # Extract the first word of "$ac_prog", so it can be a program name with args.
22221set dummy $ac_prog; ac_word=$2
22222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22223$as_echo_n "checking for $ac_word... " >&6; }
22224if ${ac_cv_path_OTOOL+:} false; then :
22225  $as_echo_n "(cached) " >&6
22226else
22227  case $OTOOL in
22228  [\\/]* | ?:[\\/]*)
22229  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22230  ;;
22231  *)
22232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22233for as_dir in $PATH
22234do
22235  IFS=$as_save_IFS
22236  test -z "$as_dir" && as_dir=.
22237    for ac_exec_ext in '' $ac_executable_extensions; do
22238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22239    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22241    break 2
22242  fi
22243done
22244  done
22245IFS=$as_save_IFS
22246
22247  ;;
22248esac
22249fi
22250OTOOL=$ac_cv_path_OTOOL
22251if test -n "$OTOOL"; then
22252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22253$as_echo "$OTOOL" >&6; }
22254else
22255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22256$as_echo "no" >&6; }
22257fi
22258
22259
22260  test -n "$OTOOL" && break
22261done
22262
22263    else
22264      # If it succeeded, then it was overridden by the user. We will use it
22265      # for the tool.
22266
22267      # First remove it from the list of overridden variables, so we can test
22268      # for unknown variables in the end.
22269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22270
22271      # Check if we try to supply an empty value
22272      if test "x$OTOOL" = x; then
22273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22274$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22276$as_echo_n "checking for OTOOL... " >&6; }
22277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22278$as_echo "disabled" >&6; }
22279      else
22280        # Check if the provided tool contains a complete path.
22281        tool_specified="$OTOOL"
22282        tool_basename="${tool_specified##*/}"
22283        if test "x$tool_basename" = "x$tool_specified"; then
22284          # A command without a complete path is provided, search $PATH.
22285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22286$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22287          # Extract the first word of "$tool_basename", so it can be a program name with args.
22288set dummy $tool_basename; ac_word=$2
22289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22290$as_echo_n "checking for $ac_word... " >&6; }
22291if ${ac_cv_path_OTOOL+:} false; then :
22292  $as_echo_n "(cached) " >&6
22293else
22294  case $OTOOL in
22295  [\\/]* | ?:[\\/]*)
22296  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22297  ;;
22298  *)
22299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22300for as_dir in $PATH
22301do
22302  IFS=$as_save_IFS
22303  test -z "$as_dir" && as_dir=.
22304    for ac_exec_ext in '' $ac_executable_extensions; do
22305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22306    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22308    break 2
22309  fi
22310done
22311  done
22312IFS=$as_save_IFS
22313
22314  ;;
22315esac
22316fi
22317OTOOL=$ac_cv_path_OTOOL
22318if test -n "$OTOOL"; then
22319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22320$as_echo "$OTOOL" >&6; }
22321else
22322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22323$as_echo "no" >&6; }
22324fi
22325
22326
22327          if test "x$OTOOL" = x; then
22328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22329          fi
22330        else
22331          # Otherwise we believe it is a complete path. Use it as it is.
22332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22333$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22335$as_echo_n "checking for OTOOL... " >&6; }
22336          if test ! -x "$tool_specified"; then
22337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22338$as_echo "not found" >&6; }
22339            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22340          fi
22341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22342$as_echo "$tool_specified" >&6; }
22343        fi
22344      fi
22345    fi
22346
22347  fi
22348
22349
22350  if test "x$OTOOL" = "x"; then
22351    OTOOL="true"
22352  fi
22353
22354
22355  # Publish this variable in the help.
22356
22357
22358  if [ -z "${READELF+x}" ]; then
22359    # The variable is not set by user, try to locate tool using the code snippet
22360    for ac_prog in greadelf readelf
22361do
22362  # Extract the first word of "$ac_prog", so it can be a program name with args.
22363set dummy $ac_prog; ac_word=$2
22364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22365$as_echo_n "checking for $ac_word... " >&6; }
22366if ${ac_cv_path_READELF+:} false; then :
22367  $as_echo_n "(cached) " >&6
22368else
22369  case $READELF in
22370  [\\/]* | ?:[\\/]*)
22371  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22372  ;;
22373  *)
22374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22375for as_dir in $PATH
22376do
22377  IFS=$as_save_IFS
22378  test -z "$as_dir" && as_dir=.
22379    for ac_exec_ext in '' $ac_executable_extensions; do
22380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22381    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22383    break 2
22384  fi
22385done
22386  done
22387IFS=$as_save_IFS
22388
22389  ;;
22390esac
22391fi
22392READELF=$ac_cv_path_READELF
22393if test -n "$READELF"; then
22394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22395$as_echo "$READELF" >&6; }
22396else
22397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22398$as_echo "no" >&6; }
22399fi
22400
22401
22402  test -n "$READELF" && break
22403done
22404
22405  else
22406    # The variable is set, but is it from the command line or the environment?
22407
22408    # Try to remove the string !READELF! from our list.
22409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22411      # If it failed, the variable was not from the command line. Ignore it,
22412      # but warn the user (except for BASH, which is always set by the calling BASH).
22413      if test "xREADELF" != xBASH; then
22414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22415$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22416      fi
22417      # Try to locate tool using the code snippet
22418      for ac_prog in greadelf readelf
22419do
22420  # Extract the first word of "$ac_prog", so it can be a program name with args.
22421set dummy $ac_prog; 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_READELF+:} false; then :
22425  $as_echo_n "(cached) " >&6
22426else
22427  case $READELF in
22428  [\\/]* | ?:[\\/]*)
22429  ac_cv_path_READELF="$READELF" # 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_READELF="$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
22450READELF=$ac_cv_path_READELF
22451if test -n "$READELF"; then
22452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22453$as_echo "$READELF" >&6; }
22454else
22455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22456$as_echo "no" >&6; }
22457fi
22458
22459
22460  test -n "$READELF" && break
22461done
22462
22463    else
22464      # If it succeeded, then it was overridden by the user. We will use it
22465      # for the tool.
22466
22467      # First remove it from the list of overridden variables, so we can test
22468      # for unknown variables in the end.
22469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22470
22471      # Check if we try to supply an empty value
22472      if test "x$READELF" = x; then
22473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22474$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22476$as_echo_n "checking for READELF... " >&6; }
22477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22478$as_echo "disabled" >&6; }
22479      else
22480        # Check if the provided tool contains a complete path.
22481        tool_specified="$READELF"
22482        tool_basename="${tool_specified##*/}"
22483        if test "x$tool_basename" = "x$tool_specified"; then
22484          # A command without a complete path is provided, search $PATH.
22485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22486$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22487          # Extract the first word of "$tool_basename", so it can be a program name with args.
22488set dummy $tool_basename; ac_word=$2
22489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22490$as_echo_n "checking for $ac_word... " >&6; }
22491if ${ac_cv_path_READELF+:} false; then :
22492  $as_echo_n "(cached) " >&6
22493else
22494  case $READELF in
22495  [\\/]* | ?:[\\/]*)
22496  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22497  ;;
22498  *)
22499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22500for as_dir in $PATH
22501do
22502  IFS=$as_save_IFS
22503  test -z "$as_dir" && as_dir=.
22504    for ac_exec_ext in '' $ac_executable_extensions; do
22505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22506    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22508    break 2
22509  fi
22510done
22511  done
22512IFS=$as_save_IFS
22513
22514  ;;
22515esac
22516fi
22517READELF=$ac_cv_path_READELF
22518if test -n "$READELF"; then
22519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22520$as_echo "$READELF" >&6; }
22521else
22522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22523$as_echo "no" >&6; }
22524fi
22525
22526
22527          if test "x$READELF" = x; then
22528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22529          fi
22530        else
22531          # Otherwise we believe it is a complete path. Use it as it is.
22532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22533$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22535$as_echo_n "checking for READELF... " >&6; }
22536          if test ! -x "$tool_specified"; then
22537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22538$as_echo "not found" >&6; }
22539            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22540          fi
22541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22542$as_echo "$tool_specified" >&6; }
22543        fi
22544      fi
22545    fi
22546
22547  fi
22548
22549
22550
22551
22552  # Publish this variable in the help.
22553
22554
22555  if [ -z "${DOT+x}" ]; then
22556    # The variable is not set by user, try to locate tool using the code snippet
22557    for ac_prog in dot
22558do
22559  # Extract the first word of "$ac_prog", so it can be a program name with args.
22560set dummy $ac_prog; ac_word=$2
22561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22562$as_echo_n "checking for $ac_word... " >&6; }
22563if ${ac_cv_path_DOT+:} false; then :
22564  $as_echo_n "(cached) " >&6
22565else
22566  case $DOT in
22567  [\\/]* | ?:[\\/]*)
22568  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22569  ;;
22570  *)
22571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22572for as_dir in $PATH
22573do
22574  IFS=$as_save_IFS
22575  test -z "$as_dir" && as_dir=.
22576    for ac_exec_ext in '' $ac_executable_extensions; do
22577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22578    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22580    break 2
22581  fi
22582done
22583  done
22584IFS=$as_save_IFS
22585
22586  ;;
22587esac
22588fi
22589DOT=$ac_cv_path_DOT
22590if test -n "$DOT"; then
22591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22592$as_echo "$DOT" >&6; }
22593else
22594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22595$as_echo "no" >&6; }
22596fi
22597
22598
22599  test -n "$DOT" && break
22600done
22601
22602  else
22603    # The variable is set, but is it from the command line or the environment?
22604
22605    # Try to remove the string !DOT! from our list.
22606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22608      # If it failed, the variable was not from the command line. Ignore it,
22609      # but warn the user (except for BASH, which is always set by the calling BASH).
22610      if test "xDOT" != xBASH; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22612$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22613      fi
22614      # Try to locate tool using the code snippet
22615      for ac_prog in dot
22616do
22617  # Extract the first word of "$ac_prog", so it can be a program name with args.
22618set dummy $ac_prog; 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_DOT+:} false; then :
22622  $as_echo_n "(cached) " >&6
22623else
22624  case $DOT in
22625  [\\/]* | ?:[\\/]*)
22626  ac_cv_path_DOT="$DOT" # 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_DOT="$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
22647DOT=$ac_cv_path_DOT
22648if test -n "$DOT"; then
22649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22650$as_echo "$DOT" >&6; }
22651else
22652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22653$as_echo "no" >&6; }
22654fi
22655
22656
22657  test -n "$DOT" && break
22658done
22659
22660    else
22661      # If it succeeded, then it was overridden by the user. We will use it
22662      # for the tool.
22663
22664      # First remove it from the list of overridden variables, so we can test
22665      # for unknown variables in the end.
22666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22667
22668      # Check if we try to supply an empty value
22669      if test "x$DOT" = x; then
22670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22671$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22673$as_echo_n "checking for DOT... " >&6; }
22674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22675$as_echo "disabled" >&6; }
22676      else
22677        # Check if the provided tool contains a complete path.
22678        tool_specified="$DOT"
22679        tool_basename="${tool_specified##*/}"
22680        if test "x$tool_basename" = "x$tool_specified"; then
22681          # A command without a complete path is provided, search $PATH.
22682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22683$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22684          # Extract the first word of "$tool_basename", so it can be a program name with args.
22685set dummy $tool_basename; ac_word=$2
22686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22687$as_echo_n "checking for $ac_word... " >&6; }
22688if ${ac_cv_path_DOT+:} false; then :
22689  $as_echo_n "(cached) " >&6
22690else
22691  case $DOT in
22692  [\\/]* | ?:[\\/]*)
22693  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22694  ;;
22695  *)
22696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22697for as_dir in $PATH
22698do
22699  IFS=$as_save_IFS
22700  test -z "$as_dir" && as_dir=.
22701    for ac_exec_ext in '' $ac_executable_extensions; do
22702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22703    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22705    break 2
22706  fi
22707done
22708  done
22709IFS=$as_save_IFS
22710
22711  ;;
22712esac
22713fi
22714DOT=$ac_cv_path_DOT
22715if test -n "$DOT"; then
22716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22717$as_echo "$DOT" >&6; }
22718else
22719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22720$as_echo "no" >&6; }
22721fi
22722
22723
22724          if test "x$DOT" = x; then
22725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22726          fi
22727        else
22728          # Otherwise we believe it is a complete path. Use it as it is.
22729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22730$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22732$as_echo_n "checking for DOT... " >&6; }
22733          if test ! -x "$tool_specified"; then
22734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22735$as_echo "not found" >&6; }
22736            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22737          fi
22738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22739$as_echo "$tool_specified" >&6; }
22740        fi
22741      fi
22742    fi
22743
22744  fi
22745
22746
22747
22748
22749  # Publish this variable in the help.
22750
22751
22752  if [ -z "${HG+x}" ]; then
22753    # The variable is not set by user, try to locate tool using the code snippet
22754    for ac_prog in hg
22755do
22756  # Extract the first word of "$ac_prog", so it can be a program name with args.
22757set dummy $ac_prog; ac_word=$2
22758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22759$as_echo_n "checking for $ac_word... " >&6; }
22760if ${ac_cv_path_HG+:} false; then :
22761  $as_echo_n "(cached) " >&6
22762else
22763  case $HG in
22764  [\\/]* | ?:[\\/]*)
22765  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22766  ;;
22767  *)
22768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22769for as_dir in $PATH
22770do
22771  IFS=$as_save_IFS
22772  test -z "$as_dir" && as_dir=.
22773    for ac_exec_ext in '' $ac_executable_extensions; do
22774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22775    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22777    break 2
22778  fi
22779done
22780  done
22781IFS=$as_save_IFS
22782
22783  ;;
22784esac
22785fi
22786HG=$ac_cv_path_HG
22787if test -n "$HG"; then
22788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22789$as_echo "$HG" >&6; }
22790else
22791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22792$as_echo "no" >&6; }
22793fi
22794
22795
22796  test -n "$HG" && break
22797done
22798
22799  else
22800    # The variable is set, but is it from the command line or the environment?
22801
22802    # Try to remove the string !HG! from our list.
22803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22805      # If it failed, the variable was not from the command line. Ignore it,
22806      # but warn the user (except for BASH, which is always set by the calling BASH).
22807      if test "xHG" != xBASH; then
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22809$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22810      fi
22811      # Try to locate tool using the code snippet
22812      for ac_prog in hg
22813do
22814  # Extract the first word of "$ac_prog", so it can be a program name with args.
22815set dummy $ac_prog; ac_word=$2
22816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22817$as_echo_n "checking for $ac_word... " >&6; }
22818if ${ac_cv_path_HG+:} false; then :
22819  $as_echo_n "(cached) " >&6
22820else
22821  case $HG in
22822  [\\/]* | ?:[\\/]*)
22823  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22824  ;;
22825  *)
22826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22827for as_dir in $PATH
22828do
22829  IFS=$as_save_IFS
22830  test -z "$as_dir" && as_dir=.
22831    for ac_exec_ext in '' $ac_executable_extensions; do
22832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22833    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22835    break 2
22836  fi
22837done
22838  done
22839IFS=$as_save_IFS
22840
22841  ;;
22842esac
22843fi
22844HG=$ac_cv_path_HG
22845if test -n "$HG"; then
22846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22847$as_echo "$HG" >&6; }
22848else
22849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22850$as_echo "no" >&6; }
22851fi
22852
22853
22854  test -n "$HG" && break
22855done
22856
22857    else
22858      # If it succeeded, then it was overridden by the user. We will use it
22859      # for the tool.
22860
22861      # First remove it from the list of overridden variables, so we can test
22862      # for unknown variables in the end.
22863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22864
22865      # Check if we try to supply an empty value
22866      if test "x$HG" = x; then
22867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22868$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22870$as_echo_n "checking for HG... " >&6; }
22871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22872$as_echo "disabled" >&6; }
22873      else
22874        # Check if the provided tool contains a complete path.
22875        tool_specified="$HG"
22876        tool_basename="${tool_specified##*/}"
22877        if test "x$tool_basename" = "x$tool_specified"; then
22878          # A command without a complete path is provided, search $PATH.
22879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22880$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22881          # Extract the first word of "$tool_basename", so it can be a program name with args.
22882set dummy $tool_basename; ac_word=$2
22883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22884$as_echo_n "checking for $ac_word... " >&6; }
22885if ${ac_cv_path_HG+:} false; then :
22886  $as_echo_n "(cached) " >&6
22887else
22888  case $HG in
22889  [\\/]* | ?:[\\/]*)
22890  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22891  ;;
22892  *)
22893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22894for as_dir in $PATH
22895do
22896  IFS=$as_save_IFS
22897  test -z "$as_dir" && as_dir=.
22898    for ac_exec_ext in '' $ac_executable_extensions; do
22899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22900    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22902    break 2
22903  fi
22904done
22905  done
22906IFS=$as_save_IFS
22907
22908  ;;
22909esac
22910fi
22911HG=$ac_cv_path_HG
22912if test -n "$HG"; then
22913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22914$as_echo "$HG" >&6; }
22915else
22916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22917$as_echo "no" >&6; }
22918fi
22919
22920
22921          if test "x$HG" = x; then
22922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22923          fi
22924        else
22925          # Otherwise we believe it is a complete path. Use it as it is.
22926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22927$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22929$as_echo_n "checking for HG... " >&6; }
22930          if test ! -x "$tool_specified"; then
22931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22932$as_echo "not found" >&6; }
22933            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22934          fi
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22936$as_echo "$tool_specified" >&6; }
22937        fi
22938      fi
22939    fi
22940
22941  fi
22942
22943
22944
22945
22946  # Publish this variable in the help.
22947
22948
22949  if [ -z "${STAT+x}" ]; then
22950    # The variable is not set by user, try to locate tool using the code snippet
22951    for ac_prog in stat
22952do
22953  # Extract the first word of "$ac_prog", so it can be a program name with args.
22954set dummy $ac_prog; ac_word=$2
22955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22956$as_echo_n "checking for $ac_word... " >&6; }
22957if ${ac_cv_path_STAT+:} false; then :
22958  $as_echo_n "(cached) " >&6
22959else
22960  case $STAT in
22961  [\\/]* | ?:[\\/]*)
22962  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22963  ;;
22964  *)
22965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22966for as_dir in $PATH
22967do
22968  IFS=$as_save_IFS
22969  test -z "$as_dir" && as_dir=.
22970    for ac_exec_ext in '' $ac_executable_extensions; do
22971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22972    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22974    break 2
22975  fi
22976done
22977  done
22978IFS=$as_save_IFS
22979
22980  ;;
22981esac
22982fi
22983STAT=$ac_cv_path_STAT
22984if test -n "$STAT"; then
22985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22986$as_echo "$STAT" >&6; }
22987else
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22989$as_echo "no" >&6; }
22990fi
22991
22992
22993  test -n "$STAT" && break
22994done
22995
22996  else
22997    # The variable is set, but is it from the command line or the environment?
22998
22999    # Try to remove the string !STAT! from our list.
23000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
23001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23002      # If it failed, the variable was not from the command line. Ignore it,
23003      # but warn the user (except for BASH, which is always set by the calling BASH).
23004      if test "xSTAT" != xBASH; then
23005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
23006$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
23007      fi
23008      # Try to locate tool using the code snippet
23009      for ac_prog in stat
23010do
23011  # Extract the first word of "$ac_prog", so it can be a program name with args.
23012set dummy $ac_prog; ac_word=$2
23013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23014$as_echo_n "checking for $ac_word... " >&6; }
23015if ${ac_cv_path_STAT+:} false; then :
23016  $as_echo_n "(cached) " >&6
23017else
23018  case $STAT in
23019  [\\/]* | ?:[\\/]*)
23020  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23021  ;;
23022  *)
23023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23024for as_dir in $PATH
23025do
23026  IFS=$as_save_IFS
23027  test -z "$as_dir" && as_dir=.
23028    for ac_exec_ext in '' $ac_executable_extensions; do
23029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23030    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23032    break 2
23033  fi
23034done
23035  done
23036IFS=$as_save_IFS
23037
23038  ;;
23039esac
23040fi
23041STAT=$ac_cv_path_STAT
23042if test -n "$STAT"; then
23043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23044$as_echo "$STAT" >&6; }
23045else
23046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23047$as_echo "no" >&6; }
23048fi
23049
23050
23051  test -n "$STAT" && break
23052done
23053
23054    else
23055      # If it succeeded, then it was overridden by the user. We will use it
23056      # for the tool.
23057
23058      # First remove it from the list of overridden variables, so we can test
23059      # for unknown variables in the end.
23060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23061
23062      # Check if we try to supply an empty value
23063      if test "x$STAT" = x; then
23064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23065$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23067$as_echo_n "checking for STAT... " >&6; }
23068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23069$as_echo "disabled" >&6; }
23070      else
23071        # Check if the provided tool contains a complete path.
23072        tool_specified="$STAT"
23073        tool_basename="${tool_specified##*/}"
23074        if test "x$tool_basename" = "x$tool_specified"; then
23075          # A command without a complete path is provided, search $PATH.
23076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23077$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23078          # Extract the first word of "$tool_basename", so it can be a program name with args.
23079set dummy $tool_basename; ac_word=$2
23080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23081$as_echo_n "checking for $ac_word... " >&6; }
23082if ${ac_cv_path_STAT+:} false; then :
23083  $as_echo_n "(cached) " >&6
23084else
23085  case $STAT in
23086  [\\/]* | ?:[\\/]*)
23087  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23088  ;;
23089  *)
23090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23091for as_dir in $PATH
23092do
23093  IFS=$as_save_IFS
23094  test -z "$as_dir" && as_dir=.
23095    for ac_exec_ext in '' $ac_executable_extensions; do
23096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23097    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23099    break 2
23100  fi
23101done
23102  done
23103IFS=$as_save_IFS
23104
23105  ;;
23106esac
23107fi
23108STAT=$ac_cv_path_STAT
23109if test -n "$STAT"; then
23110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23111$as_echo "$STAT" >&6; }
23112else
23113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23114$as_echo "no" >&6; }
23115fi
23116
23117
23118          if test "x$STAT" = x; then
23119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23120          fi
23121        else
23122          # Otherwise we believe it is a complete path. Use it as it is.
23123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23124$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23126$as_echo_n "checking for STAT... " >&6; }
23127          if test ! -x "$tool_specified"; then
23128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23129$as_echo "not found" >&6; }
23130            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23131          fi
23132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23133$as_echo "$tool_specified" >&6; }
23134        fi
23135      fi
23136    fi
23137
23138  fi
23139
23140
23141
23142
23143  # Publish this variable in the help.
23144
23145
23146  if [ -z "${TIME+x}" ]; then
23147    # The variable is not set by user, try to locate tool using the code snippet
23148    for ac_prog in time
23149do
23150  # Extract the first word of "$ac_prog", so it can be a program name with args.
23151set dummy $ac_prog; ac_word=$2
23152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23153$as_echo_n "checking for $ac_word... " >&6; }
23154if ${ac_cv_path_TIME+:} false; then :
23155  $as_echo_n "(cached) " >&6
23156else
23157  case $TIME in
23158  [\\/]* | ?:[\\/]*)
23159  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23160  ;;
23161  *)
23162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23163for as_dir in $PATH
23164do
23165  IFS=$as_save_IFS
23166  test -z "$as_dir" && as_dir=.
23167    for ac_exec_ext in '' $ac_executable_extensions; do
23168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23169    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23171    break 2
23172  fi
23173done
23174  done
23175IFS=$as_save_IFS
23176
23177  ;;
23178esac
23179fi
23180TIME=$ac_cv_path_TIME
23181if test -n "$TIME"; then
23182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23183$as_echo "$TIME" >&6; }
23184else
23185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23186$as_echo "no" >&6; }
23187fi
23188
23189
23190  test -n "$TIME" && break
23191done
23192
23193  else
23194    # The variable is set, but is it from the command line or the environment?
23195
23196    # Try to remove the string !TIME! from our list.
23197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23199      # If it failed, the variable was not from the command line. Ignore it,
23200      # but warn the user (except for BASH, which is always set by the calling BASH).
23201      if test "xTIME" != xBASH; then
23202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23203$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23204      fi
23205      # Try to locate tool using the code snippet
23206      for ac_prog in time
23207do
23208  # Extract the first word of "$ac_prog", so it can be a program name with args.
23209set dummy $ac_prog; ac_word=$2
23210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23211$as_echo_n "checking for $ac_word... " >&6; }
23212if ${ac_cv_path_TIME+:} false; then :
23213  $as_echo_n "(cached) " >&6
23214else
23215  case $TIME in
23216  [\\/]* | ?:[\\/]*)
23217  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23218  ;;
23219  *)
23220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23221for as_dir in $PATH
23222do
23223  IFS=$as_save_IFS
23224  test -z "$as_dir" && as_dir=.
23225    for ac_exec_ext in '' $ac_executable_extensions; do
23226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23227    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23229    break 2
23230  fi
23231done
23232  done
23233IFS=$as_save_IFS
23234
23235  ;;
23236esac
23237fi
23238TIME=$ac_cv_path_TIME
23239if test -n "$TIME"; then
23240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23241$as_echo "$TIME" >&6; }
23242else
23243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23244$as_echo "no" >&6; }
23245fi
23246
23247
23248  test -n "$TIME" && break
23249done
23250
23251    else
23252      # If it succeeded, then it was overridden by the user. We will use it
23253      # for the tool.
23254
23255      # First remove it from the list of overridden variables, so we can test
23256      # for unknown variables in the end.
23257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23258
23259      # Check if we try to supply an empty value
23260      if test "x$TIME" = x; then
23261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23262$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23264$as_echo_n "checking for TIME... " >&6; }
23265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23266$as_echo "disabled" >&6; }
23267      else
23268        # Check if the provided tool contains a complete path.
23269        tool_specified="$TIME"
23270        tool_basename="${tool_specified##*/}"
23271        if test "x$tool_basename" = "x$tool_specified"; then
23272          # A command without a complete path is provided, search $PATH.
23273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23274$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23275          # Extract the first word of "$tool_basename", so it can be a program name with args.
23276set dummy $tool_basename; ac_word=$2
23277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23278$as_echo_n "checking for $ac_word... " >&6; }
23279if ${ac_cv_path_TIME+:} false; then :
23280  $as_echo_n "(cached) " >&6
23281else
23282  case $TIME in
23283  [\\/]* | ?:[\\/]*)
23284  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23285  ;;
23286  *)
23287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23288for as_dir in $PATH
23289do
23290  IFS=$as_save_IFS
23291  test -z "$as_dir" && as_dir=.
23292    for ac_exec_ext in '' $ac_executable_extensions; do
23293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23294    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23296    break 2
23297  fi
23298done
23299  done
23300IFS=$as_save_IFS
23301
23302  ;;
23303esac
23304fi
23305TIME=$ac_cv_path_TIME
23306if test -n "$TIME"; then
23307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23308$as_echo "$TIME" >&6; }
23309else
23310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23311$as_echo "no" >&6; }
23312fi
23313
23314
23315          if test "x$TIME" = x; then
23316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23317          fi
23318        else
23319          # Otherwise we believe it is a complete path. Use it as it is.
23320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23321$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23323$as_echo_n "checking for TIME... " >&6; }
23324          if test ! -x "$tool_specified"; then
23325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23326$as_echo "not found" >&6; }
23327            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23328          fi
23329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23330$as_echo "$tool_specified" >&6; }
23331        fi
23332      fi
23333    fi
23334
23335  fi
23336
23337
23338
23339
23340  # Publish this variable in the help.
23341
23342
23343  if [ -z "${FLOCK+x}" ]; then
23344    # The variable is not set by user, try to locate tool using the code snippet
23345    for ac_prog in flock
23346do
23347  # Extract the first word of "$ac_prog", so it can be a program name with args.
23348set dummy $ac_prog; ac_word=$2
23349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23350$as_echo_n "checking for $ac_word... " >&6; }
23351if ${ac_cv_path_FLOCK+:} false; then :
23352  $as_echo_n "(cached) " >&6
23353else
23354  case $FLOCK in
23355  [\\/]* | ?:[\\/]*)
23356  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23357  ;;
23358  *)
23359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23360for as_dir in $PATH
23361do
23362  IFS=$as_save_IFS
23363  test -z "$as_dir" && as_dir=.
23364    for ac_exec_ext in '' $ac_executable_extensions; do
23365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23366    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23368    break 2
23369  fi
23370done
23371  done
23372IFS=$as_save_IFS
23373
23374  ;;
23375esac
23376fi
23377FLOCK=$ac_cv_path_FLOCK
23378if test -n "$FLOCK"; then
23379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23380$as_echo "$FLOCK" >&6; }
23381else
23382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23383$as_echo "no" >&6; }
23384fi
23385
23386
23387  test -n "$FLOCK" && break
23388done
23389
23390  else
23391    # The variable is set, but is it from the command line or the environment?
23392
23393    # Try to remove the string !FLOCK! from our list.
23394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23396      # If it failed, the variable was not from the command line. Ignore it,
23397      # but warn the user (except for BASH, which is always set by the calling BASH).
23398      if test "xFLOCK" != xBASH; then
23399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23400$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23401      fi
23402      # Try to locate tool using the code snippet
23403      for ac_prog in flock
23404do
23405  # Extract the first word of "$ac_prog", so it can be a program name with args.
23406set dummy $ac_prog; ac_word=$2
23407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23408$as_echo_n "checking for $ac_word... " >&6; }
23409if ${ac_cv_path_FLOCK+:} false; then :
23410  $as_echo_n "(cached) " >&6
23411else
23412  case $FLOCK in
23413  [\\/]* | ?:[\\/]*)
23414  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23415  ;;
23416  *)
23417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23418for as_dir in $PATH
23419do
23420  IFS=$as_save_IFS
23421  test -z "$as_dir" && as_dir=.
23422    for ac_exec_ext in '' $ac_executable_extensions; do
23423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23424    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23426    break 2
23427  fi
23428done
23429  done
23430IFS=$as_save_IFS
23431
23432  ;;
23433esac
23434fi
23435FLOCK=$ac_cv_path_FLOCK
23436if test -n "$FLOCK"; then
23437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23438$as_echo "$FLOCK" >&6; }
23439else
23440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23441$as_echo "no" >&6; }
23442fi
23443
23444
23445  test -n "$FLOCK" && break
23446done
23447
23448    else
23449      # If it succeeded, then it was overridden by the user. We will use it
23450      # for the tool.
23451
23452      # First remove it from the list of overridden variables, so we can test
23453      # for unknown variables in the end.
23454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23455
23456      # Check if we try to supply an empty value
23457      if test "x$FLOCK" = x; then
23458        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23459$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23461$as_echo_n "checking for FLOCK... " >&6; }
23462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23463$as_echo "disabled" >&6; }
23464      else
23465        # Check if the provided tool contains a complete path.
23466        tool_specified="$FLOCK"
23467        tool_basename="${tool_specified##*/}"
23468        if test "x$tool_basename" = "x$tool_specified"; then
23469          # A command without a complete path is provided, search $PATH.
23470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23471$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23472          # Extract the first word of "$tool_basename", so it can be a program name with args.
23473set dummy $tool_basename; ac_word=$2
23474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23475$as_echo_n "checking for $ac_word... " >&6; }
23476if ${ac_cv_path_FLOCK+:} false; then :
23477  $as_echo_n "(cached) " >&6
23478else
23479  case $FLOCK in
23480  [\\/]* | ?:[\\/]*)
23481  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23482  ;;
23483  *)
23484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23485for as_dir in $PATH
23486do
23487  IFS=$as_save_IFS
23488  test -z "$as_dir" && as_dir=.
23489    for ac_exec_ext in '' $ac_executable_extensions; do
23490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23491    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23493    break 2
23494  fi
23495done
23496  done
23497IFS=$as_save_IFS
23498
23499  ;;
23500esac
23501fi
23502FLOCK=$ac_cv_path_FLOCK
23503if test -n "$FLOCK"; then
23504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23505$as_echo "$FLOCK" >&6; }
23506else
23507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23508$as_echo "no" >&6; }
23509fi
23510
23511
23512          if test "x$FLOCK" = x; then
23513            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23514          fi
23515        else
23516          # Otherwise we believe it is a complete path. Use it as it is.
23517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23518$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23520$as_echo_n "checking for FLOCK... " >&6; }
23521          if test ! -x "$tool_specified"; then
23522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23523$as_echo "not found" >&6; }
23524            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23525          fi
23526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23527$as_echo "$tool_specified" >&6; }
23528        fi
23529      fi
23530    fi
23531
23532  fi
23533
23534
23535  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23536  # be in the user path.
23537
23538
23539  # Publish this variable in the help.
23540
23541
23542  if [ -z "${DTRACE+x}" ]; then
23543    # The variable is not set by user, try to locate tool using the code snippet
23544    for ac_prog in dtrace
23545do
23546  # Extract the first word of "$ac_prog", so it can be a program name with args.
23547set dummy $ac_prog; ac_word=$2
23548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23549$as_echo_n "checking for $ac_word... " >&6; }
23550if ${ac_cv_path_DTRACE+:} false; then :
23551  $as_echo_n "(cached) " >&6
23552else
23553  case $DTRACE in
23554  [\\/]* | ?:[\\/]*)
23555  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23556  ;;
23557  *)
23558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23559as_dummy="$PATH:/usr/sbin"
23560for as_dir in $as_dummy
23561do
23562  IFS=$as_save_IFS
23563  test -z "$as_dir" && as_dir=.
23564    for ac_exec_ext in '' $ac_executable_extensions; do
23565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23566    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23568    break 2
23569  fi
23570done
23571  done
23572IFS=$as_save_IFS
23573
23574  ;;
23575esac
23576fi
23577DTRACE=$ac_cv_path_DTRACE
23578if test -n "$DTRACE"; then
23579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23580$as_echo "$DTRACE" >&6; }
23581else
23582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23583$as_echo "no" >&6; }
23584fi
23585
23586
23587  test -n "$DTRACE" && break
23588done
23589
23590  else
23591    # The variable is set, but is it from the command line or the environment?
23592
23593    # Try to remove the string !DTRACE! from our list.
23594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23596      # If it failed, the variable was not from the command line. Ignore it,
23597      # but warn the user (except for BASH, which is always set by the calling BASH).
23598      if test "xDTRACE" != xBASH; then
23599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23600$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23601      fi
23602      # Try to locate tool using the code snippet
23603      for ac_prog in dtrace
23604do
23605  # Extract the first word of "$ac_prog", so it can be a program name with args.
23606set dummy $ac_prog; ac_word=$2
23607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23608$as_echo_n "checking for $ac_word... " >&6; }
23609if ${ac_cv_path_DTRACE+:} false; then :
23610  $as_echo_n "(cached) " >&6
23611else
23612  case $DTRACE in
23613  [\\/]* | ?:[\\/]*)
23614  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23615  ;;
23616  *)
23617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23618as_dummy="$PATH:/usr/sbin"
23619for as_dir in $as_dummy
23620do
23621  IFS=$as_save_IFS
23622  test -z "$as_dir" && as_dir=.
23623    for ac_exec_ext in '' $ac_executable_extensions; do
23624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23625    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23627    break 2
23628  fi
23629done
23630  done
23631IFS=$as_save_IFS
23632
23633  ;;
23634esac
23635fi
23636DTRACE=$ac_cv_path_DTRACE
23637if test -n "$DTRACE"; then
23638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23639$as_echo "$DTRACE" >&6; }
23640else
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23642$as_echo "no" >&6; }
23643fi
23644
23645
23646  test -n "$DTRACE" && break
23647done
23648
23649    else
23650      # If it succeeded, then it was overridden by the user. We will use it
23651      # for the tool.
23652
23653      # First remove it from the list of overridden variables, so we can test
23654      # for unknown variables in the end.
23655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23656
23657      # Check if we try to supply an empty value
23658      if test "x$DTRACE" = x; then
23659        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23660$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23661        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23662$as_echo_n "checking for DTRACE... " >&6; }
23663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23664$as_echo "disabled" >&6; }
23665      else
23666        # Check if the provided tool contains a complete path.
23667        tool_specified="$DTRACE"
23668        tool_basename="${tool_specified##*/}"
23669        if test "x$tool_basename" = "x$tool_specified"; then
23670          # A command without a complete path is provided, search $PATH.
23671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23672$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23673          # Extract the first word of "$tool_basename", so it can be a program name with args.
23674set dummy $tool_basename; ac_word=$2
23675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23676$as_echo_n "checking for $ac_word... " >&6; }
23677if ${ac_cv_path_DTRACE+:} false; then :
23678  $as_echo_n "(cached) " >&6
23679else
23680  case $DTRACE in
23681  [\\/]* | ?:[\\/]*)
23682  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23683  ;;
23684  *)
23685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23686for as_dir in $PATH
23687do
23688  IFS=$as_save_IFS
23689  test -z "$as_dir" && as_dir=.
23690    for ac_exec_ext in '' $ac_executable_extensions; do
23691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23692    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23694    break 2
23695  fi
23696done
23697  done
23698IFS=$as_save_IFS
23699
23700  ;;
23701esac
23702fi
23703DTRACE=$ac_cv_path_DTRACE
23704if test -n "$DTRACE"; then
23705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23706$as_echo "$DTRACE" >&6; }
23707else
23708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23709$as_echo "no" >&6; }
23710fi
23711
23712
23713          if test "x$DTRACE" = x; then
23714            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23715          fi
23716        else
23717          # Otherwise we believe it is a complete path. Use it as it is.
23718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23719$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23720          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23721$as_echo_n "checking for DTRACE... " >&6; }
23722          if test ! -x "$tool_specified"; then
23723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23724$as_echo "not found" >&6; }
23725            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23726          fi
23727          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23728$as_echo "$tool_specified" >&6; }
23729        fi
23730      fi
23731    fi
23732
23733  fi
23734
23735
23736
23737
23738  # Publish this variable in the help.
23739
23740
23741  if [ -z "${PATCH+x}" ]; then
23742    # The variable is not set by user, try to locate tool using the code snippet
23743    for ac_prog in gpatch patch
23744do
23745  # Extract the first word of "$ac_prog", so it can be a program name with args.
23746set dummy $ac_prog; ac_word=$2
23747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23748$as_echo_n "checking for $ac_word... " >&6; }
23749if ${ac_cv_path_PATCH+:} false; then :
23750  $as_echo_n "(cached) " >&6
23751else
23752  case $PATCH in
23753  [\\/]* | ?:[\\/]*)
23754  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23755  ;;
23756  *)
23757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23758for as_dir in $PATH
23759do
23760  IFS=$as_save_IFS
23761  test -z "$as_dir" && as_dir=.
23762    for ac_exec_ext in '' $ac_executable_extensions; do
23763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23764    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23766    break 2
23767  fi
23768done
23769  done
23770IFS=$as_save_IFS
23771
23772  ;;
23773esac
23774fi
23775PATCH=$ac_cv_path_PATCH
23776if test -n "$PATCH"; then
23777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23778$as_echo "$PATCH" >&6; }
23779else
23780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23781$as_echo "no" >&6; }
23782fi
23783
23784
23785  test -n "$PATCH" && break
23786done
23787
23788  else
23789    # The variable is set, but is it from the command line or the environment?
23790
23791    # Try to remove the string !PATCH! from our list.
23792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23794      # If it failed, the variable was not from the command line. Ignore it,
23795      # but warn the user (except for BASH, which is always set by the calling BASH).
23796      if test "xPATCH" != xBASH; then
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23798$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23799      fi
23800      # Try to locate tool using the code snippet
23801      for ac_prog in gpatch patch
23802do
23803  # Extract the first word of "$ac_prog", so it can be a program name with args.
23804set dummy $ac_prog; ac_word=$2
23805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23806$as_echo_n "checking for $ac_word... " >&6; }
23807if ${ac_cv_path_PATCH+:} false; then :
23808  $as_echo_n "(cached) " >&6
23809else
23810  case $PATCH in
23811  [\\/]* | ?:[\\/]*)
23812  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23813  ;;
23814  *)
23815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23816for as_dir in $PATH
23817do
23818  IFS=$as_save_IFS
23819  test -z "$as_dir" && as_dir=.
23820    for ac_exec_ext in '' $ac_executable_extensions; do
23821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23822    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23824    break 2
23825  fi
23826done
23827  done
23828IFS=$as_save_IFS
23829
23830  ;;
23831esac
23832fi
23833PATCH=$ac_cv_path_PATCH
23834if test -n "$PATCH"; then
23835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23836$as_echo "$PATCH" >&6; }
23837else
23838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23839$as_echo "no" >&6; }
23840fi
23841
23842
23843  test -n "$PATCH" && break
23844done
23845
23846    else
23847      # If it succeeded, then it was overridden by the user. We will use it
23848      # for the tool.
23849
23850      # First remove it from the list of overridden variables, so we can test
23851      # for unknown variables in the end.
23852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23853
23854      # Check if we try to supply an empty value
23855      if test "x$PATCH" = x; then
23856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23857$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23859$as_echo_n "checking for PATCH... " >&6; }
23860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23861$as_echo "disabled" >&6; }
23862      else
23863        # Check if the provided tool contains a complete path.
23864        tool_specified="$PATCH"
23865        tool_basename="${tool_specified##*/}"
23866        if test "x$tool_basename" = "x$tool_specified"; then
23867          # A command without a complete path is provided, search $PATH.
23868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23869$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23870          # Extract the first word of "$tool_basename", so it can be a program name with args.
23871set dummy $tool_basename; ac_word=$2
23872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23873$as_echo_n "checking for $ac_word... " >&6; }
23874if ${ac_cv_path_PATCH+:} false; then :
23875  $as_echo_n "(cached) " >&6
23876else
23877  case $PATCH in
23878  [\\/]* | ?:[\\/]*)
23879  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23880  ;;
23881  *)
23882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23883for as_dir in $PATH
23884do
23885  IFS=$as_save_IFS
23886  test -z "$as_dir" && as_dir=.
23887    for ac_exec_ext in '' $ac_executable_extensions; do
23888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23889    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23891    break 2
23892  fi
23893done
23894  done
23895IFS=$as_save_IFS
23896
23897  ;;
23898esac
23899fi
23900PATCH=$ac_cv_path_PATCH
23901if test -n "$PATCH"; then
23902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23903$as_echo "$PATCH" >&6; }
23904else
23905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23906$as_echo "no" >&6; }
23907fi
23908
23909
23910          if test "x$PATCH" = x; then
23911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23912          fi
23913        else
23914          # Otherwise we believe it is a complete path. Use it as it is.
23915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23916$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23918$as_echo_n "checking for PATCH... " >&6; }
23919          if test ! -x "$tool_specified"; then
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23921$as_echo "not found" >&6; }
23922            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23923          fi
23924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23925$as_echo "$tool_specified" >&6; }
23926        fi
23927      fi
23928    fi
23929
23930  fi
23931
23932
23933  # Check if it's GNU time
23934  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23935  if test "x$IS_GNU_TIME" != x; then
23936    IS_GNU_TIME=yes
23937  else
23938    IS_GNU_TIME=no
23939  fi
23940
23941
23942  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23943
23944
23945
23946  # Publish this variable in the help.
23947
23948
23949  if [ -z "${DSYMUTIL+x}" ]; then
23950    # The variable is not set by user, try to locate tool using the code snippet
23951    for ac_prog in dsymutil
23952do
23953  # Extract the first word of "$ac_prog", so it can be a program name with args.
23954set dummy $ac_prog; ac_word=$2
23955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23956$as_echo_n "checking for $ac_word... " >&6; }
23957if ${ac_cv_path_DSYMUTIL+:} false; then :
23958  $as_echo_n "(cached) " >&6
23959else
23960  case $DSYMUTIL in
23961  [\\/]* | ?:[\\/]*)
23962  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23963  ;;
23964  *)
23965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23966for as_dir in $PATH
23967do
23968  IFS=$as_save_IFS
23969  test -z "$as_dir" && as_dir=.
23970    for ac_exec_ext in '' $ac_executable_extensions; do
23971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23972    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23974    break 2
23975  fi
23976done
23977  done
23978IFS=$as_save_IFS
23979
23980  ;;
23981esac
23982fi
23983DSYMUTIL=$ac_cv_path_DSYMUTIL
23984if test -n "$DSYMUTIL"; then
23985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23986$as_echo "$DSYMUTIL" >&6; }
23987else
23988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23989$as_echo "no" >&6; }
23990fi
23991
23992
23993  test -n "$DSYMUTIL" && break
23994done
23995
23996  else
23997    # The variable is set, but is it from the command line or the environment?
23998
23999    # Try to remove the string !DSYMUTIL! from our list.
24000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
24001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24002      # If it failed, the variable was not from the command line. Ignore it,
24003      # but warn the user (except for BASH, which is always set by the calling BASH).
24004      if test "xDSYMUTIL" != xBASH; then
24005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
24006$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
24007      fi
24008      # Try to locate tool using the code snippet
24009      for ac_prog in dsymutil
24010do
24011  # Extract the first word of "$ac_prog", so it can be a program name with args.
24012set dummy $ac_prog; ac_word=$2
24013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24014$as_echo_n "checking for $ac_word... " >&6; }
24015if ${ac_cv_path_DSYMUTIL+:} false; then :
24016  $as_echo_n "(cached) " >&6
24017else
24018  case $DSYMUTIL in
24019  [\\/]* | ?:[\\/]*)
24020  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24021  ;;
24022  *)
24023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24024for as_dir in $PATH
24025do
24026  IFS=$as_save_IFS
24027  test -z "$as_dir" && as_dir=.
24028    for ac_exec_ext in '' $ac_executable_extensions; do
24029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24030    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24032    break 2
24033  fi
24034done
24035  done
24036IFS=$as_save_IFS
24037
24038  ;;
24039esac
24040fi
24041DSYMUTIL=$ac_cv_path_DSYMUTIL
24042if test -n "$DSYMUTIL"; then
24043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24044$as_echo "$DSYMUTIL" >&6; }
24045else
24046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24047$as_echo "no" >&6; }
24048fi
24049
24050
24051  test -n "$DSYMUTIL" && break
24052done
24053
24054    else
24055      # If it succeeded, then it was overridden by the user. We will use it
24056      # for the tool.
24057
24058      # First remove it from the list of overridden variables, so we can test
24059      # for unknown variables in the end.
24060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24061
24062      # Check if we try to supply an empty value
24063      if test "x$DSYMUTIL" = x; then
24064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24065$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24067$as_echo_n "checking for DSYMUTIL... " >&6; }
24068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24069$as_echo "disabled" >&6; }
24070      else
24071        # Check if the provided tool contains a complete path.
24072        tool_specified="$DSYMUTIL"
24073        tool_basename="${tool_specified##*/}"
24074        if test "x$tool_basename" = "x$tool_specified"; then
24075          # A command without a complete path is provided, search $PATH.
24076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24077$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24078          # Extract the first word of "$tool_basename", so it can be a program name with args.
24079set dummy $tool_basename; ac_word=$2
24080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24081$as_echo_n "checking for $ac_word... " >&6; }
24082if ${ac_cv_path_DSYMUTIL+:} false; then :
24083  $as_echo_n "(cached) " >&6
24084else
24085  case $DSYMUTIL in
24086  [\\/]* | ?:[\\/]*)
24087  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24088  ;;
24089  *)
24090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24091for as_dir in $PATH
24092do
24093  IFS=$as_save_IFS
24094  test -z "$as_dir" && as_dir=.
24095    for ac_exec_ext in '' $ac_executable_extensions; do
24096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24097    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24099    break 2
24100  fi
24101done
24102  done
24103IFS=$as_save_IFS
24104
24105  ;;
24106esac
24107fi
24108DSYMUTIL=$ac_cv_path_DSYMUTIL
24109if test -n "$DSYMUTIL"; then
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24111$as_echo "$DSYMUTIL" >&6; }
24112else
24113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24114$as_echo "no" >&6; }
24115fi
24116
24117
24118          if test "x$DSYMUTIL" = x; then
24119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24120          fi
24121        else
24122          # Otherwise we believe it is a complete path. Use it as it is.
24123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24124$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24126$as_echo_n "checking for DSYMUTIL... " >&6; }
24127          if test ! -x "$tool_specified"; then
24128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24129$as_echo "not found" >&6; }
24130            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24131          fi
24132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24133$as_echo "$tool_specified" >&6; }
24134        fi
24135      fi
24136    fi
24137
24138  fi
24139
24140
24141
24142  if test "x$DSYMUTIL" = x; then
24143    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24144  fi
24145
24146
24147
24148
24149
24150  # Publish this variable in the help.
24151
24152
24153  if [ -z "${XATTR+x}" ]; then
24154    # The variable is not set by user, try to locate tool using the code snippet
24155    for ac_prog in xattr
24156do
24157  # Extract the first word of "$ac_prog", so it can be a program name with args.
24158set dummy $ac_prog; ac_word=$2
24159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24160$as_echo_n "checking for $ac_word... " >&6; }
24161if ${ac_cv_path_XATTR+:} false; then :
24162  $as_echo_n "(cached) " >&6
24163else
24164  case $XATTR in
24165  [\\/]* | ?:[\\/]*)
24166  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24167  ;;
24168  *)
24169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24170for as_dir in $PATH
24171do
24172  IFS=$as_save_IFS
24173  test -z "$as_dir" && as_dir=.
24174    for ac_exec_ext in '' $ac_executable_extensions; do
24175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24176    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24178    break 2
24179  fi
24180done
24181  done
24182IFS=$as_save_IFS
24183
24184  ;;
24185esac
24186fi
24187XATTR=$ac_cv_path_XATTR
24188if test -n "$XATTR"; then
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24190$as_echo "$XATTR" >&6; }
24191else
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24193$as_echo "no" >&6; }
24194fi
24195
24196
24197  test -n "$XATTR" && break
24198done
24199
24200  else
24201    # The variable is set, but is it from the command line or the environment?
24202
24203    # Try to remove the string !XATTR! from our list.
24204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24206      # If it failed, the variable was not from the command line. Ignore it,
24207      # but warn the user (except for BASH, which is always set by the calling BASH).
24208      if test "xXATTR" != xBASH; then
24209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24210$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24211      fi
24212      # Try to locate tool using the code snippet
24213      for ac_prog in xattr
24214do
24215  # Extract the first word of "$ac_prog", so it can be a program name with args.
24216set dummy $ac_prog; ac_word=$2
24217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24218$as_echo_n "checking for $ac_word... " >&6; }
24219if ${ac_cv_path_XATTR+:} false; then :
24220  $as_echo_n "(cached) " >&6
24221else
24222  case $XATTR in
24223  [\\/]* | ?:[\\/]*)
24224  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24225  ;;
24226  *)
24227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24228for as_dir in $PATH
24229do
24230  IFS=$as_save_IFS
24231  test -z "$as_dir" && as_dir=.
24232    for ac_exec_ext in '' $ac_executable_extensions; do
24233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24234    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24236    break 2
24237  fi
24238done
24239  done
24240IFS=$as_save_IFS
24241
24242  ;;
24243esac
24244fi
24245XATTR=$ac_cv_path_XATTR
24246if test -n "$XATTR"; then
24247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24248$as_echo "$XATTR" >&6; }
24249else
24250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24251$as_echo "no" >&6; }
24252fi
24253
24254
24255  test -n "$XATTR" && break
24256done
24257
24258    else
24259      # If it succeeded, then it was overridden by the user. We will use it
24260      # for the tool.
24261
24262      # First remove it from the list of overridden variables, so we can test
24263      # for unknown variables in the end.
24264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24265
24266      # Check if we try to supply an empty value
24267      if test "x$XATTR" = x; then
24268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24269$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24271$as_echo_n "checking for XATTR... " >&6; }
24272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24273$as_echo "disabled" >&6; }
24274      else
24275        # Check if the provided tool contains a complete path.
24276        tool_specified="$XATTR"
24277        tool_basename="${tool_specified##*/}"
24278        if test "x$tool_basename" = "x$tool_specified"; then
24279          # A command without a complete path is provided, search $PATH.
24280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24281$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24282          # Extract the first word of "$tool_basename", so it can be a program name with args.
24283set dummy $tool_basename; ac_word=$2
24284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24285$as_echo_n "checking for $ac_word... " >&6; }
24286if ${ac_cv_path_XATTR+:} false; then :
24287  $as_echo_n "(cached) " >&6
24288else
24289  case $XATTR in
24290  [\\/]* | ?:[\\/]*)
24291  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24292  ;;
24293  *)
24294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24295for as_dir in $PATH
24296do
24297  IFS=$as_save_IFS
24298  test -z "$as_dir" && as_dir=.
24299    for ac_exec_ext in '' $ac_executable_extensions; do
24300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24301    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24303    break 2
24304  fi
24305done
24306  done
24307IFS=$as_save_IFS
24308
24309  ;;
24310esac
24311fi
24312XATTR=$ac_cv_path_XATTR
24313if test -n "$XATTR"; then
24314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24315$as_echo "$XATTR" >&6; }
24316else
24317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24318$as_echo "no" >&6; }
24319fi
24320
24321
24322          if test "x$XATTR" = x; then
24323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24324          fi
24325        else
24326          # Otherwise we believe it is a complete path. Use it as it is.
24327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24328$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24330$as_echo_n "checking for XATTR... " >&6; }
24331          if test ! -x "$tool_specified"; then
24332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24333$as_echo "not found" >&6; }
24334            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24335          fi
24336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24337$as_echo "$tool_specified" >&6; }
24338        fi
24339      fi
24340    fi
24341
24342  fi
24343
24344
24345
24346  if test "x$XATTR" = x; then
24347    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24348  fi
24349
24350
24351
24352
24353  # Publish this variable in the help.
24354
24355
24356  if [ -z "${CODESIGN+x}" ]; then
24357    # The variable is not set by user, try to locate tool using the code snippet
24358    for ac_prog in codesign
24359do
24360  # Extract the first word of "$ac_prog", so it can be a program name with args.
24361set dummy $ac_prog; ac_word=$2
24362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24363$as_echo_n "checking for $ac_word... " >&6; }
24364if ${ac_cv_path_CODESIGN+:} false; then :
24365  $as_echo_n "(cached) " >&6
24366else
24367  case $CODESIGN in
24368  [\\/]* | ?:[\\/]*)
24369  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24370  ;;
24371  *)
24372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24373for as_dir in $PATH
24374do
24375  IFS=$as_save_IFS
24376  test -z "$as_dir" && as_dir=.
24377    for ac_exec_ext in '' $ac_executable_extensions; do
24378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24379    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24381    break 2
24382  fi
24383done
24384  done
24385IFS=$as_save_IFS
24386
24387  ;;
24388esac
24389fi
24390CODESIGN=$ac_cv_path_CODESIGN
24391if test -n "$CODESIGN"; then
24392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24393$as_echo "$CODESIGN" >&6; }
24394else
24395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24396$as_echo "no" >&6; }
24397fi
24398
24399
24400  test -n "$CODESIGN" && break
24401done
24402
24403  else
24404    # The variable is set, but is it from the command line or the environment?
24405
24406    # Try to remove the string !CODESIGN! from our list.
24407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24409      # If it failed, the variable was not from the command line. Ignore it,
24410      # but warn the user (except for BASH, which is always set by the calling BASH).
24411      if test "xCODESIGN" != xBASH; then
24412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24413$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24414      fi
24415      # Try to locate tool using the code snippet
24416      for ac_prog in codesign
24417do
24418  # Extract the first word of "$ac_prog", so it can be a program name with args.
24419set dummy $ac_prog; ac_word=$2
24420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24421$as_echo_n "checking for $ac_word... " >&6; }
24422if ${ac_cv_path_CODESIGN+:} false; then :
24423  $as_echo_n "(cached) " >&6
24424else
24425  case $CODESIGN in
24426  [\\/]* | ?:[\\/]*)
24427  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24428  ;;
24429  *)
24430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24431for as_dir in $PATH
24432do
24433  IFS=$as_save_IFS
24434  test -z "$as_dir" && as_dir=.
24435    for ac_exec_ext in '' $ac_executable_extensions; do
24436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24437    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24439    break 2
24440  fi
24441done
24442  done
24443IFS=$as_save_IFS
24444
24445  ;;
24446esac
24447fi
24448CODESIGN=$ac_cv_path_CODESIGN
24449if test -n "$CODESIGN"; then
24450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24451$as_echo "$CODESIGN" >&6; }
24452else
24453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24454$as_echo "no" >&6; }
24455fi
24456
24457
24458  test -n "$CODESIGN" && break
24459done
24460
24461    else
24462      # If it succeeded, then it was overridden by the user. We will use it
24463      # for the tool.
24464
24465      # First remove it from the list of overridden variables, so we can test
24466      # for unknown variables in the end.
24467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24468
24469      # Check if we try to supply an empty value
24470      if test "x$CODESIGN" = x; then
24471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24472$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24474$as_echo_n "checking for CODESIGN... " >&6; }
24475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24476$as_echo "disabled" >&6; }
24477      else
24478        # Check if the provided tool contains a complete path.
24479        tool_specified="$CODESIGN"
24480        tool_basename="${tool_specified##*/}"
24481        if test "x$tool_basename" = "x$tool_specified"; then
24482          # A command without a complete path is provided, search $PATH.
24483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24484$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24485          # Extract the first word of "$tool_basename", so it can be a program name with args.
24486set dummy $tool_basename; ac_word=$2
24487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24488$as_echo_n "checking for $ac_word... " >&6; }
24489if ${ac_cv_path_CODESIGN+:} false; then :
24490  $as_echo_n "(cached) " >&6
24491else
24492  case $CODESIGN in
24493  [\\/]* | ?:[\\/]*)
24494  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24495  ;;
24496  *)
24497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24498for as_dir in $PATH
24499do
24500  IFS=$as_save_IFS
24501  test -z "$as_dir" && as_dir=.
24502    for ac_exec_ext in '' $ac_executable_extensions; do
24503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24504    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24506    break 2
24507  fi
24508done
24509  done
24510IFS=$as_save_IFS
24511
24512  ;;
24513esac
24514fi
24515CODESIGN=$ac_cv_path_CODESIGN
24516if test -n "$CODESIGN"; then
24517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24518$as_echo "$CODESIGN" >&6; }
24519else
24520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24521$as_echo "no" >&6; }
24522fi
24523
24524
24525          if test "x$CODESIGN" = x; then
24526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24527          fi
24528        else
24529          # Otherwise we believe it is a complete path. Use it as it is.
24530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24531$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24533$as_echo_n "checking for CODESIGN... " >&6; }
24534          if test ! -x "$tool_specified"; then
24535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24536$as_echo "not found" >&6; }
24537            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24538          fi
24539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24540$as_echo "$tool_specified" >&6; }
24541        fi
24542      fi
24543    fi
24544
24545  fi
24546
24547
24548    if test "x$CODESIGN" != "x"; then
24549      # Verify that the openjdk_codesign certificate is present
24550      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24551$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24552      $RM codesign-testfile
24553      $TOUCH codesign-testfile
24554      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24555      $RM codesign-testfile
24556      if test "x$CODESIGN" = x; then
24557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24558$as_echo "no" >&6; }
24559      else
24560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24561$as_echo "yes" >&6; }
24562      fi
24563    fi
24564
24565
24566
24567  # Publish this variable in the help.
24568
24569
24570  if [ -z "${SETFILE+x}" ]; then
24571    # The variable is not set by user, try to locate tool using the code snippet
24572    for ac_prog in SetFile
24573do
24574  # Extract the first word of "$ac_prog", so it can be a program name with args.
24575set dummy $ac_prog; ac_word=$2
24576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24577$as_echo_n "checking for $ac_word... " >&6; }
24578if ${ac_cv_path_SETFILE+:} false; then :
24579  $as_echo_n "(cached) " >&6
24580else
24581  case $SETFILE in
24582  [\\/]* | ?:[\\/]*)
24583  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24584  ;;
24585  *)
24586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24587for as_dir in $PATH
24588do
24589  IFS=$as_save_IFS
24590  test -z "$as_dir" && as_dir=.
24591    for ac_exec_ext in '' $ac_executable_extensions; do
24592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24593    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24595    break 2
24596  fi
24597done
24598  done
24599IFS=$as_save_IFS
24600
24601  ;;
24602esac
24603fi
24604SETFILE=$ac_cv_path_SETFILE
24605if test -n "$SETFILE"; then
24606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24607$as_echo "$SETFILE" >&6; }
24608else
24609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24610$as_echo "no" >&6; }
24611fi
24612
24613
24614  test -n "$SETFILE" && break
24615done
24616
24617  else
24618    # The variable is set, but is it from the command line or the environment?
24619
24620    # Try to remove the string !SETFILE! from our list.
24621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24623      # If it failed, the variable was not from the command line. Ignore it,
24624      # but warn the user (except for BASH, which is always set by the calling BASH).
24625      if test "xSETFILE" != xBASH; then
24626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24627$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24628      fi
24629      # Try to locate tool using the code snippet
24630      for ac_prog in SetFile
24631do
24632  # Extract the first word of "$ac_prog", so it can be a program name with args.
24633set dummy $ac_prog; ac_word=$2
24634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24635$as_echo_n "checking for $ac_word... " >&6; }
24636if ${ac_cv_path_SETFILE+:} false; then :
24637  $as_echo_n "(cached) " >&6
24638else
24639  case $SETFILE in
24640  [\\/]* | ?:[\\/]*)
24641  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24642  ;;
24643  *)
24644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24645for as_dir in $PATH
24646do
24647  IFS=$as_save_IFS
24648  test -z "$as_dir" && as_dir=.
24649    for ac_exec_ext in '' $ac_executable_extensions; do
24650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24651    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24653    break 2
24654  fi
24655done
24656  done
24657IFS=$as_save_IFS
24658
24659  ;;
24660esac
24661fi
24662SETFILE=$ac_cv_path_SETFILE
24663if test -n "$SETFILE"; then
24664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24665$as_echo "$SETFILE" >&6; }
24666else
24667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24668$as_echo "no" >&6; }
24669fi
24670
24671
24672  test -n "$SETFILE" && break
24673done
24674
24675    else
24676      # If it succeeded, then it was overridden by the user. We will use it
24677      # for the tool.
24678
24679      # First remove it from the list of overridden variables, so we can test
24680      # for unknown variables in the end.
24681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24682
24683      # Check if we try to supply an empty value
24684      if test "x$SETFILE" = x; then
24685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24686$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24688$as_echo_n "checking for SETFILE... " >&6; }
24689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24690$as_echo "disabled" >&6; }
24691      else
24692        # Check if the provided tool contains a complete path.
24693        tool_specified="$SETFILE"
24694        tool_basename="${tool_specified##*/}"
24695        if test "x$tool_basename" = "x$tool_specified"; then
24696          # A command without a complete path is provided, search $PATH.
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24698$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24699          # Extract the first word of "$tool_basename", so it can be a program name with args.
24700set dummy $tool_basename; ac_word=$2
24701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24702$as_echo_n "checking for $ac_word... " >&6; }
24703if ${ac_cv_path_SETFILE+:} false; then :
24704  $as_echo_n "(cached) " >&6
24705else
24706  case $SETFILE in
24707  [\\/]* | ?:[\\/]*)
24708  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24709  ;;
24710  *)
24711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24712for as_dir in $PATH
24713do
24714  IFS=$as_save_IFS
24715  test -z "$as_dir" && as_dir=.
24716    for ac_exec_ext in '' $ac_executable_extensions; do
24717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24718    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24720    break 2
24721  fi
24722done
24723  done
24724IFS=$as_save_IFS
24725
24726  ;;
24727esac
24728fi
24729SETFILE=$ac_cv_path_SETFILE
24730if test -n "$SETFILE"; then
24731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24732$as_echo "$SETFILE" >&6; }
24733else
24734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24735$as_echo "no" >&6; }
24736fi
24737
24738
24739          if test "x$SETFILE" = x; then
24740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24741          fi
24742        else
24743          # Otherwise we believe it is a complete path. Use it as it is.
24744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24745$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24747$as_echo_n "checking for SETFILE... " >&6; }
24748          if test ! -x "$tool_specified"; then
24749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24750$as_echo "not found" >&6; }
24751            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24752          fi
24753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24754$as_echo "$tool_specified" >&6; }
24755        fi
24756      fi
24757    fi
24758
24759  fi
24760
24761
24762
24763  if test "x$SETFILE" = x; then
24764    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24765  fi
24766
24767
24768  fi
24769
24770
24771  # Check bash version
24772  # Extra [ ] to stop m4 mangling
24773   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24775$as_echo_n "checking bash version... " >&6; }
24776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24777$as_echo "$BASH_VER" >&6; }
24778
24779  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24780  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24781  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24782    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24783  fi
24784
24785  # Test if bash supports pipefail.
24786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24787$as_echo_n "checking if bash supports pipefail... " >&6; }
24788  if ${BASH} -c 'set -o pipefail'; then
24789    BASH_ARGS="$BASH_ARGS -o pipefail"
24790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24791$as_echo "yes" >&6; }
24792  else
24793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24794$as_echo "no" >&6; }
24795  fi
24796
24797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24798$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24799  if ${BASH} -e -c 'true'; then
24800    BASH_ARGS="$BASH_ARGS -e"
24801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24802$as_echo "yes" >&6; }
24803  else
24804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24805$as_echo "no" >&6; }
24806  fi
24807
24808
24809
24810
24811# Check if pkg-config is available.
24812
24813
24814if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24815	if test -n "$ac_tool_prefix"; then
24816  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24817set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24819$as_echo_n "checking for $ac_word... " >&6; }
24820if ${ac_cv_path_PKG_CONFIG+:} false; then :
24821  $as_echo_n "(cached) " >&6
24822else
24823  case $PKG_CONFIG in
24824  [\\/]* | ?:[\\/]*)
24825  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24826  ;;
24827  *)
24828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24829for as_dir in $PATH
24830do
24831  IFS=$as_save_IFS
24832  test -z "$as_dir" && as_dir=.
24833    for ac_exec_ext in '' $ac_executable_extensions; do
24834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24835    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24837    break 2
24838  fi
24839done
24840  done
24841IFS=$as_save_IFS
24842
24843  ;;
24844esac
24845fi
24846PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24847if test -n "$PKG_CONFIG"; then
24848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24849$as_echo "$PKG_CONFIG" >&6; }
24850else
24851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24852$as_echo "no" >&6; }
24853fi
24854
24855
24856fi
24857if test -z "$ac_cv_path_PKG_CONFIG"; then
24858  ac_pt_PKG_CONFIG=$PKG_CONFIG
24859  # Extract the first word of "pkg-config", so it can be a program name with args.
24860set dummy pkg-config; ac_word=$2
24861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24862$as_echo_n "checking for $ac_word... " >&6; }
24863if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24864  $as_echo_n "(cached) " >&6
24865else
24866  case $ac_pt_PKG_CONFIG in
24867  [\\/]* | ?:[\\/]*)
24868  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24869  ;;
24870  *)
24871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24872for as_dir in $PATH
24873do
24874  IFS=$as_save_IFS
24875  test -z "$as_dir" && as_dir=.
24876    for ac_exec_ext in '' $ac_executable_extensions; do
24877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24878    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24880    break 2
24881  fi
24882done
24883  done
24884IFS=$as_save_IFS
24885
24886  ;;
24887esac
24888fi
24889ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24890if test -n "$ac_pt_PKG_CONFIG"; then
24891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24892$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24893else
24894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24895$as_echo "no" >&6; }
24896fi
24897
24898  if test "x$ac_pt_PKG_CONFIG" = x; then
24899    PKG_CONFIG=""
24900  else
24901    case $cross_compiling:$ac_tool_warned in
24902yes:)
24903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24905ac_tool_warned=yes ;;
24906esac
24907    PKG_CONFIG=$ac_pt_PKG_CONFIG
24908  fi
24909else
24910  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24911fi
24912
24913fi
24914if test -n "$PKG_CONFIG"; then
24915	_pkg_min_version=0.9.0
24916	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24917$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24918	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24919		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24920$as_echo "yes" >&6; }
24921	else
24922		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24923$as_echo "no" >&6; }
24924		PKG_CONFIG=""
24925	fi
24926
24927fi
24928
24929# After basic tools have been setup, we can check build os specific details.
24930
24931  ###############################################################################
24932
24933  # Note that this is the build platform OS version!
24934
24935  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24936  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24937  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24938  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24939
24940
24941
24942
24943
24944# Misc basic settings
24945
24946
24947# Check whether --with-default-make-target was given.
24948if test "${with_default_make_target+set}" = set; then :
24949  withval=$with_default_make_target;
24950fi
24951
24952  if test "x$with_default_make_target" = "x" \
24953      || test "x$with_default_make_target" = "xyes"; then
24954    DEFAULT_MAKE_TARGET="exploded-image"
24955  elif test "x$with_default_make_target" = "xno"; then
24956    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24957  else
24958    DEFAULT_MAKE_TARGET="$with_default_make_target"
24959  fi
24960
24961
24962
24963
24964###############################################################################
24965#
24966# Determine OpenJDK variants, options and version numbers.
24967#
24968###############################################################################
24969
24970# We need build & target for this.
24971
24972  # Should we build a JDK without a graphical UI?
24973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24974$as_echo_n "checking headless only... " >&6; }
24975  # Check whether --enable-headless-only was given.
24976if test "${enable_headless_only+set}" = set; then :
24977  enableval=$enable_headless_only;
24978fi
24979
24980
24981  if test "x$enable_headless_only" = "xyes"; then
24982    ENABLE_HEADLESS_ONLY="true"
24983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24984$as_echo "yes" >&6; }
24985  elif test "x$enable_headless_only" = "xno"; then
24986    ENABLE_HEADLESS_ONLY="false"
24987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24988$as_echo "no" >&6; }
24989  elif test "x$enable_headless_only" = "x"; then
24990    ENABLE_HEADLESS_ONLY="false"
24991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24992$as_echo "no" >&6; }
24993  else
24994    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24995  fi
24996
24997
24998
24999  # Should we build the complete docs, or just a lightweight version?
25000  # Check whether --enable-full-docs was given.
25001if test "${enable_full_docs+set}" = set; then :
25002  enableval=$enable_full_docs;
25003fi
25004
25005
25006  # Verify dependencies
25007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
25008$as_echo_n "checking for graphviz dot... " >&6; }
25009  if test "x$DOT" != "x"; then
25010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25011$as_echo "yes" >&6; }
25012  else
25013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25014$as_echo "no, cannot generate full docs" >&6; }
25015    FULL_DOCS_DEP_MISSING=true
25016  fi
25017
25018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
25019$as_echo_n "checking for pandoc... " >&6; }
25020  if test "x$PANDOC" != "x"; then
25021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25022$as_echo "yes" >&6; }
25023  else
25024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25025$as_echo "no, cannot generate full docs" >&6; }
25026    FULL_DOCS_DEP_MISSING=true
25027  fi
25028
25029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
25030$as_echo_n "checking full docs... " >&6; }
25031  if test "x$enable_full_docs" = xyes; then
25032    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
25033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25034$as_echo "no, missing dependencies" >&6; }
25035
25036  # Print a helpful message on how to acquire the necessary build dependency.
25037  # dot is the help tag: freetype, cups, alsa etc
25038  MISSING_DEPENDENCY=dot
25039
25040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25041    cygwin_help $MISSING_DEPENDENCY
25042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25043    msys_help $MISSING_DEPENDENCY
25044  else
25045    PKGHANDLER_COMMAND=
25046
25047    case $PKGHANDLER in
25048      apt-get)
25049        apt_help     $MISSING_DEPENDENCY ;;
25050      yum)
25051        yum_help     $MISSING_DEPENDENCY ;;
25052      brew)
25053        brew_help    $MISSING_DEPENDENCY ;;
25054      port)
25055        port_help    $MISSING_DEPENDENCY ;;
25056      pkgutil)
25057        pkgutil_help $MISSING_DEPENDENCY ;;
25058      pkgadd)
25059        pkgadd_help  $MISSING_DEPENDENCY ;;
25060    esac
25061
25062    if test "x$PKGHANDLER_COMMAND" != x; then
25063      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25064    fi
25065  fi
25066
25067      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25068    else
25069      ENABLE_FULL_DOCS=true
25070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25071$as_echo "yes, forced" >&6; }
25072    fi
25073  elif test "x$enable_full_docs" = xno; then
25074    ENABLE_FULL_DOCS=false
25075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25076$as_echo "no, forced" >&6; }
25077  elif test "x$enable_full_docs" = x; then
25078    # Check for prerequisites
25079    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25080      ENABLE_FULL_DOCS=false
25081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25082$as_echo "no, missing dependencies" >&6; }
25083    else
25084      ENABLE_FULL_DOCS=true
25085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25086$as_echo "yes, dependencies present" >&6; }
25087    fi
25088  else
25089    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25090  fi
25091
25092
25093
25094  # Choose cacerts source file
25095
25096# Check whether --with-cacerts-file was given.
25097if test "${with_cacerts_file+set}" = set; then :
25098  withval=$with_cacerts_file;
25099fi
25100
25101  if test "x$with_cacerts_file" != x; then
25102    CACERTS_FILE=$with_cacerts_file
25103  fi
25104
25105
25106  # Enable or disable unlimited crypto
25107  # Check whether --enable-unlimited-crypto was given.
25108if test "${enable_unlimited_crypto+set}" = set; then :
25109  enableval=$enable_unlimited_crypto;
25110else
25111  enable_unlimited_crypto=yes
25112fi
25113
25114  if test "x$enable_unlimited_crypto" = "xyes"; then
25115    UNLIMITED_CRYPTO=true
25116  else
25117    UNLIMITED_CRYPTO=false
25118  fi
25119
25120
25121  # Should we build the serviceability agent (SA)?
25122  INCLUDE_SA=true
25123  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25124    INCLUDE_SA=false
25125  fi
25126  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25127    INCLUDE_SA=false
25128  fi
25129
25130
25131  # Compress jars
25132  COMPRESS_JARS=false
25133
25134
25135
25136  # Setup default copyright year. Mostly overridden when building close to a new year.
25137
25138# Check whether --with-copyright-year was given.
25139if test "${with_copyright_year+set}" = set; then :
25140  withval=$with_copyright_year;
25141fi
25142
25143  if test "x$with_copyright_year" = xyes; then
25144    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25145  elif test "x$with_copyright_year" != x; then
25146    COPYRIGHT_YEAR="$with_copyright_year"
25147  else
25148    COPYRIGHT_YEAR=`$DATE +'%Y'`
25149  fi
25150
25151
25152
25153  # Check whether --enable-keep-packaged-modules was given.
25154if test "${enable_keep_packaged_modules+set}" = set; then :
25155  enableval=$enable_keep_packaged_modules;
25156fi
25157
25158
25159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25160$as_echo_n "checking if packaged modules are kept... " >&6; }
25161  if test "x$enable_keep_packaged_modules" = "xyes"; then
25162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25163$as_echo "yes" >&6; }
25164    JLINK_KEEP_PACKAGED_MODULES=true
25165  elif test "x$enable_keep_packaged_modules" = "xno"; then
25166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25167$as_echo "no" >&6; }
25168    JLINK_KEEP_PACKAGED_MODULES=false
25169  elif test "x$enable_keep_packaged_modules" = "x"; then
25170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25171$as_echo "yes (default)" >&6; }
25172    JLINK_KEEP_PACKAGED_MODULES=true
25173  else
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25175$as_echo "error" >&6; }
25176    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25177  fi
25178
25179
25180
25181
25182  # Warn user that old version arguments are deprecated.
25183
25184
25185# Check whether --with-milestone was given.
25186if test "${with_milestone+set}" = set; then :
25187  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25188$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25189fi
25190
25191
25192
25193
25194# Check whether --with-update-version was given.
25195if test "${with_update_version+set}" = set; then :
25196  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25197$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25198fi
25199
25200
25201
25202
25203# Check whether --with-user-release-suffix was given.
25204if test "${with_user_release_suffix+set}" = set; then :
25205  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
25206$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25207fi
25208
25209
25210
25211
25212# Check whether --with-build-number was given.
25213if test "${with_build_number+set}" = set; then :
25214  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25215$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25216fi
25217
25218
25219
25220  # Source the version numbers file
25221  . $AUTOCONF_DIR/version-numbers
25222
25223  # Some non-version number information is set in that file
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233  # Override version from arguments
25234
25235  # If --with-version-string is set, process it first. It is possible to
25236  # override parts with more specific flags, since these are processed later.
25237
25238# Check whether --with-version-string was given.
25239if test "${with_version_string+set}" = set; then :
25240  withval=$with_version_string;
25241fi
25242
25243  if test "x$with_version_string" = xyes; then
25244    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25245  elif test "x$with_version_string" != x; then
25246    # Additional [] needed to keep m4 from mangling shell constructs.
25247    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25248      VERSION_MAJOR=${BASH_REMATCH[1]}
25249      VERSION_MINOR=${BASH_REMATCH[3]}
25250      VERSION_SECURITY=${BASH_REMATCH[5]}
25251      VERSION_PATCH=${BASH_REMATCH[7]}
25252      VERSION_PRE=${BASH_REMATCH[9]}
25253      version_plus_separator=${BASH_REMATCH[11]}
25254      VERSION_BUILD=${BASH_REMATCH[12]}
25255      VERSION_OPT=${BASH_REMATCH[14]}
25256      # Unspecified numerical fields are interpreted as 0.
25257      if test "x$VERSION_MINOR" = x; then
25258        VERSION_MINOR=0
25259      fi
25260      if test "x$VERSION_SECURITY" = x; then
25261        VERSION_SECURITY=0
25262      fi
25263      if test "x$VERSION_PATCH" = x; then
25264        VERSION_PATCH=0
25265      fi
25266      if test "x$version_plus_separator" != x \
25267          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25268        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25269      fi
25270      # Stop the version part process from setting default values.
25271      # We still allow them to explicitly override though.
25272      NO_DEFAULT_VERSION_PARTS=true
25273    else
25274      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25275    fi
25276  fi
25277
25278
25279# Check whether --with-version-pre was given.
25280if test "${with_version_pre+set}" = set; then :
25281  withval=$with_version_pre; with_version_pre_present=true
25282else
25283  with_version_pre_present=false
25284fi
25285
25286
25287  if test "x$with_version_pre_present" = xtrue; then
25288    if test "x$with_version_pre" = xyes; then
25289      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25290    elif test "x$with_version_pre" = xno; then
25291      # Interpret --without-* as empty string instead of the literal "no"
25292      VERSION_PRE=
25293    else
25294      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25295       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25296      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25298$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25299      fi
25300    fi
25301  else
25302    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25303      # Default is to use "internal" as pre
25304      VERSION_PRE="internal"
25305    fi
25306  fi
25307
25308
25309# Check whether --with-version-opt was given.
25310if test "${with_version_opt+set}" = set; then :
25311  withval=$with_version_opt; with_version_opt_present=true
25312else
25313  with_version_opt_present=false
25314fi
25315
25316
25317  if test "x$with_version_opt_present" = xtrue; then
25318    if test "x$with_version_opt" = xyes; then
25319      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25320    elif test "x$with_version_opt" = xno; then
25321      # Interpret --without-* as empty string instead of the literal "no"
25322      VERSION_OPT=
25323    else
25324      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25325       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25326      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25328$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25329      fi
25330    fi
25331  else
25332    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25333      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25334      # Outer [ ] to quote m4.
25335       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25336      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25337    fi
25338  fi
25339
25340
25341# Check whether --with-version-build was given.
25342if test "${with_version_build+set}" = set; then :
25343  withval=$with_version_build; with_version_build_present=true
25344else
25345  with_version_build_present=false
25346fi
25347
25348
25349  if test "x$with_version_build_present" = xtrue; then
25350    if test "x$with_version_build" = xyes; then
25351      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25352    elif test "x$with_version_build" = xno; then
25353      # Interpret --without-* as empty string instead of the literal "no"
25354      VERSION_BUILD=
25355    elif test "x$with_version_build" = x; then
25356      VERSION_BUILD=
25357    else
25358
25359  # Additional [] needed to keep m4 from mangling shell constructs.
25360  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25361    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25362  fi
25363  # Extract the version number without leading zeros.
25364  cleaned_value=${BASH_REMATCH[1]}
25365  if test "x$cleaned_value" = x; then
25366    # Special case for zero
25367    cleaned_value=${BASH_REMATCH[2]}
25368  fi
25369
25370  if test $cleaned_value -gt 255; then
25371    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25372  fi
25373  if test "x$cleaned_value" != "x$with_version_build"; then
25374    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25375$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25376  fi
25377  VERSION_BUILD=$cleaned_value
25378
25379    fi
25380  else
25381    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25382      # Default is to not have a build number.
25383      VERSION_BUILD=""
25384      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25385      VERSION_BUILD=0
25386    fi
25387  fi
25388
25389
25390# Check whether --with-version-major was given.
25391if test "${with_version_major+set}" = set; then :
25392  withval=$with_version_major; with_version_major_present=true
25393else
25394  with_version_major_present=false
25395fi
25396
25397
25398  if test "x$with_version_major_present" = xtrue; then
25399    if test "x$with_version_major" = xyes; then
25400      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25401    else
25402
25403  # Additional [] needed to keep m4 from mangling shell constructs.
25404  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25405    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25406  fi
25407  # Extract the version number without leading zeros.
25408  cleaned_value=${BASH_REMATCH[1]}
25409  if test "x$cleaned_value" = x; then
25410    # Special case for zero
25411    cleaned_value=${BASH_REMATCH[2]}
25412  fi
25413
25414  if test $cleaned_value -gt 255; then
25415    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25416  fi
25417  if test "x$cleaned_value" != "x$with_version_major"; then
25418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25419$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25420  fi
25421  VERSION_MAJOR=$cleaned_value
25422
25423    fi
25424  else
25425    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25426      # Default is to get value from version-numbers
25427      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25428    fi
25429  fi
25430
25431
25432# Check whether --with-version-minor was given.
25433if test "${with_version_minor+set}" = set; then :
25434  withval=$with_version_minor; with_version_minor_present=true
25435else
25436  with_version_minor_present=false
25437fi
25438
25439
25440  if test "x$with_version_minor_present" = xtrue; then
25441    if test "x$with_version_minor" = xyes; then
25442      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25443    elif test "x$with_version_minor" = xno; then
25444      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25445      VERSION_MINOR=0
25446    elif test "x$with_version_minor" = x; then
25447      VERSION_MINOR=0
25448    else
25449
25450  # Additional [] needed to keep m4 from mangling shell constructs.
25451  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25452    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25453  fi
25454  # Extract the version number without leading zeros.
25455  cleaned_value=${BASH_REMATCH[1]}
25456  if test "x$cleaned_value" = x; then
25457    # Special case for zero
25458    cleaned_value=${BASH_REMATCH[2]}
25459  fi
25460
25461  if test $cleaned_value -gt 255; then
25462    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25463  fi
25464  if test "x$cleaned_value" != "x$with_version_minor"; then
25465    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25466$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25467  fi
25468  VERSION_MINOR=$cleaned_value
25469
25470    fi
25471  else
25472    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25473      # Default is 0, if unspecified
25474      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25475    fi
25476  fi
25477
25478
25479# Check whether --with-version-security was given.
25480if test "${with_version_security+set}" = set; then :
25481  withval=$with_version_security; with_version_security_present=true
25482else
25483  with_version_security_present=false
25484fi
25485
25486
25487  if test "x$with_version_security_present" = xtrue; then
25488    if test "x$with_version_security" = xyes; then
25489      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25490    elif test "x$with_version_security" = xno; then
25491      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25492      VERSION_SECURITY=0
25493    elif test "x$with_version_security" = x; then
25494      VERSION_SECURITY=0
25495    else
25496
25497  # Additional [] needed to keep m4 from mangling shell constructs.
25498  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25499    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25500  fi
25501  # Extract the version number without leading zeros.
25502  cleaned_value=${BASH_REMATCH[1]}
25503  if test "x$cleaned_value" = x; then
25504    # Special case for zero
25505    cleaned_value=${BASH_REMATCH[2]}
25506  fi
25507
25508  if test $cleaned_value -gt 255; then
25509    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25510  fi
25511  if test "x$cleaned_value" != "x$with_version_security"; then
25512    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25513$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25514  fi
25515  VERSION_SECURITY=$cleaned_value
25516
25517    fi
25518  else
25519    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25520      # Default is 0, if unspecified
25521      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25522    fi
25523  fi
25524
25525
25526# Check whether --with-version-patch was given.
25527if test "${with_version_patch+set}" = set; then :
25528  withval=$with_version_patch; with_version_patch_present=true
25529else
25530  with_version_patch_present=false
25531fi
25532
25533
25534  if test "x$with_version_patch_present" = xtrue; then
25535    if test "x$with_version_patch" = xyes; then
25536      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25537    elif test "x$with_version_patch" = xno; then
25538      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25539      VERSION_PATCH=0
25540    elif test "x$with_version_patch" = x; then
25541      VERSION_PATCH=0
25542    else
25543
25544  # Additional [] needed to keep m4 from mangling shell constructs.
25545  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25546    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25547  fi
25548  # Extract the version number without leading zeros.
25549  cleaned_value=${BASH_REMATCH[1]}
25550  if test "x$cleaned_value" = x; then
25551    # Special case for zero
25552    cleaned_value=${BASH_REMATCH[2]}
25553  fi
25554
25555  if test $cleaned_value -gt 255; then
25556    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25557  fi
25558  if test "x$cleaned_value" != "x$with_version_patch"; then
25559    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25560$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25561  fi
25562  VERSION_PATCH=$cleaned_value
25563
25564    fi
25565  else
25566    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25567      # Default is 0, if unspecified
25568      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25569    fi
25570  fi
25571
25572  # Calculate derived version properties
25573
25574  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25575  if test "x$VERSION_PRE" = x; then
25576    VERSION_IS_GA=true
25577  else
25578    VERSION_IS_GA=false
25579  fi
25580
25581  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25582  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25583
25584  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25585  # Strip trailing zeroes from stripped_version_number
25586  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25587  VERSION_NUMBER=$stripped_version_number
25588
25589  # The complete version string, with additional build information
25590  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25591    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25592  else
25593    # If either build or opt is set, we need a + separator
25594    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25595  fi
25596
25597  # The short version string, just VERSION_NUMBER and PRE, if present.
25598  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25599
25600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25601$as_echo_n "checking for version string... " >&6; }
25602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25603$as_echo "$VERSION_STRING" >&6; }
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619###############################################################################
25620#
25621# Setup BootJDK, used to bootstrap the build.
25622#
25623###############################################################################
25624
25625
25626  BOOT_JDK_FOUND=no
25627
25628# Check whether --with-boot-jdk was given.
25629if test "${with_boot_jdk+set}" = set; then :
25630  withval=$with_boot_jdk;
25631fi
25632
25633
25634  # We look for the Boot JDK through various means, going from more certain to
25635  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25636  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25637  # must check if this is indeed valid; otherwise we'll continue looking.
25638
25639  # Test: Is bootjdk explicitly set by command line arguments?
25640
25641  if test "x$BOOT_JDK_FOUND" = xno; then
25642    # Now execute the test
25643
25644  if test "x$with_boot_jdk" != x; then
25645    BOOT_JDK=$with_boot_jdk
25646    BOOT_JDK_FOUND=maybe
25647    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25648$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25649  fi
25650
25651
25652    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25653    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25654      # Do we have a bin/java?
25655      if test ! -x "$BOOT_JDK/bin/java"; then
25656        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25658        BOOT_JDK_FOUND=no
25659      else
25660        # Do we have a bin/javac?
25661        if test ! -x "$BOOT_JDK/bin/javac"; then
25662          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25664          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25665$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25666          BOOT_JDK_FOUND=no
25667        else
25668          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25669          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25670
25671          # Extra M4 quote needed to protect [] in grep expression.
25672          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25673          if test "x$FOUND_CORRECT_VERSION" = x; then
25674            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25676            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25677$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25678            BOOT_JDK_FOUND=no
25679          else
25680            # We're done! :-)
25681            BOOT_JDK_FOUND=yes
25682
25683  # Only process if variable expands to non-empty
25684
25685  if test "x$BOOT_JDK" != x; then
25686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25687
25688  # Input might be given as Windows format, start by converting to
25689  # unix format.
25690  path="$BOOT_JDK"
25691  new_path=`$CYGPATH -u "$path"`
25692
25693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25696  # "foo.exe" is OK but "foo" is an error.
25697  #
25698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25699  # It is also a way to make sure we got the proper file name for the real test later on.
25700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25701  if test "x$test_shortpath" = x; then
25702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25704    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25705  fi
25706
25707  # Call helper function which possibly converts this using DOS-style short mode.
25708  # If so, the updated path is stored in $new_path.
25709
25710  input_path="$new_path"
25711  # Check if we need to convert this using DOS-style short mode. If the path
25712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25713  # take no chances and rewrite it.
25714  # Note: m4 eats our [], so we need to use [ and ] instead.
25715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25716  if test "x$has_forbidden_chars" != x; then
25717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25721      # Going to short mode and back again did indeed matter. Since short mode is
25722      # case insensitive, let's make it lowercase to improve readability.
25723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25724      # Now convert it back to Unix-style (cygpath)
25725      input_path=`$CYGPATH -u "$shortmode_path"`
25726      new_path="$input_path"
25727    fi
25728  fi
25729
25730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25731  if test "x$test_cygdrive_prefix" = x; then
25732    # As a simple fix, exclude /usr/bin since it's not a real path.
25733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25735      # a path prefixed by /cygdrive for fixpath to work.
25736      new_path="$CYGWIN_ROOT_PATH$input_path"
25737    fi
25738  fi
25739
25740
25741  if test "x$path" != "x$new_path"; then
25742    BOOT_JDK="$new_path"
25743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25745  fi
25746
25747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25748
25749  path="$BOOT_JDK"
25750  has_colon=`$ECHO $path | $GREP ^.:`
25751  new_path="$path"
25752  if test "x$has_colon" = x; then
25753    # Not in mixed or Windows style, start by that.
25754    new_path=`cmd //c echo $path`
25755  fi
25756
25757
25758  input_path="$new_path"
25759  # Check if we need to convert this using DOS-style short mode. If the path
25760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25761  # take no chances and rewrite it.
25762  # Note: m4 eats our [], so we need to use [ and ] instead.
25763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25764  if test "x$has_forbidden_chars" != x; then
25765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25767  fi
25768
25769
25770  windows_path="$new_path"
25771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25772    unix_path=`$CYGPATH -u "$windows_path"`
25773    new_path="$unix_path"
25774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25776    new_path="$unix_path"
25777  fi
25778
25779  if test "x$path" != "x$new_path"; then
25780    BOOT_JDK="$new_path"
25781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25782$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25783  fi
25784
25785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25787
25788    else
25789      # We're on a unix platform. Hooray! :)
25790      path="$BOOT_JDK"
25791      has_space=`$ECHO "$path" | $GREP " "`
25792      if test "x$has_space" != x; then
25793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25796      fi
25797
25798      # Use eval to expand a potential ~
25799      eval path="$path"
25800      if test ! -f "$path" && test ! -d "$path"; then
25801        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25802      fi
25803
25804      if test -d "$path"; then
25805        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25806      else
25807        dir="`$DIRNAME "$path"`"
25808        base="`$BASENAME "$path"`"
25809        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25810      fi
25811    fi
25812  fi
25813
25814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25815$as_echo_n "checking for Boot JDK... " >&6; }
25816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25817$as_echo "$BOOT_JDK" >&6; }
25818            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25819$as_echo_n "checking Boot JDK version... " >&6; }
25820            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25822$as_echo "$BOOT_JDK_VERSION" >&6; }
25823          fi # end check jdk version
25824        fi # end check javac
25825      fi # end check java
25826    fi # end check boot jdk found
25827  fi
25828
25829  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25830    # Having specified an argument which is incorrect will produce an instant failure;
25831    # we should not go on looking
25832    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25833  fi
25834
25835  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25836
25837  if test "x$BOOT_JDK_FOUND" = xno; then
25838    # Now execute the test
25839
25840  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25841    # First check at user selected default
25842
25843  if test "x$BOOT_JDK_FOUND" = xno; then
25844    # Now execute the test
25845
25846  if test -x /usr/libexec/java_home; then
25847    BOOT_JDK=`/usr/libexec/java_home `
25848    BOOT_JDK_FOUND=maybe
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25850$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25851  fi
25852
25853
25854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25856      # Do we have a bin/java?
25857      if test ! -x "$BOOT_JDK/bin/java"; then
25858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25860        BOOT_JDK_FOUND=no
25861      else
25862        # Do we have a bin/javac?
25863        if test ! -x "$BOOT_JDK/bin/javac"; then
25864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25868          BOOT_JDK_FOUND=no
25869        else
25870          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25871          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25872
25873          # Extra M4 quote needed to protect [] in grep expression.
25874          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25875          if test "x$FOUND_CORRECT_VERSION" = x; then
25876            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25878            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25879$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25880            BOOT_JDK_FOUND=no
25881          else
25882            # We're done! :-)
25883            BOOT_JDK_FOUND=yes
25884
25885  # Only process if variable expands to non-empty
25886
25887  if test "x$BOOT_JDK" != x; then
25888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889
25890  # Input might be given as Windows format, start by converting to
25891  # unix format.
25892  path="$BOOT_JDK"
25893  new_path=`$CYGPATH -u "$path"`
25894
25895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25898  # "foo.exe" is OK but "foo" is an error.
25899  #
25900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25901  # It is also a way to make sure we got the proper file name for the real test later on.
25902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25903  if test "x$test_shortpath" = x; then
25904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25906    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25907  fi
25908
25909  # Call helper function which possibly converts this using DOS-style short mode.
25910  # If so, the updated path is stored in $new_path.
25911
25912  input_path="$new_path"
25913  # Check if we need to convert this using DOS-style short mode. If the path
25914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25915  # take no chances and rewrite it.
25916  # Note: m4 eats our [], so we need to use [ and ] instead.
25917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25918  if test "x$has_forbidden_chars" != x; then
25919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25923      # Going to short mode and back again did indeed matter. Since short mode is
25924      # case insensitive, let's make it lowercase to improve readability.
25925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25926      # Now convert it back to Unix-style (cygpath)
25927      input_path=`$CYGPATH -u "$shortmode_path"`
25928      new_path="$input_path"
25929    fi
25930  fi
25931
25932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25933  if test "x$test_cygdrive_prefix" = x; then
25934    # As a simple fix, exclude /usr/bin since it's not a real path.
25935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25937      # a path prefixed by /cygdrive for fixpath to work.
25938      new_path="$CYGWIN_ROOT_PATH$input_path"
25939    fi
25940  fi
25941
25942
25943  if test "x$path" != "x$new_path"; then
25944    BOOT_JDK="$new_path"
25945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25947  fi
25948
25949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25950
25951  path="$BOOT_JDK"
25952  has_colon=`$ECHO $path | $GREP ^.:`
25953  new_path="$path"
25954  if test "x$has_colon" = x; then
25955    # Not in mixed or Windows style, start by that.
25956    new_path=`cmd //c echo $path`
25957  fi
25958
25959
25960  input_path="$new_path"
25961  # Check if we need to convert this using DOS-style short mode. If the path
25962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25963  # take no chances and rewrite it.
25964  # Note: m4 eats our [], so we need to use [ and ] instead.
25965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25966  if test "x$has_forbidden_chars" != x; then
25967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25969  fi
25970
25971
25972  windows_path="$new_path"
25973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25974    unix_path=`$CYGPATH -u "$windows_path"`
25975    new_path="$unix_path"
25976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25978    new_path="$unix_path"
25979  fi
25980
25981  if test "x$path" != "x$new_path"; then
25982    BOOT_JDK="$new_path"
25983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25985  fi
25986
25987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25989
25990    else
25991      # We're on a unix platform. Hooray! :)
25992      path="$BOOT_JDK"
25993      has_space=`$ECHO "$path" | $GREP " "`
25994      if test "x$has_space" != x; then
25995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25998      fi
25999
26000      # Use eval to expand a potential ~
26001      eval path="$path"
26002      if test ! -f "$path" && test ! -d "$path"; then
26003        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26004      fi
26005
26006      if test -d "$path"; then
26007        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26008      else
26009        dir="`$DIRNAME "$path"`"
26010        base="`$BASENAME "$path"`"
26011        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26012      fi
26013    fi
26014  fi
26015
26016            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26017$as_echo_n "checking for Boot JDK... " >&6; }
26018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26019$as_echo "$BOOT_JDK" >&6; }
26020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26021$as_echo_n "checking Boot JDK version... " >&6; }
26022            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26024$as_echo "$BOOT_JDK_VERSION" >&6; }
26025          fi # end check jdk version
26026        fi # end check javac
26027      fi # end check java
26028    fi # end check boot jdk found
26029  fi
26030
26031    # If that did not work out (e.g. too old), try explicit versions instead
26032
26033  if test "x$BOOT_JDK_FOUND" = xno; then
26034    # Now execute the test
26035
26036  if test -x /usr/libexec/java_home; then
26037    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26038    BOOT_JDK_FOUND=maybe
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26040$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26041  fi
26042
26043
26044    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26045    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26046      # Do we have a bin/java?
26047      if test ! -x "$BOOT_JDK/bin/java"; then
26048        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26050        BOOT_JDK_FOUND=no
26051      else
26052        # Do we have a bin/javac?
26053        if test ! -x "$BOOT_JDK/bin/javac"; then
26054          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26056          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26057$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26058          BOOT_JDK_FOUND=no
26059        else
26060          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26061          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26062
26063          # Extra M4 quote needed to protect [] in grep expression.
26064          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26065          if test "x$FOUND_CORRECT_VERSION" = x; then
26066            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26068            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26069$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26070            BOOT_JDK_FOUND=no
26071          else
26072            # We're done! :-)
26073            BOOT_JDK_FOUND=yes
26074
26075  # Only process if variable expands to non-empty
26076
26077  if test "x$BOOT_JDK" != x; then
26078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26079
26080  # Input might be given as Windows format, start by converting to
26081  # unix format.
26082  path="$BOOT_JDK"
26083  new_path=`$CYGPATH -u "$path"`
26084
26085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26088  # "foo.exe" is OK but "foo" is an error.
26089  #
26090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26091  # It is also a way to make sure we got the proper file name for the real test later on.
26092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26093  if test "x$test_shortpath" = x; then
26094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26096    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26097  fi
26098
26099  # Call helper function which possibly converts this using DOS-style short mode.
26100  # If so, the updated path is stored in $new_path.
26101
26102  input_path="$new_path"
26103  # Check if we need to convert this using DOS-style short mode. If the path
26104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26105  # take no chances and rewrite it.
26106  # Note: m4 eats our [], so we need to use [ and ] instead.
26107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26108  if test "x$has_forbidden_chars" != x; then
26109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26113      # Going to short mode and back again did indeed matter. Since short mode is
26114      # case insensitive, let's make it lowercase to improve readability.
26115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26116      # Now convert it back to Unix-style (cygpath)
26117      input_path=`$CYGPATH -u "$shortmode_path"`
26118      new_path="$input_path"
26119    fi
26120  fi
26121
26122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26123  if test "x$test_cygdrive_prefix" = x; then
26124    # As a simple fix, exclude /usr/bin since it's not a real path.
26125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26127      # a path prefixed by /cygdrive for fixpath to work.
26128      new_path="$CYGWIN_ROOT_PATH$input_path"
26129    fi
26130  fi
26131
26132
26133  if test "x$path" != "x$new_path"; then
26134    BOOT_JDK="$new_path"
26135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26137  fi
26138
26139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26140
26141  path="$BOOT_JDK"
26142  has_colon=`$ECHO $path | $GREP ^.:`
26143  new_path="$path"
26144  if test "x$has_colon" = x; then
26145    # Not in mixed or Windows style, start by that.
26146    new_path=`cmd //c echo $path`
26147  fi
26148
26149
26150  input_path="$new_path"
26151  # Check if we need to convert this using DOS-style short mode. If the path
26152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26153  # take no chances and rewrite it.
26154  # Note: m4 eats our [], so we need to use [ and ] instead.
26155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26156  if test "x$has_forbidden_chars" != x; then
26157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26159  fi
26160
26161
26162  windows_path="$new_path"
26163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26164    unix_path=`$CYGPATH -u "$windows_path"`
26165    new_path="$unix_path"
26166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26168    new_path="$unix_path"
26169  fi
26170
26171  if test "x$path" != "x$new_path"; then
26172    BOOT_JDK="$new_path"
26173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26175  fi
26176
26177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26179
26180    else
26181      # We're on a unix platform. Hooray! :)
26182      path="$BOOT_JDK"
26183      has_space=`$ECHO "$path" | $GREP " "`
26184      if test "x$has_space" != x; then
26185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26186$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26188      fi
26189
26190      # Use eval to expand a potential ~
26191      eval path="$path"
26192      if test ! -f "$path" && test ! -d "$path"; then
26193        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26194      fi
26195
26196      if test -d "$path"; then
26197        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26198      else
26199        dir="`$DIRNAME "$path"`"
26200        base="`$BASENAME "$path"`"
26201        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26202      fi
26203    fi
26204  fi
26205
26206            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26207$as_echo_n "checking for Boot JDK... " >&6; }
26208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26209$as_echo "$BOOT_JDK" >&6; }
26210            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26211$as_echo_n "checking Boot JDK version... " >&6; }
26212            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26214$as_echo "$BOOT_JDK_VERSION" >&6; }
26215          fi # end check jdk version
26216        fi # end check javac
26217      fi # end check java
26218    fi # end check boot jdk found
26219  fi
26220
26221
26222  if test "x$BOOT_JDK_FOUND" = xno; then
26223    # Now execute the test
26224
26225  if test -x /usr/libexec/java_home; then
26226    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26227    BOOT_JDK_FOUND=maybe
26228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26229$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26230  fi
26231
26232
26233    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26234    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26235      # Do we have a bin/java?
26236      if test ! -x "$BOOT_JDK/bin/java"; then
26237        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26239        BOOT_JDK_FOUND=no
26240      else
26241        # Do we have a bin/javac?
26242        if test ! -x "$BOOT_JDK/bin/javac"; then
26243          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26245          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26246$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26247          BOOT_JDK_FOUND=no
26248        else
26249          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26250          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26251
26252          # Extra M4 quote needed to protect [] in grep expression.
26253          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26254          if test "x$FOUND_CORRECT_VERSION" = x; then
26255            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26257            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26258$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26259            BOOT_JDK_FOUND=no
26260          else
26261            # We're done! :-)
26262            BOOT_JDK_FOUND=yes
26263
26264  # Only process if variable expands to non-empty
26265
26266  if test "x$BOOT_JDK" != x; then
26267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26268
26269  # Input might be given as Windows format, start by converting to
26270  # unix format.
26271  path="$BOOT_JDK"
26272  new_path=`$CYGPATH -u "$path"`
26273
26274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26277  # "foo.exe" is OK but "foo" is an error.
26278  #
26279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26280  # It is also a way to make sure we got the proper file name for the real test later on.
26281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26282  if test "x$test_shortpath" = x; then
26283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26285    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26286  fi
26287
26288  # Call helper function which possibly converts this using DOS-style short mode.
26289  # If so, the updated path is stored in $new_path.
26290
26291  input_path="$new_path"
26292  # Check if we need to convert this using DOS-style short mode. If the path
26293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26294  # take no chances and rewrite it.
26295  # Note: m4 eats our [], so we need to use [ and ] instead.
26296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26297  if test "x$has_forbidden_chars" != x; then
26298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26302      # Going to short mode and back again did indeed matter. Since short mode is
26303      # case insensitive, let's make it lowercase to improve readability.
26304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26305      # Now convert it back to Unix-style (cygpath)
26306      input_path=`$CYGPATH -u "$shortmode_path"`
26307      new_path="$input_path"
26308    fi
26309  fi
26310
26311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26312  if test "x$test_cygdrive_prefix" = x; then
26313    # As a simple fix, exclude /usr/bin since it's not a real path.
26314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26316      # a path prefixed by /cygdrive for fixpath to work.
26317      new_path="$CYGWIN_ROOT_PATH$input_path"
26318    fi
26319  fi
26320
26321
26322  if test "x$path" != "x$new_path"; then
26323    BOOT_JDK="$new_path"
26324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26326  fi
26327
26328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26329
26330  path="$BOOT_JDK"
26331  has_colon=`$ECHO $path | $GREP ^.:`
26332  new_path="$path"
26333  if test "x$has_colon" = x; then
26334    # Not in mixed or Windows style, start by that.
26335    new_path=`cmd //c echo $path`
26336  fi
26337
26338
26339  input_path="$new_path"
26340  # Check if we need to convert this using DOS-style short mode. If the path
26341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26342  # take no chances and rewrite it.
26343  # Note: m4 eats our [], so we need to use [ and ] instead.
26344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26345  if test "x$has_forbidden_chars" != x; then
26346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26348  fi
26349
26350
26351  windows_path="$new_path"
26352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26353    unix_path=`$CYGPATH -u "$windows_path"`
26354    new_path="$unix_path"
26355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26357    new_path="$unix_path"
26358  fi
26359
26360  if test "x$path" != "x$new_path"; then
26361    BOOT_JDK="$new_path"
26362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26364  fi
26365
26366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26368
26369    else
26370      # We're on a unix platform. Hooray! :)
26371      path="$BOOT_JDK"
26372      has_space=`$ECHO "$path" | $GREP " "`
26373      if test "x$has_space" != x; then
26374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26376        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26377      fi
26378
26379      # Use eval to expand a potential ~
26380      eval path="$path"
26381      if test ! -f "$path" && test ! -d "$path"; then
26382        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26383      fi
26384
26385      if test -d "$path"; then
26386        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26387      else
26388        dir="`$DIRNAME "$path"`"
26389        base="`$BASENAME "$path"`"
26390        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26391      fi
26392    fi
26393  fi
26394
26395            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26396$as_echo_n "checking for Boot JDK... " >&6; }
26397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26398$as_echo "$BOOT_JDK" >&6; }
26399            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26400$as_echo_n "checking Boot JDK version... " >&6; }
26401            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26403$as_echo "$BOOT_JDK_VERSION" >&6; }
26404          fi # end check jdk version
26405        fi # end check javac
26406      fi # end check java
26407    fi # end check boot jdk found
26408  fi
26409
26410
26411  if test "x$BOOT_JDK_FOUND" = xno; then
26412    # Now execute the test
26413
26414  if test -x /usr/libexec/java_home; then
26415    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26416    BOOT_JDK_FOUND=maybe
26417    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26418$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26419  fi
26420
26421
26422    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26423    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26424      # Do we have a bin/java?
26425      if test ! -x "$BOOT_JDK/bin/java"; then
26426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26428        BOOT_JDK_FOUND=no
26429      else
26430        # Do we have a bin/javac?
26431        if test ! -x "$BOOT_JDK/bin/javac"; then
26432          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26434          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26435$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26436          BOOT_JDK_FOUND=no
26437        else
26438          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26439          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26440
26441          # Extra M4 quote needed to protect [] in grep expression.
26442          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26443          if test "x$FOUND_CORRECT_VERSION" = x; then
26444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26446            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26447$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26448            BOOT_JDK_FOUND=no
26449          else
26450            # We're done! :-)
26451            BOOT_JDK_FOUND=yes
26452
26453  # Only process if variable expands to non-empty
26454
26455  if test "x$BOOT_JDK" != x; then
26456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26457
26458  # Input might be given as Windows format, start by converting to
26459  # unix format.
26460  path="$BOOT_JDK"
26461  new_path=`$CYGPATH -u "$path"`
26462
26463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26466  # "foo.exe" is OK but "foo" is an error.
26467  #
26468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26469  # It is also a way to make sure we got the proper file name for the real test later on.
26470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26471  if test "x$test_shortpath" = x; then
26472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26474    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26475  fi
26476
26477  # Call helper function which possibly converts this using DOS-style short mode.
26478  # If so, the updated path is stored in $new_path.
26479
26480  input_path="$new_path"
26481  # Check if we need to convert this using DOS-style short mode. If the path
26482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26483  # take no chances and rewrite it.
26484  # Note: m4 eats our [], so we need to use [ and ] instead.
26485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26486  if test "x$has_forbidden_chars" != x; then
26487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26491      # Going to short mode and back again did indeed matter. Since short mode is
26492      # case insensitive, let's make it lowercase to improve readability.
26493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26494      # Now convert it back to Unix-style (cygpath)
26495      input_path=`$CYGPATH -u "$shortmode_path"`
26496      new_path="$input_path"
26497    fi
26498  fi
26499
26500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26501  if test "x$test_cygdrive_prefix" = x; then
26502    # As a simple fix, exclude /usr/bin since it's not a real path.
26503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26505      # a path prefixed by /cygdrive for fixpath to work.
26506      new_path="$CYGWIN_ROOT_PATH$input_path"
26507    fi
26508  fi
26509
26510
26511  if test "x$path" != "x$new_path"; then
26512    BOOT_JDK="$new_path"
26513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26515  fi
26516
26517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518
26519  path="$BOOT_JDK"
26520  has_colon=`$ECHO $path | $GREP ^.:`
26521  new_path="$path"
26522  if test "x$has_colon" = x; then
26523    # Not in mixed or Windows style, start by that.
26524    new_path=`cmd //c echo $path`
26525  fi
26526
26527
26528  input_path="$new_path"
26529  # Check if we need to convert this using DOS-style short mode. If the path
26530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26531  # take no chances and rewrite it.
26532  # Note: m4 eats our [], so we need to use [ and ] instead.
26533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26534  if test "x$has_forbidden_chars" != x; then
26535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26537  fi
26538
26539
26540  windows_path="$new_path"
26541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26542    unix_path=`$CYGPATH -u "$windows_path"`
26543    new_path="$unix_path"
26544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26546    new_path="$unix_path"
26547  fi
26548
26549  if test "x$path" != "x$new_path"; then
26550    BOOT_JDK="$new_path"
26551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26553  fi
26554
26555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26557
26558    else
26559      # We're on a unix platform. Hooray! :)
26560      path="$BOOT_JDK"
26561      has_space=`$ECHO "$path" | $GREP " "`
26562      if test "x$has_space" != x; then
26563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26566      fi
26567
26568      # Use eval to expand a potential ~
26569      eval path="$path"
26570      if test ! -f "$path" && test ! -d "$path"; then
26571        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26572      fi
26573
26574      if test -d "$path"; then
26575        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26576      else
26577        dir="`$DIRNAME "$path"`"
26578        base="`$BASENAME "$path"`"
26579        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26580      fi
26581    fi
26582  fi
26583
26584            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26585$as_echo_n "checking for Boot JDK... " >&6; }
26586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26587$as_echo "$BOOT_JDK" >&6; }
26588            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26589$as_echo_n "checking Boot JDK version... " >&6; }
26590            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26591            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26592$as_echo "$BOOT_JDK_VERSION" >&6; }
26593          fi # end check jdk version
26594        fi # end check javac
26595      fi # end check java
26596    fi # end check boot jdk found
26597  fi
26598
26599  fi
26600
26601
26602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26604      # Do we have a bin/java?
26605      if test ! -x "$BOOT_JDK/bin/java"; then
26606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26608        BOOT_JDK_FOUND=no
26609      else
26610        # Do we have a bin/javac?
26611        if test ! -x "$BOOT_JDK/bin/javac"; then
26612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26616          BOOT_JDK_FOUND=no
26617        else
26618          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26619          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26620
26621          # Extra M4 quote needed to protect [] in grep expression.
26622          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26623          if test "x$FOUND_CORRECT_VERSION" = x; then
26624            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26626            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26627$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26628            BOOT_JDK_FOUND=no
26629          else
26630            # We're done! :-)
26631            BOOT_JDK_FOUND=yes
26632
26633  # Only process if variable expands to non-empty
26634
26635  if test "x$BOOT_JDK" != x; then
26636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26637
26638  # Input might be given as Windows format, start by converting to
26639  # unix format.
26640  path="$BOOT_JDK"
26641  new_path=`$CYGPATH -u "$path"`
26642
26643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26646  # "foo.exe" is OK but "foo" is an error.
26647  #
26648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26649  # It is also a way to make sure we got the proper file name for the real test later on.
26650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26651  if test "x$test_shortpath" = x; then
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26655  fi
26656
26657  # Call helper function which possibly converts this using DOS-style short mode.
26658  # If so, the updated path is stored in $new_path.
26659
26660  input_path="$new_path"
26661  # Check if we need to convert this using DOS-style short mode. If the path
26662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26663  # take no chances and rewrite it.
26664  # Note: m4 eats our [], so we need to use [ and ] instead.
26665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26666  if test "x$has_forbidden_chars" != x; then
26667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26671      # Going to short mode and back again did indeed matter. Since short mode is
26672      # case insensitive, let's make it lowercase to improve readability.
26673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26674      # Now convert it back to Unix-style (cygpath)
26675      input_path=`$CYGPATH -u "$shortmode_path"`
26676      new_path="$input_path"
26677    fi
26678  fi
26679
26680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26681  if test "x$test_cygdrive_prefix" = x; then
26682    # As a simple fix, exclude /usr/bin since it's not a real path.
26683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26685      # a path prefixed by /cygdrive for fixpath to work.
26686      new_path="$CYGWIN_ROOT_PATH$input_path"
26687    fi
26688  fi
26689
26690
26691  if test "x$path" != "x$new_path"; then
26692    BOOT_JDK="$new_path"
26693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26695  fi
26696
26697    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26698
26699  path="$BOOT_JDK"
26700  has_colon=`$ECHO $path | $GREP ^.:`
26701  new_path="$path"
26702  if test "x$has_colon" = x; then
26703    # Not in mixed or Windows style, start by that.
26704    new_path=`cmd //c echo $path`
26705  fi
26706
26707
26708  input_path="$new_path"
26709  # Check if we need to convert this using DOS-style short mode. If the path
26710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26711  # take no chances and rewrite it.
26712  # Note: m4 eats our [], so we need to use [ and ] instead.
26713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26714  if test "x$has_forbidden_chars" != x; then
26715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26717  fi
26718
26719
26720  windows_path="$new_path"
26721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26722    unix_path=`$CYGPATH -u "$windows_path"`
26723    new_path="$unix_path"
26724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26726    new_path="$unix_path"
26727  fi
26728
26729  if test "x$path" != "x$new_path"; then
26730    BOOT_JDK="$new_path"
26731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26733  fi
26734
26735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26737
26738    else
26739      # We're on a unix platform. Hooray! :)
26740      path="$BOOT_JDK"
26741      has_space=`$ECHO "$path" | $GREP " "`
26742      if test "x$has_space" != x; then
26743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26745        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26746      fi
26747
26748      # Use eval to expand a potential ~
26749      eval path="$path"
26750      if test ! -f "$path" && test ! -d "$path"; then
26751        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26752      fi
26753
26754      if test -d "$path"; then
26755        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26756      else
26757        dir="`$DIRNAME "$path"`"
26758        base="`$BASENAME "$path"`"
26759        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26760      fi
26761    fi
26762  fi
26763
26764            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26765$as_echo_n "checking for Boot JDK... " >&6; }
26766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26767$as_echo "$BOOT_JDK" >&6; }
26768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26769$as_echo_n "checking Boot JDK version... " >&6; }
26770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26772$as_echo "$BOOT_JDK_VERSION" >&6; }
26773          fi # end check jdk version
26774        fi # end check javac
26775      fi # end check java
26776    fi # end check boot jdk found
26777  fi
26778
26779
26780  # Test: Is $JAVA_HOME set?
26781
26782  if test "x$BOOT_JDK_FOUND" = xno; then
26783    # Now execute the test
26784
26785  if test "x$JAVA_HOME" != x; then
26786    JAVA_HOME_PROCESSED="$JAVA_HOME"
26787
26788  # Only process if variable expands to non-empty
26789
26790  if test "x$JAVA_HOME_PROCESSED" != x; then
26791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26792
26793  # Input might be given as Windows format, start by converting to
26794  # unix format.
26795  path="$JAVA_HOME_PROCESSED"
26796  new_path=`$CYGPATH -u "$path"`
26797
26798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26801  # "foo.exe" is OK but "foo" is an error.
26802  #
26803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26804  # It is also a way to make sure we got the proper file name for the real test later on.
26805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26806  if test "x$test_shortpath" = x; then
26807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26808$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26809    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26810  fi
26811
26812  # Call helper function which possibly converts this using DOS-style short mode.
26813  # If so, the updated path is stored in $new_path.
26814
26815  input_path="$new_path"
26816  # Check if we need to convert this using DOS-style short mode. If the path
26817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26818  # take no chances and rewrite it.
26819  # Note: m4 eats our [], so we need to use [ and ] instead.
26820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26821  if test "x$has_forbidden_chars" != x; then
26822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26826      # Going to short mode and back again did indeed matter. Since short mode is
26827      # case insensitive, let's make it lowercase to improve readability.
26828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26829      # Now convert it back to Unix-style (cygpath)
26830      input_path=`$CYGPATH -u "$shortmode_path"`
26831      new_path="$input_path"
26832    fi
26833  fi
26834
26835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26836  if test "x$test_cygdrive_prefix" = x; then
26837    # As a simple fix, exclude /usr/bin since it's not a real path.
26838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26840      # a path prefixed by /cygdrive for fixpath to work.
26841      new_path="$CYGWIN_ROOT_PATH$input_path"
26842    fi
26843  fi
26844
26845
26846  if test "x$path" != "x$new_path"; then
26847    JAVA_HOME_PROCESSED="$new_path"
26848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26849$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26850  fi
26851
26852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26853
26854  path="$JAVA_HOME_PROCESSED"
26855  has_colon=`$ECHO $path | $GREP ^.:`
26856  new_path="$path"
26857  if test "x$has_colon" = x; then
26858    # Not in mixed or Windows style, start by that.
26859    new_path=`cmd //c echo $path`
26860  fi
26861
26862
26863  input_path="$new_path"
26864  # Check if we need to convert this using DOS-style short mode. If the path
26865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26866  # take no chances and rewrite it.
26867  # Note: m4 eats our [], so we need to use [ and ] instead.
26868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26869  if test "x$has_forbidden_chars" != x; then
26870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26872  fi
26873
26874
26875  windows_path="$new_path"
26876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26877    unix_path=`$CYGPATH -u "$windows_path"`
26878    new_path="$unix_path"
26879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26881    new_path="$unix_path"
26882  fi
26883
26884  if test "x$path" != "x$new_path"; then
26885    JAVA_HOME_PROCESSED="$new_path"
26886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26887$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26888  fi
26889
26890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26892
26893    else
26894      # We're on a unix platform. Hooray! :)
26895      path="$JAVA_HOME_PROCESSED"
26896      has_space=`$ECHO "$path" | $GREP " "`
26897      if test "x$has_space" != x; then
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26899$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26901      fi
26902
26903      # Use eval to expand a potential ~
26904      eval path="$path"
26905      if test ! -f "$path" && test ! -d "$path"; then
26906        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26907      fi
26908
26909      if test -d "$path"; then
26910        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26911      else
26912        dir="`$DIRNAME "$path"`"
26913        base="`$BASENAME "$path"`"
26914        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26915      fi
26916    fi
26917  fi
26918
26919    if test ! -d "$JAVA_HOME_PROCESSED"; then
26920      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26921$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26922    else
26923      # Aha, the user has set a JAVA_HOME
26924      # let us use that as the Boot JDK.
26925      BOOT_JDK="$JAVA_HOME_PROCESSED"
26926      BOOT_JDK_FOUND=maybe
26927      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26928$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26929    fi
26930  fi
26931
26932
26933    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26934    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26935      # Do we have a bin/java?
26936      if test ! -x "$BOOT_JDK/bin/java"; then
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26939        BOOT_JDK_FOUND=no
26940      else
26941        # Do we have a bin/javac?
26942        if test ! -x "$BOOT_JDK/bin/javac"; then
26943          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26945          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26946$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26947          BOOT_JDK_FOUND=no
26948        else
26949          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26950          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26951
26952          # Extra M4 quote needed to protect [] in grep expression.
26953          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26954          if test "x$FOUND_CORRECT_VERSION" = x; then
26955            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26957            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26958$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26959            BOOT_JDK_FOUND=no
26960          else
26961            # We're done! :-)
26962            BOOT_JDK_FOUND=yes
26963
26964  # Only process if variable expands to non-empty
26965
26966  if test "x$BOOT_JDK" != x; then
26967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968
26969  # Input might be given as Windows format, start by converting to
26970  # unix format.
26971  path="$BOOT_JDK"
26972  new_path=`$CYGPATH -u "$path"`
26973
26974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26977  # "foo.exe" is OK but "foo" is an error.
26978  #
26979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26980  # It is also a way to make sure we got the proper file name for the real test later on.
26981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26982  if test "x$test_shortpath" = x; then
26983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26985    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26986  fi
26987
26988  # Call helper function which possibly converts this using DOS-style short mode.
26989  # If so, the updated path is stored in $new_path.
26990
26991  input_path="$new_path"
26992  # Check if we need to convert this using DOS-style short mode. If the path
26993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26994  # take no chances and rewrite it.
26995  # Note: m4 eats our [], so we need to use [ and ] instead.
26996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26997  if test "x$has_forbidden_chars" != x; then
26998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27002      # Going to short mode and back again did indeed matter. Since short mode is
27003      # case insensitive, let's make it lowercase to improve readability.
27004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27005      # Now convert it back to Unix-style (cygpath)
27006      input_path=`$CYGPATH -u "$shortmode_path"`
27007      new_path="$input_path"
27008    fi
27009  fi
27010
27011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27012  if test "x$test_cygdrive_prefix" = x; then
27013    # As a simple fix, exclude /usr/bin since it's not a real path.
27014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27016      # a path prefixed by /cygdrive for fixpath to work.
27017      new_path="$CYGWIN_ROOT_PATH$input_path"
27018    fi
27019  fi
27020
27021
27022  if test "x$path" != "x$new_path"; then
27023    BOOT_JDK="$new_path"
27024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27026  fi
27027
27028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27029
27030  path="$BOOT_JDK"
27031  has_colon=`$ECHO $path | $GREP ^.:`
27032  new_path="$path"
27033  if test "x$has_colon" = x; then
27034    # Not in mixed or Windows style, start by that.
27035    new_path=`cmd //c echo $path`
27036  fi
27037
27038
27039  input_path="$new_path"
27040  # Check if we need to convert this using DOS-style short mode. If the path
27041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27042  # take no chances and rewrite it.
27043  # Note: m4 eats our [], so we need to use [ and ] instead.
27044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27045  if test "x$has_forbidden_chars" != x; then
27046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27048  fi
27049
27050
27051  windows_path="$new_path"
27052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27053    unix_path=`$CYGPATH -u "$windows_path"`
27054    new_path="$unix_path"
27055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27057    new_path="$unix_path"
27058  fi
27059
27060  if test "x$path" != "x$new_path"; then
27061    BOOT_JDK="$new_path"
27062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27064  fi
27065
27066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27068
27069    else
27070      # We're on a unix platform. Hooray! :)
27071      path="$BOOT_JDK"
27072      has_space=`$ECHO "$path" | $GREP " "`
27073      if test "x$has_space" != x; then
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27077      fi
27078
27079      # Use eval to expand a potential ~
27080      eval path="$path"
27081      if test ! -f "$path" && test ! -d "$path"; then
27082        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27083      fi
27084
27085      if test -d "$path"; then
27086        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27087      else
27088        dir="`$DIRNAME "$path"`"
27089        base="`$BASENAME "$path"`"
27090        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27091      fi
27092    fi
27093  fi
27094
27095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27096$as_echo_n "checking for Boot JDK... " >&6; }
27097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27098$as_echo "$BOOT_JDK" >&6; }
27099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27100$as_echo_n "checking Boot JDK version... " >&6; }
27101            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27103$as_echo "$BOOT_JDK_VERSION" >&6; }
27104          fi # end check jdk version
27105        fi # end check javac
27106      fi # end check java
27107    fi # end check boot jdk found
27108  fi
27109
27110
27111  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27112
27113  if test "x$BOOT_JDK_FOUND" = xno; then
27114    # Now execute the test
27115
27116  # Extract the first word of "javac", so it can be a program name with args.
27117set dummy javac; ac_word=$2
27118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27119$as_echo_n "checking for $ac_word... " >&6; }
27120if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27121  $as_echo_n "(cached) " >&6
27122else
27123  case $JAVAC_CHECK in
27124  [\\/]* | ?:[\\/]*)
27125  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27126  ;;
27127  *)
27128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27129for as_dir in $PATH
27130do
27131  IFS=$as_save_IFS
27132  test -z "$as_dir" && as_dir=.
27133    for ac_exec_ext in '' $ac_executable_extensions; do
27134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27135    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27137    break 2
27138  fi
27139done
27140  done
27141IFS=$as_save_IFS
27142
27143  ;;
27144esac
27145fi
27146JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27147if test -n "$JAVAC_CHECK"; then
27148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27149$as_echo "$JAVAC_CHECK" >&6; }
27150else
27151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27152$as_echo "no" >&6; }
27153fi
27154
27155
27156  # Extract the first word of "java", so it can be a program name with args.
27157set dummy java; ac_word=$2
27158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27159$as_echo_n "checking for $ac_word... " >&6; }
27160if ${ac_cv_path_JAVA_CHECK+:} false; then :
27161  $as_echo_n "(cached) " >&6
27162else
27163  case $JAVA_CHECK in
27164  [\\/]* | ?:[\\/]*)
27165  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27166  ;;
27167  *)
27168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27169for as_dir in $PATH
27170do
27171  IFS=$as_save_IFS
27172  test -z "$as_dir" && as_dir=.
27173    for ac_exec_ext in '' $ac_executable_extensions; do
27174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27175    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27177    break 2
27178  fi
27179done
27180  done
27181IFS=$as_save_IFS
27182
27183  ;;
27184esac
27185fi
27186JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27187if test -n "$JAVA_CHECK"; then
27188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27189$as_echo "$JAVA_CHECK" >&6; }
27190else
27191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27192$as_echo "no" >&6; }
27193fi
27194
27195
27196  BINARY="$JAVAC_CHECK"
27197  if test "x$JAVAC_CHECK" = x; then
27198    BINARY="$JAVA_CHECK"
27199  fi
27200  if test "x$BINARY" != x; then
27201    # So there is a java(c) binary, it might be part of a JDK.
27202    # Lets find the JDK/JRE directory by following symbolic links.
27203    # Linux/GNU systems often have links from /usr/bin/java to
27204    # /etc/alternatives/java to the real JDK binary.
27205
27206  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27207    # Follow a chain of symbolic links. Use readlink
27208    # where it exists, else fall back to horribly
27209    # complicated shell code.
27210    if test "x$READLINK_TESTED" != yes; then
27211      # On MacOSX there is a readlink tool with a different
27212      # purpose than the GNU readlink tool. Check the found readlink.
27213      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27214      if test "x$ISGNU" = x; then
27215        # A readlink that we do not know how to use.
27216        # Are there other non-GNU readlinks out there?
27217        READLINK_TESTED=yes
27218        READLINK=
27219      fi
27220    fi
27221
27222    if test "x$READLINK" != x; then
27223      BINARY=`$READLINK -f $BINARY`
27224    else
27225      # Save the current directory for restoring afterwards
27226      STARTDIR=$PWD
27227      COUNTER=0
27228      sym_link_dir=`$DIRNAME $BINARY`
27229      sym_link_file=`$BASENAME $BINARY`
27230      cd $sym_link_dir
27231      # Use -P flag to resolve symlinks in directories.
27232      cd `$THEPWDCMD -P`
27233      sym_link_dir=`$THEPWDCMD -P`
27234      # Resolve file symlinks
27235      while test $COUNTER -lt 20; do
27236        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27237        if test "x$ISLINK" == x; then
27238          # This is not a symbolic link! We are done!
27239          break
27240        fi
27241        # Again resolve directory symlinks since the target of the just found
27242        # link could be in a different directory
27243        cd `$DIRNAME $ISLINK`
27244        sym_link_dir=`$THEPWDCMD -P`
27245        sym_link_file=`$BASENAME $ISLINK`
27246        let COUNTER=COUNTER+1
27247      done
27248      cd $STARTDIR
27249      BINARY=$sym_link_dir/$sym_link_file
27250    fi
27251  fi
27252
27253    BOOT_JDK=`dirname "$BINARY"`
27254    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27255    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27256      # Looks like we found ourselves an JDK
27257      BOOT_JDK_FOUND=maybe
27258      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27259$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27260    fi
27261  fi
27262
27263
27264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27266      # Do we have a bin/java?
27267      if test ! -x "$BOOT_JDK/bin/java"; then
27268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27270        BOOT_JDK_FOUND=no
27271      else
27272        # Do we have a bin/javac?
27273        if test ! -x "$BOOT_JDK/bin/javac"; then
27274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27278          BOOT_JDK_FOUND=no
27279        else
27280          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27281          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27282
27283          # Extra M4 quote needed to protect [] in grep expression.
27284          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27285          if test "x$FOUND_CORRECT_VERSION" = x; then
27286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27288            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27289$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27290            BOOT_JDK_FOUND=no
27291          else
27292            # We're done! :-)
27293            BOOT_JDK_FOUND=yes
27294
27295  # Only process if variable expands to non-empty
27296
27297  if test "x$BOOT_JDK" != x; then
27298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27299
27300  # Input might be given as Windows format, start by converting to
27301  # unix format.
27302  path="$BOOT_JDK"
27303  new_path=`$CYGPATH -u "$path"`
27304
27305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27308  # "foo.exe" is OK but "foo" is an error.
27309  #
27310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27311  # It is also a way to make sure we got the proper file name for the real test later on.
27312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27313  if test "x$test_shortpath" = x; then
27314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27316    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27317  fi
27318
27319  # Call helper function which possibly converts this using DOS-style short mode.
27320  # If so, the updated path is stored in $new_path.
27321
27322  input_path="$new_path"
27323  # Check if we need to convert this using DOS-style short mode. If the path
27324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27325  # take no chances and rewrite it.
27326  # Note: m4 eats our [], so we need to use [ and ] instead.
27327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27328  if test "x$has_forbidden_chars" != x; then
27329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27333      # Going to short mode and back again did indeed matter. Since short mode is
27334      # case insensitive, let's make it lowercase to improve readability.
27335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27336      # Now convert it back to Unix-style (cygpath)
27337      input_path=`$CYGPATH -u "$shortmode_path"`
27338      new_path="$input_path"
27339    fi
27340  fi
27341
27342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27343  if test "x$test_cygdrive_prefix" = x; then
27344    # As a simple fix, exclude /usr/bin since it's not a real path.
27345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27347      # a path prefixed by /cygdrive for fixpath to work.
27348      new_path="$CYGWIN_ROOT_PATH$input_path"
27349    fi
27350  fi
27351
27352
27353  if test "x$path" != "x$new_path"; then
27354    BOOT_JDK="$new_path"
27355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27357  fi
27358
27359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27360
27361  path="$BOOT_JDK"
27362  has_colon=`$ECHO $path | $GREP ^.:`
27363  new_path="$path"
27364  if test "x$has_colon" = x; then
27365    # Not in mixed or Windows style, start by that.
27366    new_path=`cmd //c echo $path`
27367  fi
27368
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27379  fi
27380
27381
27382  windows_path="$new_path"
27383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27384    unix_path=`$CYGPATH -u "$windows_path"`
27385    new_path="$unix_path"
27386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27388    new_path="$unix_path"
27389  fi
27390
27391  if test "x$path" != "x$new_path"; then
27392    BOOT_JDK="$new_path"
27393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27395  fi
27396
27397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27399
27400    else
27401      # We're on a unix platform. Hooray! :)
27402      path="$BOOT_JDK"
27403      has_space=`$ECHO "$path" | $GREP " "`
27404      if test "x$has_space" != x; then
27405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27408      fi
27409
27410      # Use eval to expand a potential ~
27411      eval path="$path"
27412      if test ! -f "$path" && test ! -d "$path"; then
27413        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27414      fi
27415
27416      if test -d "$path"; then
27417        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27418      else
27419        dir="`$DIRNAME "$path"`"
27420        base="`$BASENAME "$path"`"
27421        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27422      fi
27423    fi
27424  fi
27425
27426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27427$as_echo_n "checking for Boot JDK... " >&6; }
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27429$as_echo "$BOOT_JDK" >&6; }
27430            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27431$as_echo_n "checking Boot JDK version... " >&6; }
27432            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27434$as_echo "$BOOT_JDK_VERSION" >&6; }
27435          fi # end check jdk version
27436        fi # end check javac
27437      fi # end check java
27438    fi # end check boot jdk found
27439  fi
27440
27441
27442  # Test: Is there a JDK installed in default, well-known locations?
27443
27444  if test "x$BOOT_JDK_FOUND" = xno; then
27445    # Now execute the test
27446
27447  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27448
27449  if test "x$BOOT_JDK_FOUND" = xno; then
27450    # Now execute the test
27451
27452  if test "x$ProgramW6432" != x; then
27453    VIRTUAL_DIR="$ProgramW6432/Java"
27454
27455  windows_path="$VIRTUAL_DIR"
27456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27457    unix_path=`$CYGPATH -u "$windows_path"`
27458    VIRTUAL_DIR="$unix_path"
27459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27461    VIRTUAL_DIR="$unix_path"
27462  fi
27463
27464
27465  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27466  BOOT_JDK_SUFFIX=""
27467  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27468  if test "x$ALL_JDKS_FOUND" != x; then
27469    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27470
27471  if test "x$BOOT_JDK_FOUND" = xno; then
27472    # Now execute the test
27473
27474        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27475        if test -d "$BOOT_JDK"; then
27476          BOOT_JDK_FOUND=maybe
27477          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27478$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27479        fi
27480
27481
27482    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27483    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27484      # Do we have a bin/java?
27485      if test ! -x "$BOOT_JDK/bin/java"; then
27486        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27488        BOOT_JDK_FOUND=no
27489      else
27490        # Do we have a bin/javac?
27491        if test ! -x "$BOOT_JDK/bin/javac"; then
27492          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27494          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27495$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27496          BOOT_JDK_FOUND=no
27497        else
27498          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27499          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27500
27501          # Extra M4 quote needed to protect [] in grep expression.
27502          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27503          if test "x$FOUND_CORRECT_VERSION" = x; then
27504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27506            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27507$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27508            BOOT_JDK_FOUND=no
27509          else
27510            # We're done! :-)
27511            BOOT_JDK_FOUND=yes
27512
27513  # Only process if variable expands to non-empty
27514
27515  if test "x$BOOT_JDK" != x; then
27516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27517
27518  # Input might be given as Windows format, start by converting to
27519  # unix format.
27520  path="$BOOT_JDK"
27521  new_path=`$CYGPATH -u "$path"`
27522
27523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27526  # "foo.exe" is OK but "foo" is an error.
27527  #
27528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27529  # It is also a way to make sure we got the proper file name for the real test later on.
27530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27531  if test "x$test_shortpath" = x; then
27532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27534    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27535  fi
27536
27537  # Call helper function which possibly converts this using DOS-style short mode.
27538  # If so, the updated path is stored in $new_path.
27539
27540  input_path="$new_path"
27541  # Check if we need to convert this using DOS-style short mode. If the path
27542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27543  # take no chances and rewrite it.
27544  # Note: m4 eats our [], so we need to use [ and ] instead.
27545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27546  if test "x$has_forbidden_chars" != x; then
27547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27551      # Going to short mode and back again did indeed matter. Since short mode is
27552      # case insensitive, let's make it lowercase to improve readability.
27553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27554      # Now convert it back to Unix-style (cygpath)
27555      input_path=`$CYGPATH -u "$shortmode_path"`
27556      new_path="$input_path"
27557    fi
27558  fi
27559
27560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27561  if test "x$test_cygdrive_prefix" = x; then
27562    # As a simple fix, exclude /usr/bin since it's not a real path.
27563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27565      # a path prefixed by /cygdrive for fixpath to work.
27566      new_path="$CYGWIN_ROOT_PATH$input_path"
27567    fi
27568  fi
27569
27570
27571  if test "x$path" != "x$new_path"; then
27572    BOOT_JDK="$new_path"
27573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27575  fi
27576
27577    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27578
27579  path="$BOOT_JDK"
27580  has_colon=`$ECHO $path | $GREP ^.:`
27581  new_path="$path"
27582  if test "x$has_colon" = x; then
27583    # Not in mixed or Windows style, start by that.
27584    new_path=`cmd //c echo $path`
27585  fi
27586
27587
27588  input_path="$new_path"
27589  # Check if we need to convert this using DOS-style short mode. If the path
27590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27591  # take no chances and rewrite it.
27592  # Note: m4 eats our [], so we need to use [ and ] instead.
27593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27594  if test "x$has_forbidden_chars" != x; then
27595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27597  fi
27598
27599
27600  windows_path="$new_path"
27601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27602    unix_path=`$CYGPATH -u "$windows_path"`
27603    new_path="$unix_path"
27604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27606    new_path="$unix_path"
27607  fi
27608
27609  if test "x$path" != "x$new_path"; then
27610    BOOT_JDK="$new_path"
27611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27613  fi
27614
27615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27617
27618    else
27619      # We're on a unix platform. Hooray! :)
27620      path="$BOOT_JDK"
27621      has_space=`$ECHO "$path" | $GREP " "`
27622      if test "x$has_space" != x; then
27623        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27625        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27626      fi
27627
27628      # Use eval to expand a potential ~
27629      eval path="$path"
27630      if test ! -f "$path" && test ! -d "$path"; then
27631        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27632      fi
27633
27634      if test -d "$path"; then
27635        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27636      else
27637        dir="`$DIRNAME "$path"`"
27638        base="`$BASENAME "$path"`"
27639        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27640      fi
27641    fi
27642  fi
27643
27644            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27645$as_echo_n "checking for Boot JDK... " >&6; }
27646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27647$as_echo "$BOOT_JDK" >&6; }
27648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27649$as_echo_n "checking Boot JDK version... " >&6; }
27650            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27652$as_echo "$BOOT_JDK_VERSION" >&6; }
27653          fi # end check jdk version
27654        fi # end check javac
27655      fi # end check java
27656    fi # end check boot jdk found
27657  fi
27658
27659    done
27660  fi
27661
27662  fi
27663
27664
27665    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27666    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27667      # Do we have a bin/java?
27668      if test ! -x "$BOOT_JDK/bin/java"; then
27669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27671        BOOT_JDK_FOUND=no
27672      else
27673        # Do we have a bin/javac?
27674        if test ! -x "$BOOT_JDK/bin/javac"; then
27675          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27677          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27678$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27679          BOOT_JDK_FOUND=no
27680        else
27681          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27682          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27683
27684          # Extra M4 quote needed to protect [] in grep expression.
27685          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27686          if test "x$FOUND_CORRECT_VERSION" = x; then
27687            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27689            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27690$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27691            BOOT_JDK_FOUND=no
27692          else
27693            # We're done! :-)
27694            BOOT_JDK_FOUND=yes
27695
27696  # Only process if variable expands to non-empty
27697
27698  if test "x$BOOT_JDK" != x; then
27699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27700
27701  # Input might be given as Windows format, start by converting to
27702  # unix format.
27703  path="$BOOT_JDK"
27704  new_path=`$CYGPATH -u "$path"`
27705
27706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27709  # "foo.exe" is OK but "foo" is an error.
27710  #
27711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27712  # It is also a way to make sure we got the proper file name for the real test later on.
27713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27714  if test "x$test_shortpath" = x; then
27715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27717    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27718  fi
27719
27720  # Call helper function which possibly converts this using DOS-style short mode.
27721  # If so, the updated path is stored in $new_path.
27722
27723  input_path="$new_path"
27724  # Check if we need to convert this using DOS-style short mode. If the path
27725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27726  # take no chances and rewrite it.
27727  # Note: m4 eats our [], so we need to use [ and ] instead.
27728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27729  if test "x$has_forbidden_chars" != x; then
27730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27734      # Going to short mode and back again did indeed matter. Since short mode is
27735      # case insensitive, let's make it lowercase to improve readability.
27736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27737      # Now convert it back to Unix-style (cygpath)
27738      input_path=`$CYGPATH -u "$shortmode_path"`
27739      new_path="$input_path"
27740    fi
27741  fi
27742
27743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27744  if test "x$test_cygdrive_prefix" = x; then
27745    # As a simple fix, exclude /usr/bin since it's not a real path.
27746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27748      # a path prefixed by /cygdrive for fixpath to work.
27749      new_path="$CYGWIN_ROOT_PATH$input_path"
27750    fi
27751  fi
27752
27753
27754  if test "x$path" != "x$new_path"; then
27755    BOOT_JDK="$new_path"
27756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27758  fi
27759
27760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27761
27762  path="$BOOT_JDK"
27763  has_colon=`$ECHO $path | $GREP ^.:`
27764  new_path="$path"
27765  if test "x$has_colon" = x; then
27766    # Not in mixed or Windows style, start by that.
27767    new_path=`cmd //c echo $path`
27768  fi
27769
27770
27771  input_path="$new_path"
27772  # Check if we need to convert this using DOS-style short mode. If the path
27773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27774  # take no chances and rewrite it.
27775  # Note: m4 eats our [], so we need to use [ and ] instead.
27776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27777  if test "x$has_forbidden_chars" != x; then
27778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27780  fi
27781
27782
27783  windows_path="$new_path"
27784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27785    unix_path=`$CYGPATH -u "$windows_path"`
27786    new_path="$unix_path"
27787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27789    new_path="$unix_path"
27790  fi
27791
27792  if test "x$path" != "x$new_path"; then
27793    BOOT_JDK="$new_path"
27794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27796  fi
27797
27798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27800
27801    else
27802      # We're on a unix platform. Hooray! :)
27803      path="$BOOT_JDK"
27804      has_space=`$ECHO "$path" | $GREP " "`
27805      if test "x$has_space" != x; then
27806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27807$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27809      fi
27810
27811      # Use eval to expand a potential ~
27812      eval path="$path"
27813      if test ! -f "$path" && test ! -d "$path"; then
27814        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27815      fi
27816
27817      if test -d "$path"; then
27818        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27819      else
27820        dir="`$DIRNAME "$path"`"
27821        base="`$BASENAME "$path"`"
27822        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27823      fi
27824    fi
27825  fi
27826
27827            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27828$as_echo_n "checking for Boot JDK... " >&6; }
27829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27830$as_echo "$BOOT_JDK" >&6; }
27831            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27832$as_echo_n "checking Boot JDK version... " >&6; }
27833            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27835$as_echo "$BOOT_JDK_VERSION" >&6; }
27836          fi # end check jdk version
27837        fi # end check javac
27838      fi # end check java
27839    fi # end check boot jdk found
27840  fi
27841
27842
27843  if test "x$BOOT_JDK_FOUND" = xno; then
27844    # Now execute the test
27845
27846  if test "x$PROGRAMW6432" != x; then
27847    VIRTUAL_DIR="$PROGRAMW6432/Java"
27848
27849  windows_path="$VIRTUAL_DIR"
27850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27851    unix_path=`$CYGPATH -u "$windows_path"`
27852    VIRTUAL_DIR="$unix_path"
27853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27855    VIRTUAL_DIR="$unix_path"
27856  fi
27857
27858
27859  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27860  BOOT_JDK_SUFFIX=""
27861  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27862  if test "x$ALL_JDKS_FOUND" != x; then
27863    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27864
27865  if test "x$BOOT_JDK_FOUND" = xno; then
27866    # Now execute the test
27867
27868        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27869        if test -d "$BOOT_JDK"; then
27870          BOOT_JDK_FOUND=maybe
27871          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27872$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27873        fi
27874
27875
27876    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27877    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27878      # Do we have a bin/java?
27879      if test ! -x "$BOOT_JDK/bin/java"; then
27880        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27882        BOOT_JDK_FOUND=no
27883      else
27884        # Do we have a bin/javac?
27885        if test ! -x "$BOOT_JDK/bin/javac"; then
27886          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27888          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27889$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27890          BOOT_JDK_FOUND=no
27891        else
27892          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27893          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27894
27895          # Extra M4 quote needed to protect [] in grep expression.
27896          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27897          if test "x$FOUND_CORRECT_VERSION" = x; then
27898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27900            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27901$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27902            BOOT_JDK_FOUND=no
27903          else
27904            # We're done! :-)
27905            BOOT_JDK_FOUND=yes
27906
27907  # Only process if variable expands to non-empty
27908
27909  if test "x$BOOT_JDK" != x; then
27910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27911
27912  # Input might be given as Windows format, start by converting to
27913  # unix format.
27914  path="$BOOT_JDK"
27915  new_path=`$CYGPATH -u "$path"`
27916
27917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27920  # "foo.exe" is OK but "foo" is an error.
27921  #
27922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27923  # It is also a way to make sure we got the proper file name for the real test later on.
27924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27925  if test "x$test_shortpath" = x; then
27926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27929  fi
27930
27931  # Call helper function which possibly converts this using DOS-style short mode.
27932  # If so, the updated path is stored in $new_path.
27933
27934  input_path="$new_path"
27935  # Check if we need to convert this using DOS-style short mode. If the path
27936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27937  # take no chances and rewrite it.
27938  # Note: m4 eats our [], so we need to use [ and ] instead.
27939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27940  if test "x$has_forbidden_chars" != x; then
27941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27945      # Going to short mode and back again did indeed matter. Since short mode is
27946      # case insensitive, let's make it lowercase to improve readability.
27947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27948      # Now convert it back to Unix-style (cygpath)
27949      input_path=`$CYGPATH -u "$shortmode_path"`
27950      new_path="$input_path"
27951    fi
27952  fi
27953
27954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27955  if test "x$test_cygdrive_prefix" = x; then
27956    # As a simple fix, exclude /usr/bin since it's not a real path.
27957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27959      # a path prefixed by /cygdrive for fixpath to work.
27960      new_path="$CYGWIN_ROOT_PATH$input_path"
27961    fi
27962  fi
27963
27964
27965  if test "x$path" != "x$new_path"; then
27966    BOOT_JDK="$new_path"
27967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27969  fi
27970
27971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27972
27973  path="$BOOT_JDK"
27974  has_colon=`$ECHO $path | $GREP ^.:`
27975  new_path="$path"
27976  if test "x$has_colon" = x; then
27977    # Not in mixed or Windows style, start by that.
27978    new_path=`cmd //c echo $path`
27979  fi
27980
27981
27982  input_path="$new_path"
27983  # Check if we need to convert this using DOS-style short mode. If the path
27984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27985  # take no chances and rewrite it.
27986  # Note: m4 eats our [], so we need to use [ and ] instead.
27987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27988  if test "x$has_forbidden_chars" != x; then
27989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27991  fi
27992
27993
27994  windows_path="$new_path"
27995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27996    unix_path=`$CYGPATH -u "$windows_path"`
27997    new_path="$unix_path"
27998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28000    new_path="$unix_path"
28001  fi
28002
28003  if test "x$path" != "x$new_path"; then
28004    BOOT_JDK="$new_path"
28005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28007  fi
28008
28009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28011
28012    else
28013      # We're on a unix platform. Hooray! :)
28014      path="$BOOT_JDK"
28015      has_space=`$ECHO "$path" | $GREP " "`
28016      if test "x$has_space" != x; then
28017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28020      fi
28021
28022      # Use eval to expand a potential ~
28023      eval path="$path"
28024      if test ! -f "$path" && test ! -d "$path"; then
28025        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28026      fi
28027
28028      if test -d "$path"; then
28029        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28030      else
28031        dir="`$DIRNAME "$path"`"
28032        base="`$BASENAME "$path"`"
28033        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28034      fi
28035    fi
28036  fi
28037
28038            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28039$as_echo_n "checking for Boot JDK... " >&6; }
28040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28041$as_echo "$BOOT_JDK" >&6; }
28042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28043$as_echo_n "checking Boot JDK version... " >&6; }
28044            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28046$as_echo "$BOOT_JDK_VERSION" >&6; }
28047          fi # end check jdk version
28048        fi # end check javac
28049      fi # end check java
28050    fi # end check boot jdk found
28051  fi
28052
28053    done
28054  fi
28055
28056  fi
28057
28058
28059    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28060    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28061      # Do we have a bin/java?
28062      if test ! -x "$BOOT_JDK/bin/java"; then
28063        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28065        BOOT_JDK_FOUND=no
28066      else
28067        # Do we have a bin/javac?
28068        if test ! -x "$BOOT_JDK/bin/javac"; then
28069          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28071          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28072$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28073          BOOT_JDK_FOUND=no
28074        else
28075          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28076          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28077
28078          # Extra M4 quote needed to protect [] in grep expression.
28079          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28080          if test "x$FOUND_CORRECT_VERSION" = x; then
28081            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28083            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28084$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28085            BOOT_JDK_FOUND=no
28086          else
28087            # We're done! :-)
28088            BOOT_JDK_FOUND=yes
28089
28090  # Only process if variable expands to non-empty
28091
28092  if test "x$BOOT_JDK" != x; then
28093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28094
28095  # Input might be given as Windows format, start by converting to
28096  # unix format.
28097  path="$BOOT_JDK"
28098  new_path=`$CYGPATH -u "$path"`
28099
28100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28103  # "foo.exe" is OK but "foo" is an error.
28104  #
28105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28106  # It is also a way to make sure we got the proper file name for the real test later on.
28107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28108  if test "x$test_shortpath" = x; then
28109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28111    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28112  fi
28113
28114  # Call helper function which possibly converts this using DOS-style short mode.
28115  # If so, the updated path is stored in $new_path.
28116
28117  input_path="$new_path"
28118  # Check if we need to convert this using DOS-style short mode. If the path
28119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28120  # take no chances and rewrite it.
28121  # Note: m4 eats our [], so we need to use [ and ] instead.
28122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28123  if test "x$has_forbidden_chars" != x; then
28124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28128      # Going to short mode and back again did indeed matter. Since short mode is
28129      # case insensitive, let's make it lowercase to improve readability.
28130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28131      # Now convert it back to Unix-style (cygpath)
28132      input_path=`$CYGPATH -u "$shortmode_path"`
28133      new_path="$input_path"
28134    fi
28135  fi
28136
28137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28138  if test "x$test_cygdrive_prefix" = x; then
28139    # As a simple fix, exclude /usr/bin since it's not a real path.
28140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28142      # a path prefixed by /cygdrive for fixpath to work.
28143      new_path="$CYGWIN_ROOT_PATH$input_path"
28144    fi
28145  fi
28146
28147
28148  if test "x$path" != "x$new_path"; then
28149    BOOT_JDK="$new_path"
28150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28152  fi
28153
28154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28155
28156  path="$BOOT_JDK"
28157  has_colon=`$ECHO $path | $GREP ^.:`
28158  new_path="$path"
28159  if test "x$has_colon" = x; then
28160    # Not in mixed or Windows style, start by that.
28161    new_path=`cmd //c echo $path`
28162  fi
28163
28164
28165  input_path="$new_path"
28166  # Check if we need to convert this using DOS-style short mode. If the path
28167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28168  # take no chances and rewrite it.
28169  # Note: m4 eats our [], so we need to use [ and ] instead.
28170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28171  if test "x$has_forbidden_chars" != x; then
28172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28174  fi
28175
28176
28177  windows_path="$new_path"
28178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28179    unix_path=`$CYGPATH -u "$windows_path"`
28180    new_path="$unix_path"
28181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28183    new_path="$unix_path"
28184  fi
28185
28186  if test "x$path" != "x$new_path"; then
28187    BOOT_JDK="$new_path"
28188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28190  fi
28191
28192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28194
28195    else
28196      # We're on a unix platform. Hooray! :)
28197      path="$BOOT_JDK"
28198      has_space=`$ECHO "$path" | $GREP " "`
28199      if test "x$has_space" != x; then
28200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28203      fi
28204
28205      # Use eval to expand a potential ~
28206      eval path="$path"
28207      if test ! -f "$path" && test ! -d "$path"; then
28208        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28209      fi
28210
28211      if test -d "$path"; then
28212        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28213      else
28214        dir="`$DIRNAME "$path"`"
28215        base="`$BASENAME "$path"`"
28216        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28217      fi
28218    fi
28219  fi
28220
28221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28222$as_echo_n "checking for Boot JDK... " >&6; }
28223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28224$as_echo "$BOOT_JDK" >&6; }
28225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28226$as_echo_n "checking Boot JDK version... " >&6; }
28227            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28229$as_echo "$BOOT_JDK_VERSION" >&6; }
28230          fi # end check jdk version
28231        fi # end check javac
28232      fi # end check java
28233    fi # end check boot jdk found
28234  fi
28235
28236
28237  if test "x$BOOT_JDK_FOUND" = xno; then
28238    # Now execute the test
28239
28240  if test "x$PROGRAMFILES" != x; then
28241    VIRTUAL_DIR="$PROGRAMFILES/Java"
28242
28243  windows_path="$VIRTUAL_DIR"
28244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28245    unix_path=`$CYGPATH -u "$windows_path"`
28246    VIRTUAL_DIR="$unix_path"
28247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28249    VIRTUAL_DIR="$unix_path"
28250  fi
28251
28252
28253  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28254  BOOT_JDK_SUFFIX=""
28255  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28256  if test "x$ALL_JDKS_FOUND" != x; then
28257    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28258
28259  if test "x$BOOT_JDK_FOUND" = xno; then
28260    # Now execute the test
28261
28262        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28263        if test -d "$BOOT_JDK"; then
28264          BOOT_JDK_FOUND=maybe
28265          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28266$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28267        fi
28268
28269
28270    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28271    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28272      # Do we have a bin/java?
28273      if test ! -x "$BOOT_JDK/bin/java"; then
28274        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28276        BOOT_JDK_FOUND=no
28277      else
28278        # Do we have a bin/javac?
28279        if test ! -x "$BOOT_JDK/bin/javac"; then
28280          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28282          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28283$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28284          BOOT_JDK_FOUND=no
28285        else
28286          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28287          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28288
28289          # Extra M4 quote needed to protect [] in grep expression.
28290          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28291          if test "x$FOUND_CORRECT_VERSION" = x; then
28292            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28294            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28295$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28296            BOOT_JDK_FOUND=no
28297          else
28298            # We're done! :-)
28299            BOOT_JDK_FOUND=yes
28300
28301  # Only process if variable expands to non-empty
28302
28303  if test "x$BOOT_JDK" != x; then
28304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28305
28306  # Input might be given as Windows format, start by converting to
28307  # unix format.
28308  path="$BOOT_JDK"
28309  new_path=`$CYGPATH -u "$path"`
28310
28311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28314  # "foo.exe" is OK but "foo" is an error.
28315  #
28316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28317  # It is also a way to make sure we got the proper file name for the real test later on.
28318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28319  if test "x$test_shortpath" = x; then
28320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28323  fi
28324
28325  # Call helper function which possibly converts this using DOS-style short mode.
28326  # If so, the updated path is stored in $new_path.
28327
28328  input_path="$new_path"
28329  # Check if we need to convert this using DOS-style short mode. If the path
28330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28331  # take no chances and rewrite it.
28332  # Note: m4 eats our [], so we need to use [ and ] instead.
28333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28334  if test "x$has_forbidden_chars" != x; then
28335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28339      # Going to short mode and back again did indeed matter. Since short mode is
28340      # case insensitive, let's make it lowercase to improve readability.
28341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28342      # Now convert it back to Unix-style (cygpath)
28343      input_path=`$CYGPATH -u "$shortmode_path"`
28344      new_path="$input_path"
28345    fi
28346  fi
28347
28348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28349  if test "x$test_cygdrive_prefix" = x; then
28350    # As a simple fix, exclude /usr/bin since it's not a real path.
28351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28353      # a path prefixed by /cygdrive for fixpath to work.
28354      new_path="$CYGWIN_ROOT_PATH$input_path"
28355    fi
28356  fi
28357
28358
28359  if test "x$path" != "x$new_path"; then
28360    BOOT_JDK="$new_path"
28361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28363  fi
28364
28365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28366
28367  path="$BOOT_JDK"
28368  has_colon=`$ECHO $path | $GREP ^.:`
28369  new_path="$path"
28370  if test "x$has_colon" = x; then
28371    # Not in mixed or Windows style, start by that.
28372    new_path=`cmd //c echo $path`
28373  fi
28374
28375
28376  input_path="$new_path"
28377  # Check if we need to convert this using DOS-style short mode. If the path
28378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28379  # take no chances and rewrite it.
28380  # Note: m4 eats our [], so we need to use [ and ] instead.
28381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28382  if test "x$has_forbidden_chars" != x; then
28383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28385  fi
28386
28387
28388  windows_path="$new_path"
28389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28390    unix_path=`$CYGPATH -u "$windows_path"`
28391    new_path="$unix_path"
28392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28394    new_path="$unix_path"
28395  fi
28396
28397  if test "x$path" != "x$new_path"; then
28398    BOOT_JDK="$new_path"
28399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28401  fi
28402
28403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28405
28406    else
28407      # We're on a unix platform. Hooray! :)
28408      path="$BOOT_JDK"
28409      has_space=`$ECHO "$path" | $GREP " "`
28410      if test "x$has_space" != x; then
28411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28413        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28414      fi
28415
28416      # Use eval to expand a potential ~
28417      eval path="$path"
28418      if test ! -f "$path" && test ! -d "$path"; then
28419        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28420      fi
28421
28422      if test -d "$path"; then
28423        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28424      else
28425        dir="`$DIRNAME "$path"`"
28426        base="`$BASENAME "$path"`"
28427        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28428      fi
28429    fi
28430  fi
28431
28432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28433$as_echo_n "checking for Boot JDK... " >&6; }
28434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28435$as_echo "$BOOT_JDK" >&6; }
28436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28437$as_echo_n "checking Boot JDK version... " >&6; }
28438            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28440$as_echo "$BOOT_JDK_VERSION" >&6; }
28441          fi # end check jdk version
28442        fi # end check javac
28443      fi # end check java
28444    fi # end check boot jdk found
28445  fi
28446
28447    done
28448  fi
28449
28450  fi
28451
28452
28453    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28454    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28455      # Do we have a bin/java?
28456      if test ! -x "$BOOT_JDK/bin/java"; then
28457        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28459        BOOT_JDK_FOUND=no
28460      else
28461        # Do we have a bin/javac?
28462        if test ! -x "$BOOT_JDK/bin/javac"; then
28463          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28465          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28466$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28467          BOOT_JDK_FOUND=no
28468        else
28469          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28470          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28471
28472          # Extra M4 quote needed to protect [] in grep expression.
28473          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28474          if test "x$FOUND_CORRECT_VERSION" = x; then
28475            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28477            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28478$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28479            BOOT_JDK_FOUND=no
28480          else
28481            # We're done! :-)
28482            BOOT_JDK_FOUND=yes
28483
28484  # Only process if variable expands to non-empty
28485
28486  if test "x$BOOT_JDK" != x; then
28487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28488
28489  # Input might be given as Windows format, start by converting to
28490  # unix format.
28491  path="$BOOT_JDK"
28492  new_path=`$CYGPATH -u "$path"`
28493
28494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28497  # "foo.exe" is OK but "foo" is an error.
28498  #
28499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28500  # It is also a way to make sure we got the proper file name for the real test later on.
28501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28502  if test "x$test_shortpath" = x; then
28503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28505    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28506  fi
28507
28508  # Call helper function which possibly converts this using DOS-style short mode.
28509  # If so, the updated path is stored in $new_path.
28510
28511  input_path="$new_path"
28512  # Check if we need to convert this using DOS-style short mode. If the path
28513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28514  # take no chances and rewrite it.
28515  # Note: m4 eats our [], so we need to use [ and ] instead.
28516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28517  if test "x$has_forbidden_chars" != x; then
28518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28522      # Going to short mode and back again did indeed matter. Since short mode is
28523      # case insensitive, let's make it lowercase to improve readability.
28524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28525      # Now convert it back to Unix-style (cygpath)
28526      input_path=`$CYGPATH -u "$shortmode_path"`
28527      new_path="$input_path"
28528    fi
28529  fi
28530
28531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28532  if test "x$test_cygdrive_prefix" = x; then
28533    # As a simple fix, exclude /usr/bin since it's not a real path.
28534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28536      # a path prefixed by /cygdrive for fixpath to work.
28537      new_path="$CYGWIN_ROOT_PATH$input_path"
28538    fi
28539  fi
28540
28541
28542  if test "x$path" != "x$new_path"; then
28543    BOOT_JDK="$new_path"
28544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28545$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28546  fi
28547
28548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28549
28550  path="$BOOT_JDK"
28551  has_colon=`$ECHO $path | $GREP ^.:`
28552  new_path="$path"
28553  if test "x$has_colon" = x; then
28554    # Not in mixed or Windows style, start by that.
28555    new_path=`cmd //c echo $path`
28556  fi
28557
28558
28559  input_path="$new_path"
28560  # Check if we need to convert this using DOS-style short mode. If the path
28561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28562  # take no chances and rewrite it.
28563  # Note: m4 eats our [], so we need to use [ and ] instead.
28564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28565  if test "x$has_forbidden_chars" != x; then
28566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28568  fi
28569
28570
28571  windows_path="$new_path"
28572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28573    unix_path=`$CYGPATH -u "$windows_path"`
28574    new_path="$unix_path"
28575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28577    new_path="$unix_path"
28578  fi
28579
28580  if test "x$path" != "x$new_path"; then
28581    BOOT_JDK="$new_path"
28582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28584  fi
28585
28586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28588
28589    else
28590      # We're on a unix platform. Hooray! :)
28591      path="$BOOT_JDK"
28592      has_space=`$ECHO "$path" | $GREP " "`
28593      if test "x$has_space" != x; then
28594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28597      fi
28598
28599      # Use eval to expand a potential ~
28600      eval path="$path"
28601      if test ! -f "$path" && test ! -d "$path"; then
28602        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28603      fi
28604
28605      if test -d "$path"; then
28606        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28607      else
28608        dir="`$DIRNAME "$path"`"
28609        base="`$BASENAME "$path"`"
28610        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28611      fi
28612    fi
28613  fi
28614
28615            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28616$as_echo_n "checking for Boot JDK... " >&6; }
28617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28618$as_echo "$BOOT_JDK" >&6; }
28619            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28620$as_echo_n "checking Boot JDK version... " >&6; }
28621            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28623$as_echo "$BOOT_JDK_VERSION" >&6; }
28624          fi # end check jdk version
28625        fi # end check javac
28626      fi # end check java
28627    fi # end check boot jdk found
28628  fi
28629
28630
28631  if test "x$BOOT_JDK_FOUND" = xno; then
28632    # Now execute the test
28633
28634  if test "x$ProgramFiles" != x; then
28635    VIRTUAL_DIR="$ProgramFiles/Java"
28636
28637  windows_path="$VIRTUAL_DIR"
28638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28639    unix_path=`$CYGPATH -u "$windows_path"`
28640    VIRTUAL_DIR="$unix_path"
28641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28643    VIRTUAL_DIR="$unix_path"
28644  fi
28645
28646
28647  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28648  BOOT_JDK_SUFFIX=""
28649  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28650  if test "x$ALL_JDKS_FOUND" != x; then
28651    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28652
28653  if test "x$BOOT_JDK_FOUND" = xno; then
28654    # Now execute the test
28655
28656        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28657        if test -d "$BOOT_JDK"; then
28658          BOOT_JDK_FOUND=maybe
28659          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28660$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28661        fi
28662
28663
28664    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28665    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28666      # Do we have a bin/java?
28667      if test ! -x "$BOOT_JDK/bin/java"; then
28668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28670        BOOT_JDK_FOUND=no
28671      else
28672        # Do we have a bin/javac?
28673        if test ! -x "$BOOT_JDK/bin/javac"; then
28674          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28676          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28677$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28678          BOOT_JDK_FOUND=no
28679        else
28680          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28681          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28682
28683          # Extra M4 quote needed to protect [] in grep expression.
28684          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28685          if test "x$FOUND_CORRECT_VERSION" = x; then
28686            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28688            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28689$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28690            BOOT_JDK_FOUND=no
28691          else
28692            # We're done! :-)
28693            BOOT_JDK_FOUND=yes
28694
28695  # Only process if variable expands to non-empty
28696
28697  if test "x$BOOT_JDK" != x; then
28698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28699
28700  # Input might be given as Windows format, start by converting to
28701  # unix format.
28702  path="$BOOT_JDK"
28703  new_path=`$CYGPATH -u "$path"`
28704
28705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28708  # "foo.exe" is OK but "foo" is an error.
28709  #
28710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28711  # It is also a way to make sure we got the proper file name for the real test later on.
28712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28713  if test "x$test_shortpath" = x; then
28714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28716    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28717  fi
28718
28719  # Call helper function which possibly converts this using DOS-style short mode.
28720  # If so, the updated path is stored in $new_path.
28721
28722  input_path="$new_path"
28723  # Check if we need to convert this using DOS-style short mode. If the path
28724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28725  # take no chances and rewrite it.
28726  # Note: m4 eats our [], so we need to use [ and ] instead.
28727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28728  if test "x$has_forbidden_chars" != x; then
28729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28733      # Going to short mode and back again did indeed matter. Since short mode is
28734      # case insensitive, let's make it lowercase to improve readability.
28735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28736      # Now convert it back to Unix-style (cygpath)
28737      input_path=`$CYGPATH -u "$shortmode_path"`
28738      new_path="$input_path"
28739    fi
28740  fi
28741
28742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28743  if test "x$test_cygdrive_prefix" = x; then
28744    # As a simple fix, exclude /usr/bin since it's not a real path.
28745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28747      # a path prefixed by /cygdrive for fixpath to work.
28748      new_path="$CYGWIN_ROOT_PATH$input_path"
28749    fi
28750  fi
28751
28752
28753  if test "x$path" != "x$new_path"; then
28754    BOOT_JDK="$new_path"
28755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28757  fi
28758
28759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28760
28761  path="$BOOT_JDK"
28762  has_colon=`$ECHO $path | $GREP ^.:`
28763  new_path="$path"
28764  if test "x$has_colon" = x; then
28765    # Not in mixed or Windows style, start by that.
28766    new_path=`cmd //c echo $path`
28767  fi
28768
28769
28770  input_path="$new_path"
28771  # Check if we need to convert this using DOS-style short mode. If the path
28772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28773  # take no chances and rewrite it.
28774  # Note: m4 eats our [], so we need to use [ and ] instead.
28775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28776  if test "x$has_forbidden_chars" != x; then
28777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28779  fi
28780
28781
28782  windows_path="$new_path"
28783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28784    unix_path=`$CYGPATH -u "$windows_path"`
28785    new_path="$unix_path"
28786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28788    new_path="$unix_path"
28789  fi
28790
28791  if test "x$path" != "x$new_path"; then
28792    BOOT_JDK="$new_path"
28793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28795  fi
28796
28797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28799
28800    else
28801      # We're on a unix platform. Hooray! :)
28802      path="$BOOT_JDK"
28803      has_space=`$ECHO "$path" | $GREP " "`
28804      if test "x$has_space" != x; then
28805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28807        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28808      fi
28809
28810      # Use eval to expand a potential ~
28811      eval path="$path"
28812      if test ! -f "$path" && test ! -d "$path"; then
28813        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28814      fi
28815
28816      if test -d "$path"; then
28817        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28818      else
28819        dir="`$DIRNAME "$path"`"
28820        base="`$BASENAME "$path"`"
28821        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28822      fi
28823    fi
28824  fi
28825
28826            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28827$as_echo_n "checking for Boot JDK... " >&6; }
28828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28829$as_echo "$BOOT_JDK" >&6; }
28830            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28831$as_echo_n "checking Boot JDK version... " >&6; }
28832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28834$as_echo "$BOOT_JDK_VERSION" >&6; }
28835          fi # end check jdk version
28836        fi # end check javac
28837      fi # end check java
28838    fi # end check boot jdk found
28839  fi
28840
28841    done
28842  fi
28843
28844  fi
28845
28846
28847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28849      # Do we have a bin/java?
28850      if test ! -x "$BOOT_JDK/bin/java"; then
28851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28853        BOOT_JDK_FOUND=no
28854      else
28855        # Do we have a bin/javac?
28856        if test ! -x "$BOOT_JDK/bin/javac"; then
28857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28861          BOOT_JDK_FOUND=no
28862        else
28863          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28864          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28865
28866          # Extra M4 quote needed to protect [] in grep expression.
28867          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28868          if test "x$FOUND_CORRECT_VERSION" = x; then
28869            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28871            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28872$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28873            BOOT_JDK_FOUND=no
28874          else
28875            # We're done! :-)
28876            BOOT_JDK_FOUND=yes
28877
28878  # Only process if variable expands to non-empty
28879
28880  if test "x$BOOT_JDK" != x; then
28881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882
28883  # Input might be given as Windows format, start by converting to
28884  # unix format.
28885  path="$BOOT_JDK"
28886  new_path=`$CYGPATH -u "$path"`
28887
28888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28891  # "foo.exe" is OK but "foo" is an error.
28892  #
28893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28894  # It is also a way to make sure we got the proper file name for the real test later on.
28895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28896  if test "x$test_shortpath" = x; then
28897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28899    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28900  fi
28901
28902  # Call helper function which possibly converts this using DOS-style short mode.
28903  # If so, the updated path is stored in $new_path.
28904
28905  input_path="$new_path"
28906  # Check if we need to convert this using DOS-style short mode. If the path
28907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28908  # take no chances and rewrite it.
28909  # Note: m4 eats our [], so we need to use [ and ] instead.
28910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28911  if test "x$has_forbidden_chars" != x; then
28912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28916      # Going to short mode and back again did indeed matter. Since short mode is
28917      # case insensitive, let's make it lowercase to improve readability.
28918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28919      # Now convert it back to Unix-style (cygpath)
28920      input_path=`$CYGPATH -u "$shortmode_path"`
28921      new_path="$input_path"
28922    fi
28923  fi
28924
28925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28926  if test "x$test_cygdrive_prefix" = x; then
28927    # As a simple fix, exclude /usr/bin since it's not a real path.
28928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28930      # a path prefixed by /cygdrive for fixpath to work.
28931      new_path="$CYGWIN_ROOT_PATH$input_path"
28932    fi
28933  fi
28934
28935
28936  if test "x$path" != "x$new_path"; then
28937    BOOT_JDK="$new_path"
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28940  fi
28941
28942    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943
28944  path="$BOOT_JDK"
28945  has_colon=`$ECHO $path | $GREP ^.:`
28946  new_path="$path"
28947  if test "x$has_colon" = x; then
28948    # Not in mixed or Windows style, start by that.
28949    new_path=`cmd //c echo $path`
28950  fi
28951
28952
28953  input_path="$new_path"
28954  # Check if we need to convert this using DOS-style short mode. If the path
28955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28956  # take no chances and rewrite it.
28957  # Note: m4 eats our [], so we need to use [ and ] instead.
28958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28959  if test "x$has_forbidden_chars" != x; then
28960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28962  fi
28963
28964
28965  windows_path="$new_path"
28966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28967    unix_path=`$CYGPATH -u "$windows_path"`
28968    new_path="$unix_path"
28969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28971    new_path="$unix_path"
28972  fi
28973
28974  if test "x$path" != "x$new_path"; then
28975    BOOT_JDK="$new_path"
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28978  fi
28979
28980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28982
28983    else
28984      # We're on a unix platform. Hooray! :)
28985      path="$BOOT_JDK"
28986      has_space=`$ECHO "$path" | $GREP " "`
28987      if test "x$has_space" != x; then
28988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28990        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28991      fi
28992
28993      # Use eval to expand a potential ~
28994      eval path="$path"
28995      if test ! -f "$path" && test ! -d "$path"; then
28996        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28997      fi
28998
28999      if test -d "$path"; then
29000        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29001      else
29002        dir="`$DIRNAME "$path"`"
29003        base="`$BASENAME "$path"`"
29004        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29005      fi
29006    fi
29007  fi
29008
29009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29010$as_echo_n "checking for Boot JDK... " >&6; }
29011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29012$as_echo "$BOOT_JDK" >&6; }
29013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29014$as_echo_n "checking Boot JDK version... " >&6; }
29015            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29017$as_echo "$BOOT_JDK_VERSION" >&6; }
29018          fi # end check jdk version
29019        fi # end check javac
29020      fi # end check java
29021    fi # end check boot jdk found
29022  fi
29023
29024
29025  if test "x$BOOT_JDK_FOUND" = xno; then
29026    # Now execute the test
29027
29028  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29029  BOOT_JDK_SUFFIX=""
29030  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29031  if test "x$ALL_JDKS_FOUND" != x; then
29032    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29033
29034  if test "x$BOOT_JDK_FOUND" = xno; then
29035    # Now execute the test
29036
29037        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29038        if test -d "$BOOT_JDK"; then
29039          BOOT_JDK_FOUND=maybe
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29041$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29042        fi
29043
29044
29045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29047      # Do we have a bin/java?
29048      if test ! -x "$BOOT_JDK/bin/java"; then
29049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29051        BOOT_JDK_FOUND=no
29052      else
29053        # Do we have a bin/javac?
29054        if test ! -x "$BOOT_JDK/bin/javac"; then
29055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29059          BOOT_JDK_FOUND=no
29060        else
29061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29063
29064          # Extra M4 quote needed to protect [] in grep expression.
29065          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29066          if test "x$FOUND_CORRECT_VERSION" = x; then
29067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29071            BOOT_JDK_FOUND=no
29072          else
29073            # We're done! :-)
29074            BOOT_JDK_FOUND=yes
29075
29076  # Only process if variable expands to non-empty
29077
29078  if test "x$BOOT_JDK" != x; then
29079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29080
29081  # Input might be given as Windows format, start by converting to
29082  # unix format.
29083  path="$BOOT_JDK"
29084  new_path=`$CYGPATH -u "$path"`
29085
29086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29089  # "foo.exe" is OK but "foo" is an error.
29090  #
29091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29092  # It is also a way to make sure we got the proper file name for the real test later on.
29093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29094  if test "x$test_shortpath" = x; then
29095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29098  fi
29099
29100  # Call helper function which possibly converts this using DOS-style short mode.
29101  # If so, the updated path is stored in $new_path.
29102
29103  input_path="$new_path"
29104  # Check if we need to convert this using DOS-style short mode. If the path
29105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29106  # take no chances and rewrite it.
29107  # Note: m4 eats our [], so we need to use [ and ] instead.
29108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29109  if test "x$has_forbidden_chars" != x; then
29110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29114      # Going to short mode and back again did indeed matter. Since short mode is
29115      # case insensitive, let's make it lowercase to improve readability.
29116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29117      # Now convert it back to Unix-style (cygpath)
29118      input_path=`$CYGPATH -u "$shortmode_path"`
29119      new_path="$input_path"
29120    fi
29121  fi
29122
29123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29124  if test "x$test_cygdrive_prefix" = x; then
29125    # As a simple fix, exclude /usr/bin since it's not a real path.
29126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29128      # a path prefixed by /cygdrive for fixpath to work.
29129      new_path="$CYGWIN_ROOT_PATH$input_path"
29130    fi
29131  fi
29132
29133
29134  if test "x$path" != "x$new_path"; then
29135    BOOT_JDK="$new_path"
29136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29138  fi
29139
29140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29141
29142  path="$BOOT_JDK"
29143  has_colon=`$ECHO $path | $GREP ^.:`
29144  new_path="$path"
29145  if test "x$has_colon" = x; then
29146    # Not in mixed or Windows style, start by that.
29147    new_path=`cmd //c echo $path`
29148  fi
29149
29150
29151  input_path="$new_path"
29152  # Check if we need to convert this using DOS-style short mode. If the path
29153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29154  # take no chances and rewrite it.
29155  # Note: m4 eats our [], so we need to use [ and ] instead.
29156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29157  if test "x$has_forbidden_chars" != x; then
29158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29160  fi
29161
29162
29163  windows_path="$new_path"
29164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29165    unix_path=`$CYGPATH -u "$windows_path"`
29166    new_path="$unix_path"
29167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29169    new_path="$unix_path"
29170  fi
29171
29172  if test "x$path" != "x$new_path"; then
29173    BOOT_JDK="$new_path"
29174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29176  fi
29177
29178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29180
29181    else
29182      # We're on a unix platform. Hooray! :)
29183      path="$BOOT_JDK"
29184      has_space=`$ECHO "$path" | $GREP " "`
29185      if test "x$has_space" != x; then
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29189      fi
29190
29191      # Use eval to expand a potential ~
29192      eval path="$path"
29193      if test ! -f "$path" && test ! -d "$path"; then
29194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29195      fi
29196
29197      if test -d "$path"; then
29198        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29199      else
29200        dir="`$DIRNAME "$path"`"
29201        base="`$BASENAME "$path"`"
29202        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29203      fi
29204    fi
29205  fi
29206
29207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29208$as_echo_n "checking for Boot JDK... " >&6; }
29209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29210$as_echo "$BOOT_JDK" >&6; }
29211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29212$as_echo_n "checking Boot JDK version... " >&6; }
29213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29215$as_echo "$BOOT_JDK_VERSION" >&6; }
29216          fi # end check jdk version
29217        fi # end check javac
29218      fi # end check java
29219    fi # end check boot jdk found
29220  fi
29221
29222    done
29223  fi
29224
29225
29226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29228      # Do we have a bin/java?
29229      if test ! -x "$BOOT_JDK/bin/java"; then
29230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29232        BOOT_JDK_FOUND=no
29233      else
29234        # Do we have a bin/javac?
29235        if test ! -x "$BOOT_JDK/bin/javac"; then
29236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29240          BOOT_JDK_FOUND=no
29241        else
29242          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29243          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29244
29245          # Extra M4 quote needed to protect [] in grep expression.
29246          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29247          if test "x$FOUND_CORRECT_VERSION" = x; then
29248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29250            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29251$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29252            BOOT_JDK_FOUND=no
29253          else
29254            # We're done! :-)
29255            BOOT_JDK_FOUND=yes
29256
29257  # Only process if variable expands to non-empty
29258
29259  if test "x$BOOT_JDK" != x; then
29260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29261
29262  # Input might be given as Windows format, start by converting to
29263  # unix format.
29264  path="$BOOT_JDK"
29265  new_path=`$CYGPATH -u "$path"`
29266
29267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29270  # "foo.exe" is OK but "foo" is an error.
29271  #
29272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29273  # It is also a way to make sure we got the proper file name for the real test later on.
29274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29275  if test "x$test_shortpath" = x; then
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29278    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29279  fi
29280
29281  # Call helper function which possibly converts this using DOS-style short mode.
29282  # If so, the updated path is stored in $new_path.
29283
29284  input_path="$new_path"
29285  # Check if we need to convert this using DOS-style short mode. If the path
29286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29287  # take no chances and rewrite it.
29288  # Note: m4 eats our [], so we need to use [ and ] instead.
29289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29290  if test "x$has_forbidden_chars" != x; then
29291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29295      # Going to short mode and back again did indeed matter. Since short mode is
29296      # case insensitive, let's make it lowercase to improve readability.
29297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29298      # Now convert it back to Unix-style (cygpath)
29299      input_path=`$CYGPATH -u "$shortmode_path"`
29300      new_path="$input_path"
29301    fi
29302  fi
29303
29304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29305  if test "x$test_cygdrive_prefix" = x; then
29306    # As a simple fix, exclude /usr/bin since it's not a real path.
29307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29309      # a path prefixed by /cygdrive for fixpath to work.
29310      new_path="$CYGWIN_ROOT_PATH$input_path"
29311    fi
29312  fi
29313
29314
29315  if test "x$path" != "x$new_path"; then
29316    BOOT_JDK="$new_path"
29317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29319  fi
29320
29321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29322
29323  path="$BOOT_JDK"
29324  has_colon=`$ECHO $path | $GREP ^.:`
29325  new_path="$path"
29326  if test "x$has_colon" = x; then
29327    # Not in mixed or Windows style, start by that.
29328    new_path=`cmd //c echo $path`
29329  fi
29330
29331
29332  input_path="$new_path"
29333  # Check if we need to convert this using DOS-style short mode. If the path
29334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29335  # take no chances and rewrite it.
29336  # Note: m4 eats our [], so we need to use [ and ] instead.
29337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29338  if test "x$has_forbidden_chars" != x; then
29339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29341  fi
29342
29343
29344  windows_path="$new_path"
29345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29346    unix_path=`$CYGPATH -u "$windows_path"`
29347    new_path="$unix_path"
29348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29350    new_path="$unix_path"
29351  fi
29352
29353  if test "x$path" != "x$new_path"; then
29354    BOOT_JDK="$new_path"
29355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29357  fi
29358
29359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29361
29362    else
29363      # We're on a unix platform. Hooray! :)
29364      path="$BOOT_JDK"
29365      has_space=`$ECHO "$path" | $GREP " "`
29366      if test "x$has_space" != x; then
29367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29370      fi
29371
29372      # Use eval to expand a potential ~
29373      eval path="$path"
29374      if test ! -f "$path" && test ! -d "$path"; then
29375        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29376      fi
29377
29378      if test -d "$path"; then
29379        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29380      else
29381        dir="`$DIRNAME "$path"`"
29382        base="`$BASENAME "$path"`"
29383        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29384      fi
29385    fi
29386  fi
29387
29388            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29389$as_echo_n "checking for Boot JDK... " >&6; }
29390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29391$as_echo "$BOOT_JDK" >&6; }
29392            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29393$as_echo_n "checking Boot JDK version... " >&6; }
29394            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29395            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29396$as_echo "$BOOT_JDK_VERSION" >&6; }
29397          fi # end check jdk version
29398        fi # end check javac
29399      fi # end check java
29400    fi # end check boot jdk found
29401  fi
29402
29403  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29404
29405  if test "x$BOOT_JDK_FOUND" = xno; then
29406    # Now execute the test
29407
29408  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29409  BOOT_JDK_SUFFIX="/Contents/Home"
29410  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29411  if test "x$ALL_JDKS_FOUND" != x; then
29412    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29413
29414  if test "x$BOOT_JDK_FOUND" = xno; then
29415    # Now execute the test
29416
29417        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29418        if test -d "$BOOT_JDK"; then
29419          BOOT_JDK_FOUND=maybe
29420          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29421$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29422        fi
29423
29424
29425    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29426    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29427      # Do we have a bin/java?
29428      if test ! -x "$BOOT_JDK/bin/java"; then
29429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29431        BOOT_JDK_FOUND=no
29432      else
29433        # Do we have a bin/javac?
29434        if test ! -x "$BOOT_JDK/bin/javac"; then
29435          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29437          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29438$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29439          BOOT_JDK_FOUND=no
29440        else
29441          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29442          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29443
29444          # Extra M4 quote needed to protect [] in grep expression.
29445          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29446          if test "x$FOUND_CORRECT_VERSION" = x; then
29447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29449            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29450$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29451            BOOT_JDK_FOUND=no
29452          else
29453            # We're done! :-)
29454            BOOT_JDK_FOUND=yes
29455
29456  # Only process if variable expands to non-empty
29457
29458  if test "x$BOOT_JDK" != x; then
29459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29460
29461  # Input might be given as Windows format, start by converting to
29462  # unix format.
29463  path="$BOOT_JDK"
29464  new_path=`$CYGPATH -u "$path"`
29465
29466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29469  # "foo.exe" is OK but "foo" is an error.
29470  #
29471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29472  # It is also a way to make sure we got the proper file name for the real test later on.
29473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29474  if test "x$test_shortpath" = x; then
29475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29477    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29478  fi
29479
29480  # Call helper function which possibly converts this using DOS-style short mode.
29481  # If so, the updated path is stored in $new_path.
29482
29483  input_path="$new_path"
29484  # Check if we need to convert this using DOS-style short mode. If the path
29485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29486  # take no chances and rewrite it.
29487  # Note: m4 eats our [], so we need to use [ and ] instead.
29488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29489  if test "x$has_forbidden_chars" != x; then
29490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29494      # Going to short mode and back again did indeed matter. Since short mode is
29495      # case insensitive, let's make it lowercase to improve readability.
29496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29497      # Now convert it back to Unix-style (cygpath)
29498      input_path=`$CYGPATH -u "$shortmode_path"`
29499      new_path="$input_path"
29500    fi
29501  fi
29502
29503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29504  if test "x$test_cygdrive_prefix" = x; then
29505    # As a simple fix, exclude /usr/bin since it's not a real path.
29506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29508      # a path prefixed by /cygdrive for fixpath to work.
29509      new_path="$CYGWIN_ROOT_PATH$input_path"
29510    fi
29511  fi
29512
29513
29514  if test "x$path" != "x$new_path"; then
29515    BOOT_JDK="$new_path"
29516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29518  fi
29519
29520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29521
29522  path="$BOOT_JDK"
29523  has_colon=`$ECHO $path | $GREP ^.:`
29524  new_path="$path"
29525  if test "x$has_colon" = x; then
29526    # Not in mixed or Windows style, start by that.
29527    new_path=`cmd //c echo $path`
29528  fi
29529
29530
29531  input_path="$new_path"
29532  # Check if we need to convert this using DOS-style short mode. If the path
29533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29534  # take no chances and rewrite it.
29535  # Note: m4 eats our [], so we need to use [ and ] instead.
29536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29537  if test "x$has_forbidden_chars" != x; then
29538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29540  fi
29541
29542
29543  windows_path="$new_path"
29544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29545    unix_path=`$CYGPATH -u "$windows_path"`
29546    new_path="$unix_path"
29547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29549    new_path="$unix_path"
29550  fi
29551
29552  if test "x$path" != "x$new_path"; then
29553    BOOT_JDK="$new_path"
29554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29556  fi
29557
29558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29560
29561    else
29562      # We're on a unix platform. Hooray! :)
29563      path="$BOOT_JDK"
29564      has_space=`$ECHO "$path" | $GREP " "`
29565      if test "x$has_space" != x; then
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29569      fi
29570
29571      # Use eval to expand a potential ~
29572      eval path="$path"
29573      if test ! -f "$path" && test ! -d "$path"; then
29574        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29575      fi
29576
29577      if test -d "$path"; then
29578        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29579      else
29580        dir="`$DIRNAME "$path"`"
29581        base="`$BASENAME "$path"`"
29582        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29583      fi
29584    fi
29585  fi
29586
29587            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29588$as_echo_n "checking for Boot JDK... " >&6; }
29589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29590$as_echo "$BOOT_JDK" >&6; }
29591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29592$as_echo_n "checking Boot JDK version... " >&6; }
29593            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29595$as_echo "$BOOT_JDK_VERSION" >&6; }
29596          fi # end check jdk version
29597        fi # end check javac
29598      fi # end check java
29599    fi # end check boot jdk found
29600  fi
29601
29602    done
29603  fi
29604
29605
29606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29608      # Do we have a bin/java?
29609      if test ! -x "$BOOT_JDK/bin/java"; then
29610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29612        BOOT_JDK_FOUND=no
29613      else
29614        # Do we have a bin/javac?
29615        if test ! -x "$BOOT_JDK/bin/javac"; then
29616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29620          BOOT_JDK_FOUND=no
29621        else
29622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29624
29625          # Extra M4 quote needed to protect [] in grep expression.
29626          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29627          if test "x$FOUND_CORRECT_VERSION" = x; then
29628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29632            BOOT_JDK_FOUND=no
29633          else
29634            # We're done! :-)
29635            BOOT_JDK_FOUND=yes
29636
29637  # Only process if variable expands to non-empty
29638
29639  if test "x$BOOT_JDK" != x; then
29640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641
29642  # Input might be given as Windows format, start by converting to
29643  # unix format.
29644  path="$BOOT_JDK"
29645  new_path=`$CYGPATH -u "$path"`
29646
29647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29650  # "foo.exe" is OK but "foo" is an error.
29651  #
29652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29653  # It is also a way to make sure we got the proper file name for the real test later on.
29654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29655  if test "x$test_shortpath" = x; then
29656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29659  fi
29660
29661  # Call helper function which possibly converts this using DOS-style short mode.
29662  # If so, the updated path is stored in $new_path.
29663
29664  input_path="$new_path"
29665  # Check if we need to convert this using DOS-style short mode. If the path
29666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29667  # take no chances and rewrite it.
29668  # Note: m4 eats our [], so we need to use [ and ] instead.
29669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29670  if test "x$has_forbidden_chars" != x; then
29671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29675      # Going to short mode and back again did indeed matter. Since short mode is
29676      # case insensitive, let's make it lowercase to improve readability.
29677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29678      # Now convert it back to Unix-style (cygpath)
29679      input_path=`$CYGPATH -u "$shortmode_path"`
29680      new_path="$input_path"
29681    fi
29682  fi
29683
29684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29685  if test "x$test_cygdrive_prefix" = x; then
29686    # As a simple fix, exclude /usr/bin since it's not a real path.
29687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29689      # a path prefixed by /cygdrive for fixpath to work.
29690      new_path="$CYGWIN_ROOT_PATH$input_path"
29691    fi
29692  fi
29693
29694
29695  if test "x$path" != "x$new_path"; then
29696    BOOT_JDK="$new_path"
29697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29699  fi
29700
29701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29702
29703  path="$BOOT_JDK"
29704  has_colon=`$ECHO $path | $GREP ^.:`
29705  new_path="$path"
29706  if test "x$has_colon" = x; then
29707    # Not in mixed or Windows style, start by that.
29708    new_path=`cmd //c echo $path`
29709  fi
29710
29711
29712  input_path="$new_path"
29713  # Check if we need to convert this using DOS-style short mode. If the path
29714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29715  # take no chances and rewrite it.
29716  # Note: m4 eats our [], so we need to use [ and ] instead.
29717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29718  if test "x$has_forbidden_chars" != x; then
29719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29721  fi
29722
29723
29724  windows_path="$new_path"
29725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29726    unix_path=`$CYGPATH -u "$windows_path"`
29727    new_path="$unix_path"
29728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29730    new_path="$unix_path"
29731  fi
29732
29733  if test "x$path" != "x$new_path"; then
29734    BOOT_JDK="$new_path"
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29737  fi
29738
29739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29741
29742    else
29743      # We're on a unix platform. Hooray! :)
29744      path="$BOOT_JDK"
29745      has_space=`$ECHO "$path" | $GREP " "`
29746      if test "x$has_space" != x; then
29747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29750      fi
29751
29752      # Use eval to expand a potential ~
29753      eval path="$path"
29754      if test ! -f "$path" && test ! -d "$path"; then
29755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29756      fi
29757
29758      if test -d "$path"; then
29759        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29760      else
29761        dir="`$DIRNAME "$path"`"
29762        base="`$BASENAME "$path"`"
29763        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29764      fi
29765    fi
29766  fi
29767
29768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29769$as_echo_n "checking for Boot JDK... " >&6; }
29770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29771$as_echo "$BOOT_JDK" >&6; }
29772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29773$as_echo_n "checking Boot JDK version... " >&6; }
29774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29776$as_echo "$BOOT_JDK_VERSION" >&6; }
29777          fi # end check jdk version
29778        fi # end check javac
29779      fi # end check java
29780    fi # end check boot jdk found
29781  fi
29782
29783
29784  if test "x$BOOT_JDK_FOUND" = xno; then
29785    # Now execute the test
29786
29787  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29788  BOOT_JDK_SUFFIX="/Contents/Home"
29789  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29790  if test "x$ALL_JDKS_FOUND" != x; then
29791    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29792
29793  if test "x$BOOT_JDK_FOUND" = xno; then
29794    # Now execute the test
29795
29796        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29797        if test -d "$BOOT_JDK"; then
29798          BOOT_JDK_FOUND=maybe
29799          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29800$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29801        fi
29802
29803
29804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29806      # Do we have a bin/java?
29807      if test ! -x "$BOOT_JDK/bin/java"; then
29808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29810        BOOT_JDK_FOUND=no
29811      else
29812        # Do we have a bin/javac?
29813        if test ! -x "$BOOT_JDK/bin/javac"; then
29814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29818          BOOT_JDK_FOUND=no
29819        else
29820          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29821          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29822
29823          # Extra M4 quote needed to protect [] in grep expression.
29824          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29825          if test "x$FOUND_CORRECT_VERSION" = x; then
29826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29828            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29829$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29830            BOOT_JDK_FOUND=no
29831          else
29832            # We're done! :-)
29833            BOOT_JDK_FOUND=yes
29834
29835  # Only process if variable expands to non-empty
29836
29837  if test "x$BOOT_JDK" != x; then
29838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29839
29840  # Input might be given as Windows format, start by converting to
29841  # unix format.
29842  path="$BOOT_JDK"
29843  new_path=`$CYGPATH -u "$path"`
29844
29845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29848  # "foo.exe" is OK but "foo" is an error.
29849  #
29850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29851  # It is also a way to make sure we got the proper file name for the real test later on.
29852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29853  if test "x$test_shortpath" = x; then
29854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29857  fi
29858
29859  # Call helper function which possibly converts this using DOS-style short mode.
29860  # If so, the updated path is stored in $new_path.
29861
29862  input_path="$new_path"
29863  # Check if we need to convert this using DOS-style short mode. If the path
29864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29865  # take no chances and rewrite it.
29866  # Note: m4 eats our [], so we need to use [ and ] instead.
29867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29868  if test "x$has_forbidden_chars" != x; then
29869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29873      # Going to short mode and back again did indeed matter. Since short mode is
29874      # case insensitive, let's make it lowercase to improve readability.
29875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29876      # Now convert it back to Unix-style (cygpath)
29877      input_path=`$CYGPATH -u "$shortmode_path"`
29878      new_path="$input_path"
29879    fi
29880  fi
29881
29882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29883  if test "x$test_cygdrive_prefix" = x; then
29884    # As a simple fix, exclude /usr/bin since it's not a real path.
29885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29887      # a path prefixed by /cygdrive for fixpath to work.
29888      new_path="$CYGWIN_ROOT_PATH$input_path"
29889    fi
29890  fi
29891
29892
29893  if test "x$path" != "x$new_path"; then
29894    BOOT_JDK="$new_path"
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29897  fi
29898
29899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29900
29901  path="$BOOT_JDK"
29902  has_colon=`$ECHO $path | $GREP ^.:`
29903  new_path="$path"
29904  if test "x$has_colon" = x; then
29905    # Not in mixed or Windows style, start by that.
29906    new_path=`cmd //c echo $path`
29907  fi
29908
29909
29910  input_path="$new_path"
29911  # Check if we need to convert this using DOS-style short mode. If the path
29912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29913  # take no chances and rewrite it.
29914  # Note: m4 eats our [], so we need to use [ and ] instead.
29915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29916  if test "x$has_forbidden_chars" != x; then
29917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29919  fi
29920
29921
29922  windows_path="$new_path"
29923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29924    unix_path=`$CYGPATH -u "$windows_path"`
29925    new_path="$unix_path"
29926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29928    new_path="$unix_path"
29929  fi
29930
29931  if test "x$path" != "x$new_path"; then
29932    BOOT_JDK="$new_path"
29933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29935  fi
29936
29937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29939
29940    else
29941      # We're on a unix platform. Hooray! :)
29942      path="$BOOT_JDK"
29943      has_space=`$ECHO "$path" | $GREP " "`
29944      if test "x$has_space" != x; then
29945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29948      fi
29949
29950      # Use eval to expand a potential ~
29951      eval path="$path"
29952      if test ! -f "$path" && test ! -d "$path"; then
29953        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29954      fi
29955
29956      if test -d "$path"; then
29957        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29958      else
29959        dir="`$DIRNAME "$path"`"
29960        base="`$BASENAME "$path"`"
29961        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29962      fi
29963    fi
29964  fi
29965
29966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29967$as_echo_n "checking for Boot JDK... " >&6; }
29968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29969$as_echo "$BOOT_JDK" >&6; }
29970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29971$as_echo_n "checking Boot JDK version... " >&6; }
29972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29974$as_echo "$BOOT_JDK_VERSION" >&6; }
29975          fi # end check jdk version
29976        fi # end check javac
29977      fi # end check java
29978    fi # end check boot jdk found
29979  fi
29980
29981    done
29982  fi
29983
29984
29985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29987      # Do we have a bin/java?
29988      if test ! -x "$BOOT_JDK/bin/java"; then
29989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29991        BOOT_JDK_FOUND=no
29992      else
29993        # Do we have a bin/javac?
29994        if test ! -x "$BOOT_JDK/bin/javac"; then
29995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29999          BOOT_JDK_FOUND=no
30000        else
30001          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30002          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30003
30004          # Extra M4 quote needed to protect [] in grep expression.
30005          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30006          if test "x$FOUND_CORRECT_VERSION" = x; then
30007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30009            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30010$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30011            BOOT_JDK_FOUND=no
30012          else
30013            # We're done! :-)
30014            BOOT_JDK_FOUND=yes
30015
30016  # Only process if variable expands to non-empty
30017
30018  if test "x$BOOT_JDK" != x; then
30019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30020
30021  # Input might be given as Windows format, start by converting to
30022  # unix format.
30023  path="$BOOT_JDK"
30024  new_path=`$CYGPATH -u "$path"`
30025
30026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30029  # "foo.exe" is OK but "foo" is an error.
30030  #
30031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30032  # It is also a way to make sure we got the proper file name for the real test later on.
30033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30034  if test "x$test_shortpath" = x; then
30035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30038  fi
30039
30040  # Call helper function which possibly converts this using DOS-style short mode.
30041  # If so, the updated path is stored in $new_path.
30042
30043  input_path="$new_path"
30044  # Check if we need to convert this using DOS-style short mode. If the path
30045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30046  # take no chances and rewrite it.
30047  # Note: m4 eats our [], so we need to use [ and ] instead.
30048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30049  if test "x$has_forbidden_chars" != x; then
30050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30054      # Going to short mode and back again did indeed matter. Since short mode is
30055      # case insensitive, let's make it lowercase to improve readability.
30056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30057      # Now convert it back to Unix-style (cygpath)
30058      input_path=`$CYGPATH -u "$shortmode_path"`
30059      new_path="$input_path"
30060    fi
30061  fi
30062
30063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30064  if test "x$test_cygdrive_prefix" = x; then
30065    # As a simple fix, exclude /usr/bin since it's not a real path.
30066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30068      # a path prefixed by /cygdrive for fixpath to work.
30069      new_path="$CYGWIN_ROOT_PATH$input_path"
30070    fi
30071  fi
30072
30073
30074  if test "x$path" != "x$new_path"; then
30075    BOOT_JDK="$new_path"
30076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30078  fi
30079
30080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30081
30082  path="$BOOT_JDK"
30083  has_colon=`$ECHO $path | $GREP ^.:`
30084  new_path="$path"
30085  if test "x$has_colon" = x; then
30086    # Not in mixed or Windows style, start by that.
30087    new_path=`cmd //c echo $path`
30088  fi
30089
30090
30091  input_path="$new_path"
30092  # Check if we need to convert this using DOS-style short mode. If the path
30093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30094  # take no chances and rewrite it.
30095  # Note: m4 eats our [], so we need to use [ and ] instead.
30096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30097  if test "x$has_forbidden_chars" != x; then
30098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30100  fi
30101
30102
30103  windows_path="$new_path"
30104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30105    unix_path=`$CYGPATH -u "$windows_path"`
30106    new_path="$unix_path"
30107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30109    new_path="$unix_path"
30110  fi
30111
30112  if test "x$path" != "x$new_path"; then
30113    BOOT_JDK="$new_path"
30114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30116  fi
30117
30118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30120
30121    else
30122      # We're on a unix platform. Hooray! :)
30123      path="$BOOT_JDK"
30124      has_space=`$ECHO "$path" | $GREP " "`
30125      if test "x$has_space" != x; then
30126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30129      fi
30130
30131      # Use eval to expand a potential ~
30132      eval path="$path"
30133      if test ! -f "$path" && test ! -d "$path"; then
30134        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30135      fi
30136
30137      if test -d "$path"; then
30138        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30139      else
30140        dir="`$DIRNAME "$path"`"
30141        base="`$BASENAME "$path"`"
30142        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30143      fi
30144    fi
30145  fi
30146
30147            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30148$as_echo_n "checking for Boot JDK... " >&6; }
30149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30150$as_echo "$BOOT_JDK" >&6; }
30151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30152$as_echo_n "checking Boot JDK version... " >&6; }
30153            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30155$as_echo "$BOOT_JDK_VERSION" >&6; }
30156          fi # end check jdk version
30157        fi # end check javac
30158      fi # end check java
30159    fi # end check boot jdk found
30160  fi
30161
30162  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30163
30164  if test "x$BOOT_JDK_FOUND" = xno; then
30165    # Now execute the test
30166
30167  BOOT_JDK_PREFIX="/usr/lib/jvm"
30168  BOOT_JDK_SUFFIX=""
30169  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30170  if test "x$ALL_JDKS_FOUND" != x; then
30171    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30172
30173  if test "x$BOOT_JDK_FOUND" = xno; then
30174    # Now execute the test
30175
30176        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30177        if test -d "$BOOT_JDK"; then
30178          BOOT_JDK_FOUND=maybe
30179          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30180$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30181        fi
30182
30183
30184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30186      # Do we have a bin/java?
30187      if test ! -x "$BOOT_JDK/bin/java"; then
30188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30190        BOOT_JDK_FOUND=no
30191      else
30192        # Do we have a bin/javac?
30193        if test ! -x "$BOOT_JDK/bin/javac"; then
30194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30198          BOOT_JDK_FOUND=no
30199        else
30200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30202
30203          # Extra M4 quote needed to protect [] in grep expression.
30204          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30205          if test "x$FOUND_CORRECT_VERSION" = x; then
30206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30210            BOOT_JDK_FOUND=no
30211          else
30212            # We're done! :-)
30213            BOOT_JDK_FOUND=yes
30214
30215  # Only process if variable expands to non-empty
30216
30217  if test "x$BOOT_JDK" != x; then
30218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30219
30220  # Input might be given as Windows format, start by converting to
30221  # unix format.
30222  path="$BOOT_JDK"
30223  new_path=`$CYGPATH -u "$path"`
30224
30225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30228  # "foo.exe" is OK but "foo" is an error.
30229  #
30230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30231  # It is also a way to make sure we got the proper file name for the real test later on.
30232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30233  if test "x$test_shortpath" = x; then
30234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30237  fi
30238
30239  # Call helper function which possibly converts this using DOS-style short mode.
30240  # If so, the updated path is stored in $new_path.
30241
30242  input_path="$new_path"
30243  # Check if we need to convert this using DOS-style short mode. If the path
30244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30245  # take no chances and rewrite it.
30246  # Note: m4 eats our [], so we need to use [ and ] instead.
30247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30248  if test "x$has_forbidden_chars" != x; then
30249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30253      # Going to short mode and back again did indeed matter. Since short mode is
30254      # case insensitive, let's make it lowercase to improve readability.
30255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30256      # Now convert it back to Unix-style (cygpath)
30257      input_path=`$CYGPATH -u "$shortmode_path"`
30258      new_path="$input_path"
30259    fi
30260  fi
30261
30262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30263  if test "x$test_cygdrive_prefix" = x; then
30264    # As a simple fix, exclude /usr/bin since it's not a real path.
30265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30267      # a path prefixed by /cygdrive for fixpath to work.
30268      new_path="$CYGWIN_ROOT_PATH$input_path"
30269    fi
30270  fi
30271
30272
30273  if test "x$path" != "x$new_path"; then
30274    BOOT_JDK="$new_path"
30275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30277  fi
30278
30279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30280
30281  path="$BOOT_JDK"
30282  has_colon=`$ECHO $path | $GREP ^.:`
30283  new_path="$path"
30284  if test "x$has_colon" = x; then
30285    # Not in mixed or Windows style, start by that.
30286    new_path=`cmd //c echo $path`
30287  fi
30288
30289
30290  input_path="$new_path"
30291  # Check if we need to convert this using DOS-style short mode. If the path
30292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30293  # take no chances and rewrite it.
30294  # Note: m4 eats our [], so we need to use [ and ] instead.
30295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30296  if test "x$has_forbidden_chars" != x; then
30297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30299  fi
30300
30301
30302  windows_path="$new_path"
30303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304    unix_path=`$CYGPATH -u "$windows_path"`
30305    new_path="$unix_path"
30306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30308    new_path="$unix_path"
30309  fi
30310
30311  if test "x$path" != "x$new_path"; then
30312    BOOT_JDK="$new_path"
30313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30315  fi
30316
30317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30319
30320    else
30321      # We're on a unix platform. Hooray! :)
30322      path="$BOOT_JDK"
30323      has_space=`$ECHO "$path" | $GREP " "`
30324      if test "x$has_space" != x; then
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30328      fi
30329
30330      # Use eval to expand a potential ~
30331      eval path="$path"
30332      if test ! -f "$path" && test ! -d "$path"; then
30333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30334      fi
30335
30336      if test -d "$path"; then
30337        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30338      else
30339        dir="`$DIRNAME "$path"`"
30340        base="`$BASENAME "$path"`"
30341        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30342      fi
30343    fi
30344  fi
30345
30346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30347$as_echo_n "checking for Boot JDK... " >&6; }
30348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30349$as_echo "$BOOT_JDK" >&6; }
30350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30351$as_echo_n "checking Boot JDK version... " >&6; }
30352            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30354$as_echo "$BOOT_JDK_VERSION" >&6; }
30355          fi # end check jdk version
30356        fi # end check javac
30357      fi # end check java
30358    fi # end check boot jdk found
30359  fi
30360
30361    done
30362  fi
30363
30364
30365    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30366    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30367      # Do we have a bin/java?
30368      if test ! -x "$BOOT_JDK/bin/java"; then
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30371        BOOT_JDK_FOUND=no
30372      else
30373        # Do we have a bin/javac?
30374        if test ! -x "$BOOT_JDK/bin/javac"; then
30375          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30377          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30378$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30379          BOOT_JDK_FOUND=no
30380        else
30381          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30382          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30383
30384          # Extra M4 quote needed to protect [] in grep expression.
30385          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30386          if test "x$FOUND_CORRECT_VERSION" = x; then
30387            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30389            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30390$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30391            BOOT_JDK_FOUND=no
30392          else
30393            # We're done! :-)
30394            BOOT_JDK_FOUND=yes
30395
30396  # Only process if variable expands to non-empty
30397
30398  if test "x$BOOT_JDK" != x; then
30399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30400
30401  # Input might be given as Windows format, start by converting to
30402  # unix format.
30403  path="$BOOT_JDK"
30404  new_path=`$CYGPATH -u "$path"`
30405
30406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30409  # "foo.exe" is OK but "foo" is an error.
30410  #
30411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30412  # It is also a way to make sure we got the proper file name for the real test later on.
30413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30414  if test "x$test_shortpath" = x; then
30415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30417    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30418  fi
30419
30420  # Call helper function which possibly converts this using DOS-style short mode.
30421  # If so, the updated path is stored in $new_path.
30422
30423  input_path="$new_path"
30424  # Check if we need to convert this using DOS-style short mode. If the path
30425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30426  # take no chances and rewrite it.
30427  # Note: m4 eats our [], so we need to use [ and ] instead.
30428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30429  if test "x$has_forbidden_chars" != x; then
30430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30434      # Going to short mode and back again did indeed matter. Since short mode is
30435      # case insensitive, let's make it lowercase to improve readability.
30436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30437      # Now convert it back to Unix-style (cygpath)
30438      input_path=`$CYGPATH -u "$shortmode_path"`
30439      new_path="$input_path"
30440    fi
30441  fi
30442
30443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30444  if test "x$test_cygdrive_prefix" = x; then
30445    # As a simple fix, exclude /usr/bin since it's not a real path.
30446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30448      # a path prefixed by /cygdrive for fixpath to work.
30449      new_path="$CYGWIN_ROOT_PATH$input_path"
30450    fi
30451  fi
30452
30453
30454  if test "x$path" != "x$new_path"; then
30455    BOOT_JDK="$new_path"
30456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30458  fi
30459
30460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30461
30462  path="$BOOT_JDK"
30463  has_colon=`$ECHO $path | $GREP ^.:`
30464  new_path="$path"
30465  if test "x$has_colon" = x; then
30466    # Not in mixed or Windows style, start by that.
30467    new_path=`cmd //c echo $path`
30468  fi
30469
30470
30471  input_path="$new_path"
30472  # Check if we need to convert this using DOS-style short mode. If the path
30473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30474  # take no chances and rewrite it.
30475  # Note: m4 eats our [], so we need to use [ and ] instead.
30476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30477  if test "x$has_forbidden_chars" != x; then
30478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30480  fi
30481
30482
30483  windows_path="$new_path"
30484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30485    unix_path=`$CYGPATH -u "$windows_path"`
30486    new_path="$unix_path"
30487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30489    new_path="$unix_path"
30490  fi
30491
30492  if test "x$path" != "x$new_path"; then
30493    BOOT_JDK="$new_path"
30494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30496  fi
30497
30498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30500
30501    else
30502      # We're on a unix platform. Hooray! :)
30503      path="$BOOT_JDK"
30504      has_space=`$ECHO "$path" | $GREP " "`
30505      if test "x$has_space" != x; then
30506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30507$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30509      fi
30510
30511      # Use eval to expand a potential ~
30512      eval path="$path"
30513      if test ! -f "$path" && test ! -d "$path"; then
30514        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30515      fi
30516
30517      if test -d "$path"; then
30518        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30519      else
30520        dir="`$DIRNAME "$path"`"
30521        base="`$BASENAME "$path"`"
30522        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30523      fi
30524    fi
30525  fi
30526
30527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30528$as_echo_n "checking for Boot JDK... " >&6; }
30529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30530$as_echo "$BOOT_JDK" >&6; }
30531            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30532$as_echo_n "checking Boot JDK version... " >&6; }
30533            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30535$as_echo "$BOOT_JDK_VERSION" >&6; }
30536          fi # end check jdk version
30537        fi # end check javac
30538      fi # end check java
30539    fi # end check boot jdk found
30540  fi
30541
30542  fi
30543
30544
30545    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30546    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30547      # Do we have a bin/java?
30548      if test ! -x "$BOOT_JDK/bin/java"; then
30549        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30551        BOOT_JDK_FOUND=no
30552      else
30553        # Do we have a bin/javac?
30554        if test ! -x "$BOOT_JDK/bin/javac"; then
30555          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30557          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30558$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30559          BOOT_JDK_FOUND=no
30560        else
30561          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30562          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30563
30564          # Extra M4 quote needed to protect [] in grep expression.
30565          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30566          if test "x$FOUND_CORRECT_VERSION" = x; then
30567            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30569            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30570$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30571            BOOT_JDK_FOUND=no
30572          else
30573            # We're done! :-)
30574            BOOT_JDK_FOUND=yes
30575
30576  # Only process if variable expands to non-empty
30577
30578  if test "x$BOOT_JDK" != x; then
30579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30580
30581  # Input might be given as Windows format, start by converting to
30582  # unix format.
30583  path="$BOOT_JDK"
30584  new_path=`$CYGPATH -u "$path"`
30585
30586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30589  # "foo.exe" is OK but "foo" is an error.
30590  #
30591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30592  # It is also a way to make sure we got the proper file name for the real test later on.
30593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30594  if test "x$test_shortpath" = x; then
30595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30597    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30598  fi
30599
30600  # Call helper function which possibly converts this using DOS-style short mode.
30601  # If so, the updated path is stored in $new_path.
30602
30603  input_path="$new_path"
30604  # Check if we need to convert this using DOS-style short mode. If the path
30605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30606  # take no chances and rewrite it.
30607  # Note: m4 eats our [], so we need to use [ and ] instead.
30608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30609  if test "x$has_forbidden_chars" != x; then
30610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30614      # Going to short mode and back again did indeed matter. Since short mode is
30615      # case insensitive, let's make it lowercase to improve readability.
30616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30617      # Now convert it back to Unix-style (cygpath)
30618      input_path=`$CYGPATH -u "$shortmode_path"`
30619      new_path="$input_path"
30620    fi
30621  fi
30622
30623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30624  if test "x$test_cygdrive_prefix" = x; then
30625    # As a simple fix, exclude /usr/bin since it's not a real path.
30626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30628      # a path prefixed by /cygdrive for fixpath to work.
30629      new_path="$CYGWIN_ROOT_PATH$input_path"
30630    fi
30631  fi
30632
30633
30634  if test "x$path" != "x$new_path"; then
30635    BOOT_JDK="$new_path"
30636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30638  fi
30639
30640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30641
30642  path="$BOOT_JDK"
30643  has_colon=`$ECHO $path | $GREP ^.:`
30644  new_path="$path"
30645  if test "x$has_colon" = x; then
30646    # Not in mixed or Windows style, start by that.
30647    new_path=`cmd //c echo $path`
30648  fi
30649
30650
30651  input_path="$new_path"
30652  # Check if we need to convert this using DOS-style short mode. If the path
30653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30654  # take no chances and rewrite it.
30655  # Note: m4 eats our [], so we need to use [ and ] instead.
30656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30657  if test "x$has_forbidden_chars" != x; then
30658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30660  fi
30661
30662
30663  windows_path="$new_path"
30664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30665    unix_path=`$CYGPATH -u "$windows_path"`
30666    new_path="$unix_path"
30667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30669    new_path="$unix_path"
30670  fi
30671
30672  if test "x$path" != "x$new_path"; then
30673    BOOT_JDK="$new_path"
30674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30676  fi
30677
30678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30680
30681    else
30682      # We're on a unix platform. Hooray! :)
30683      path="$BOOT_JDK"
30684      has_space=`$ECHO "$path" | $GREP " "`
30685      if test "x$has_space" != x; then
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30689      fi
30690
30691      # Use eval to expand a potential ~
30692      eval path="$path"
30693      if test ! -f "$path" && test ! -d "$path"; then
30694        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30695      fi
30696
30697      if test -d "$path"; then
30698        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30699      else
30700        dir="`$DIRNAME "$path"`"
30701        base="`$BASENAME "$path"`"
30702        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30703      fi
30704    fi
30705  fi
30706
30707            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30708$as_echo_n "checking for Boot JDK... " >&6; }
30709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30710$as_echo "$BOOT_JDK" >&6; }
30711            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30712$as_echo_n "checking Boot JDK version... " >&6; }
30713            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30715$as_echo "$BOOT_JDK_VERSION" >&6; }
30716          fi # end check jdk version
30717        fi # end check javac
30718      fi # end check java
30719    fi # end check boot jdk found
30720  fi
30721
30722
30723  # If we haven't found anything yet, we've truly lost. Give up.
30724  if test "x$BOOT_JDK_FOUND" = xno; then
30725
30726  # Print a helpful message on how to acquire the necessary build dependency.
30727  # openjdk is the help tag: freetype, cups, alsa etc
30728  MISSING_DEPENDENCY=openjdk
30729
30730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30731    cygwin_help $MISSING_DEPENDENCY
30732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30733    msys_help $MISSING_DEPENDENCY
30734  else
30735    PKGHANDLER_COMMAND=
30736
30737    case $PKGHANDLER in
30738      apt-get)
30739        apt_help     $MISSING_DEPENDENCY ;;
30740      yum)
30741        yum_help     $MISSING_DEPENDENCY ;;
30742      brew)
30743        brew_help    $MISSING_DEPENDENCY ;;
30744      port)
30745        port_help    $MISSING_DEPENDENCY ;;
30746      pkgutil)
30747        pkgutil_help $MISSING_DEPENDENCY ;;
30748      pkgadd)
30749        pkgadd_help  $MISSING_DEPENDENCY ;;
30750    esac
30751
30752    if test "x$PKGHANDLER_COMMAND" != x; then
30753      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30754    fi
30755  fi
30756
30757    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30758$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30759    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30760$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30761    as_fn_error $? "Cannot continue" "$LINENO" 5
30762  fi
30763
30764
30765
30766  # Setup tools from the Boot JDK.
30767
30768  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30769
30770  # Publish this variable in the help.
30771
30772
30773  if [ -z "${JAVA+x}" ]; then
30774    # The variable is not set by user, try to locate tool using the code snippet
30775
30776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30777$as_echo_n "checking for java in Boot JDK... " >&6; }
30778      JAVA=$BOOT_JDK/bin/java
30779      if test ! -x $JAVA; then
30780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30781$as_echo "not found" >&6; }
30782        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30783$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30784        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30785      fi
30786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30787$as_echo "ok" >&6; }
30788
30789
30790  else
30791    # The variable is set, but is it from the command line or the environment?
30792
30793    # Try to remove the string !JAVA! from our list.
30794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30796      # If it failed, the variable was not from the command line. Ignore it,
30797      # but warn the user (except for BASH, which is always set by the calling BASH).
30798      if test "xJAVA" != xBASH; then
30799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30800$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30801      fi
30802      # Try to locate tool using the code snippet
30803
30804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30805$as_echo_n "checking for java in Boot JDK... " >&6; }
30806      JAVA=$BOOT_JDK/bin/java
30807      if test ! -x $JAVA; then
30808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30809$as_echo "not found" >&6; }
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30811$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30812        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30813      fi
30814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30815$as_echo "ok" >&6; }
30816
30817
30818    else
30819      # If it succeeded, then it was overridden by the user. We will use it
30820      # for the tool.
30821
30822      # First remove it from the list of overridden variables, so we can test
30823      # for unknown variables in the end.
30824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30825
30826      # Check if we try to supply an empty value
30827      if test "x$JAVA" = x; then
30828        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30829$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30831$as_echo_n "checking for JAVA... " >&6; }
30832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30833$as_echo "disabled" >&6; }
30834      else
30835        # Check if the provided tool contains a complete path.
30836        tool_specified="$JAVA"
30837        tool_basename="${tool_specified##*/}"
30838        if test "x$tool_basename" = "x$tool_specified"; then
30839          # A command without a complete path is provided, search $PATH.
30840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30841$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30842          # Extract the first word of "$tool_basename", so it can be a program name with args.
30843set dummy $tool_basename; ac_word=$2
30844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30845$as_echo_n "checking for $ac_word... " >&6; }
30846if ${ac_cv_path_JAVA+:} false; then :
30847  $as_echo_n "(cached) " >&6
30848else
30849  case $JAVA in
30850  [\\/]* | ?:[\\/]*)
30851  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30852  ;;
30853  *)
30854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30855for as_dir in $PATH
30856do
30857  IFS=$as_save_IFS
30858  test -z "$as_dir" && as_dir=.
30859    for ac_exec_ext in '' $ac_executable_extensions; do
30860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30861    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30863    break 2
30864  fi
30865done
30866  done
30867IFS=$as_save_IFS
30868
30869  ;;
30870esac
30871fi
30872JAVA=$ac_cv_path_JAVA
30873if test -n "$JAVA"; then
30874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30875$as_echo "$JAVA" >&6; }
30876else
30877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30878$as_echo "no" >&6; }
30879fi
30880
30881
30882          if test "x$JAVA" = x; then
30883            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30884          fi
30885        else
30886          # Otherwise we believe it is a complete path. Use it as it is.
30887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30888$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30889          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30890$as_echo_n "checking for JAVA... " >&6; }
30891          if test ! -x "$tool_specified"; then
30892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30893$as_echo "not found" >&6; }
30894            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30895          fi
30896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30897$as_echo "$tool_specified" >&6; }
30898        fi
30899      fi
30900    fi
30901
30902  fi
30903
30904
30905
30906  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30907
30908  # Publish this variable in the help.
30909
30910
30911  if [ -z "${JAVAC+x}" ]; then
30912    # The variable is not set by user, try to locate tool using the code snippet
30913
30914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30915$as_echo_n "checking for javac in Boot JDK... " >&6; }
30916      JAVAC=$BOOT_JDK/bin/javac
30917      if test ! -x $JAVAC; then
30918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30919$as_echo "not found" >&6; }
30920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30922        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30923      fi
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30925$as_echo "ok" >&6; }
30926
30927
30928  else
30929    # The variable is set, but is it from the command line or the environment?
30930
30931    # Try to remove the string !JAVAC! from our list.
30932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30934      # If it failed, the variable was not from the command line. Ignore it,
30935      # but warn the user (except for BASH, which is always set by the calling BASH).
30936      if test "xJAVAC" != xBASH; then
30937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30938$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30939      fi
30940      # Try to locate tool using the code snippet
30941
30942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30943$as_echo_n "checking for javac in Boot JDK... " >&6; }
30944      JAVAC=$BOOT_JDK/bin/javac
30945      if test ! -x $JAVAC; then
30946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30947$as_echo "not found" >&6; }
30948        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30949$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30950        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30951      fi
30952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30953$as_echo "ok" >&6; }
30954
30955
30956    else
30957      # If it succeeded, then it was overridden by the user. We will use it
30958      # for the tool.
30959
30960      # First remove it from the list of overridden variables, so we can test
30961      # for unknown variables in the end.
30962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30963
30964      # Check if we try to supply an empty value
30965      if test "x$JAVAC" = x; then
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30967$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30969$as_echo_n "checking for JAVAC... " >&6; }
30970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30971$as_echo "disabled" >&6; }
30972      else
30973        # Check if the provided tool contains a complete path.
30974        tool_specified="$JAVAC"
30975        tool_basename="${tool_specified##*/}"
30976        if test "x$tool_basename" = "x$tool_specified"; then
30977          # A command without a complete path is provided, search $PATH.
30978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30979$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30980          # Extract the first word of "$tool_basename", so it can be a program name with args.
30981set dummy $tool_basename; ac_word=$2
30982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30983$as_echo_n "checking for $ac_word... " >&6; }
30984if ${ac_cv_path_JAVAC+:} false; then :
30985  $as_echo_n "(cached) " >&6
30986else
30987  case $JAVAC in
30988  [\\/]* | ?:[\\/]*)
30989  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30990  ;;
30991  *)
30992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30993for as_dir in $PATH
30994do
30995  IFS=$as_save_IFS
30996  test -z "$as_dir" && as_dir=.
30997    for ac_exec_ext in '' $ac_executable_extensions; do
30998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30999    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
31000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31001    break 2
31002  fi
31003done
31004  done
31005IFS=$as_save_IFS
31006
31007  ;;
31008esac
31009fi
31010JAVAC=$ac_cv_path_JAVAC
31011if test -n "$JAVAC"; then
31012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
31013$as_echo "$JAVAC" >&6; }
31014else
31015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31016$as_echo "no" >&6; }
31017fi
31018
31019
31020          if test "x$JAVAC" = x; then
31021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31022          fi
31023        else
31024          # Otherwise we believe it is a complete path. Use it as it is.
31025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31026$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31028$as_echo_n "checking for JAVAC... " >&6; }
31029          if test ! -x "$tool_specified"; then
31030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31031$as_echo "not found" >&6; }
31032            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31033          fi
31034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31035$as_echo "$tool_specified" >&6; }
31036        fi
31037      fi
31038    fi
31039
31040  fi
31041
31042
31043
31044  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31045
31046  # Publish this variable in the help.
31047
31048
31049  if [ -z "${JAVAH+x}" ]; then
31050    # The variable is not set by user, try to locate tool using the code snippet
31051
31052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31053$as_echo_n "checking for javah in Boot JDK... " >&6; }
31054      JAVAH=$BOOT_JDK/bin/javah
31055      if test ! -x $JAVAH; then
31056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31057$as_echo "not found" >&6; }
31058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31060        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31061      fi
31062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31063$as_echo "ok" >&6; }
31064
31065
31066  else
31067    # The variable is set, but is it from the command line or the environment?
31068
31069    # Try to remove the string !JAVAH! from our list.
31070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31072      # If it failed, the variable was not from the command line. Ignore it,
31073      # but warn the user (except for BASH, which is always set by the calling BASH).
31074      if test "xJAVAH" != xBASH; then
31075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31076$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31077      fi
31078      # Try to locate tool using the code snippet
31079
31080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31081$as_echo_n "checking for javah in Boot JDK... " >&6; }
31082      JAVAH=$BOOT_JDK/bin/javah
31083      if test ! -x $JAVAH; then
31084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31085$as_echo "not found" >&6; }
31086        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31087$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31088        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31089      fi
31090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31091$as_echo "ok" >&6; }
31092
31093
31094    else
31095      # If it succeeded, then it was overridden by the user. We will use it
31096      # for the tool.
31097
31098      # First remove it from the list of overridden variables, so we can test
31099      # for unknown variables in the end.
31100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31101
31102      # Check if we try to supply an empty value
31103      if test "x$JAVAH" = x; then
31104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31105$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31107$as_echo_n "checking for JAVAH... " >&6; }
31108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31109$as_echo "disabled" >&6; }
31110      else
31111        # Check if the provided tool contains a complete path.
31112        tool_specified="$JAVAH"
31113        tool_basename="${tool_specified##*/}"
31114        if test "x$tool_basename" = "x$tool_specified"; then
31115          # A command without a complete path is provided, search $PATH.
31116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31117$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31118          # Extract the first word of "$tool_basename", so it can be a program name with args.
31119set dummy $tool_basename; ac_word=$2
31120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31121$as_echo_n "checking for $ac_word... " >&6; }
31122if ${ac_cv_path_JAVAH+:} false; then :
31123  $as_echo_n "(cached) " >&6
31124else
31125  case $JAVAH in
31126  [\\/]* | ?:[\\/]*)
31127  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31128  ;;
31129  *)
31130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31131for as_dir in $PATH
31132do
31133  IFS=$as_save_IFS
31134  test -z "$as_dir" && as_dir=.
31135    for ac_exec_ext in '' $ac_executable_extensions; do
31136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31137    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31139    break 2
31140  fi
31141done
31142  done
31143IFS=$as_save_IFS
31144
31145  ;;
31146esac
31147fi
31148JAVAH=$ac_cv_path_JAVAH
31149if test -n "$JAVAH"; then
31150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31151$as_echo "$JAVAH" >&6; }
31152else
31153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31154$as_echo "no" >&6; }
31155fi
31156
31157
31158          if test "x$JAVAH" = x; then
31159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31160          fi
31161        else
31162          # Otherwise we believe it is a complete path. Use it as it is.
31163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31164$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31166$as_echo_n "checking for JAVAH... " >&6; }
31167          if test ! -x "$tool_specified"; then
31168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31169$as_echo "not found" >&6; }
31170            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31171          fi
31172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31173$as_echo "$tool_specified" >&6; }
31174        fi
31175      fi
31176    fi
31177
31178  fi
31179
31180
31181
31182  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31183
31184  # Publish this variable in the help.
31185
31186
31187  if [ -z "${JAR+x}" ]; then
31188    # The variable is not set by user, try to locate tool using the code snippet
31189
31190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31191$as_echo_n "checking for jar in Boot JDK... " >&6; }
31192      JAR=$BOOT_JDK/bin/jar
31193      if test ! -x $JAR; then
31194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31195$as_echo "not found" >&6; }
31196        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31197$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31198        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31199      fi
31200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31201$as_echo "ok" >&6; }
31202
31203
31204  else
31205    # The variable is set, but is it from the command line or the environment?
31206
31207    # Try to remove the string !JAR! from our list.
31208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31210      # If it failed, the variable was not from the command line. Ignore it,
31211      # but warn the user (except for BASH, which is always set by the calling BASH).
31212      if test "xJAR" != xBASH; then
31213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31214$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31215      fi
31216      # Try to locate tool using the code snippet
31217
31218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31219$as_echo_n "checking for jar in Boot JDK... " >&6; }
31220      JAR=$BOOT_JDK/bin/jar
31221      if test ! -x $JAR; then
31222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31223$as_echo "not found" >&6; }
31224        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31225$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31226        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31227      fi
31228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31229$as_echo "ok" >&6; }
31230
31231
31232    else
31233      # If it succeeded, then it was overridden by the user. We will use it
31234      # for the tool.
31235
31236      # First remove it from the list of overridden variables, so we can test
31237      # for unknown variables in the end.
31238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31239
31240      # Check if we try to supply an empty value
31241      if test "x$JAR" = x; then
31242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31243$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31245$as_echo_n "checking for JAR... " >&6; }
31246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31247$as_echo "disabled" >&6; }
31248      else
31249        # Check if the provided tool contains a complete path.
31250        tool_specified="$JAR"
31251        tool_basename="${tool_specified##*/}"
31252        if test "x$tool_basename" = "x$tool_specified"; then
31253          # A command without a complete path is provided, search $PATH.
31254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31255$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31256          # Extract the first word of "$tool_basename", so it can be a program name with args.
31257set dummy $tool_basename; ac_word=$2
31258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31259$as_echo_n "checking for $ac_word... " >&6; }
31260if ${ac_cv_path_JAR+:} false; then :
31261  $as_echo_n "(cached) " >&6
31262else
31263  case $JAR in
31264  [\\/]* | ?:[\\/]*)
31265  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31266  ;;
31267  *)
31268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31269for as_dir in $PATH
31270do
31271  IFS=$as_save_IFS
31272  test -z "$as_dir" && as_dir=.
31273    for ac_exec_ext in '' $ac_executable_extensions; do
31274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31275    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31277    break 2
31278  fi
31279done
31280  done
31281IFS=$as_save_IFS
31282
31283  ;;
31284esac
31285fi
31286JAR=$ac_cv_path_JAR
31287if test -n "$JAR"; then
31288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31289$as_echo "$JAR" >&6; }
31290else
31291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31292$as_echo "no" >&6; }
31293fi
31294
31295
31296          if test "x$JAR" = x; then
31297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31298          fi
31299        else
31300          # Otherwise we believe it is a complete path. Use it as it is.
31301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31302$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31304$as_echo_n "checking for JAR... " >&6; }
31305          if test ! -x "$tool_specified"; then
31306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31307$as_echo "not found" >&6; }
31308            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31309          fi
31310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31311$as_echo "$tool_specified" >&6; }
31312        fi
31313      fi
31314    fi
31315
31316  fi
31317
31318
31319
31320  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31321
31322  # Publish this variable in the help.
31323
31324
31325  if [ -z "${JARSIGNER+x}" ]; then
31326    # The variable is not set by user, try to locate tool using the code snippet
31327
31328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31329$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31330      JARSIGNER=$BOOT_JDK/bin/jarsigner
31331      if test ! -x $JARSIGNER; then
31332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31333$as_echo "not found" >&6; }
31334        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31335$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31336        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31337      fi
31338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31339$as_echo "ok" >&6; }
31340
31341
31342  else
31343    # The variable is set, but is it from the command line or the environment?
31344
31345    # Try to remove the string !JARSIGNER! from our list.
31346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31348      # If it failed, the variable was not from the command line. Ignore it,
31349      # but warn the user (except for BASH, which is always set by the calling BASH).
31350      if test "xJARSIGNER" != xBASH; then
31351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31352$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31353      fi
31354      # Try to locate tool using the code snippet
31355
31356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31357$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31358      JARSIGNER=$BOOT_JDK/bin/jarsigner
31359      if test ! -x $JARSIGNER; then
31360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31361$as_echo "not found" >&6; }
31362        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31363$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31364        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31365      fi
31366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31367$as_echo "ok" >&6; }
31368
31369
31370    else
31371      # If it succeeded, then it was overridden by the user. We will use it
31372      # for the tool.
31373
31374      # First remove it from the list of overridden variables, so we can test
31375      # for unknown variables in the end.
31376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31377
31378      # Check if we try to supply an empty value
31379      if test "x$JARSIGNER" = x; then
31380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31381$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31383$as_echo_n "checking for JARSIGNER... " >&6; }
31384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31385$as_echo "disabled" >&6; }
31386      else
31387        # Check if the provided tool contains a complete path.
31388        tool_specified="$JARSIGNER"
31389        tool_basename="${tool_specified##*/}"
31390        if test "x$tool_basename" = "x$tool_specified"; then
31391          # A command without a complete path is provided, search $PATH.
31392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31393$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31394          # Extract the first word of "$tool_basename", so it can be a program name with args.
31395set dummy $tool_basename; ac_word=$2
31396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31397$as_echo_n "checking for $ac_word... " >&6; }
31398if ${ac_cv_path_JARSIGNER+:} false; then :
31399  $as_echo_n "(cached) " >&6
31400else
31401  case $JARSIGNER in
31402  [\\/]* | ?:[\\/]*)
31403  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31404  ;;
31405  *)
31406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31407for as_dir in $PATH
31408do
31409  IFS=$as_save_IFS
31410  test -z "$as_dir" && as_dir=.
31411    for ac_exec_ext in '' $ac_executable_extensions; do
31412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31413    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31415    break 2
31416  fi
31417done
31418  done
31419IFS=$as_save_IFS
31420
31421  ;;
31422esac
31423fi
31424JARSIGNER=$ac_cv_path_JARSIGNER
31425if test -n "$JARSIGNER"; then
31426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31427$as_echo "$JARSIGNER" >&6; }
31428else
31429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31430$as_echo "no" >&6; }
31431fi
31432
31433
31434          if test "x$JARSIGNER" = x; then
31435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31436          fi
31437        else
31438          # Otherwise we believe it is a complete path. Use it as it is.
31439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31440$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31442$as_echo_n "checking for JARSIGNER... " >&6; }
31443          if test ! -x "$tool_specified"; then
31444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31445$as_echo "not found" >&6; }
31446            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31447          fi
31448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31449$as_echo "$tool_specified" >&6; }
31450        fi
31451      fi
31452    fi
31453
31454  fi
31455
31456
31457
31458  # Finally, set some other options...
31459
31460  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31461  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31462
31463
31464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31465$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31466  if "$JAVA" --list-modules > /dev/null 2>&1; then
31467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31468$as_echo "yes" >&6; }
31469    BOOT_JDK_MODULAR="true"
31470  else
31471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31472$as_echo "no" >&6; }
31473    BOOT_JDK_MODULAR="false"
31474  fi
31475
31476
31477
31478
31479  # Check if the boot jdk is 32 or 64 bit
31480  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31481    BOOT_JDK_BITS="64"
31482  else
31483    BOOT_JDK_BITS="32"
31484  fi
31485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31486$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31488$as_echo "$BOOT_JDK_BITS" >&6; }
31489
31490
31491
31492# Check whether --with-build-jdk was given.
31493if test "${with_build_jdk+set}" = set; then :
31494  withval=$with_build_jdk;
31495fi
31496
31497
31498  CREATE_BUILDJDK=false
31499  EXTERNAL_BUILDJDK=false
31500  BUILD_JDK_FOUND="no"
31501  if test "x$with_build_jdk" != "x"; then
31502
31503  if test "x$BUILD_JDK_FOUND" = xno; then
31504    # Execute the test
31505
31506       if test "x$with_build_jdk" != x; then
31507         BUILD_JDK=$with_build_jdk
31508         BUILD_JDK_FOUND=maybe
31509         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31510$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31511       fi
31512
31513    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31514    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31515      # Do we have a bin/java?
31516      if test ! -x "$BUILD_JDK/bin/java"; then
31517        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31518$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31519        BUILD_JDK_FOUND=no
31520      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31522$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31523        BUILD_JDK_FOUND=no
31524      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31526$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31527        BUILD_JDK_FOUND=no
31528      elif test ! -x "$BUILD_JDK/bin/javac"; then
31529        # Do we have a bin/javac?
31530        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31531$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31532        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31533$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31534        BUILD_JDK_FOUND=no
31535      else
31536        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31537        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31538
31539        # Extra M4 quote needed to protect [] in grep expression.
31540        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31541        if test "x$FOUND_CORRECT_VERSION" = x; then
31542          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31543$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31544          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31545$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31546          BUILD_JDK_FOUND=no
31547        else
31548          # We're done!
31549          BUILD_JDK_FOUND=yes
31550
31551  # Only process if variable expands to non-empty
31552
31553  if test "x$BUILD_JDK" != x; then
31554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31555
31556  # Input might be given as Windows format, start by converting to
31557  # unix format.
31558  path="$BUILD_JDK"
31559  new_path=`$CYGPATH -u "$path"`
31560
31561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31564  # "foo.exe" is OK but "foo" is an error.
31565  #
31566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31567  # It is also a way to make sure we got the proper file name for the real test later on.
31568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31569  if test "x$test_shortpath" = x; then
31570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31571$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31572    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31573  fi
31574
31575  # Call helper function which possibly converts this using DOS-style short mode.
31576  # If so, the updated path is stored in $new_path.
31577
31578  input_path="$new_path"
31579  # Check if we need to convert this using DOS-style short mode. If the path
31580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31581  # take no chances and rewrite it.
31582  # Note: m4 eats our [], so we need to use [ and ] instead.
31583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31584  if test "x$has_forbidden_chars" != x; then
31585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31589      # Going to short mode and back again did indeed matter. Since short mode is
31590      # case insensitive, let's make it lowercase to improve readability.
31591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31592      # Now convert it back to Unix-style (cygpath)
31593      input_path=`$CYGPATH -u "$shortmode_path"`
31594      new_path="$input_path"
31595    fi
31596  fi
31597
31598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31599  if test "x$test_cygdrive_prefix" = x; then
31600    # As a simple fix, exclude /usr/bin since it's not a real path.
31601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31603      # a path prefixed by /cygdrive for fixpath to work.
31604      new_path="$CYGWIN_ROOT_PATH$input_path"
31605    fi
31606  fi
31607
31608
31609  if test "x$path" != "x$new_path"; then
31610    BUILD_JDK="$new_path"
31611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31612$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31613  fi
31614
31615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31616
31617  path="$BUILD_JDK"
31618  has_colon=`$ECHO $path | $GREP ^.:`
31619  new_path="$path"
31620  if test "x$has_colon" = x; then
31621    # Not in mixed or Windows style, start by that.
31622    new_path=`cmd //c echo $path`
31623  fi
31624
31625
31626  input_path="$new_path"
31627  # Check if we need to convert this using DOS-style short mode. If the path
31628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31629  # take no chances and rewrite it.
31630  # Note: m4 eats our [], so we need to use [ and ] instead.
31631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31632  if test "x$has_forbidden_chars" != x; then
31633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31635  fi
31636
31637
31638  windows_path="$new_path"
31639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31640    unix_path=`$CYGPATH -u "$windows_path"`
31641    new_path="$unix_path"
31642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31644    new_path="$unix_path"
31645  fi
31646
31647  if test "x$path" != "x$new_path"; then
31648    BUILD_JDK="$new_path"
31649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31650$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31651  fi
31652
31653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31655
31656    else
31657      # We're on a unix platform. Hooray! :)
31658      path="$BUILD_JDK"
31659      has_space=`$ECHO "$path" | $GREP " "`
31660      if test "x$has_space" != x; then
31661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31662$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31664      fi
31665
31666      # Use eval to expand a potential ~
31667      eval path="$path"
31668      if test ! -f "$path" && test ! -d "$path"; then
31669        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31670      fi
31671
31672      if test -d "$path"; then
31673        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31674      else
31675        dir="`$DIRNAME "$path"`"
31676        base="`$BASENAME "$path"`"
31677        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31678      fi
31679    fi
31680  fi
31681
31682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31683$as_echo_n "checking for Build JDK... " >&6; }
31684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31685$as_echo "$BUILD_JDK" >&6; }
31686          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31687$as_echo_n "checking Build JDK version... " >&6; }
31688          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31690$as_echo "$BUILD_JDK_VERSION" >&6; }
31691        fi # end check jdk version
31692      fi # end check java
31693    fi # end check build jdk found
31694  fi
31695
31696    EXTERNAL_BUILDJDK=true
31697  else
31698    if test "x$COMPILE_TYPE" = "xcross"; then
31699      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31700      BUILD_JDK_FOUND=yes
31701      CREATE_BUILDJDK=true
31702      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31703$as_echo_n "checking for Build JDK... " >&6; }
31704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31705$as_echo "yes, will build it for the host platform" >&6; }
31706    else
31707      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31708      BUILD_JDK_FOUND=yes
31709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31710$as_echo_n "checking for Build JDK... " >&6; }
31711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31712$as_echo "yes, will use output dir" >&6; }
31713    fi
31714  fi
31715
31716  JMOD="$BUILD_JDK/bin/jmod"
31717  JLINK="$BUILD_JDK/bin/jlink"
31718
31719
31720
31721  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31723$as_echo_n "checking for Build JDK... " >&6; }
31724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31725$as_echo "no" >&6; }
31726    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31727  fi
31728
31729
31730
31731
31732
31733
31734###############################################################################
31735#
31736# Configure the sources to use. We can add or override individual directories.
31737#
31738###############################################################################
31739
31740
31741  # Where are the sources.
31742  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31743  CORBA_TOPDIR="$SRC_ROOT/corba"
31744  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31745  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31746  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31747  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31748  JDK_TOPDIR="$SRC_ROOT/jdk"
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758  # This feature is no longer supported.
31759
31760
31761
31762# Check whether --with-add-source-root was given.
31763if test "${with_add_source_root+set}" = set; then :
31764  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
31765$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31766fi
31767
31768
31769
31770
31771# Check whether --with-override-source-root was given.
31772if test "${with_override_source_root+set}" = set; then :
31773  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
31774$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31775fi
31776
31777
31778
31779
31780# Check whether --with-adds-and-overrides was given.
31781if test "${with_adds_and_overrides+set}" = set; then :
31782  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
31783$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31784fi
31785
31786
31787
31788
31789# Check whether --with-override-langtools was given.
31790if test "${with_override_langtools+set}" = set; then :
31791  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31792$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31793fi
31794
31795
31796
31797
31798# Check whether --with-override-corba was given.
31799if test "${with_override_corba+set}" = set; then :
31800  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31801$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31802fi
31803
31804
31805
31806
31807# Check whether --with-override-jaxp was given.
31808if test "${with_override_jaxp+set}" = set; then :
31809  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31810$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31811fi
31812
31813
31814
31815
31816# Check whether --with-override-jaxws was given.
31817if test "${with_override_jaxws+set}" = set; then :
31818  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31819$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31820fi
31821
31822
31823
31824
31825# Check whether --with-override-hotspot was given.
31826if test "${with_override_hotspot+set}" = set; then :
31827  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31828$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31829fi
31830
31831
31832
31833
31834# Check whether --with-override-nashorn was given.
31835if test "${with_override_nashorn+set}" = set; then :
31836  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31837$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31838fi
31839
31840
31841
31842
31843# Check whether --with-override-jdk was given.
31844if test "${with_override_jdk+set}" = set; then :
31845  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31846$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31847fi
31848
31849
31850
31851
31852  BUILD_OUTPUT="$OUTPUT_ROOT"
31853
31854  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31855
31856
31857
31858# Check whether --with-import_hotspot was given.
31859if test "${with_import_hotspot+set}" = set; then :
31860  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31861$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31862fi
31863
31864
31865
31866
31867
31868
31869# Check whether --with-import-modules was given.
31870if test "${with_import_modules+set}" = set; then :
31871  withval=$with_import_modules;
31872fi
31873
31874
31875  if test "x$with_import_modules" != x \
31876      && test "x$with_import_modules" != "xno"; then
31877    if test -d "$with_import_modules"; then
31878      IMPORT_MODULES_TOPDIR="$with_import_modules"
31879
31880  # Only process if variable expands to non-empty
31881
31882  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31884
31885  # Input might be given as Windows format, start by converting to
31886  # unix format.
31887  path="$IMPORT_MODULES_TOPDIR"
31888  new_path=`$CYGPATH -u "$path"`
31889
31890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31893  # "foo.exe" is OK but "foo" is an error.
31894  #
31895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31896  # It is also a way to make sure we got the proper file name for the real test later on.
31897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31898  if test "x$test_shortpath" = x; then
31899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31900$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31901    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31902  fi
31903
31904  # Call helper function which possibly converts this using DOS-style short mode.
31905  # If so, the updated path is stored in $new_path.
31906
31907  input_path="$new_path"
31908  # Check if we need to convert this using DOS-style short mode. If the path
31909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31910  # take no chances and rewrite it.
31911  # Note: m4 eats our [], so we need to use [ and ] instead.
31912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31913  if test "x$has_forbidden_chars" != x; then
31914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31918      # Going to short mode and back again did indeed matter. Since short mode is
31919      # case insensitive, let's make it lowercase to improve readability.
31920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31921      # Now convert it back to Unix-style (cygpath)
31922      input_path=`$CYGPATH -u "$shortmode_path"`
31923      new_path="$input_path"
31924    fi
31925  fi
31926
31927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31928  if test "x$test_cygdrive_prefix" = x; then
31929    # As a simple fix, exclude /usr/bin since it's not a real path.
31930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31932      # a path prefixed by /cygdrive for fixpath to work.
31933      new_path="$CYGWIN_ROOT_PATH$input_path"
31934    fi
31935  fi
31936
31937
31938  if test "x$path" != "x$new_path"; then
31939    IMPORT_MODULES_TOPDIR="$new_path"
31940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31941$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31942  fi
31943
31944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31945
31946  path="$IMPORT_MODULES_TOPDIR"
31947  has_colon=`$ECHO $path | $GREP ^.:`
31948  new_path="$path"
31949  if test "x$has_colon" = x; then
31950    # Not in mixed or Windows style, start by that.
31951    new_path=`cmd //c echo $path`
31952  fi
31953
31954
31955  input_path="$new_path"
31956  # Check if we need to convert this using DOS-style short mode. If the path
31957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31958  # take no chances and rewrite it.
31959  # Note: m4 eats our [], so we need to use [ and ] instead.
31960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31961  if test "x$has_forbidden_chars" != x; then
31962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31964  fi
31965
31966
31967  windows_path="$new_path"
31968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31969    unix_path=`$CYGPATH -u "$windows_path"`
31970    new_path="$unix_path"
31971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31973    new_path="$unix_path"
31974  fi
31975
31976  if test "x$path" != "x$new_path"; then
31977    IMPORT_MODULES_TOPDIR="$new_path"
31978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31979$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31980  fi
31981
31982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31984
31985    else
31986      # We're on a unix platform. Hooray! :)
31987      path="$IMPORT_MODULES_TOPDIR"
31988      has_space=`$ECHO "$path" | $GREP " "`
31989      if test "x$has_space" != x; then
31990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31991$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31992        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31993      fi
31994
31995      # Use eval to expand a potential ~
31996      eval path="$path"
31997      if test ! -f "$path" && test ! -d "$path"; then
31998        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31999      fi
32000
32001      if test -d "$path"; then
32002        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
32003      else
32004        dir="`$DIRNAME "$path"`"
32005        base="`$BASENAME "$path"`"
32006        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
32007      fi
32008    fi
32009  fi
32010
32011    elif test -e "$with_import_modules"; then
32012      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
32013      $RM -rf "$IMPORT_MODULES_TOPDIR"
32014      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
32015      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
32016        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32017      fi
32018    else
32019      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32020    fi
32021  fi
32022
32023  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
32024    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
32025  fi
32026  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
32027    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
32028  fi
32029  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
32030    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
32031  fi
32032  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
32033    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
32034  fi
32035  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
32036    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
32037  fi
32038  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
32039    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
32040  fi
32041  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
32042    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
32043  fi
32044  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
32045    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
32046  fi
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058###############################################################################
32059#
32060# Setup the toolchain (compilers etc), i.e. tools used to compile and process
32061# native code.
32062#
32063###############################################################################
32064
32065# See if we are doing a complete static build or not
32066
32067  # Check whether --enable-static-build was given.
32068if test "${enable_static_build+set}" = set; then :
32069  enableval=$enable_static_build;
32070fi
32071
32072  STATIC_BUILD=false
32073  if test "x$enable_static_build" = "xyes"; then
32074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32075$as_echo_n "checking if static build is enabled... " >&6; }
32076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32077$as_echo "yes" >&6; }
32078    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
32079      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
32080    fi
32081    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
32082    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32083    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32084    STATIC_BUILD=true
32085  elif test "x$enable_static_build" = "xno"; then
32086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32087$as_echo_n "checking if static build is enabled... " >&6; }
32088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32089$as_echo "no" >&6; }
32090  elif test "x$enable_static_build" != "x"; then
32091    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32092  fi
32093
32094
32095
32096
32097# First determine the toolchain type (compiler family)
32098
32099
32100# Check whether --with-toolchain-type was given.
32101if test "${with_toolchain_type+set}" = set; then :
32102  withval=$with_toolchain_type;
32103fi
32104
32105
32106  # Use indirect variable referencing
32107  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32108  VALID_TOOLCHAINS=${!toolchain_var_name}
32109
32110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32111    if test -n "$XCODEBUILD"; then
32112      # On Mac OS X, default toolchain to clang after Xcode 5
32113      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32114      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32115      if test $? -ne 0; then
32116        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32117      fi
32118      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32119          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32120          $CUT -f 1 -d .`
32121      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32122$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32123      if test $XCODE_MAJOR_VERSION -ge 5; then
32124          DEFAULT_TOOLCHAIN="clang"
32125      else
32126          DEFAULT_TOOLCHAIN="gcc"
32127      fi
32128    else
32129      # If Xcode is not installed, but the command line tools are
32130      # then we can't run xcodebuild. On these systems we should
32131      # default to clang
32132      DEFAULT_TOOLCHAIN="clang"
32133    fi
32134  else
32135    # First toolchain type in the list is the default
32136    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32137  fi
32138
32139  if test "x$with_toolchain_type" = xlist; then
32140    # List all toolchains
32141    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32142$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32143    for toolchain in $VALID_TOOLCHAINS; do
32144      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32145      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32146      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32147    done
32148
32149    exit 0
32150  elif test "x$with_toolchain_type" != x; then
32151    # User override; check that it is valid
32152    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32153      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32154$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32155      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32156$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32157      as_fn_error $? "Cannot continue." "$LINENO" 5
32158    fi
32159    TOOLCHAIN_TYPE=$with_toolchain_type
32160  else
32161    # No flag given, use default
32162    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32163  fi
32164
32165
32166  TOOLCHAIN_CC_BINARY_clang="clang"
32167  TOOLCHAIN_CC_BINARY_gcc="gcc"
32168  TOOLCHAIN_CC_BINARY_microsoft="cl"
32169  TOOLCHAIN_CC_BINARY_solstudio="cc"
32170  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32171
32172  TOOLCHAIN_CXX_BINARY_clang="clang++"
32173  TOOLCHAIN_CXX_BINARY_gcc="g++"
32174  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32175  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32176  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32177
32178  # Use indirect variable referencing
32179  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32180  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32181  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32182  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32183  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32184  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32185  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32186  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32187
32188
32189  # Define filename patterns
32190  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32191    LIBRARY_PREFIX=
32192    SHARED_LIBRARY_SUFFIX='.dll'
32193    STATIC_LIBRARY_SUFFIX='.lib'
32194    SHARED_LIBRARY='$1.dll'
32195    STATIC_LIBRARY='$1.lib'
32196    OBJ_SUFFIX='.obj'
32197    EXE_SUFFIX='.exe'
32198  else
32199    LIBRARY_PREFIX=lib
32200    SHARED_LIBRARY_SUFFIX='.so'
32201    STATIC_LIBRARY_SUFFIX='.a'
32202    SHARED_LIBRARY='lib$1.so'
32203    STATIC_LIBRARY='lib$1.a'
32204    OBJ_SUFFIX='.o'
32205    EXE_SUFFIX=''
32206    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32207      # For full static builds, we're overloading the SHARED_LIBRARY
32208      # variables in order to limit the amount of changes required.
32209      # It would be better to remove SHARED and just use LIBRARY and
32210      # LIBRARY_SUFFIX for libraries that can be built either
32211      # shared or static and use STATIC_* for libraries that are
32212      # always built statically.
32213      if test "x$STATIC_BUILD" = xtrue; then
32214        SHARED_LIBRARY='lib$1.a'
32215        SHARED_LIBRARY_SUFFIX='.a'
32216      else
32217        SHARED_LIBRARY='lib$1.dylib'
32218        SHARED_LIBRARY_SUFFIX='.dylib'
32219      fi
32220    fi
32221  fi
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32233    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32234$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32235  else
32236    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32237$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32238  fi
32239
32240
32241# User supplied flags should be used when configure detects compilers
32242
32243  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32244    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32245$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32246  fi
32247
32248  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32250$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32251  fi
32252
32253  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32254    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32255$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32256  fi
32257
32258
32259# Check whether --with-extra-cflags was given.
32260if test "${with_extra_cflags+set}" = set; then :
32261  withval=$with_extra_cflags;
32262fi
32263
32264
32265
32266# Check whether --with-extra-cxxflags was given.
32267if test "${with_extra_cxxflags+set}" = set; then :
32268  withval=$with_extra_cxxflags;
32269fi
32270
32271
32272
32273# Check whether --with-extra-ldflags was given.
32274if test "${with_extra_ldflags+set}" = set; then :
32275  withval=$with_extra_ldflags;
32276fi
32277
32278
32279  EXTRA_CFLAGS="$with_extra_cflags"
32280  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32281  EXTRA_LDFLAGS="$with_extra_ldflags"
32282
32283
32284
32285
32286
32287  # The global CFLAGS and LDLAGS variables are used by configure tests and
32288  # should include the extra parameters
32289  CFLAGS="$EXTRA_CFLAGS"
32290  CXXFLAGS="$EXTRA_CXXFLAGS"
32291  LDFLAGS="$EXTRA_LDFLAGS"
32292  CPPFLAGS=""
32293
32294# The sysroot cflags are needed for configure to be able to run the compilers
32295
32296  if test "x$SYSROOT" != "x"; then
32297    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32298      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32299        # Solaris Studio does not have a concept of sysroot. Instead we must
32300        # make sure the default include and lib dirs are appended to each
32301        # compile and link command line. Must also add -I-xbuiltin to enable
32302        # inlining of system functions and intrinsics.
32303        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32304        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32305            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32306      fi
32307    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32308      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32309      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32310    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32311      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32312      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32313    fi
32314    # The global CFLAGS and LDFLAGS variables need these for configure to function
32315    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32316    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32317    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32318    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32319  fi
32320
32321  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32322    # We also need -iframework<path>/System/Library/Frameworks
32323    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32324    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32325    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32326    # set this here so it doesn't have to be peppered throughout the forest
32327    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32328    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32329  fi
32330
32331
32332
32333
32334
32335# Then detect the actual binaries needed
32336
32337  # FIXME: Is this needed?
32338  ac_ext=cpp
32339ac_cpp='$CXXCPP $CPPFLAGS'
32340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32343
32344
32345  # Store the CFLAGS etc passed to the configure script.
32346  ORG_CFLAGS="$CFLAGS"
32347  ORG_CXXFLAGS="$CXXFLAGS"
32348
32349  # autoconf magic only relies on PATH, so update it if tools dir is specified
32350  OLD_PATH="$PATH"
32351
32352  # On Windows, we need to detect the visual studio installation first.
32353  # This will change the PATH, but we need to keep that new PATH even
32354  # after toolchain detection is done, since the compiler (on x86) uses
32355  # it for DLL resolution in runtime.
32356  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32357      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32358
32359  # Store path to cygwin link.exe to help excluding it when searching for
32360  # VS linker. This must be done before changing the PATH when looking for VS.
32361  # Extract the first word of "link", so it can be a program name with args.
32362set dummy link; ac_word=$2
32363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32364$as_echo_n "checking for $ac_word... " >&6; }
32365if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32366  $as_echo_n "(cached) " >&6
32367else
32368  case $CYGWIN_LINK in
32369  [\\/]* | ?:[\\/]*)
32370  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32371  ;;
32372  *)
32373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32374for as_dir in $PATH
32375do
32376  IFS=$as_save_IFS
32377  test -z "$as_dir" && as_dir=.
32378    for ac_exec_ext in '' $ac_executable_extensions; do
32379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32380    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32382    break 2
32383  fi
32384done
32385  done
32386IFS=$as_save_IFS
32387
32388  ;;
32389esac
32390fi
32391CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32392if test -n "$CYGWIN_LINK"; then
32393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32394$as_echo "$CYGWIN_LINK" >&6; }
32395else
32396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32397$as_echo "no" >&6; }
32398fi
32399
32400
32401  if test "x$CYGWIN_LINK" != x; then
32402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32403$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32404    "$CYGWIN_LINK" --version > /dev/null
32405    if test $? -eq 0 ; then
32406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32407$as_echo "yes" >&6; }
32408    else
32409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32410$as_echo "no" >&6; }
32411      # This might be the VS linker. Don't exclude it later on.
32412      CYGWIN_LINK=""
32413    fi
32414  fi
32415
32416  # First-hand choice is to locate and run the vsvars bat file.
32417
32418
32419# Check whether --with-toolchain-version was given.
32420if test "${with_toolchain_version+set}" = set; then :
32421  withval=$with_toolchain_version;
32422fi
32423
32424
32425  if test "x$with_toolchain_version" = xlist; then
32426    # List all toolchains
32427    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32428$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32429    for version in $VALID_VS_VERSIONS; do
32430      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32431      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32432    done
32433
32434    exit 0
32435  elif test "x$DEVKIT_VS_VERSION" != x; then
32436    VS_VERSION=$DEVKIT_VS_VERSION
32437    TOOLCHAIN_VERSION=$VS_VERSION
32438    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32439    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32440    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32441    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32442    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32443    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32444
32445    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32446    # can still be exported as INCLUDE for compiler invocations without
32447    # SYSROOT_CFLAGS
32448    OLDIFS="$IFS"
32449    IFS=";"
32450    for i in $DEVKIT_VS_INCLUDE; do
32451      ipath=$i
32452
32453  unix_path="$ipath"
32454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32455    windows_path=`$CYGPATH -m "$unix_path"`
32456    ipath="$windows_path"
32457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32458    windows_path=`cmd //c echo $unix_path`
32459    ipath="$windows_path"
32460  fi
32461
32462      VS_INCLUDE="$VS_INCLUDE;$ipath"
32463    done
32464    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32465    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32466    for i in $DEVKIT_VS_LIB; do
32467      libpath=$i
32468
32469  unix_path="$libpath"
32470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32471    windows_path=`$CYGPATH -m "$unix_path"`
32472    libpath="$windows_path"
32473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32474    windows_path=`cmd //c echo $unix_path`
32475    libpath="$windows_path"
32476  fi
32477
32478      VS_LIB="$VS_LIB;$libpath"
32479    done
32480    IFS="$OLDIFS"
32481
32482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32483$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32484
32485  elif test "x$with_toolchain_version" != x; then
32486    # User override; check that it is valid
32487    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32488      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32489$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32490      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32491$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32492      as_fn_error $? "Cannot continue." "$LINENO" 5
32493    fi
32494    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32495  else
32496    # No flag given, use default
32497    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32498  fi
32499
32500  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32501
32502  VS_VERSION="$VS_VERSION"
32503  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32504  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32505  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32506  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32507
32508  # When using --with-tools-dir, assume it points to the correct and default
32509  # version of Visual Studio or that --with-toolchain-version was also set.
32510  if test "x$with_tools_dir" != x; then
32511
32512  if test "x$VS_ENV_CMD" = x; then
32513    VS_VERSION="${VS_VERSION}"
32514    VS_BASE="$with_tools_dir/../.."
32515    METHOD="--with-tools-dir"
32516
32517    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32518      VCVARSFILE="vc/bin/vcvars32.bat"
32519    else
32520      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32521    fi
32522
32523
32524  windows_path="$VS_BASE"
32525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32526    unix_path=`$CYGPATH -u "$windows_path"`
32527    VS_BASE="$unix_path"
32528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32530    VS_BASE="$unix_path"
32531  fi
32532
32533    if test -d "$VS_BASE"; then
32534      if test -f "$VS_BASE/$VCVARSFILE"; then
32535        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32536$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32537        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32538        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32539        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32540        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32541      else
32542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32543$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32544        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32545$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32546      fi
32547    fi
32548  fi
32549
32550
32551  if test "x$VS_ENV_CMD" = x; then
32552    VS_VERSION="${VS_VERSION}"
32553    VS_BASE="$with_tools_dir/../../.."
32554    METHOD="--with-tools-dir"
32555
32556    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32557      VCVARSFILE="vc/bin/vcvars32.bat"
32558    else
32559      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32560    fi
32561
32562
32563  windows_path="$VS_BASE"
32564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32565    unix_path=`$CYGPATH -u "$windows_path"`
32566    VS_BASE="$unix_path"
32567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32569    VS_BASE="$unix_path"
32570  fi
32571
32572    if test -d "$VS_BASE"; then
32573      if test -f "$VS_BASE/$VCVARSFILE"; then
32574        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32575$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32576        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32577        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32578        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32579        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32580      else
32581        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32582$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32583        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32584$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32585      fi
32586    fi
32587  fi
32588
32589    if test "x$VS_ENV_CMD" = x; then
32590      # Having specified an argument which is incorrect will produce an instant failure;
32591      # we should not go on looking
32592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32593$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32594      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32595$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32596      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32597$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32598      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32599    fi
32600  fi
32601
32602  VS_ENV_CMD=""
32603  VS_ENV_ARGS=""
32604
32605  if test "x$VS_COMNTOOLS" != x; then
32606
32607  if test "x$VS_ENV_CMD" = x; then
32608    VS_VERSION="${VS_VERSION}"
32609    VS_BASE="$VS_COMNTOOLS/../.."
32610    METHOD="$VS_COMNTOOLS_VAR variable"
32611
32612    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32613      VCVARSFILE="vc/bin/vcvars32.bat"
32614    else
32615      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32616    fi
32617
32618
32619  windows_path="$VS_BASE"
32620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32621    unix_path=`$CYGPATH -u "$windows_path"`
32622    VS_BASE="$unix_path"
32623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32625    VS_BASE="$unix_path"
32626  fi
32627
32628    if test -d "$VS_BASE"; then
32629      if test -f "$VS_BASE/$VCVARSFILE"; then
32630        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32631$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32632        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32633        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32634        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32635        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32636      else
32637        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32638$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32639        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32640$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32641      fi
32642    fi
32643  fi
32644
32645  fi
32646  if test "x$PROGRAMFILES" != x; then
32647
32648  if test "x$VS_ENV_CMD" = x; then
32649    VS_VERSION="${VS_VERSION}"
32650    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32651    METHOD="well-known name"
32652
32653    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32654      VCVARSFILE="vc/bin/vcvars32.bat"
32655    else
32656      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32657    fi
32658
32659
32660  windows_path="$VS_BASE"
32661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32662    unix_path=`$CYGPATH -u "$windows_path"`
32663    VS_BASE="$unix_path"
32664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32666    VS_BASE="$unix_path"
32667  fi
32668
32669    if test -d "$VS_BASE"; then
32670      if test -f "$VS_BASE/$VCVARSFILE"; then
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32672$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32673        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32674        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32675        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32676        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32677      else
32678        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32679$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32680        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32681$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32682      fi
32683    fi
32684  fi
32685
32686  fi
32687  # Work around the insanely named ProgramFiles(x86) env variable
32688  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32689  if test "x$PROGRAMFILES_X86" != x; then
32690
32691  if test "x$VS_ENV_CMD" = x; then
32692    VS_VERSION="${VS_VERSION}"
32693    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32694    METHOD="well-known name"
32695
32696    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32697      VCVARSFILE="vc/bin/vcvars32.bat"
32698    else
32699      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32700    fi
32701
32702
32703  windows_path="$VS_BASE"
32704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32705    unix_path=`$CYGPATH -u "$windows_path"`
32706    VS_BASE="$unix_path"
32707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32709    VS_BASE="$unix_path"
32710  fi
32711
32712    if test -d "$VS_BASE"; then
32713      if test -f "$VS_BASE/$VCVARSFILE"; then
32714        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32715$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32716        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32717        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32718        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32719        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32720      else
32721        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32722$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32723        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32724$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32725      fi
32726    fi
32727  fi
32728
32729  fi
32730
32731  if test "x$VS_ENV_CMD" = x; then
32732    VS_VERSION="${VS_VERSION}"
32733    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32734    METHOD="well-known name"
32735
32736    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32737      VCVARSFILE="vc/bin/vcvars32.bat"
32738    else
32739      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32740    fi
32741
32742
32743  windows_path="$VS_BASE"
32744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32745    unix_path=`$CYGPATH -u "$windows_path"`
32746    VS_BASE="$unix_path"
32747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32749    VS_BASE="$unix_path"
32750  fi
32751
32752    if test -d "$VS_BASE"; then
32753      if test -f "$VS_BASE/$VCVARSFILE"; then
32754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32755$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32756        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32757        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32758        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32759        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32760      else
32761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32762$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32763        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32764$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32765      fi
32766    fi
32767  fi
32768
32769
32770  if test "x$VS_ENV_CMD" = x; then
32771    VS_VERSION="${VS_VERSION}"
32772    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32773    METHOD="well-known name"
32774
32775    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32776      VCVARSFILE="vc/bin/vcvars32.bat"
32777    else
32778      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32779    fi
32780
32781
32782  windows_path="$VS_BASE"
32783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32784    unix_path=`$CYGPATH -u "$windows_path"`
32785    VS_BASE="$unix_path"
32786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32788    VS_BASE="$unix_path"
32789  fi
32790
32791    if test -d "$VS_BASE"; then
32792      if test -f "$VS_BASE/$VCVARSFILE"; then
32793        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32794$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32795        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32796        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32797        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32798        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32799      else
32800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32801$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32802        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32803$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32804      fi
32805    fi
32806  fi
32807
32808
32809  if test "x$SDK_INSTALL_DIR" != x; then
32810    if test "x$ProgramW6432" != x; then
32811
32812  if test "x$VS_ENV_CMD" = x; then
32813    VS_VERSION="${VS_VERSION}"
32814    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32815    METHOD="well-known name"
32816
32817  windows_path="$WIN_SDK_BASE"
32818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819    unix_path=`$CYGPATH -u "$windows_path"`
32820    WIN_SDK_BASE="$unix_path"
32821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32823    WIN_SDK_BASE="$unix_path"
32824  fi
32825
32826    if test -d "$WIN_SDK_BASE"; then
32827      # There have been cases of partial or broken SDK installations. A missing
32828      # lib dir is not going to work.
32829      if test ! -d "$WIN_SDK_BASE/lib"; then
32830        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32831$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32832        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32833$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32834      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32836$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32837        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32838        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32839          VS_ENV_ARGS="/x86"
32840        else
32841          VS_ENV_ARGS="/x64"
32842        fi
32843        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32844        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32845        # TODO: improve detection for other versions of SDK
32846        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32847      else
32848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32849$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32850        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32851$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32852      fi
32853    fi
32854  fi
32855
32856    fi
32857    if test "x$PROGRAMW6432" != x; then
32858
32859  if test "x$VS_ENV_CMD" = x; then
32860    VS_VERSION="${VS_VERSION}"
32861    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32862    METHOD="well-known name"
32863
32864  windows_path="$WIN_SDK_BASE"
32865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32866    unix_path=`$CYGPATH -u "$windows_path"`
32867    WIN_SDK_BASE="$unix_path"
32868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32870    WIN_SDK_BASE="$unix_path"
32871  fi
32872
32873    if test -d "$WIN_SDK_BASE"; then
32874      # There have been cases of partial or broken SDK installations. A missing
32875      # lib dir is not going to work.
32876      if test ! -d "$WIN_SDK_BASE/lib"; then
32877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32878$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32879        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32880$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32881      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32883$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32884        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32885        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32886          VS_ENV_ARGS="/x86"
32887        else
32888          VS_ENV_ARGS="/x64"
32889        fi
32890        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32891        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32892        # TODO: improve detection for other versions of SDK
32893        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32894      else
32895        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32896$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32897        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32898$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32899      fi
32900    fi
32901  fi
32902
32903    fi
32904    if test "x$PROGRAMFILES" != x; then
32905
32906  if test "x$VS_ENV_CMD" = x; then
32907    VS_VERSION="${VS_VERSION}"
32908    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32909    METHOD="well-known name"
32910
32911  windows_path="$WIN_SDK_BASE"
32912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32913    unix_path=`$CYGPATH -u "$windows_path"`
32914    WIN_SDK_BASE="$unix_path"
32915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32917    WIN_SDK_BASE="$unix_path"
32918  fi
32919
32920    if test -d "$WIN_SDK_BASE"; then
32921      # There have been cases of partial or broken SDK installations. A missing
32922      # lib dir is not going to work.
32923      if test ! -d "$WIN_SDK_BASE/lib"; then
32924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32925$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32926        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32927$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32928      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32929        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32930$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32931        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32932        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32933          VS_ENV_ARGS="/x86"
32934        else
32935          VS_ENV_ARGS="/x64"
32936        fi
32937        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32938        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32939        # TODO: improve detection for other versions of SDK
32940        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32941      else
32942        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32943$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32944        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32945$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32946      fi
32947    fi
32948  fi
32949
32950    fi
32951
32952  if test "x$VS_ENV_CMD" = x; then
32953    VS_VERSION="${VS_VERSION}"
32954    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32955    METHOD="well-known name"
32956
32957  windows_path="$WIN_SDK_BASE"
32958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32959    unix_path=`$CYGPATH -u "$windows_path"`
32960    WIN_SDK_BASE="$unix_path"
32961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32963    WIN_SDK_BASE="$unix_path"
32964  fi
32965
32966    if test -d "$WIN_SDK_BASE"; then
32967      # There have been cases of partial or broken SDK installations. A missing
32968      # lib dir is not going to work.
32969      if test ! -d "$WIN_SDK_BASE/lib"; then
32970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32971$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32972        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32973$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32974      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32975        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32976$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32977        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32978        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32979          VS_ENV_ARGS="/x86"
32980        else
32981          VS_ENV_ARGS="/x64"
32982        fi
32983        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32984        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32985        # TODO: improve detection for other versions of SDK
32986        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32987      else
32988        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32989$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32990        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32991$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32992      fi
32993    fi
32994  fi
32995
32996
32997  if test "x$VS_ENV_CMD" = x; then
32998    VS_VERSION="${VS_VERSION}"
32999    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
33000    METHOD="well-known name"
33001
33002  windows_path="$WIN_SDK_BASE"
33003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33004    unix_path=`$CYGPATH -u "$windows_path"`
33005    WIN_SDK_BASE="$unix_path"
33006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33008    WIN_SDK_BASE="$unix_path"
33009  fi
33010
33011    if test -d "$WIN_SDK_BASE"; then
33012      # There have been cases of partial or broken SDK installations. A missing
33013      # lib dir is not going to work.
33014      if test ! -d "$WIN_SDK_BASE/lib"; then
33015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33016$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
33018$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
33019      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
33020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33022        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33023        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33024          VS_ENV_ARGS="/x86"
33025        else
33026          VS_ENV_ARGS="/x64"
33027        fi
33028        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33029        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33030        # TODO: improve detection for other versions of SDK
33031        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33032      else
33033        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33034$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33035        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33036$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33037      fi
33038    fi
33039  fi
33040
33041  fi
33042
33043    if test "x$VS_ENV_CMD" != x; then
33044      TOOLCHAIN_VERSION=$VS_VERSION
33045      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
33046      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
33047      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
33048      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
33049      # The rest of the variables are already evaled while probing
33050      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
33051$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
33052      break
33053    fi
33054  done
33055
33056
33057  # If we have a devkit, skip all of the below.
33058  if test "x$DEVKIT_VS_VERSION" = x; then
33059    if test "x$VS_ENV_CMD" != x; then
33060      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33061
33062  # Only process if variable expands to non-empty
33063
33064  if test "x$VS_ENV_CMD" != x; then
33065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33066
33067  # First separate the path from the arguments. This will split at the first
33068  # space.
33069  complete="$VS_ENV_CMD"
33070  path="${complete%% *}"
33071  tmp="$complete EOL"
33072  arguments="${tmp#* }"
33073
33074  # Input might be given as Windows format, start by converting to
33075  # unix format.
33076  new_path=`$CYGPATH -u "$path"`
33077
33078  # Now try to locate executable using which
33079  new_path=`$WHICH "$new_path" 2> /dev/null`
33080  # bat and cmd files are not always considered executable in cygwin causing which
33081  # to not find them
33082  if test "x$new_path" = x \
33083      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33084      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33085    new_path=`$CYGPATH -u "$path"`
33086  fi
33087  if test "x$new_path" = x; then
33088    # Oops. Which didn't find the executable.
33089    # The splitting of arguments from the executable at a space might have been incorrect,
33090    # since paths with space are more likely in Windows. Give it another try with the whole
33091    # argument.
33092    path="$complete"
33093    arguments="EOL"
33094    new_path=`$CYGPATH -u "$path"`
33095    new_path=`$WHICH "$new_path" 2> /dev/null`
33096    # bat and cmd files are not always considered executable in cygwin causing which
33097    # to not find them
33098    if test "x$new_path" = x \
33099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33101      new_path=`$CYGPATH -u "$path"`
33102    fi
33103    if test "x$new_path" = x; then
33104      # It's still not found. Now this is an unrecoverable error.
33105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33106$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33107      has_space=`$ECHO "$complete" | $GREP " "`
33108      if test "x$has_space" != x; then
33109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33111      fi
33112      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33113    fi
33114  fi
33115
33116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33119  # "foo.exe" is OK but "foo" is an error.
33120  #
33121  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33122  # It is also a way to make sure we got the proper file name for the real test later on.
33123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33124  if test "x$test_shortpath" = x; then
33125    # Short path failed, file does not exist as specified.
33126    # Try adding .exe or .cmd
33127    if test -f "${new_path}.exe"; then
33128      input_to_shortpath="${new_path}.exe"
33129    elif test -f "${new_path}.cmd"; then
33130      input_to_shortpath="${new_path}.cmd"
33131    else
33132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33133$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33134      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33135$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33136      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33137    fi
33138  else
33139    input_to_shortpath="$new_path"
33140  fi
33141
33142  # Call helper function which possibly converts this using DOS-style short mode.
33143  # If so, the updated path is stored in $new_path.
33144  new_path="$input_to_shortpath"
33145
33146  input_path="$input_to_shortpath"
33147  # Check if we need to convert this using DOS-style short mode. If the path
33148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33149  # take no chances and rewrite it.
33150  # Note: m4 eats our [], so we need to use [ and ] instead.
33151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33152  if test "x$has_forbidden_chars" != x; then
33153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33157      # Going to short mode and back again did indeed matter. Since short mode is
33158      # case insensitive, let's make it lowercase to improve readability.
33159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33160      # Now convert it back to Unix-style (cygpath)
33161      input_path=`$CYGPATH -u "$shortmode_path"`
33162      new_path="$input_path"
33163    fi
33164  fi
33165
33166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33167  if test "x$test_cygdrive_prefix" = x; then
33168    # As a simple fix, exclude /usr/bin since it's not a real path.
33169    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33171      # a path prefixed by /cygdrive for fixpath to work.
33172      new_path="$CYGWIN_ROOT_PATH$input_path"
33173    fi
33174  fi
33175
33176  # remove trailing .exe if any
33177  new_path="${new_path/%.exe/}"
33178
33179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33180
33181  # First separate the path from the arguments. This will split at the first
33182  # space.
33183  complete="$VS_ENV_CMD"
33184  path="${complete%% *}"
33185  tmp="$complete EOL"
33186  arguments="${tmp#* }"
33187
33188  # Input might be given as Windows format, start by converting to
33189  # unix format.
33190  new_path="$path"
33191
33192  windows_path="$new_path"
33193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33194    unix_path=`$CYGPATH -u "$windows_path"`
33195    new_path="$unix_path"
33196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33198    new_path="$unix_path"
33199  fi
33200
33201
33202  # Now try to locate executable using which
33203  new_path=`$WHICH "$new_path" 2> /dev/null`
33204
33205  if test "x$new_path" = x; then
33206    # Oops. Which didn't find the executable.
33207    # The splitting of arguments from the executable at a space might have been incorrect,
33208    # since paths with space are more likely in Windows. Give it another try with the whole
33209    # argument.
33210    path="$complete"
33211    arguments="EOL"
33212    new_path="$path"
33213
33214  windows_path="$new_path"
33215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33216    unix_path=`$CYGPATH -u "$windows_path"`
33217    new_path="$unix_path"
33218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33220    new_path="$unix_path"
33221  fi
33222
33223
33224    new_path=`$WHICH "$new_path" 2> /dev/null`
33225    # bat and cmd files are not always considered executable in MSYS causing which
33226    # to not find them
33227    if test "x$new_path" = x \
33228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33230      new_path="$path"
33231
33232  windows_path="$new_path"
33233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234    unix_path=`$CYGPATH -u "$windows_path"`
33235    new_path="$unix_path"
33236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33238    new_path="$unix_path"
33239  fi
33240
33241    fi
33242
33243    if test "x$new_path" = x; then
33244      # It's still not found. Now this is an unrecoverable error.
33245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33246$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33247      has_space=`$ECHO "$complete" | $GREP " "`
33248      if test "x$has_space" != x; then
33249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33251      fi
33252      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33253    fi
33254  fi
33255
33256  # Now new_path has a complete unix path to the binary
33257  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33258    # Keep paths in /bin as-is, but remove trailing .exe if any
33259    new_path="${new_path/%.exe/}"
33260    # Do not save /bin paths to all_fixpath_prefixes!
33261  else
33262    # Not in mixed or Windows style, start by that.
33263    new_path=`cmd //c echo $new_path`
33264
33265  input_path="$new_path"
33266  # Check if we need to convert this using DOS-style short mode. If the path
33267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33268  # take no chances and rewrite it.
33269  # Note: m4 eats our [], so we need to use [ and ] instead.
33270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33271  if test "x$has_forbidden_chars" != x; then
33272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33274  fi
33275
33276    # Output is in $new_path
33277
33278  windows_path="$new_path"
33279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33280    unix_path=`$CYGPATH -u "$windows_path"`
33281    new_path="$unix_path"
33282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33284    new_path="$unix_path"
33285  fi
33286
33287    # remove trailing .exe if any
33288    new_path="${new_path/%.exe/}"
33289
33290    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33291    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33292  fi
33293
33294    else
33295      # We're on a unix platform. Hooray! :)
33296      # First separate the path from the arguments. This will split at the first
33297      # space.
33298      complete="$VS_ENV_CMD"
33299      path="${complete%% *}"
33300      tmp="$complete EOL"
33301      arguments="${tmp#* }"
33302
33303      # Cannot rely on the command "which" here since it doesn't always work.
33304      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33305      if test -z "$is_absolute_path"; then
33306        # Path to executable is not absolute. Find it.
33307        IFS_save="$IFS"
33308        IFS=:
33309        for p in $PATH; do
33310          if test -f "$p/$path" && test -x "$p/$path"; then
33311            new_path="$p/$path"
33312            break
33313          fi
33314        done
33315        IFS="$IFS_save"
33316      else
33317        # This is an absolute path, we can use it without further modifications.
33318        new_path="$path"
33319      fi
33320
33321      if test "x$new_path" = x; then
33322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33323$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33324        has_space=`$ECHO "$complete" | $GREP " "`
33325        if test "x$has_space" != x; then
33326          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33328        fi
33329        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33330      fi
33331    fi
33332
33333    # Now join together the path and the arguments once again
33334    if test "x$arguments" != xEOL; then
33335      new_complete="$new_path ${arguments% *}"
33336    else
33337      new_complete="$new_path"
33338    fi
33339
33340    if test "x$complete" != "x$new_complete"; then
33341      VS_ENV_CMD="$new_complete"
33342      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33343$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33344    fi
33345  fi
33346
33347
33348      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33349      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33350$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33351
33352      # We need to create a couple of temporary files.
33353      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33354      $MKDIR -p $VS_ENV_TMP_DIR
33355
33356      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33357      # Instead create a shell script which will set the relevant variables when run.
33358      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33359
33360  unix_path="$WINPATH_VS_ENV_CMD"
33361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33362    windows_path=`$CYGPATH -m "$unix_path"`
33363    WINPATH_VS_ENV_CMD="$windows_path"
33364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33365    windows_path=`cmd //c echo $unix_path`
33366    WINPATH_VS_ENV_CMD="$windows_path"
33367  fi
33368
33369      WINPATH_BASH="$BASH"
33370
33371  unix_path="$WINPATH_BASH"
33372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33373    windows_path=`$CYGPATH -m "$unix_path"`
33374    WINPATH_BASH="$windows_path"
33375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33376    windows_path=`cmd //c echo $unix_path`
33377    WINPATH_BASH="$windows_path"
33378  fi
33379
33380
33381      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33382      # script (executable by bash) that will setup the important variables.
33383      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33384      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33385      # This will end up something like:
33386      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33387      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33388      # These will end up something like:
33389      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33390      # The trailing space for everyone except PATH is no typo, but is needed due
33391      # to trailing \ in the Windows paths. These will be stripped later.
33392      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33393          >> $EXTRACT_VC_ENV_BAT_FILE
33394      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33395          >> $EXTRACT_VC_ENV_BAT_FILE
33396      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33397          >> $EXTRACT_VC_ENV_BAT_FILE
33398      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33399          >> $EXTRACT_VC_ENV_BAT_FILE
33400      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33401          >> $EXTRACT_VC_ENV_BAT_FILE
33402      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33403          >> $EXTRACT_VC_ENV_BAT_FILE
33404
33405      # Now execute the newly created bat file.
33406      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33407      # Change directory so we don't need to mess with Windows paths in redirects.
33408      cd $VS_ENV_TMP_DIR
33409      cmd /c extract-vs-env.bat | $CAT
33410      cd $CURDIR
33411
33412      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33414$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33415        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33416$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33417        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33418$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33419        as_fn_error $? "Cannot continue" "$LINENO" 5
33420      fi
33421
33422      # Now set all paths and other env variables. This will allow the rest of
33423      # the configure script to find and run the compiler in the proper way.
33424      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33425$as_echo "$as_me: Setting extracted environment variables" >&6;}
33426      . $VS_ENV_TMP_DIR/set-vs-env.sh
33427      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33428      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33429    else
33430      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33431      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33432$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33433    fi
33434  fi
33435
33436  # At this point, we should have correct variables in the environment, or we can't continue.
33437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33438$as_echo_n "checking for Visual Studio variables... " >&6; }
33439
33440  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33441      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33442    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33444$as_echo "present but broken" >&6; }
33445      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33446    else
33447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33448$as_echo "ok" >&6; }
33449      # Remove any trailing "\" ";" and " " from the variables.
33450      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33451      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33452      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33453      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33454      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33455      # Remove any paths containing # (typically F#) as that messes up make. This
33456      # is needed if visual studio was installed with F# support.
33457      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33458
33459
33460
33461
33462
33463      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33464      OLDIFS="$IFS"
33465      IFS=";"
33466      for i in $VS_INCLUDE; do
33467        ipath=$i
33468        # Only process non-empty elements
33469        if test "x$ipath" != x; then
33470          IFS="$OLDIFS"
33471          # Check that directory exists before calling fixup_path
33472          testpath=$ipath
33473
33474  windows_path="$testpath"
33475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33476    unix_path=`$CYGPATH -u "$windows_path"`
33477    testpath="$unix_path"
33478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33480    testpath="$unix_path"
33481  fi
33482
33483          if test -d "$testpath"; then
33484
33485  # Only process if variable expands to non-empty
33486
33487  if test "x$ipath" != x; then
33488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33489
33490  # Input might be given as Windows format, start by converting to
33491  # unix format.
33492  path="$ipath"
33493  new_path=`$CYGPATH -u "$path"`
33494
33495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33498  # "foo.exe" is OK but "foo" is an error.
33499  #
33500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33501  # It is also a way to make sure we got the proper file name for the real test later on.
33502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33503  if test "x$test_shortpath" = x; then
33504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33505$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33506    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33507  fi
33508
33509  # Call helper function which possibly converts this using DOS-style short mode.
33510  # If so, the updated path is stored in $new_path.
33511
33512  input_path="$new_path"
33513  # Check if we need to convert this using DOS-style short mode. If the path
33514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33515  # take no chances and rewrite it.
33516  # Note: m4 eats our [], so we need to use [ and ] instead.
33517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33518  if test "x$has_forbidden_chars" != x; then
33519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33523      # Going to short mode and back again did indeed matter. Since short mode is
33524      # case insensitive, let's make it lowercase to improve readability.
33525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33526      # Now convert it back to Unix-style (cygpath)
33527      input_path=`$CYGPATH -u "$shortmode_path"`
33528      new_path="$input_path"
33529    fi
33530  fi
33531
33532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33533  if test "x$test_cygdrive_prefix" = x; then
33534    # As a simple fix, exclude /usr/bin since it's not a real path.
33535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33537      # a path prefixed by /cygdrive for fixpath to work.
33538      new_path="$CYGWIN_ROOT_PATH$input_path"
33539    fi
33540  fi
33541
33542
33543  if test "x$path" != "x$new_path"; then
33544    ipath="$new_path"
33545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33546$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33547  fi
33548
33549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33550
33551  path="$ipath"
33552  has_colon=`$ECHO $path | $GREP ^.:`
33553  new_path="$path"
33554  if test "x$has_colon" = x; then
33555    # Not in mixed or Windows style, start by that.
33556    new_path=`cmd //c echo $path`
33557  fi
33558
33559
33560  input_path="$new_path"
33561  # Check if we need to convert this using DOS-style short mode. If the path
33562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33563  # take no chances and rewrite it.
33564  # Note: m4 eats our [], so we need to use [ and ] instead.
33565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33566  if test "x$has_forbidden_chars" != x; then
33567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33569  fi
33570
33571
33572  windows_path="$new_path"
33573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33574    unix_path=`$CYGPATH -u "$windows_path"`
33575    new_path="$unix_path"
33576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33578    new_path="$unix_path"
33579  fi
33580
33581  if test "x$path" != "x$new_path"; then
33582    ipath="$new_path"
33583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33584$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33585  fi
33586
33587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33589
33590    else
33591      # We're on a unix platform. Hooray! :)
33592      path="$ipath"
33593      has_space=`$ECHO "$path" | $GREP " "`
33594      if test "x$has_space" != x; then
33595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33596$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33597        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33598      fi
33599
33600      # Use eval to expand a potential ~
33601      eval path="$path"
33602      if test ! -f "$path" && test ! -d "$path"; then
33603        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33604      fi
33605
33606      if test -d "$path"; then
33607        ipath="`cd "$path"; $THEPWDCMD -L`"
33608      else
33609        dir="`$DIRNAME "$path"`"
33610        base="`$BASENAME "$path"`"
33611        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33612      fi
33613    fi
33614  fi
33615
33616            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33617          fi
33618          IFS=";"
33619        fi
33620      done
33621      # Convert VS_LIB into SYSROOT_LDFLAGS
33622      for i in $VS_LIB; do
33623        libpath=$i
33624        # Only process non-empty elements
33625        if test "x$libpath" != x; then
33626          IFS="$OLDIFS"
33627          # Check that directory exists before calling fixup_path
33628          testpath=$libpath
33629
33630  windows_path="$testpath"
33631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33632    unix_path=`$CYGPATH -u "$windows_path"`
33633    testpath="$unix_path"
33634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33636    testpath="$unix_path"
33637  fi
33638
33639          if test -d "$testpath"; then
33640
33641  # Only process if variable expands to non-empty
33642
33643  if test "x$libpath" != x; then
33644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33645
33646  # Input might be given as Windows format, start by converting to
33647  # unix format.
33648  path="$libpath"
33649  new_path=`$CYGPATH -u "$path"`
33650
33651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33654  # "foo.exe" is OK but "foo" is an error.
33655  #
33656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33657  # It is also a way to make sure we got the proper file name for the real test later on.
33658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33659  if test "x$test_shortpath" = x; then
33660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33661$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33662    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33663  fi
33664
33665  # Call helper function which possibly converts this using DOS-style short mode.
33666  # If so, the updated path is stored in $new_path.
33667
33668  input_path="$new_path"
33669  # Check if we need to convert this using DOS-style short mode. If the path
33670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33671  # take no chances and rewrite it.
33672  # Note: m4 eats our [], so we need to use [ and ] instead.
33673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33674  if test "x$has_forbidden_chars" != x; then
33675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33679      # Going to short mode and back again did indeed matter. Since short mode is
33680      # case insensitive, let's make it lowercase to improve readability.
33681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33682      # Now convert it back to Unix-style (cygpath)
33683      input_path=`$CYGPATH -u "$shortmode_path"`
33684      new_path="$input_path"
33685    fi
33686  fi
33687
33688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33689  if test "x$test_cygdrive_prefix" = x; then
33690    # As a simple fix, exclude /usr/bin since it's not a real path.
33691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33693      # a path prefixed by /cygdrive for fixpath to work.
33694      new_path="$CYGWIN_ROOT_PATH$input_path"
33695    fi
33696  fi
33697
33698
33699  if test "x$path" != "x$new_path"; then
33700    libpath="$new_path"
33701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33702$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33703  fi
33704
33705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33706
33707  path="$libpath"
33708  has_colon=`$ECHO $path | $GREP ^.:`
33709  new_path="$path"
33710  if test "x$has_colon" = x; then
33711    # Not in mixed or Windows style, start by that.
33712    new_path=`cmd //c echo $path`
33713  fi
33714
33715
33716  input_path="$new_path"
33717  # Check if we need to convert this using DOS-style short mode. If the path
33718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33719  # take no chances and rewrite it.
33720  # Note: m4 eats our [], so we need to use [ and ] instead.
33721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33722  if test "x$has_forbidden_chars" != x; then
33723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33725  fi
33726
33727
33728  windows_path="$new_path"
33729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33730    unix_path=`$CYGPATH -u "$windows_path"`
33731    new_path="$unix_path"
33732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33734    new_path="$unix_path"
33735  fi
33736
33737  if test "x$path" != "x$new_path"; then
33738    libpath="$new_path"
33739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33740$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33741  fi
33742
33743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33745
33746    else
33747      # We're on a unix platform. Hooray! :)
33748      path="$libpath"
33749      has_space=`$ECHO "$path" | $GREP " "`
33750      if test "x$has_space" != x; then
33751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33752$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33754      fi
33755
33756      # Use eval to expand a potential ~
33757      eval path="$path"
33758      if test ! -f "$path" && test ! -d "$path"; then
33759        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33760      fi
33761
33762      if test -d "$path"; then
33763        libpath="`cd "$path"; $THEPWDCMD -L`"
33764      else
33765        dir="`$DIRNAME "$path"`"
33766        base="`$BASENAME "$path"`"
33767        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33768      fi
33769    fi
33770  fi
33771
33772            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33773          fi
33774          IFS=";"
33775        fi
33776      done
33777      IFS="$OLDIFS"
33778    fi
33779  else
33780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33781$as_echo "not found" >&6; }
33782
33783    if test "x$VS_ENV_CMD" = x; then
33784      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33785$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33786      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33787$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33788    else
33789      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33790$as_echo "$as_me: Running the extraction script failed." >&6;}
33791    fi
33792    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33793$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33794    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33795$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33796    as_fn_error $? "Cannot continue" "$LINENO" 5
33797  fi
33798
33799    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33800    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33801    PATH="$VS_PATH"
33802    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33803    export INCLUDE="$VS_INCLUDE"
33804    export LIB="$VS_LIB"
33805  else
33806    if test "x$XCODE_VERSION_OUTPUT" != x; then
33807      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33808      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33809      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33810    else
33811      # Currently we do not define this for other toolchains. This might change as the need arise.
33812      TOOLCHAIN_VERSION=
33813    fi
33814  fi
33815
33816
33817  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33818  # override all other locations.
33819  if test "x$TOOLCHAIN_PATH" != x; then
33820    PATH=$TOOLCHAIN_PATH:$PATH
33821  fi
33822
33823
33824  #
33825  # Setup the compilers (CC and CXX)
33826  #
33827
33828  COMPILER_NAME=C
33829  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33830
33831  if test "x$CC" != x; then
33832    # User has supplied compiler name already, always let that override.
33833    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33834$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33835    if test "x`basename $CC`" = "x$CC"; then
33836      # A command without a complete path is provided, search $PATH.
33837
33838      for ac_prog in $CC
33839do
33840  # Extract the first word of "$ac_prog", so it can be a program name with args.
33841set dummy $ac_prog; ac_word=$2
33842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33843$as_echo_n "checking for $ac_word... " >&6; }
33844if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33845  $as_echo_n "(cached) " >&6
33846else
33847  case $POTENTIAL_CC in
33848  [\\/]* | ?:[\\/]*)
33849  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33850  ;;
33851  *)
33852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33853for as_dir in $PATH
33854do
33855  IFS=$as_save_IFS
33856  test -z "$as_dir" && as_dir=.
33857    for ac_exec_ext in '' $ac_executable_extensions; do
33858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33859    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33861    break 2
33862  fi
33863done
33864  done
33865IFS=$as_save_IFS
33866
33867  ;;
33868esac
33869fi
33870POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33871if test -n "$POTENTIAL_CC"; then
33872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33873$as_echo "$POTENTIAL_CC" >&6; }
33874else
33875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33876$as_echo "no" >&6; }
33877fi
33878
33879
33880  test -n "$POTENTIAL_CC" && break
33881done
33882
33883      if test "x$POTENTIAL_CC" != x; then
33884        CC=$POTENTIAL_CC
33885      else
33886        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33887      fi
33888    else
33889      # Otherwise it might already be a complete path
33890      if test ! -x "$CC"; then
33891        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33892      fi
33893    fi
33894  else
33895    # No user supplied value. Locate compiler ourselves.
33896
33897    # If we are cross compiling, assume cross compilation tools follows the
33898    # cross compilation standard where they are prefixed with the autoconf
33899    # standard name for the target. For example the binary
33900    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33901    # If we are not cross compiling, then the default compiler name will be
33902    # used.
33903
33904    CC=
33905    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33906    # before checking the rest of the PATH.
33907    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33908    # step, this should not be necessary.
33909    if test -n "$TOOLCHAIN_PATH"; then
33910      PATH_save="$PATH"
33911      PATH="$TOOLCHAIN_PATH"
33912      if test -n "$ac_tool_prefix"; then
33913  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33914set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33916$as_echo_n "checking for $ac_word... " >&6; }
33917if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33918  $as_echo_n "(cached) " >&6
33919else
33920  case $TOOLCHAIN_PATH_CC in
33921  [\\/]* | ?:[\\/]*)
33922  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33923  ;;
33924  *)
33925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33926for as_dir in $PATH
33927do
33928  IFS=$as_save_IFS
33929  test -z "$as_dir" && as_dir=.
33930    for ac_exec_ext in '' $ac_executable_extensions; do
33931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33932    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33934    break 2
33935  fi
33936done
33937  done
33938IFS=$as_save_IFS
33939
33940  ;;
33941esac
33942fi
33943TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33944if test -n "$TOOLCHAIN_PATH_CC"; then
33945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33946$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33947else
33948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33949$as_echo "no" >&6; }
33950fi
33951
33952
33953fi
33954if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33955  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33956  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33957set dummy $SEARCH_LIST; ac_word=$2
33958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33959$as_echo_n "checking for $ac_word... " >&6; }
33960if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33961  $as_echo_n "(cached) " >&6
33962else
33963  case $ac_pt_TOOLCHAIN_PATH_CC in
33964  [\\/]* | ?:[\\/]*)
33965  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33966  ;;
33967  *)
33968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33969for as_dir in $PATH
33970do
33971  IFS=$as_save_IFS
33972  test -z "$as_dir" && as_dir=.
33973    for ac_exec_ext in '' $ac_executable_extensions; do
33974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33975    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33977    break 2
33978  fi
33979done
33980  done
33981IFS=$as_save_IFS
33982
33983  ;;
33984esac
33985fi
33986ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33987if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33989$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33990else
33991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33992$as_echo "no" >&6; }
33993fi
33994
33995  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33996    TOOLCHAIN_PATH_CC=""
33997  else
33998    case $cross_compiling:$ac_tool_warned in
33999yes:)
34000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34002ac_tool_warned=yes ;;
34003esac
34004    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
34005  fi
34006else
34007  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
34008fi
34009
34010      CC=$TOOLCHAIN_PATH_CC
34011      PATH="$PATH_save"
34012    fi
34013
34014    # AC_PATH_TOOL can't be run multiple times with the same variable,
34015    # so create a new name for this run.
34016    if test "x$CC" = x; then
34017      if test -n "$ac_tool_prefix"; then
34018  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34019set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34021$as_echo_n "checking for $ac_word... " >&6; }
34022if ${ac_cv_path_POTENTIAL_CC+:} false; then :
34023  $as_echo_n "(cached) " >&6
34024else
34025  case $POTENTIAL_CC in
34026  [\\/]* | ?:[\\/]*)
34027  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
34028  ;;
34029  *)
34030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34031for as_dir in $PATH
34032do
34033  IFS=$as_save_IFS
34034  test -z "$as_dir" && as_dir=.
34035    for ac_exec_ext in '' $ac_executable_extensions; do
34036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34037    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34039    break 2
34040  fi
34041done
34042  done
34043IFS=$as_save_IFS
34044
34045  ;;
34046esac
34047fi
34048POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
34049if test -n "$POTENTIAL_CC"; then
34050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
34051$as_echo "$POTENTIAL_CC" >&6; }
34052else
34053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34054$as_echo "no" >&6; }
34055fi
34056
34057
34058fi
34059if test -z "$ac_cv_path_POTENTIAL_CC"; then
34060  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34061  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34062set dummy $SEARCH_LIST; ac_word=$2
34063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34064$as_echo_n "checking for $ac_word... " >&6; }
34065if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34066  $as_echo_n "(cached) " >&6
34067else
34068  case $ac_pt_POTENTIAL_CC in
34069  [\\/]* | ?:[\\/]*)
34070  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34071  ;;
34072  *)
34073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34074for as_dir in $PATH
34075do
34076  IFS=$as_save_IFS
34077  test -z "$as_dir" && as_dir=.
34078    for ac_exec_ext in '' $ac_executable_extensions; do
34079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34080    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34082    break 2
34083  fi
34084done
34085  done
34086IFS=$as_save_IFS
34087
34088  ;;
34089esac
34090fi
34091ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34092if test -n "$ac_pt_POTENTIAL_CC"; then
34093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34094$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34095else
34096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34097$as_echo "no" >&6; }
34098fi
34099
34100  if test "x$ac_pt_POTENTIAL_CC" = x; then
34101    POTENTIAL_CC=""
34102  else
34103    case $cross_compiling:$ac_tool_warned in
34104yes:)
34105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34107ac_tool_warned=yes ;;
34108esac
34109    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34110  fi
34111else
34112  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34113fi
34114
34115      CC=$POTENTIAL_CC
34116    fi
34117
34118    if test "x$CC" = x; then
34119
34120  # Print a helpful message on how to acquire the necessary build dependency.
34121  # devkit is the help tag: freetype, cups, alsa etc
34122  MISSING_DEPENDENCY=devkit
34123
34124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34125    cygwin_help $MISSING_DEPENDENCY
34126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34127    msys_help $MISSING_DEPENDENCY
34128  else
34129    PKGHANDLER_COMMAND=
34130
34131    case $PKGHANDLER in
34132      apt-get)
34133        apt_help     $MISSING_DEPENDENCY ;;
34134      yum)
34135        yum_help     $MISSING_DEPENDENCY ;;
34136      brew)
34137        brew_help    $MISSING_DEPENDENCY ;;
34138      port)
34139        port_help    $MISSING_DEPENDENCY ;;
34140      pkgutil)
34141        pkgutil_help $MISSING_DEPENDENCY ;;
34142      pkgadd)
34143        pkgadd_help  $MISSING_DEPENDENCY ;;
34144    esac
34145
34146    if test "x$PKGHANDLER_COMMAND" != x; then
34147      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34148    fi
34149  fi
34150
34151      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34152    fi
34153  fi
34154
34155  # Now we have a compiler binary in CC. Make sure it's okay.
34156
34157  # Only process if variable expands to non-empty
34158
34159  if test "x$CC" != x; then
34160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34161
34162  # First separate the path from the arguments. This will split at the first
34163  # space.
34164  complete="$CC"
34165  path="${complete%% *}"
34166  tmp="$complete EOL"
34167  arguments="${tmp#* }"
34168
34169  # Input might be given as Windows format, start by converting to
34170  # unix format.
34171  new_path=`$CYGPATH -u "$path"`
34172
34173  # Now try to locate executable using which
34174  new_path=`$WHICH "$new_path" 2> /dev/null`
34175  # bat and cmd files are not always considered executable in cygwin causing which
34176  # to not find them
34177  if test "x$new_path" = x \
34178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34180    new_path=`$CYGPATH -u "$path"`
34181  fi
34182  if test "x$new_path" = x; then
34183    # Oops. Which didn't find the executable.
34184    # The splitting of arguments from the executable at a space might have been incorrect,
34185    # since paths with space are more likely in Windows. Give it another try with the whole
34186    # argument.
34187    path="$complete"
34188    arguments="EOL"
34189    new_path=`$CYGPATH -u "$path"`
34190    new_path=`$WHICH "$new_path" 2> /dev/null`
34191    # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
34197    fi
34198    if test "x$new_path" = x; then
34199      # It's still not found. Now this is an unrecoverable error.
34200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34201$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34202      has_space=`$ECHO "$complete" | $GREP " "`
34203      if test "x$has_space" != x; then
34204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34206      fi
34207      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34208    fi
34209  fi
34210
34211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34214  # "foo.exe" is OK but "foo" is an error.
34215  #
34216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34217  # It is also a way to make sure we got the proper file name for the real test later on.
34218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34219  if test "x$test_shortpath" = x; then
34220    # Short path failed, file does not exist as specified.
34221    # Try adding .exe or .cmd
34222    if test -f "${new_path}.exe"; then
34223      input_to_shortpath="${new_path}.exe"
34224    elif test -f "${new_path}.cmd"; then
34225      input_to_shortpath="${new_path}.cmd"
34226    else
34227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34228$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34231      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34232    fi
34233  else
34234    input_to_shortpath="$new_path"
34235  fi
34236
34237  # Call helper function which possibly converts this using DOS-style short mode.
34238  # If so, the updated path is stored in $new_path.
34239  new_path="$input_to_shortpath"
34240
34241  input_path="$input_to_shortpath"
34242  # Check if we need to convert this using DOS-style short mode. If the path
34243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34244  # take no chances and rewrite it.
34245  # Note: m4 eats our [], so we need to use [ and ] instead.
34246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34247  if test "x$has_forbidden_chars" != x; then
34248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34252      # Going to short mode and back again did indeed matter. Since short mode is
34253      # case insensitive, let's make it lowercase to improve readability.
34254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34255      # Now convert it back to Unix-style (cygpath)
34256      input_path=`$CYGPATH -u "$shortmode_path"`
34257      new_path="$input_path"
34258    fi
34259  fi
34260
34261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34262  if test "x$test_cygdrive_prefix" = x; then
34263    # As a simple fix, exclude /usr/bin since it's not a real path.
34264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34266      # a path prefixed by /cygdrive for fixpath to work.
34267      new_path="$CYGWIN_ROOT_PATH$input_path"
34268    fi
34269  fi
34270
34271  # remove trailing .exe if any
34272  new_path="${new_path/%.exe/}"
34273
34274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34275
34276  # First separate the path from the arguments. This will split at the first
34277  # space.
34278  complete="$CC"
34279  path="${complete%% *}"
34280  tmp="$complete EOL"
34281  arguments="${tmp#* }"
34282
34283  # Input might be given as Windows format, start by converting to
34284  # unix format.
34285  new_path="$path"
34286
34287  windows_path="$new_path"
34288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34289    unix_path=`$CYGPATH -u "$windows_path"`
34290    new_path="$unix_path"
34291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34293    new_path="$unix_path"
34294  fi
34295
34296
34297  # Now try to locate executable using which
34298  new_path=`$WHICH "$new_path" 2> /dev/null`
34299
34300  if test "x$new_path" = x; then
34301    # Oops. Which didn't find the executable.
34302    # The splitting of arguments from the executable at a space might have been incorrect,
34303    # since paths with space are more likely in Windows. Give it another try with the whole
34304    # argument.
34305    path="$complete"
34306    arguments="EOL"
34307    new_path="$path"
34308
34309  windows_path="$new_path"
34310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34311    unix_path=`$CYGPATH -u "$windows_path"`
34312    new_path="$unix_path"
34313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34315    new_path="$unix_path"
34316  fi
34317
34318
34319    new_path=`$WHICH "$new_path" 2> /dev/null`
34320    # bat and cmd files are not always considered executable in MSYS causing which
34321    # to not find them
34322    if test "x$new_path" = x \
34323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34325      new_path="$path"
34326
34327  windows_path="$new_path"
34328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34329    unix_path=`$CYGPATH -u "$windows_path"`
34330    new_path="$unix_path"
34331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34333    new_path="$unix_path"
34334  fi
34335
34336    fi
34337
34338    if test "x$new_path" = x; then
34339      # It's still not found. Now this is an unrecoverable error.
34340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34341$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34342      has_space=`$ECHO "$complete" | $GREP " "`
34343      if test "x$has_space" != x; then
34344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34346      fi
34347      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34348    fi
34349  fi
34350
34351  # Now new_path has a complete unix path to the binary
34352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34353    # Keep paths in /bin as-is, but remove trailing .exe if any
34354    new_path="${new_path/%.exe/}"
34355    # Do not save /bin paths to all_fixpath_prefixes!
34356  else
34357    # Not in mixed or Windows style, start by that.
34358    new_path=`cmd //c echo $new_path`
34359
34360  input_path="$new_path"
34361  # Check if we need to convert this using DOS-style short mode. If the path
34362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34363  # take no chances and rewrite it.
34364  # Note: m4 eats our [], so we need to use [ and ] instead.
34365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34366  if test "x$has_forbidden_chars" != x; then
34367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34369  fi
34370
34371    # Output is in $new_path
34372
34373  windows_path="$new_path"
34374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34375    unix_path=`$CYGPATH -u "$windows_path"`
34376    new_path="$unix_path"
34377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34379    new_path="$unix_path"
34380  fi
34381
34382    # remove trailing .exe if any
34383    new_path="${new_path/%.exe/}"
34384
34385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34387  fi
34388
34389    else
34390      # We're on a unix platform. Hooray! :)
34391      # First separate the path from the arguments. This will split at the first
34392      # space.
34393      complete="$CC"
34394      path="${complete%% *}"
34395      tmp="$complete EOL"
34396      arguments="${tmp#* }"
34397
34398      # Cannot rely on the command "which" here since it doesn't always work.
34399      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34400      if test -z "$is_absolute_path"; then
34401        # Path to executable is not absolute. Find it.
34402        IFS_save="$IFS"
34403        IFS=:
34404        for p in $PATH; do
34405          if test -f "$p/$path" && test -x "$p/$path"; then
34406            new_path="$p/$path"
34407            break
34408          fi
34409        done
34410        IFS="$IFS_save"
34411      else
34412        # This is an absolute path, we can use it without further modifications.
34413        new_path="$path"
34414      fi
34415
34416      if test "x$new_path" = x; then
34417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34418$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34419        has_space=`$ECHO "$complete" | $GREP " "`
34420        if test "x$has_space" != x; then
34421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34423        fi
34424        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34425      fi
34426    fi
34427
34428    # Now join together the path and the arguments once again
34429    if test "x$arguments" != xEOL; then
34430      new_complete="$new_path ${arguments% *}"
34431    else
34432      new_complete="$new_path"
34433    fi
34434
34435    if test "x$complete" != "x$new_complete"; then
34436      CC="$new_complete"
34437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34438$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34439    fi
34440  fi
34441
34442  TEST_COMPILER="$CC"
34443
34444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34445$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34446  SYMLINK_ORIGINAL="$TEST_COMPILER"
34447
34448  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34449    # Follow a chain of symbolic links. Use readlink
34450    # where it exists, else fall back to horribly
34451    # complicated shell code.
34452    if test "x$READLINK_TESTED" != yes; then
34453      # On MacOSX there is a readlink tool with a different
34454      # purpose than the GNU readlink tool. Check the found readlink.
34455      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34456      if test "x$ISGNU" = x; then
34457        # A readlink that we do not know how to use.
34458        # Are there other non-GNU readlinks out there?
34459        READLINK_TESTED=yes
34460        READLINK=
34461      fi
34462    fi
34463
34464    if test "x$READLINK" != x; then
34465      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34466    else
34467      # Save the current directory for restoring afterwards
34468      STARTDIR=$PWD
34469      COUNTER=0
34470      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34471      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34472      cd $sym_link_dir
34473      # Use -P flag to resolve symlinks in directories.
34474      cd `$THEPWDCMD -P`
34475      sym_link_dir=`$THEPWDCMD -P`
34476      # Resolve file symlinks
34477      while test $COUNTER -lt 20; do
34478        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34479        if test "x$ISLINK" == x; then
34480          # This is not a symbolic link! We are done!
34481          break
34482        fi
34483        # Again resolve directory symlinks since the target of the just found
34484        # link could be in a different directory
34485        cd `$DIRNAME $ISLINK`
34486        sym_link_dir=`$THEPWDCMD -P`
34487        sym_link_file=`$BASENAME $ISLINK`
34488        let COUNTER=COUNTER+1
34489      done
34490      cd $STARTDIR
34491      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34492    fi
34493  fi
34494
34495  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34497$as_echo "no symlink" >&6; }
34498  else
34499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34500$as_echo "$SYMLINK_ORIGINAL" >&6; }
34501
34502    # We can't handle ccache by gcc wrappers, since we need to know if we're
34503    # using ccache. Instead ccache usage must be controlled by a configure option.
34504    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34505    if test "x$COMPILER_BASENAME" = "xccache"; then
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34507$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34508      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34509    fi
34510  fi
34511
34512
34513  COMPILER=$CC
34514  COMPILER_NAME=$COMPILER_NAME
34515
34516  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34517    # cc -V output typically looks like
34518    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34519    # or
34520    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34521    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34522    # Check that this is likely to be the Solaris Studio cc.
34523    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34524    if test $? -ne 0; then
34525      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34526      { $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
34527$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34528      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34529$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34530      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34531$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34532      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34533    fi
34534    # Remove usage instructions (if present), and
34535    # collapse compiler output into a single line
34536    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34537        $SED -e 's/ *[Uu]sage:.*//'`
34538    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34539        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34540  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34541    # xlc -qversion output typically looks like
34542    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34543    #     Version: 11.01.0000.0015
34544    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34545    # Check that this is likely to be the IBM XL C compiler.
34546    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34547    if test $? -ne 0; then
34548      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34549      { $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
34550$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34551      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34552$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34553      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34554$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34555      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34556    fi
34557    # Collapse compiler output into a single line
34558    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34559    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34560        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34561  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34562    # There is no specific version flag, but all output starts with a version string.
34563    # First line typically looks something like:
34564    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34565    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34566    # Check that this is likely to be Microsoft CL.EXE.
34567    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34568    if test $? -ne 0; then
34569      { $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
34570$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34571      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34572$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34573      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34574    fi
34575    # Collapse compiler output into a single line
34576    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34577    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34578        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34579  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34580    # gcc --version output typically looks like
34581    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34582    #     Copyright (C) 2013 Free Software Foundation, Inc.
34583    #     This is free software; see the source for copying conditions.  There is NO
34584    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34585    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34586    # Check that this is likely to be GCC.
34587    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34588    if test $? -ne 0; then
34589      { $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
34590$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34591      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34592$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34593      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34594    fi
34595    # Remove Copyright and legalese from version string, and
34596    # collapse into a single line
34597    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34598        $SED -e 's/ *Copyright .*//'`
34599    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34600        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34601  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34602    # clang --version output typically looks like
34603    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34604    #    clang version 3.3 (tags/RELEASE_33/final)
34605    # or
34606    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34607    #    Target: x86_64-pc-linux-gnu
34608    #    Thread model: posix
34609    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34610    # Check that this is likely to be clang
34611    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34612    if test $? -ne 0; then
34613      { $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
34614$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34616$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34617      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34618    fi
34619    # Collapse compiler output into a single line
34620    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34621    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34622        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34623  else
34624      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34625  fi
34626  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34627  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34628  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34629  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34630
34631  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34632$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34633
34634
34635  # Now that we have resolved CC ourself, let autoconf have its go at it
34636  ac_ext=c
34637ac_cpp='$CPP $CPPFLAGS'
34638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34640ac_compiler_gnu=$ac_cv_c_compiler_gnu
34641if test -n "$ac_tool_prefix"; then
34642  for ac_prog in $CC
34643  do
34644    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34645set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34647$as_echo_n "checking for $ac_word... " >&6; }
34648if ${ac_cv_prog_CC+:} false; then :
34649  $as_echo_n "(cached) " >&6
34650else
34651  if test -n "$CC"; then
34652  ac_cv_prog_CC="$CC" # Let the user override the test.
34653else
34654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34655for as_dir in $PATH
34656do
34657  IFS=$as_save_IFS
34658  test -z "$as_dir" && as_dir=.
34659    for ac_exec_ext in '' $ac_executable_extensions; do
34660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34661    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34663    break 2
34664  fi
34665done
34666  done
34667IFS=$as_save_IFS
34668
34669fi
34670fi
34671CC=$ac_cv_prog_CC
34672if test -n "$CC"; then
34673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34674$as_echo "$CC" >&6; }
34675else
34676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34677$as_echo "no" >&6; }
34678fi
34679
34680
34681    test -n "$CC" && break
34682  done
34683fi
34684if test -z "$CC"; then
34685  ac_ct_CC=$CC
34686  for ac_prog in $CC
34687do
34688  # Extract the first word of "$ac_prog", so it can be a program name with args.
34689set dummy $ac_prog; ac_word=$2
34690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34691$as_echo_n "checking for $ac_word... " >&6; }
34692if ${ac_cv_prog_ac_ct_CC+:} false; then :
34693  $as_echo_n "(cached) " >&6
34694else
34695  if test -n "$ac_ct_CC"; then
34696  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34697else
34698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34699for as_dir in $PATH
34700do
34701  IFS=$as_save_IFS
34702  test -z "$as_dir" && as_dir=.
34703    for ac_exec_ext in '' $ac_executable_extensions; do
34704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34705    ac_cv_prog_ac_ct_CC="$ac_prog"
34706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34707    break 2
34708  fi
34709done
34710  done
34711IFS=$as_save_IFS
34712
34713fi
34714fi
34715ac_ct_CC=$ac_cv_prog_ac_ct_CC
34716if test -n "$ac_ct_CC"; then
34717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34718$as_echo "$ac_ct_CC" >&6; }
34719else
34720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34721$as_echo "no" >&6; }
34722fi
34723
34724
34725  test -n "$ac_ct_CC" && break
34726done
34727
34728  if test "x$ac_ct_CC" = x; then
34729    CC=""
34730  else
34731    case $cross_compiling:$ac_tool_warned in
34732yes:)
34733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34735ac_tool_warned=yes ;;
34736esac
34737    CC=$ac_ct_CC
34738  fi
34739fi
34740
34741
34742test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34744as_fn_error $? "no acceptable C compiler found in \$PATH
34745See \`config.log' for more details" "$LINENO" 5; }
34746
34747# Provide some information about the compiler.
34748$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34749set X $ac_compile
34750ac_compiler=$2
34751for ac_option in --version -v -V -qversion; do
34752  { { ac_try="$ac_compiler $ac_option >&5"
34753case "(($ac_try" in
34754  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34755  *) ac_try_echo=$ac_try;;
34756esac
34757eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34758$as_echo "$ac_try_echo"; } >&5
34759  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34760  ac_status=$?
34761  if test -s conftest.err; then
34762    sed '10a\
34763... rest of stderr output deleted ...
34764         10q' conftest.err >conftest.er1
34765    cat conftest.er1 >&5
34766  fi
34767  rm -f conftest.er1 conftest.err
34768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34769  test $ac_status = 0; }
34770done
34771
34772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34773/* end confdefs.h.  */
34774
34775int
34776main ()
34777{
34778
34779  ;
34780  return 0;
34781}
34782_ACEOF
34783ac_clean_files_save=$ac_clean_files
34784ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34785# Try to create an executable without -o first, disregard a.out.
34786# It will help us diagnose broken compilers, and finding out an intuition
34787# of exeext.
34788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34789$as_echo_n "checking whether the C compiler works... " >&6; }
34790ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34791
34792# The possible output files:
34793ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34794
34795ac_rmfiles=
34796for ac_file in $ac_files
34797do
34798  case $ac_file in
34799    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34800    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34801  esac
34802done
34803rm -f $ac_rmfiles
34804
34805if { { ac_try="$ac_link_default"
34806case "(($ac_try" in
34807  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34808  *) ac_try_echo=$ac_try;;
34809esac
34810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34811$as_echo "$ac_try_echo"; } >&5
34812  (eval "$ac_link_default") 2>&5
34813  ac_status=$?
34814  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34815  test $ac_status = 0; }; then :
34816  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34817# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34818# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34819# so that the user can short-circuit this test for compilers unknown to
34820# Autoconf.
34821for ac_file in $ac_files ''
34822do
34823  test -f "$ac_file" || continue
34824  case $ac_file in
34825    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34826	;;
34827    [ab].out )
34828	# We found the default executable, but exeext='' is most
34829	# certainly right.
34830	break;;
34831    *.* )
34832	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34833	then :; else
34834	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34835	fi
34836	# We set ac_cv_exeext here because the later test for it is not
34837	# safe: cross compilers may not add the suffix if given an `-o'
34838	# argument, so we may need to know it at that point already.
34839	# Even if this section looks crufty: it has the advantage of
34840	# actually working.
34841	break;;
34842    * )
34843	break;;
34844  esac
34845done
34846test "$ac_cv_exeext" = no && ac_cv_exeext=
34847
34848else
34849  ac_file=''
34850fi
34851if test -z "$ac_file"; then :
34852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34853$as_echo "no" >&6; }
34854$as_echo "$as_me: failed program was:" >&5
34855sed 's/^/| /' conftest.$ac_ext >&5
34856
34857{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34859as_fn_error 77 "C compiler cannot create executables
34860See \`config.log' for more details" "$LINENO" 5; }
34861else
34862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34863$as_echo "yes" >&6; }
34864fi
34865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34866$as_echo_n "checking for C compiler default output file name... " >&6; }
34867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34868$as_echo "$ac_file" >&6; }
34869ac_exeext=$ac_cv_exeext
34870
34871rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34872ac_clean_files=$ac_clean_files_save
34873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34874$as_echo_n "checking for suffix of executables... " >&6; }
34875if { { ac_try="$ac_link"
34876case "(($ac_try" in
34877  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34878  *) ac_try_echo=$ac_try;;
34879esac
34880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34881$as_echo "$ac_try_echo"; } >&5
34882  (eval "$ac_link") 2>&5
34883  ac_status=$?
34884  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34885  test $ac_status = 0; }; then :
34886  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34887# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34888# work properly (i.e., refer to `conftest.exe'), while it won't with
34889# `rm'.
34890for ac_file in conftest.exe conftest conftest.*; do
34891  test -f "$ac_file" || continue
34892  case $ac_file in
34893    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34894    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34895	  break;;
34896    * ) break;;
34897  esac
34898done
34899else
34900  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34902as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34903See \`config.log' for more details" "$LINENO" 5; }
34904fi
34905rm -f conftest conftest$ac_cv_exeext
34906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34907$as_echo "$ac_cv_exeext" >&6; }
34908
34909rm -f conftest.$ac_ext
34910EXEEXT=$ac_cv_exeext
34911ac_exeext=$EXEEXT
34912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34913/* end confdefs.h.  */
34914#include <stdio.h>
34915int
34916main ()
34917{
34918FILE *f = fopen ("conftest.out", "w");
34919 return ferror (f) || fclose (f) != 0;
34920
34921  ;
34922  return 0;
34923}
34924_ACEOF
34925ac_clean_files="$ac_clean_files conftest.out"
34926# Check that the compiler produces executables we can run.  If not, either
34927# the compiler is broken, or we cross compile.
34928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34929$as_echo_n "checking whether we are cross compiling... " >&6; }
34930if test "$cross_compiling" != yes; then
34931  { { ac_try="$ac_link"
34932case "(($ac_try" in
34933  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34934  *) ac_try_echo=$ac_try;;
34935esac
34936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34937$as_echo "$ac_try_echo"; } >&5
34938  (eval "$ac_link") 2>&5
34939  ac_status=$?
34940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34941  test $ac_status = 0; }
34942  if { ac_try='./conftest$ac_cv_exeext'
34943  { { case "(($ac_try" in
34944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34945  *) ac_try_echo=$ac_try;;
34946esac
34947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34948$as_echo "$ac_try_echo"; } >&5
34949  (eval "$ac_try") 2>&5
34950  ac_status=$?
34951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34952  test $ac_status = 0; }; }; then
34953    cross_compiling=no
34954  else
34955    if test "$cross_compiling" = maybe; then
34956	cross_compiling=yes
34957    else
34958	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34960as_fn_error $? "cannot run C compiled programs.
34961If you meant to cross compile, use \`--host'.
34962See \`config.log' for more details" "$LINENO" 5; }
34963    fi
34964  fi
34965fi
34966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34967$as_echo "$cross_compiling" >&6; }
34968
34969rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34970ac_clean_files=$ac_clean_files_save
34971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34972$as_echo_n "checking for suffix of object files... " >&6; }
34973if ${ac_cv_objext+:} false; then :
34974  $as_echo_n "(cached) " >&6
34975else
34976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34977/* end confdefs.h.  */
34978
34979int
34980main ()
34981{
34982
34983  ;
34984  return 0;
34985}
34986_ACEOF
34987rm -f conftest.o conftest.obj
34988if { { ac_try="$ac_compile"
34989case "(($ac_try" in
34990  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34991  *) ac_try_echo=$ac_try;;
34992esac
34993eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34994$as_echo "$ac_try_echo"; } >&5
34995  (eval "$ac_compile") 2>&5
34996  ac_status=$?
34997  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34998  test $ac_status = 0; }; then :
34999  for ac_file in conftest.o conftest.obj conftest.*; do
35000  test -f "$ac_file" || continue;
35001  case $ac_file in
35002    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
35003    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
35004       break;;
35005  esac
35006done
35007else
35008  $as_echo "$as_me: failed program was:" >&5
35009sed 's/^/| /' conftest.$ac_ext >&5
35010
35011{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35013as_fn_error $? "cannot compute suffix of object files: cannot compile
35014See \`config.log' for more details" "$LINENO" 5; }
35015fi
35016rm -f conftest.$ac_cv_objext conftest.$ac_ext
35017fi
35018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
35019$as_echo "$ac_cv_objext" >&6; }
35020OBJEXT=$ac_cv_objext
35021ac_objext=$OBJEXT
35022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
35023$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
35024if ${ac_cv_c_compiler_gnu+:} false; then :
35025  $as_echo_n "(cached) " >&6
35026else
35027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35028/* end confdefs.h.  */
35029
35030int
35031main ()
35032{
35033#ifndef __GNUC__
35034       choke me
35035#endif
35036
35037  ;
35038  return 0;
35039}
35040_ACEOF
35041if ac_fn_c_try_compile "$LINENO"; then :
35042  ac_compiler_gnu=yes
35043else
35044  ac_compiler_gnu=no
35045fi
35046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35047ac_cv_c_compiler_gnu=$ac_compiler_gnu
35048
35049fi
35050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
35051$as_echo "$ac_cv_c_compiler_gnu" >&6; }
35052if test $ac_compiler_gnu = yes; then
35053  GCC=yes
35054else
35055  GCC=
35056fi
35057ac_test_CFLAGS=${CFLAGS+set}
35058ac_save_CFLAGS=$CFLAGS
35059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
35060$as_echo_n "checking whether $CC accepts -g... " >&6; }
35061if ${ac_cv_prog_cc_g+:} false; then :
35062  $as_echo_n "(cached) " >&6
35063else
35064  ac_save_c_werror_flag=$ac_c_werror_flag
35065   ac_c_werror_flag=yes
35066   ac_cv_prog_cc_g=no
35067   CFLAGS="-g"
35068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35069/* end confdefs.h.  */
35070
35071int
35072main ()
35073{
35074
35075  ;
35076  return 0;
35077}
35078_ACEOF
35079if ac_fn_c_try_compile "$LINENO"; then :
35080  ac_cv_prog_cc_g=yes
35081else
35082  CFLAGS=""
35083      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35084/* end confdefs.h.  */
35085
35086int
35087main ()
35088{
35089
35090  ;
35091  return 0;
35092}
35093_ACEOF
35094if ac_fn_c_try_compile "$LINENO"; then :
35095
35096else
35097  ac_c_werror_flag=$ac_save_c_werror_flag
35098	 CFLAGS="-g"
35099	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35100/* end confdefs.h.  */
35101
35102int
35103main ()
35104{
35105
35106  ;
35107  return 0;
35108}
35109_ACEOF
35110if ac_fn_c_try_compile "$LINENO"; then :
35111  ac_cv_prog_cc_g=yes
35112fi
35113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35114fi
35115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35116fi
35117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35118   ac_c_werror_flag=$ac_save_c_werror_flag
35119fi
35120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35121$as_echo "$ac_cv_prog_cc_g" >&6; }
35122if test "$ac_test_CFLAGS" = set; then
35123  CFLAGS=$ac_save_CFLAGS
35124elif test $ac_cv_prog_cc_g = yes; then
35125  if test "$GCC" = yes; then
35126    CFLAGS="-g -O2"
35127  else
35128    CFLAGS="-g"
35129  fi
35130else
35131  if test "$GCC" = yes; then
35132    CFLAGS="-O2"
35133  else
35134    CFLAGS=
35135  fi
35136fi
35137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35138$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35139if ${ac_cv_prog_cc_c89+:} false; then :
35140  $as_echo_n "(cached) " >&6
35141else
35142  ac_cv_prog_cc_c89=no
35143ac_save_CC=$CC
35144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35145/* end confdefs.h.  */
35146#include <stdarg.h>
35147#include <stdio.h>
35148struct stat;
35149/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35150struct buf { int x; };
35151FILE * (*rcsopen) (struct buf *, struct stat *, int);
35152static char *e (p, i)
35153     char **p;
35154     int i;
35155{
35156  return p[i];
35157}
35158static char *f (char * (*g) (char **, int), char **p, ...)
35159{
35160  char *s;
35161  va_list v;
35162  va_start (v,p);
35163  s = g (p, va_arg (v,int));
35164  va_end (v);
35165  return s;
35166}
35167
35168/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35169   function prototypes and stuff, but not '\xHH' hex character constants.
35170   These don't provoke an error unfortunately, instead are silently treated
35171   as 'x'.  The following induces an error, until -std is added to get
35172   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35173   array size at least.  It's necessary to write '\x00'==0 to get something
35174   that's true only with -std.  */
35175int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35176
35177/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35178   inside strings and character constants.  */
35179#define FOO(x) 'x'
35180int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35181
35182int test (int i, double x);
35183struct s1 {int (*f) (int a);};
35184struct s2 {int (*f) (double a);};
35185int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35186int argc;
35187char **argv;
35188int
35189main ()
35190{
35191return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35192  ;
35193  return 0;
35194}
35195_ACEOF
35196for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35197	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35198do
35199  CC="$ac_save_CC $ac_arg"
35200  if ac_fn_c_try_compile "$LINENO"; then :
35201  ac_cv_prog_cc_c89=$ac_arg
35202fi
35203rm -f core conftest.err conftest.$ac_objext
35204  test "x$ac_cv_prog_cc_c89" != "xno" && break
35205done
35206rm -f conftest.$ac_ext
35207CC=$ac_save_CC
35208
35209fi
35210# AC_CACHE_VAL
35211case "x$ac_cv_prog_cc_c89" in
35212  x)
35213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35214$as_echo "none needed" >&6; } ;;
35215  xno)
35216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35217$as_echo "unsupported" >&6; } ;;
35218  *)
35219    CC="$CC $ac_cv_prog_cc_c89"
35220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35221$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35222esac
35223if test "x$ac_cv_prog_cc_c89" != xno; then :
35224
35225fi
35226
35227ac_ext=cpp
35228ac_cpp='$CXXCPP $CPPFLAGS'
35229ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35230ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35231ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35232
35233
35234
35235  COMPILER_NAME=C++
35236  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35237
35238  if test "x$CXX" != x; then
35239    # User has supplied compiler name already, always let that override.
35240    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35241$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35242    if test "x`basename $CXX`" = "x$CXX"; then
35243      # A command without a complete path is provided, search $PATH.
35244
35245      for ac_prog in $CXX
35246do
35247  # Extract the first word of "$ac_prog", so it can be a program name with args.
35248set dummy $ac_prog; ac_word=$2
35249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35250$as_echo_n "checking for $ac_word... " >&6; }
35251if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35252  $as_echo_n "(cached) " >&6
35253else
35254  case $POTENTIAL_CXX in
35255  [\\/]* | ?:[\\/]*)
35256  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35257  ;;
35258  *)
35259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35260for as_dir in $PATH
35261do
35262  IFS=$as_save_IFS
35263  test -z "$as_dir" && as_dir=.
35264    for ac_exec_ext in '' $ac_executable_extensions; do
35265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35266    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35268    break 2
35269  fi
35270done
35271  done
35272IFS=$as_save_IFS
35273
35274  ;;
35275esac
35276fi
35277POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35278if test -n "$POTENTIAL_CXX"; then
35279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35280$as_echo "$POTENTIAL_CXX" >&6; }
35281else
35282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35283$as_echo "no" >&6; }
35284fi
35285
35286
35287  test -n "$POTENTIAL_CXX" && break
35288done
35289
35290      if test "x$POTENTIAL_CXX" != x; then
35291        CXX=$POTENTIAL_CXX
35292      else
35293        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35294      fi
35295    else
35296      # Otherwise it might already be a complete path
35297      if test ! -x "$CXX"; then
35298        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35299      fi
35300    fi
35301  else
35302    # No user supplied value. Locate compiler ourselves.
35303
35304    # If we are cross compiling, assume cross compilation tools follows the
35305    # cross compilation standard where they are prefixed with the autoconf
35306    # standard name for the target. For example the binary
35307    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35308    # If we are not cross compiling, then the default compiler name will be
35309    # used.
35310
35311    CXX=
35312    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35313    # before checking the rest of the PATH.
35314    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35315    # step, this should not be necessary.
35316    if test -n "$TOOLCHAIN_PATH"; then
35317      PATH_save="$PATH"
35318      PATH="$TOOLCHAIN_PATH"
35319      if test -n "$ac_tool_prefix"; then
35320  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35321set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35323$as_echo_n "checking for $ac_word... " >&6; }
35324if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35325  $as_echo_n "(cached) " >&6
35326else
35327  case $TOOLCHAIN_PATH_CXX in
35328  [\\/]* | ?:[\\/]*)
35329  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35330  ;;
35331  *)
35332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35333for as_dir in $PATH
35334do
35335  IFS=$as_save_IFS
35336  test -z "$as_dir" && as_dir=.
35337    for ac_exec_ext in '' $ac_executable_extensions; do
35338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35339    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35341    break 2
35342  fi
35343done
35344  done
35345IFS=$as_save_IFS
35346
35347  ;;
35348esac
35349fi
35350TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35351if test -n "$TOOLCHAIN_PATH_CXX"; then
35352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35353$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35354else
35355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35356$as_echo "no" >&6; }
35357fi
35358
35359
35360fi
35361if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35362  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35363  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35364set dummy $SEARCH_LIST; ac_word=$2
35365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35366$as_echo_n "checking for $ac_word... " >&6; }
35367if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35368  $as_echo_n "(cached) " >&6
35369else
35370  case $ac_pt_TOOLCHAIN_PATH_CXX in
35371  [\\/]* | ?:[\\/]*)
35372  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35373  ;;
35374  *)
35375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35376for as_dir in $PATH
35377do
35378  IFS=$as_save_IFS
35379  test -z "$as_dir" && as_dir=.
35380    for ac_exec_ext in '' $ac_executable_extensions; do
35381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35382    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35384    break 2
35385  fi
35386done
35387  done
35388IFS=$as_save_IFS
35389
35390  ;;
35391esac
35392fi
35393ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35394if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35396$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35397else
35398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35399$as_echo "no" >&6; }
35400fi
35401
35402  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35403    TOOLCHAIN_PATH_CXX=""
35404  else
35405    case $cross_compiling:$ac_tool_warned in
35406yes:)
35407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35409ac_tool_warned=yes ;;
35410esac
35411    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35412  fi
35413else
35414  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35415fi
35416
35417      CXX=$TOOLCHAIN_PATH_CXX
35418      PATH="$PATH_save"
35419    fi
35420
35421    # AC_PATH_TOOL can't be run multiple times with the same variable,
35422    # so create a new name for this run.
35423    if test "x$CXX" = x; then
35424      if test -n "$ac_tool_prefix"; then
35425  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35426set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35428$as_echo_n "checking for $ac_word... " >&6; }
35429if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35430  $as_echo_n "(cached) " >&6
35431else
35432  case $POTENTIAL_CXX in
35433  [\\/]* | ?:[\\/]*)
35434  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35435  ;;
35436  *)
35437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35438for as_dir in $PATH
35439do
35440  IFS=$as_save_IFS
35441  test -z "$as_dir" && as_dir=.
35442    for ac_exec_ext in '' $ac_executable_extensions; do
35443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35444    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35446    break 2
35447  fi
35448done
35449  done
35450IFS=$as_save_IFS
35451
35452  ;;
35453esac
35454fi
35455POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35456if test -n "$POTENTIAL_CXX"; then
35457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35458$as_echo "$POTENTIAL_CXX" >&6; }
35459else
35460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35461$as_echo "no" >&6; }
35462fi
35463
35464
35465fi
35466if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35467  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35468  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35469set dummy $SEARCH_LIST; ac_word=$2
35470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35471$as_echo_n "checking for $ac_word... " >&6; }
35472if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35473  $as_echo_n "(cached) " >&6
35474else
35475  case $ac_pt_POTENTIAL_CXX in
35476  [\\/]* | ?:[\\/]*)
35477  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35478  ;;
35479  *)
35480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35481for as_dir in $PATH
35482do
35483  IFS=$as_save_IFS
35484  test -z "$as_dir" && as_dir=.
35485    for ac_exec_ext in '' $ac_executable_extensions; do
35486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35487    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35489    break 2
35490  fi
35491done
35492  done
35493IFS=$as_save_IFS
35494
35495  ;;
35496esac
35497fi
35498ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35499if test -n "$ac_pt_POTENTIAL_CXX"; then
35500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35501$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35502else
35503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35504$as_echo "no" >&6; }
35505fi
35506
35507  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35508    POTENTIAL_CXX=""
35509  else
35510    case $cross_compiling:$ac_tool_warned in
35511yes:)
35512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35514ac_tool_warned=yes ;;
35515esac
35516    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35517  fi
35518else
35519  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35520fi
35521
35522      CXX=$POTENTIAL_CXX
35523    fi
35524
35525    if test "x$CXX" = x; then
35526
35527  # Print a helpful message on how to acquire the necessary build dependency.
35528  # devkit is the help tag: freetype, cups, alsa etc
35529  MISSING_DEPENDENCY=devkit
35530
35531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35532    cygwin_help $MISSING_DEPENDENCY
35533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35534    msys_help $MISSING_DEPENDENCY
35535  else
35536    PKGHANDLER_COMMAND=
35537
35538    case $PKGHANDLER in
35539      apt-get)
35540        apt_help     $MISSING_DEPENDENCY ;;
35541      yum)
35542        yum_help     $MISSING_DEPENDENCY ;;
35543      brew)
35544        brew_help    $MISSING_DEPENDENCY ;;
35545      port)
35546        port_help    $MISSING_DEPENDENCY ;;
35547      pkgutil)
35548        pkgutil_help $MISSING_DEPENDENCY ;;
35549      pkgadd)
35550        pkgadd_help  $MISSING_DEPENDENCY ;;
35551    esac
35552
35553    if test "x$PKGHANDLER_COMMAND" != x; then
35554      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35555    fi
35556  fi
35557
35558      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35559    fi
35560  fi
35561
35562  # Now we have a compiler binary in CXX. Make sure it's okay.
35563
35564  # Only process if variable expands to non-empty
35565
35566  if test "x$CXX" != x; then
35567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35568
35569  # First separate the path from the arguments. This will split at the first
35570  # space.
35571  complete="$CXX"
35572  path="${complete%% *}"
35573  tmp="$complete EOL"
35574  arguments="${tmp#* }"
35575
35576  # Input might be given as Windows format, start by converting to
35577  # unix format.
35578  new_path=`$CYGPATH -u "$path"`
35579
35580  # Now try to locate executable using which
35581  new_path=`$WHICH "$new_path" 2> /dev/null`
35582  # bat and cmd files are not always considered executable in cygwin causing which
35583  # to not find them
35584  if test "x$new_path" = x \
35585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35587    new_path=`$CYGPATH -u "$path"`
35588  fi
35589  if test "x$new_path" = x; then
35590    # Oops. Which didn't find the executable.
35591    # The splitting of arguments from the executable at a space might have been incorrect,
35592    # since paths with space are more likely in Windows. Give it another try with the whole
35593    # argument.
35594    path="$complete"
35595    arguments="EOL"
35596    new_path=`$CYGPATH -u "$path"`
35597    new_path=`$WHICH "$new_path" 2> /dev/null`
35598    # bat and cmd files are not always considered executable in cygwin causing which
35599    # to not find them
35600    if test "x$new_path" = x \
35601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35603      new_path=`$CYGPATH -u "$path"`
35604    fi
35605    if test "x$new_path" = x; then
35606      # It's still not found. Now this is an unrecoverable error.
35607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35608$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35609      has_space=`$ECHO "$complete" | $GREP " "`
35610      if test "x$has_space" != x; then
35611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35613      fi
35614      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35615    fi
35616  fi
35617
35618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35621  # "foo.exe" is OK but "foo" is an error.
35622  #
35623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35624  # It is also a way to make sure we got the proper file name for the real test later on.
35625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35626  if test "x$test_shortpath" = x; then
35627    # Short path failed, file does not exist as specified.
35628    # Try adding .exe or .cmd
35629    if test -f "${new_path}.exe"; then
35630      input_to_shortpath="${new_path}.exe"
35631    elif test -f "${new_path}.cmd"; then
35632      input_to_shortpath="${new_path}.cmd"
35633    else
35634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35635$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35638      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35639    fi
35640  else
35641    input_to_shortpath="$new_path"
35642  fi
35643
35644  # Call helper function which possibly converts this using DOS-style short mode.
35645  # If so, the updated path is stored in $new_path.
35646  new_path="$input_to_shortpath"
35647
35648  input_path="$input_to_shortpath"
35649  # Check if we need to convert this using DOS-style short mode. If the path
35650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35651  # take no chances and rewrite it.
35652  # Note: m4 eats our [], so we need to use [ and ] instead.
35653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35654  if test "x$has_forbidden_chars" != x; then
35655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35659      # Going to short mode and back again did indeed matter. Since short mode is
35660      # case insensitive, let's make it lowercase to improve readability.
35661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35662      # Now convert it back to Unix-style (cygpath)
35663      input_path=`$CYGPATH -u "$shortmode_path"`
35664      new_path="$input_path"
35665    fi
35666  fi
35667
35668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35669  if test "x$test_cygdrive_prefix" = x; then
35670    # As a simple fix, exclude /usr/bin since it's not a real path.
35671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35673      # a path prefixed by /cygdrive for fixpath to work.
35674      new_path="$CYGWIN_ROOT_PATH$input_path"
35675    fi
35676  fi
35677
35678  # remove trailing .exe if any
35679  new_path="${new_path/%.exe/}"
35680
35681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35682
35683  # First separate the path from the arguments. This will split at the first
35684  # space.
35685  complete="$CXX"
35686  path="${complete%% *}"
35687  tmp="$complete EOL"
35688  arguments="${tmp#* }"
35689
35690  # Input might be given as Windows format, start by converting to
35691  # unix format.
35692  new_path="$path"
35693
35694  windows_path="$new_path"
35695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35696    unix_path=`$CYGPATH -u "$windows_path"`
35697    new_path="$unix_path"
35698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35700    new_path="$unix_path"
35701  fi
35702
35703
35704  # Now try to locate executable using which
35705  new_path=`$WHICH "$new_path" 2> /dev/null`
35706
35707  if test "x$new_path" = x; then
35708    # Oops. Which didn't find the executable.
35709    # The splitting of arguments from the executable at a space might have been incorrect,
35710    # since paths with space are more likely in Windows. Give it another try with the whole
35711    # argument.
35712    path="$complete"
35713    arguments="EOL"
35714    new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725
35726    new_path=`$WHICH "$new_path" 2> /dev/null`
35727    # bat and cmd files are not always considered executable in MSYS causing which
35728    # to not find them
35729    if test "x$new_path" = x \
35730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35732      new_path="$path"
35733
35734  windows_path="$new_path"
35735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35736    unix_path=`$CYGPATH -u "$windows_path"`
35737    new_path="$unix_path"
35738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35740    new_path="$unix_path"
35741  fi
35742
35743    fi
35744
35745    if test "x$new_path" = x; then
35746      # It's still not found. Now this is an unrecoverable error.
35747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35748$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35749      has_space=`$ECHO "$complete" | $GREP " "`
35750      if test "x$has_space" != x; then
35751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35753      fi
35754      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35755    fi
35756  fi
35757
35758  # Now new_path has a complete unix path to the binary
35759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35760    # Keep paths in /bin as-is, but remove trailing .exe if any
35761    new_path="${new_path/%.exe/}"
35762    # Do not save /bin paths to all_fixpath_prefixes!
35763  else
35764    # Not in mixed or Windows style, start by that.
35765    new_path=`cmd //c echo $new_path`
35766
35767  input_path="$new_path"
35768  # Check if we need to convert this using DOS-style short mode. If the path
35769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35770  # take no chances and rewrite it.
35771  # Note: m4 eats our [], so we need to use [ and ] instead.
35772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35773  if test "x$has_forbidden_chars" != x; then
35774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35776  fi
35777
35778    # Output is in $new_path
35779
35780  windows_path="$new_path"
35781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35782    unix_path=`$CYGPATH -u "$windows_path"`
35783    new_path="$unix_path"
35784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35786    new_path="$unix_path"
35787  fi
35788
35789    # remove trailing .exe if any
35790    new_path="${new_path/%.exe/}"
35791
35792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35794  fi
35795
35796    else
35797      # We're on a unix platform. Hooray! :)
35798      # First separate the path from the arguments. This will split at the first
35799      # space.
35800      complete="$CXX"
35801      path="${complete%% *}"
35802      tmp="$complete EOL"
35803      arguments="${tmp#* }"
35804
35805      # Cannot rely on the command "which" here since it doesn't always work.
35806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35807      if test -z "$is_absolute_path"; then
35808        # Path to executable is not absolute. Find it.
35809        IFS_save="$IFS"
35810        IFS=:
35811        for p in $PATH; do
35812          if test -f "$p/$path" && test -x "$p/$path"; then
35813            new_path="$p/$path"
35814            break
35815          fi
35816        done
35817        IFS="$IFS_save"
35818      else
35819        # This is an absolute path, we can use it without further modifications.
35820        new_path="$path"
35821      fi
35822
35823      if test "x$new_path" = x; then
35824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35825$as_echo "$as_me: The path of CXX, 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}: This might be caused by spaces in the path, which is not allowed." >&5
35829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35830        fi
35831        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35832      fi
35833    fi
35834
35835    # Now join together the path and the arguments once again
35836    if test "x$arguments" != xEOL; then
35837      new_complete="$new_path ${arguments% *}"
35838    else
35839      new_complete="$new_path"
35840    fi
35841
35842    if test "x$complete" != "x$new_complete"; then
35843      CXX="$new_complete"
35844      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35845$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35846    fi
35847  fi
35848
35849  TEST_COMPILER="$CXX"
35850
35851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35852$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35853  SYMLINK_ORIGINAL="$TEST_COMPILER"
35854
35855  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35856    # Follow a chain of symbolic links. Use readlink
35857    # where it exists, else fall back to horribly
35858    # complicated shell code.
35859    if test "x$READLINK_TESTED" != yes; then
35860      # On MacOSX there is a readlink tool with a different
35861      # purpose than the GNU readlink tool. Check the found readlink.
35862      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35863      if test "x$ISGNU" = x; then
35864        # A readlink that we do not know how to use.
35865        # Are there other non-GNU readlinks out there?
35866        READLINK_TESTED=yes
35867        READLINK=
35868      fi
35869    fi
35870
35871    if test "x$READLINK" != x; then
35872      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35873    else
35874      # Save the current directory for restoring afterwards
35875      STARTDIR=$PWD
35876      COUNTER=0
35877      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35878      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35879      cd $sym_link_dir
35880      # Use -P flag to resolve symlinks in directories.
35881      cd `$THEPWDCMD -P`
35882      sym_link_dir=`$THEPWDCMD -P`
35883      # Resolve file symlinks
35884      while test $COUNTER -lt 20; do
35885        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35886        if test "x$ISLINK" == x; then
35887          # This is not a symbolic link! We are done!
35888          break
35889        fi
35890        # Again resolve directory symlinks since the target of the just found
35891        # link could be in a different directory
35892        cd `$DIRNAME $ISLINK`
35893        sym_link_dir=`$THEPWDCMD -P`
35894        sym_link_file=`$BASENAME $ISLINK`
35895        let COUNTER=COUNTER+1
35896      done
35897      cd $STARTDIR
35898      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35899    fi
35900  fi
35901
35902  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35904$as_echo "no symlink" >&6; }
35905  else
35906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35907$as_echo "$SYMLINK_ORIGINAL" >&6; }
35908
35909    # We can't handle ccache by gcc wrappers, since we need to know if we're
35910    # using ccache. Instead ccache usage must be controlled by a configure option.
35911    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35912    if test "x$COMPILER_BASENAME" = "xccache"; then
35913      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35914$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35915      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35916    fi
35917  fi
35918
35919
35920  COMPILER=$CXX
35921  COMPILER_NAME=$COMPILER_NAME
35922
35923  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35924    # cc -V output typically looks like
35925    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35926    # or
35927    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35928    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35929    # Check that this is likely to be the Solaris Studio cc.
35930    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35931    if test $? -ne 0; then
35932      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35933      { $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
35934$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35935      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35936$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35937      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35938$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35939      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35940    fi
35941    # Remove usage instructions (if present), and
35942    # collapse compiler output into a single line
35943    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35944        $SED -e 's/ *[Uu]sage:.*//'`
35945    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35946        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35947  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35948    # xlc -qversion output typically looks like
35949    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35950    #     Version: 11.01.0000.0015
35951    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35952    # Check that this is likely to be the IBM XL C compiler.
35953    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35954    if test $? -ne 0; then
35955      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35956      { $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
35957$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35958      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35959$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35960      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35961$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35962      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35963    fi
35964    # Collapse compiler output into a single line
35965    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35966    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35967        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35968  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35969    # There is no specific version flag, but all output starts with a version string.
35970    # First line typically looks something like:
35971    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35972    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35973    # Check that this is likely to be Microsoft CL.EXE.
35974    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35975    if test $? -ne 0; then
35976      { $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
35977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35979$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35980      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35981    fi
35982    # Collapse compiler output into a single line
35983    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35984    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35985        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35986  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35987    # gcc --version output typically looks like
35988    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35989    #     Copyright (C) 2013 Free Software Foundation, Inc.
35990    #     This is free software; see the source for copying conditions.  There is NO
35991    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35992    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35993    # Check that this is likely to be GCC.
35994    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35995    if test $? -ne 0; then
35996      { $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
35997$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35998      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35999$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
36000      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36001    fi
36002    # Remove Copyright and legalese from version string, and
36003    # collapse into a single line
36004    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
36005        $SED -e 's/ *Copyright .*//'`
36006    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36007        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
36008  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
36009    # clang --version output typically looks like
36010    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
36011    #    clang version 3.3 (tags/RELEASE_33/final)
36012    # or
36013    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
36014    #    Target: x86_64-pc-linux-gnu
36015    #    Thread model: posix
36016    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36017    # Check that this is likely to be clang
36018    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
36019    if test $? -ne 0; then
36020      { $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
36021$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36022      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36023$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36024      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36025    fi
36026    # Collapse compiler output into a single line
36027    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36028    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36029        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
36030  else
36031      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
36032  fi
36033  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
36034  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
36035  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
36036  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
36037
36038  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
36039$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
36040
36041
36042  # Now that we have resolved CXX ourself, let autoconf have its go at it
36043  ac_ext=cpp
36044ac_cpp='$CXXCPP $CPPFLAGS'
36045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36048if test -z "$CXX"; then
36049  if test -n "$CCC"; then
36050    CXX=$CCC
36051  else
36052    if test -n "$ac_tool_prefix"; then
36053  for ac_prog in $CXX
36054  do
36055    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36056set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36058$as_echo_n "checking for $ac_word... " >&6; }
36059if ${ac_cv_prog_CXX+:} false; then :
36060  $as_echo_n "(cached) " >&6
36061else
36062  if test -n "$CXX"; then
36063  ac_cv_prog_CXX="$CXX" # Let the user override the test.
36064else
36065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36066for as_dir in $PATH
36067do
36068  IFS=$as_save_IFS
36069  test -z "$as_dir" && as_dir=.
36070    for ac_exec_ext in '' $ac_executable_extensions; do
36071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36072    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36074    break 2
36075  fi
36076done
36077  done
36078IFS=$as_save_IFS
36079
36080fi
36081fi
36082CXX=$ac_cv_prog_CXX
36083if test -n "$CXX"; then
36084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36085$as_echo "$CXX" >&6; }
36086else
36087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36088$as_echo "no" >&6; }
36089fi
36090
36091
36092    test -n "$CXX" && break
36093  done
36094fi
36095if test -z "$CXX"; then
36096  ac_ct_CXX=$CXX
36097  for ac_prog in $CXX
36098do
36099  # Extract the first word of "$ac_prog", so it can be a program name with args.
36100set dummy $ac_prog; ac_word=$2
36101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36102$as_echo_n "checking for $ac_word... " >&6; }
36103if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36104  $as_echo_n "(cached) " >&6
36105else
36106  if test -n "$ac_ct_CXX"; then
36107  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36108else
36109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36110for as_dir in $PATH
36111do
36112  IFS=$as_save_IFS
36113  test -z "$as_dir" && as_dir=.
36114    for ac_exec_ext in '' $ac_executable_extensions; do
36115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36116    ac_cv_prog_ac_ct_CXX="$ac_prog"
36117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36118    break 2
36119  fi
36120done
36121  done
36122IFS=$as_save_IFS
36123
36124fi
36125fi
36126ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36127if test -n "$ac_ct_CXX"; then
36128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36129$as_echo "$ac_ct_CXX" >&6; }
36130else
36131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36132$as_echo "no" >&6; }
36133fi
36134
36135
36136  test -n "$ac_ct_CXX" && break
36137done
36138
36139  if test "x$ac_ct_CXX" = x; then
36140    CXX="g++"
36141  else
36142    case $cross_compiling:$ac_tool_warned in
36143yes:)
36144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36146ac_tool_warned=yes ;;
36147esac
36148    CXX=$ac_ct_CXX
36149  fi
36150fi
36151
36152  fi
36153fi
36154# Provide some information about the compiler.
36155$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36156set X $ac_compile
36157ac_compiler=$2
36158for ac_option in --version -v -V -qversion; do
36159  { { ac_try="$ac_compiler $ac_option >&5"
36160case "(($ac_try" in
36161  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36162  *) ac_try_echo=$ac_try;;
36163esac
36164eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36165$as_echo "$ac_try_echo"; } >&5
36166  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36167  ac_status=$?
36168  if test -s conftest.err; then
36169    sed '10a\
36170... rest of stderr output deleted ...
36171         10q' conftest.err >conftest.er1
36172    cat conftest.er1 >&5
36173  fi
36174  rm -f conftest.er1 conftest.err
36175  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36176  test $ac_status = 0; }
36177done
36178
36179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36180$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36181if ${ac_cv_cxx_compiler_gnu+:} false; then :
36182  $as_echo_n "(cached) " >&6
36183else
36184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36185/* end confdefs.h.  */
36186
36187int
36188main ()
36189{
36190#ifndef __GNUC__
36191       choke me
36192#endif
36193
36194  ;
36195  return 0;
36196}
36197_ACEOF
36198if ac_fn_cxx_try_compile "$LINENO"; then :
36199  ac_compiler_gnu=yes
36200else
36201  ac_compiler_gnu=no
36202fi
36203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36204ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36205
36206fi
36207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36208$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36209if test $ac_compiler_gnu = yes; then
36210  GXX=yes
36211else
36212  GXX=
36213fi
36214ac_test_CXXFLAGS=${CXXFLAGS+set}
36215ac_save_CXXFLAGS=$CXXFLAGS
36216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36217$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36218if ${ac_cv_prog_cxx_g+:} false; then :
36219  $as_echo_n "(cached) " >&6
36220else
36221  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36222   ac_cxx_werror_flag=yes
36223   ac_cv_prog_cxx_g=no
36224   CXXFLAGS="-g"
36225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36226/* end confdefs.h.  */
36227
36228int
36229main ()
36230{
36231
36232  ;
36233  return 0;
36234}
36235_ACEOF
36236if ac_fn_cxx_try_compile "$LINENO"; then :
36237  ac_cv_prog_cxx_g=yes
36238else
36239  CXXFLAGS=""
36240      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36241/* end confdefs.h.  */
36242
36243int
36244main ()
36245{
36246
36247  ;
36248  return 0;
36249}
36250_ACEOF
36251if ac_fn_cxx_try_compile "$LINENO"; then :
36252
36253else
36254  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36255	 CXXFLAGS="-g"
36256	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36257/* end confdefs.h.  */
36258
36259int
36260main ()
36261{
36262
36263  ;
36264  return 0;
36265}
36266_ACEOF
36267if ac_fn_cxx_try_compile "$LINENO"; then :
36268  ac_cv_prog_cxx_g=yes
36269fi
36270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36271fi
36272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36273fi
36274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36275   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36276fi
36277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36278$as_echo "$ac_cv_prog_cxx_g" >&6; }
36279if test "$ac_test_CXXFLAGS" = set; then
36280  CXXFLAGS=$ac_save_CXXFLAGS
36281elif test $ac_cv_prog_cxx_g = yes; then
36282  if test "$GXX" = yes; then
36283    CXXFLAGS="-g -O2"
36284  else
36285    CXXFLAGS="-g"
36286  fi
36287else
36288  if test "$GXX" = yes; then
36289    CXXFLAGS="-O2"
36290  else
36291    CXXFLAGS=
36292  fi
36293fi
36294ac_ext=cpp
36295ac_cpp='$CXXCPP $CPPFLAGS'
36296ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36297ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36298ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36299
36300
36301  # This is the compiler version number on the form X.Y[.Z]
36302
36303
36304
36305
36306  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36307    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36308$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36309    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36310$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36311  fi
36312
36313  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36314  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36315    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36316$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36317  fi
36318
36319  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36320    { $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
36321$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36322  fi
36323
36324  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36325
36326
36327  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377    # Execute function body
36378
36379  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36380  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36381
36382  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36383    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36384  fi
36385
36386  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36387    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36388  fi
36389
36390  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36391  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36392
36393  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36394    :
36395
36396  else
36397    :
36398
36399          { $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
36400$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36401
36402
36403  fi
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418  fi
36419
36420  #
36421  # Setup the preprocessor (CPP and CXXCPP)
36422  #
36423  ac_ext=c
36424ac_cpp='$CPP $CPPFLAGS'
36425ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36426ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36427ac_compiler_gnu=$ac_cv_c_compiler_gnu
36428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36429$as_echo_n "checking how to run the C preprocessor... " >&6; }
36430# On Suns, sometimes $CPP names a directory.
36431if test -n "$CPP" && test -d "$CPP"; then
36432  CPP=
36433fi
36434if test -z "$CPP"; then
36435  if ${ac_cv_prog_CPP+:} false; then :
36436  $as_echo_n "(cached) " >&6
36437else
36438      # Double quotes because CPP needs to be expanded
36439    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36440    do
36441      ac_preproc_ok=false
36442for ac_c_preproc_warn_flag in '' yes
36443do
36444  # Use a header file that comes with gcc, so configuring glibc
36445  # with a fresh cross-compiler works.
36446  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36447  # <limits.h> exists even on freestanding compilers.
36448  # On the NeXT, cc -E runs the code through the compiler's parser,
36449  # not just through cpp. "Syntax error" is here to catch this case.
36450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36451/* end confdefs.h.  */
36452#ifdef __STDC__
36453# include <limits.h>
36454#else
36455# include <assert.h>
36456#endif
36457		     Syntax error
36458_ACEOF
36459if ac_fn_c_try_cpp "$LINENO"; then :
36460
36461else
36462  # Broken: fails on valid input.
36463continue
36464fi
36465rm -f conftest.err conftest.i conftest.$ac_ext
36466
36467  # OK, works on sane cases.  Now check whether nonexistent headers
36468  # can be detected and how.
36469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36470/* end confdefs.h.  */
36471#include <ac_nonexistent.h>
36472_ACEOF
36473if ac_fn_c_try_cpp "$LINENO"; then :
36474  # Broken: success on invalid input.
36475continue
36476else
36477  # Passes both tests.
36478ac_preproc_ok=:
36479break
36480fi
36481rm -f conftest.err conftest.i conftest.$ac_ext
36482
36483done
36484# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36485rm -f conftest.i conftest.err conftest.$ac_ext
36486if $ac_preproc_ok; then :
36487  break
36488fi
36489
36490    done
36491    ac_cv_prog_CPP=$CPP
36492
36493fi
36494  CPP=$ac_cv_prog_CPP
36495else
36496  ac_cv_prog_CPP=$CPP
36497fi
36498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36499$as_echo "$CPP" >&6; }
36500ac_preproc_ok=false
36501for ac_c_preproc_warn_flag in '' yes
36502do
36503  # Use a header file that comes with gcc, so configuring glibc
36504  # with a fresh cross-compiler works.
36505  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36506  # <limits.h> exists even on freestanding compilers.
36507  # On the NeXT, cc -E runs the code through the compiler's parser,
36508  # not just through cpp. "Syntax error" is here to catch this case.
36509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36510/* end confdefs.h.  */
36511#ifdef __STDC__
36512# include <limits.h>
36513#else
36514# include <assert.h>
36515#endif
36516		     Syntax error
36517_ACEOF
36518if ac_fn_c_try_cpp "$LINENO"; then :
36519
36520else
36521  # Broken: fails on valid input.
36522continue
36523fi
36524rm -f conftest.err conftest.i conftest.$ac_ext
36525
36526  # OK, works on sane cases.  Now check whether nonexistent headers
36527  # can be detected and how.
36528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36529/* end confdefs.h.  */
36530#include <ac_nonexistent.h>
36531_ACEOF
36532if ac_fn_c_try_cpp "$LINENO"; then :
36533  # Broken: success on invalid input.
36534continue
36535else
36536  # Passes both tests.
36537ac_preproc_ok=:
36538break
36539fi
36540rm -f conftest.err conftest.i conftest.$ac_ext
36541
36542done
36543# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36544rm -f conftest.i conftest.err conftest.$ac_ext
36545if $ac_preproc_ok; then :
36546
36547else
36548  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36550as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36551See \`config.log' for more details" "$LINENO" 5; }
36552fi
36553
36554ac_ext=cpp
36555ac_cpp='$CXXCPP $CPPFLAGS'
36556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36559
36560
36561  # Only process if variable expands to non-empty
36562
36563  if test "x$CPP" != x; then
36564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36565
36566  # First separate the path from the arguments. This will split at the first
36567  # space.
36568  complete="$CPP"
36569  path="${complete%% *}"
36570  tmp="$complete EOL"
36571  arguments="${tmp#* }"
36572
36573  # Input might be given as Windows format, start by converting to
36574  # unix format.
36575  new_path=`$CYGPATH -u "$path"`
36576
36577  # Now try to locate executable using which
36578  new_path=`$WHICH "$new_path" 2> /dev/null`
36579  # bat and cmd files are not always considered executable in cygwin causing which
36580  # to not find them
36581  if test "x$new_path" = x \
36582      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36583      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36584    new_path=`$CYGPATH -u "$path"`
36585  fi
36586  if test "x$new_path" = x; then
36587    # Oops. Which didn't find the executable.
36588    # The splitting of arguments from the executable at a space might have been incorrect,
36589    # since paths with space are more likely in Windows. Give it another try with the whole
36590    # argument.
36591    path="$complete"
36592    arguments="EOL"
36593    new_path=`$CYGPATH -u "$path"`
36594    new_path=`$WHICH "$new_path" 2> /dev/null`
36595    # bat and cmd files are not always considered executable in cygwin causing which
36596    # to not find them
36597    if test "x$new_path" = x \
36598        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36599        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36600      new_path=`$CYGPATH -u "$path"`
36601    fi
36602    if test "x$new_path" = x; then
36603      # It's still not found. Now this is an unrecoverable error.
36604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36605$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36606      has_space=`$ECHO "$complete" | $GREP " "`
36607      if test "x$has_space" != x; then
36608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36610      fi
36611      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36612    fi
36613  fi
36614
36615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36618  # "foo.exe" is OK but "foo" is an error.
36619  #
36620  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36621  # It is also a way to make sure we got the proper file name for the real test later on.
36622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36623  if test "x$test_shortpath" = x; then
36624    # Short path failed, file does not exist as specified.
36625    # Try adding .exe or .cmd
36626    if test -f "${new_path}.exe"; then
36627      input_to_shortpath="${new_path}.exe"
36628    elif test -f "${new_path}.cmd"; then
36629      input_to_shortpath="${new_path}.cmd"
36630    else
36631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36632$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36633      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36634$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36635      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36636    fi
36637  else
36638    input_to_shortpath="$new_path"
36639  fi
36640
36641  # Call helper function which possibly converts this using DOS-style short mode.
36642  # If so, the updated path is stored in $new_path.
36643  new_path="$input_to_shortpath"
36644
36645  input_path="$input_to_shortpath"
36646  # Check if we need to convert this using DOS-style short mode. If the path
36647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36648  # take no chances and rewrite it.
36649  # Note: m4 eats our [], so we need to use [ and ] instead.
36650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36651  if test "x$has_forbidden_chars" != x; then
36652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36656      # Going to short mode and back again did indeed matter. Since short mode is
36657      # case insensitive, let's make it lowercase to improve readability.
36658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36659      # Now convert it back to Unix-style (cygpath)
36660      input_path=`$CYGPATH -u "$shortmode_path"`
36661      new_path="$input_path"
36662    fi
36663  fi
36664
36665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36666  if test "x$test_cygdrive_prefix" = x; then
36667    # As a simple fix, exclude /usr/bin since it's not a real path.
36668    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36670      # a path prefixed by /cygdrive for fixpath to work.
36671      new_path="$CYGWIN_ROOT_PATH$input_path"
36672    fi
36673  fi
36674
36675  # remove trailing .exe if any
36676  new_path="${new_path/%.exe/}"
36677
36678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36679
36680  # First separate the path from the arguments. This will split at the first
36681  # space.
36682  complete="$CPP"
36683  path="${complete%% *}"
36684  tmp="$complete EOL"
36685  arguments="${tmp#* }"
36686
36687  # Input might be given as Windows format, start by converting to
36688  # unix format.
36689  new_path="$path"
36690
36691  windows_path="$new_path"
36692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36693    unix_path=`$CYGPATH -u "$windows_path"`
36694    new_path="$unix_path"
36695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36697    new_path="$unix_path"
36698  fi
36699
36700
36701  # Now try to locate executable using which
36702  new_path=`$WHICH "$new_path" 2> /dev/null`
36703
36704  if test "x$new_path" = x; then
36705    # Oops. Which didn't find the executable.
36706    # The splitting of arguments from the executable at a space might have been incorrect,
36707    # since paths with space are more likely in Windows. Give it another try with the whole
36708    # argument.
36709    path="$complete"
36710    arguments="EOL"
36711    new_path="$path"
36712
36713  windows_path="$new_path"
36714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36715    unix_path=`$CYGPATH -u "$windows_path"`
36716    new_path="$unix_path"
36717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36719    new_path="$unix_path"
36720  fi
36721
36722
36723    new_path=`$WHICH "$new_path" 2> /dev/null`
36724    # bat and cmd files are not always considered executable in MSYS causing which
36725    # to not find them
36726    if test "x$new_path" = x \
36727        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36728        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36729      new_path="$path"
36730
36731  windows_path="$new_path"
36732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36733    unix_path=`$CYGPATH -u "$windows_path"`
36734    new_path="$unix_path"
36735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36737    new_path="$unix_path"
36738  fi
36739
36740    fi
36741
36742    if test "x$new_path" = x; then
36743      # It's still not found. Now this is an unrecoverable error.
36744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36745$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36746      has_space=`$ECHO "$complete" | $GREP " "`
36747      if test "x$has_space" != x; then
36748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36750      fi
36751      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36752    fi
36753  fi
36754
36755  # Now new_path has a complete unix path to the binary
36756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36757    # Keep paths in /bin as-is, but remove trailing .exe if any
36758    new_path="${new_path/%.exe/}"
36759    # Do not save /bin paths to all_fixpath_prefixes!
36760  else
36761    # Not in mixed or Windows style, start by that.
36762    new_path=`cmd //c echo $new_path`
36763
36764  input_path="$new_path"
36765  # Check if we need to convert this using DOS-style short mode. If the path
36766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36767  # take no chances and rewrite it.
36768  # Note: m4 eats our [], so we need to use [ and ] instead.
36769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36770  if test "x$has_forbidden_chars" != x; then
36771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36773  fi
36774
36775    # Output is in $new_path
36776
36777  windows_path="$new_path"
36778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36779    unix_path=`$CYGPATH -u "$windows_path"`
36780    new_path="$unix_path"
36781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36783    new_path="$unix_path"
36784  fi
36785
36786    # remove trailing .exe if any
36787    new_path="${new_path/%.exe/}"
36788
36789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36791  fi
36792
36793    else
36794      # We're on a unix platform. Hooray! :)
36795      # First separate the path from the arguments. This will split at the first
36796      # space.
36797      complete="$CPP"
36798      path="${complete%% *}"
36799      tmp="$complete EOL"
36800      arguments="${tmp#* }"
36801
36802      # Cannot rely on the command "which" here since it doesn't always work.
36803      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36804      if test -z "$is_absolute_path"; then
36805        # Path to executable is not absolute. Find it.
36806        IFS_save="$IFS"
36807        IFS=:
36808        for p in $PATH; do
36809          if test -f "$p/$path" && test -x "$p/$path"; then
36810            new_path="$p/$path"
36811            break
36812          fi
36813        done
36814        IFS="$IFS_save"
36815      else
36816        # This is an absolute path, we can use it without further modifications.
36817        new_path="$path"
36818      fi
36819
36820      if test "x$new_path" = x; then
36821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36822$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36823        has_space=`$ECHO "$complete" | $GREP " "`
36824        if test "x$has_space" != x; then
36825          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36826$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36827        fi
36828        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36829      fi
36830    fi
36831
36832    # Now join together the path and the arguments once again
36833    if test "x$arguments" != xEOL; then
36834      new_complete="$new_path ${arguments% *}"
36835    else
36836      new_complete="$new_path"
36837    fi
36838
36839    if test "x$complete" != "x$new_complete"; then
36840      CPP="$new_complete"
36841      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36842$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36843    fi
36844  fi
36845
36846  ac_ext=cpp
36847ac_cpp='$CXXCPP $CPPFLAGS'
36848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36852$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36853if test -z "$CXXCPP"; then
36854  if ${ac_cv_prog_CXXCPP+:} false; then :
36855  $as_echo_n "(cached) " >&6
36856else
36857      # Double quotes because CXXCPP needs to be expanded
36858    for CXXCPP in "$CXX -E" "/lib/cpp"
36859    do
36860      ac_preproc_ok=false
36861for ac_cxx_preproc_warn_flag in '' yes
36862do
36863  # Use a header file that comes with gcc, so configuring glibc
36864  # with a fresh cross-compiler works.
36865  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36866  # <limits.h> exists even on freestanding compilers.
36867  # On the NeXT, cc -E runs the code through the compiler's parser,
36868  # not just through cpp. "Syntax error" is here to catch this case.
36869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36870/* end confdefs.h.  */
36871#ifdef __STDC__
36872# include <limits.h>
36873#else
36874# include <assert.h>
36875#endif
36876		     Syntax error
36877_ACEOF
36878if ac_fn_cxx_try_cpp "$LINENO"; then :
36879
36880else
36881  # Broken: fails on valid input.
36882continue
36883fi
36884rm -f conftest.err conftest.i conftest.$ac_ext
36885
36886  # OK, works on sane cases.  Now check whether nonexistent headers
36887  # can be detected and how.
36888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36889/* end confdefs.h.  */
36890#include <ac_nonexistent.h>
36891_ACEOF
36892if ac_fn_cxx_try_cpp "$LINENO"; then :
36893  # Broken: success on invalid input.
36894continue
36895else
36896  # Passes both tests.
36897ac_preproc_ok=:
36898break
36899fi
36900rm -f conftest.err conftest.i conftest.$ac_ext
36901
36902done
36903# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36904rm -f conftest.i conftest.err conftest.$ac_ext
36905if $ac_preproc_ok; then :
36906  break
36907fi
36908
36909    done
36910    ac_cv_prog_CXXCPP=$CXXCPP
36911
36912fi
36913  CXXCPP=$ac_cv_prog_CXXCPP
36914else
36915  ac_cv_prog_CXXCPP=$CXXCPP
36916fi
36917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36918$as_echo "$CXXCPP" >&6; }
36919ac_preproc_ok=false
36920for ac_cxx_preproc_warn_flag in '' yes
36921do
36922  # Use a header file that comes with gcc, so configuring glibc
36923  # with a fresh cross-compiler works.
36924  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36925  # <limits.h> exists even on freestanding compilers.
36926  # On the NeXT, cc -E runs the code through the compiler's parser,
36927  # not just through cpp. "Syntax error" is here to catch this case.
36928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36929/* end confdefs.h.  */
36930#ifdef __STDC__
36931# include <limits.h>
36932#else
36933# include <assert.h>
36934#endif
36935		     Syntax error
36936_ACEOF
36937if ac_fn_cxx_try_cpp "$LINENO"; then :
36938
36939else
36940  # Broken: fails on valid input.
36941continue
36942fi
36943rm -f conftest.err conftest.i conftest.$ac_ext
36944
36945  # OK, works on sane cases.  Now check whether nonexistent headers
36946  # can be detected and how.
36947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36948/* end confdefs.h.  */
36949#include <ac_nonexistent.h>
36950_ACEOF
36951if ac_fn_cxx_try_cpp "$LINENO"; then :
36952  # Broken: success on invalid input.
36953continue
36954else
36955  # Passes both tests.
36956ac_preproc_ok=:
36957break
36958fi
36959rm -f conftest.err conftest.i conftest.$ac_ext
36960
36961done
36962# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36963rm -f conftest.i conftest.err conftest.$ac_ext
36964if $ac_preproc_ok; then :
36965
36966else
36967  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36969as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36970See \`config.log' for more details" "$LINENO" 5; }
36971fi
36972
36973ac_ext=cpp
36974ac_cpp='$CXXCPP $CPPFLAGS'
36975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36978
36979
36980  # Only process if variable expands to non-empty
36981
36982  if test "x$CXXCPP" != x; then
36983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36984
36985  # First separate the path from the arguments. This will split at the first
36986  # space.
36987  complete="$CXXCPP"
36988  path="${complete%% *}"
36989  tmp="$complete EOL"
36990  arguments="${tmp#* }"
36991
36992  # Input might be given as Windows format, start by converting to
36993  # unix format.
36994  new_path=`$CYGPATH -u "$path"`
36995
36996  # Now try to locate executable using which
36997  new_path=`$WHICH "$new_path" 2> /dev/null`
36998  # bat and cmd files are not always considered executable in cygwin causing which
36999  # to not find them
37000  if test "x$new_path" = x \
37001      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37002      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37003    new_path=`$CYGPATH -u "$path"`
37004  fi
37005  if test "x$new_path" = x; then
37006    # Oops. Which didn't find the executable.
37007    # The splitting of arguments from the executable at a space might have been incorrect,
37008    # since paths with space are more likely in Windows. Give it another try with the whole
37009    # argument.
37010    path="$complete"
37011    arguments="EOL"
37012    new_path=`$CYGPATH -u "$path"`
37013    new_path=`$WHICH "$new_path" 2> /dev/null`
37014    # bat and cmd files are not always considered executable in cygwin causing which
37015    # to not find them
37016    if test "x$new_path" = x \
37017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37019      new_path=`$CYGPATH -u "$path"`
37020    fi
37021    if test "x$new_path" = x; then
37022      # It's still not found. Now this is an unrecoverable error.
37023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37024$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37025      has_space=`$ECHO "$complete" | $GREP " "`
37026      if test "x$has_space" != x; then
37027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37029      fi
37030      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37031    fi
37032  fi
37033
37034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37037  # "foo.exe" is OK but "foo" is an error.
37038  #
37039  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37040  # It is also a way to make sure we got the proper file name for the real test later on.
37041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37042  if test "x$test_shortpath" = x; then
37043    # Short path failed, file does not exist as specified.
37044    # Try adding .exe or .cmd
37045    if test -f "${new_path}.exe"; then
37046      input_to_shortpath="${new_path}.exe"
37047    elif test -f "${new_path}.cmd"; then
37048      input_to_shortpath="${new_path}.cmd"
37049    else
37050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
37051$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
37052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37054      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37055    fi
37056  else
37057    input_to_shortpath="$new_path"
37058  fi
37059
37060  # Call helper function which possibly converts this using DOS-style short mode.
37061  # If so, the updated path is stored in $new_path.
37062  new_path="$input_to_shortpath"
37063
37064  input_path="$input_to_shortpath"
37065  # Check if we need to convert this using DOS-style short mode. If the path
37066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37067  # take no chances and rewrite it.
37068  # Note: m4 eats our [], so we need to use [ and ] instead.
37069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37070  if test "x$has_forbidden_chars" != x; then
37071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37075      # Going to short mode and back again did indeed matter. Since short mode is
37076      # case insensitive, let's make it lowercase to improve readability.
37077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37078      # Now convert it back to Unix-style (cygpath)
37079      input_path=`$CYGPATH -u "$shortmode_path"`
37080      new_path="$input_path"
37081    fi
37082  fi
37083
37084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37085  if test "x$test_cygdrive_prefix" = x; then
37086    # As a simple fix, exclude /usr/bin since it's not a real path.
37087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37089      # a path prefixed by /cygdrive for fixpath to work.
37090      new_path="$CYGWIN_ROOT_PATH$input_path"
37091    fi
37092  fi
37093
37094  # remove trailing .exe if any
37095  new_path="${new_path/%.exe/}"
37096
37097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37098
37099  # First separate the path from the arguments. This will split at the first
37100  # space.
37101  complete="$CXXCPP"
37102  path="${complete%% *}"
37103  tmp="$complete EOL"
37104  arguments="${tmp#* }"
37105
37106  # Input might be given as Windows format, start by converting to
37107  # unix format.
37108  new_path="$path"
37109
37110  windows_path="$new_path"
37111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37112    unix_path=`$CYGPATH -u "$windows_path"`
37113    new_path="$unix_path"
37114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37116    new_path="$unix_path"
37117  fi
37118
37119
37120  # Now try to locate executable using which
37121  new_path=`$WHICH "$new_path" 2> /dev/null`
37122
37123  if test "x$new_path" = x; then
37124    # Oops. Which didn't find the executable.
37125    # The splitting of arguments from the executable at a space might have been incorrect,
37126    # since paths with space are more likely in Windows. Give it another try with the whole
37127    # argument.
37128    path="$complete"
37129    arguments="EOL"
37130    new_path="$path"
37131
37132  windows_path="$new_path"
37133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37134    unix_path=`$CYGPATH -u "$windows_path"`
37135    new_path="$unix_path"
37136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37138    new_path="$unix_path"
37139  fi
37140
37141
37142    new_path=`$WHICH "$new_path" 2> /dev/null`
37143    # bat and cmd files are not always considered executable in MSYS causing which
37144    # to not find them
37145    if test "x$new_path" = x \
37146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37148      new_path="$path"
37149
37150  windows_path="$new_path"
37151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37152    unix_path=`$CYGPATH -u "$windows_path"`
37153    new_path="$unix_path"
37154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37156    new_path="$unix_path"
37157  fi
37158
37159    fi
37160
37161    if test "x$new_path" = x; then
37162      # It's still not found. Now this is an unrecoverable error.
37163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37164$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37165      has_space=`$ECHO "$complete" | $GREP " "`
37166      if test "x$has_space" != x; then
37167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37169      fi
37170      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37171    fi
37172  fi
37173
37174  # Now new_path has a complete unix path to the binary
37175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37176    # Keep paths in /bin as-is, but remove trailing .exe if any
37177    new_path="${new_path/%.exe/}"
37178    # Do not save /bin paths to all_fixpath_prefixes!
37179  else
37180    # Not in mixed or Windows style, start by that.
37181    new_path=`cmd //c echo $new_path`
37182
37183  input_path="$new_path"
37184  # Check if we need to convert this using DOS-style short mode. If the path
37185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37186  # take no chances and rewrite it.
37187  # Note: m4 eats our [], so we need to use [ and ] instead.
37188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37189  if test "x$has_forbidden_chars" != x; then
37190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37192  fi
37193
37194    # Output is in $new_path
37195
37196  windows_path="$new_path"
37197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37198    unix_path=`$CYGPATH -u "$windows_path"`
37199    new_path="$unix_path"
37200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37202    new_path="$unix_path"
37203  fi
37204
37205    # remove trailing .exe if any
37206    new_path="${new_path/%.exe/}"
37207
37208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37210  fi
37211
37212    else
37213      # We're on a unix platform. Hooray! :)
37214      # First separate the path from the arguments. This will split at the first
37215      # space.
37216      complete="$CXXCPP"
37217      path="${complete%% *}"
37218      tmp="$complete EOL"
37219      arguments="${tmp#* }"
37220
37221      # Cannot rely on the command "which" here since it doesn't always work.
37222      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37223      if test -z "$is_absolute_path"; then
37224        # Path to executable is not absolute. Find it.
37225        IFS_save="$IFS"
37226        IFS=:
37227        for p in $PATH; do
37228          if test -f "$p/$path" && test -x "$p/$path"; then
37229            new_path="$p/$path"
37230            break
37231          fi
37232        done
37233        IFS="$IFS_save"
37234      else
37235        # This is an absolute path, we can use it without further modifications.
37236        new_path="$path"
37237      fi
37238
37239      if test "x$new_path" = x; then
37240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37241$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37242        has_space=`$ECHO "$complete" | $GREP " "`
37243        if test "x$has_space" != x; then
37244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37246        fi
37247        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37248      fi
37249    fi
37250
37251    # Now join together the path and the arguments once again
37252    if test "x$arguments" != xEOL; then
37253      new_complete="$new_path ${arguments% *}"
37254    else
37255      new_complete="$new_path"
37256    fi
37257
37258    if test "x$complete" != "x$new_complete"; then
37259      CXXCPP="$new_complete"
37260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37261$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37262    fi
37263  fi
37264
37265
37266  #
37267  # Setup the linker (LD)
37268  #
37269  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37270    # In the Microsoft toolchain we have a separate LD command "link".
37271    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37272    # a cygwin program for something completely different.
37273    # Extract the first word of "link", so it can be a program name with args.
37274set dummy link; ac_word=$2
37275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37276$as_echo_n "checking for $ac_word... " >&6; }
37277if ${ac_cv_prog_LD+:} false; then :
37278  $as_echo_n "(cached) " >&6
37279else
37280  if test -n "$LD"; then
37281  ac_cv_prog_LD="$LD" # Let the user override the test.
37282else
37283  ac_prog_rejected=no
37284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37285for as_dir in $PATH
37286do
37287  IFS=$as_save_IFS
37288  test -z "$as_dir" && as_dir=.
37289    for ac_exec_ext in '' $ac_executable_extensions; do
37290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37291    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37292       ac_prog_rejected=yes
37293       continue
37294     fi
37295    ac_cv_prog_LD="link"
37296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37297    break 2
37298  fi
37299done
37300  done
37301IFS=$as_save_IFS
37302
37303if test $ac_prog_rejected = yes; then
37304  # We found a bogon in the path, so make sure we never use it.
37305  set dummy $ac_cv_prog_LD
37306  shift
37307  if test $# != 0; then
37308    # We chose a different compiler from the bogus one.
37309    # However, it has the same basename, so the bogon will be chosen
37310    # first if we set LD to just the basename; use the full file name.
37311    shift
37312    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37313  fi
37314fi
37315fi
37316fi
37317LD=$ac_cv_prog_LD
37318if test -n "$LD"; then
37319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37320$as_echo "$LD" >&6; }
37321else
37322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37323$as_echo "no" >&6; }
37324fi
37325
37326
37327
37328  # Only process if variable expands to non-empty
37329
37330  if test "x$LD" != x; then
37331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37332
37333  # First separate the path from the arguments. This will split at the first
37334  # space.
37335  complete="$LD"
37336  path="${complete%% *}"
37337  tmp="$complete EOL"
37338  arguments="${tmp#* }"
37339
37340  # Input might be given as Windows format, start by converting to
37341  # unix format.
37342  new_path=`$CYGPATH -u "$path"`
37343
37344  # Now try to locate executable using which
37345  new_path=`$WHICH "$new_path" 2> /dev/null`
37346  # bat and cmd files are not always considered executable in cygwin causing which
37347  # to not find them
37348  if test "x$new_path" = x \
37349      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37350      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37351    new_path=`$CYGPATH -u "$path"`
37352  fi
37353  if test "x$new_path" = x; then
37354    # Oops. Which didn't find the executable.
37355    # The splitting of arguments from the executable at a space might have been incorrect,
37356    # since paths with space are more likely in Windows. Give it another try with the whole
37357    # argument.
37358    path="$complete"
37359    arguments="EOL"
37360    new_path=`$CYGPATH -u "$path"`
37361    new_path=`$WHICH "$new_path" 2> /dev/null`
37362    # bat and cmd files are not always considered executable in cygwin causing which
37363    # to not find them
37364    if test "x$new_path" = x \
37365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37367      new_path=`$CYGPATH -u "$path"`
37368    fi
37369    if test "x$new_path" = x; then
37370      # It's still not found. Now this is an unrecoverable error.
37371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37372$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37373      has_space=`$ECHO "$complete" | $GREP " "`
37374      if test "x$has_space" != x; then
37375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37377      fi
37378      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37379    fi
37380  fi
37381
37382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37385  # "foo.exe" is OK but "foo" is an error.
37386  #
37387  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37388  # It is also a way to make sure we got the proper file name for the real test later on.
37389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37390  if test "x$test_shortpath" = x; then
37391    # Short path failed, file does not exist as specified.
37392    # Try adding .exe or .cmd
37393    if test -f "${new_path}.exe"; then
37394      input_to_shortpath="${new_path}.exe"
37395    elif test -f "${new_path}.cmd"; then
37396      input_to_shortpath="${new_path}.cmd"
37397    else
37398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37399$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37400      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37401$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37402      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37403    fi
37404  else
37405    input_to_shortpath="$new_path"
37406  fi
37407
37408  # Call helper function which possibly converts this using DOS-style short mode.
37409  # If so, the updated path is stored in $new_path.
37410  new_path="$input_to_shortpath"
37411
37412  input_path="$input_to_shortpath"
37413  # Check if we need to convert this using DOS-style short mode. If the path
37414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37415  # take no chances and rewrite it.
37416  # Note: m4 eats our [], so we need to use [ and ] instead.
37417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37418  if test "x$has_forbidden_chars" != x; then
37419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37423      # Going to short mode and back again did indeed matter. Since short mode is
37424      # case insensitive, let's make it lowercase to improve readability.
37425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37426      # Now convert it back to Unix-style (cygpath)
37427      input_path=`$CYGPATH -u "$shortmode_path"`
37428      new_path="$input_path"
37429    fi
37430  fi
37431
37432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37433  if test "x$test_cygdrive_prefix" = x; then
37434    # As a simple fix, exclude /usr/bin since it's not a real path.
37435    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37437      # a path prefixed by /cygdrive for fixpath to work.
37438      new_path="$CYGWIN_ROOT_PATH$input_path"
37439    fi
37440  fi
37441
37442  # remove trailing .exe if any
37443  new_path="${new_path/%.exe/}"
37444
37445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37446
37447  # First separate the path from the arguments. This will split at the first
37448  # space.
37449  complete="$LD"
37450  path="${complete%% *}"
37451  tmp="$complete EOL"
37452  arguments="${tmp#* }"
37453
37454  # Input might be given as Windows format, start by converting to
37455  # unix format.
37456  new_path="$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
37468  # Now try to locate executable using which
37469  new_path=`$WHICH "$new_path" 2> /dev/null`
37470
37471  if test "x$new_path" = x; then
37472    # Oops. Which didn't find the executable.
37473    # The splitting of arguments from the executable at a space might have been incorrect,
37474    # since paths with space are more likely in Windows. Give it another try with the whole
37475    # argument.
37476    path="$complete"
37477    arguments="EOL"
37478    new_path="$path"
37479
37480  windows_path="$new_path"
37481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37482    unix_path=`$CYGPATH -u "$windows_path"`
37483    new_path="$unix_path"
37484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37486    new_path="$unix_path"
37487  fi
37488
37489
37490    new_path=`$WHICH "$new_path" 2> /dev/null`
37491    # bat and cmd files are not always considered executable in MSYS causing which
37492    # to not find them
37493    if test "x$new_path" = x \
37494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37496      new_path="$path"
37497
37498  windows_path="$new_path"
37499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37500    unix_path=`$CYGPATH -u "$windows_path"`
37501    new_path="$unix_path"
37502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37504    new_path="$unix_path"
37505  fi
37506
37507    fi
37508
37509    if test "x$new_path" = x; then
37510      # It's still not found. Now this is an unrecoverable error.
37511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37512$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37513      has_space=`$ECHO "$complete" | $GREP " "`
37514      if test "x$has_space" != x; then
37515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37517      fi
37518      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37519    fi
37520  fi
37521
37522  # Now new_path has a complete unix path to the binary
37523  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37524    # Keep paths in /bin as-is, but remove trailing .exe if any
37525    new_path="${new_path/%.exe/}"
37526    # Do not save /bin paths to all_fixpath_prefixes!
37527  else
37528    # Not in mixed or Windows style, start by that.
37529    new_path=`cmd //c echo $new_path`
37530
37531  input_path="$new_path"
37532  # Check if we need to convert this using DOS-style short mode. If the path
37533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37534  # take no chances and rewrite it.
37535  # Note: m4 eats our [], so we need to use [ and ] instead.
37536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37537  if test "x$has_forbidden_chars" != x; then
37538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37540  fi
37541
37542    # Output is in $new_path
37543
37544  windows_path="$new_path"
37545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37546    unix_path=`$CYGPATH -u "$windows_path"`
37547    new_path="$unix_path"
37548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37550    new_path="$unix_path"
37551  fi
37552
37553    # remove trailing .exe if any
37554    new_path="${new_path/%.exe/}"
37555
37556    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37557    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37558  fi
37559
37560    else
37561      # We're on a unix platform. Hooray! :)
37562      # First separate the path from the arguments. This will split at the first
37563      # space.
37564      complete="$LD"
37565      path="${complete%% *}"
37566      tmp="$complete EOL"
37567      arguments="${tmp#* }"
37568
37569      # Cannot rely on the command "which" here since it doesn't always work.
37570      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37571      if test -z "$is_absolute_path"; then
37572        # Path to executable is not absolute. Find it.
37573        IFS_save="$IFS"
37574        IFS=:
37575        for p in $PATH; do
37576          if test -f "$p/$path" && test -x "$p/$path"; then
37577            new_path="$p/$path"
37578            break
37579          fi
37580        done
37581        IFS="$IFS_save"
37582      else
37583        # This is an absolute path, we can use it without further modifications.
37584        new_path="$path"
37585      fi
37586
37587      if test "x$new_path" = x; then
37588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37589$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37590        has_space=`$ECHO "$complete" | $GREP " "`
37591        if test "x$has_space" != x; then
37592          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37593$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37594        fi
37595        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37596      fi
37597    fi
37598
37599    # Now join together the path and the arguments once again
37600    if test "x$arguments" != xEOL; then
37601      new_complete="$new_path ${arguments% *}"
37602    else
37603      new_complete="$new_path"
37604    fi
37605
37606    if test "x$complete" != "x$new_complete"; then
37607      LD="$new_complete"
37608      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37609$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37610    fi
37611  fi
37612
37613    # Verify that we indeed succeeded with this trick.
37614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37615$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37616    "$LD" --version > /dev/null
37617    if test $? -eq 0 ; then
37618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37619$as_echo "no" >&6; }
37620      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37621    else
37622      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37623$as_echo "yes" >&6; }
37624    fi
37625    LDCXX="$LD"
37626  else
37627    # All other toolchains use the compiler to link.
37628    LD="$CC"
37629    LDCXX="$CXX"
37630  fi
37631
37632  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37633
37634
37635  #
37636  # Setup the assembler (AS)
37637  #
37638  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37639
37640
37641  # Publish this variable in the help.
37642
37643
37644  if [ -z "${AS+x}" ]; then
37645    # The variable is not set by user, try to locate tool using the code snippet
37646    for ac_prog in as
37647do
37648  # Extract the first word of "$ac_prog", so it can be a program name with args.
37649set dummy $ac_prog; ac_word=$2
37650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37651$as_echo_n "checking for $ac_word... " >&6; }
37652if ${ac_cv_path_AS+:} false; then :
37653  $as_echo_n "(cached) " >&6
37654else
37655  case $AS in
37656  [\\/]* | ?:[\\/]*)
37657  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37658  ;;
37659  *)
37660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37661for as_dir in $PATH
37662do
37663  IFS=$as_save_IFS
37664  test -z "$as_dir" && as_dir=.
37665    for ac_exec_ext in '' $ac_executable_extensions; do
37666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37667    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37669    break 2
37670  fi
37671done
37672  done
37673IFS=$as_save_IFS
37674
37675  ;;
37676esac
37677fi
37678AS=$ac_cv_path_AS
37679if test -n "$AS"; then
37680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37681$as_echo "$AS" >&6; }
37682else
37683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37684$as_echo "no" >&6; }
37685fi
37686
37687
37688  test -n "$AS" && break
37689done
37690
37691  else
37692    # The variable is set, but is it from the command line or the environment?
37693
37694    # Try to remove the string !AS! from our list.
37695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37697      # If it failed, the variable was not from the command line. Ignore it,
37698      # but warn the user (except for BASH, which is always set by the calling BASH).
37699      if test "xAS" != xBASH; then
37700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37701$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37702      fi
37703      # Try to locate tool using the code snippet
37704      for ac_prog in as
37705do
37706  # Extract the first word of "$ac_prog", so it can be a program name with args.
37707set dummy $ac_prog; ac_word=$2
37708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37709$as_echo_n "checking for $ac_word... " >&6; }
37710if ${ac_cv_path_AS+:} false; then :
37711  $as_echo_n "(cached) " >&6
37712else
37713  case $AS in
37714  [\\/]* | ?:[\\/]*)
37715  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37716  ;;
37717  *)
37718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37719for as_dir in $PATH
37720do
37721  IFS=$as_save_IFS
37722  test -z "$as_dir" && as_dir=.
37723    for ac_exec_ext in '' $ac_executable_extensions; do
37724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37725    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37727    break 2
37728  fi
37729done
37730  done
37731IFS=$as_save_IFS
37732
37733  ;;
37734esac
37735fi
37736AS=$ac_cv_path_AS
37737if test -n "$AS"; then
37738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37739$as_echo "$AS" >&6; }
37740else
37741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37742$as_echo "no" >&6; }
37743fi
37744
37745
37746  test -n "$AS" && break
37747done
37748
37749    else
37750      # If it succeeded, then it was overridden by the user. We will use it
37751      # for the tool.
37752
37753      # First remove it from the list of overridden variables, so we can test
37754      # for unknown variables in the end.
37755      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37756
37757      # Check if we try to supply an empty value
37758      if test "x$AS" = x; then
37759        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37760$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37762$as_echo_n "checking for AS... " >&6; }
37763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37764$as_echo "disabled" >&6; }
37765      else
37766        # Check if the provided tool contains a complete path.
37767        tool_specified="$AS"
37768        tool_basename="${tool_specified##*/}"
37769        if test "x$tool_basename" = "x$tool_specified"; then
37770          # A command without a complete path is provided, search $PATH.
37771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37772$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37773          # Extract the first word of "$tool_basename", so it can be a program name with args.
37774set dummy $tool_basename; ac_word=$2
37775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37776$as_echo_n "checking for $ac_word... " >&6; }
37777if ${ac_cv_path_AS+:} false; then :
37778  $as_echo_n "(cached) " >&6
37779else
37780  case $AS in
37781  [\\/]* | ?:[\\/]*)
37782  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37783  ;;
37784  *)
37785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37786for as_dir in $PATH
37787do
37788  IFS=$as_save_IFS
37789  test -z "$as_dir" && as_dir=.
37790    for ac_exec_ext in '' $ac_executable_extensions; do
37791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37792    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37794    break 2
37795  fi
37796done
37797  done
37798IFS=$as_save_IFS
37799
37800  ;;
37801esac
37802fi
37803AS=$ac_cv_path_AS
37804if test -n "$AS"; then
37805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37806$as_echo "$AS" >&6; }
37807else
37808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37809$as_echo "no" >&6; }
37810fi
37811
37812
37813          if test "x$AS" = x; then
37814            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37815          fi
37816        else
37817          # Otherwise we believe it is a complete path. Use it as it is.
37818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37819$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37820          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37821$as_echo_n "checking for AS... " >&6; }
37822          if test ! -x "$tool_specified"; then
37823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37824$as_echo "not found" >&6; }
37825            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37826          fi
37827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37828$as_echo "$tool_specified" >&6; }
37829        fi
37830      fi
37831    fi
37832
37833  fi
37834
37835
37836
37837  # Only process if variable expands to non-empty
37838
37839  if test "x$AS" != x; then
37840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37841
37842  # First separate the path from the arguments. This will split at the first
37843  # space.
37844  complete="$AS"
37845  path="${complete%% *}"
37846  tmp="$complete EOL"
37847  arguments="${tmp#* }"
37848
37849  # Input might be given as Windows format, start by converting to
37850  # unix format.
37851  new_path=`$CYGPATH -u "$path"`
37852
37853  # Now try to locate executable using which
37854  new_path=`$WHICH "$new_path" 2> /dev/null`
37855  # bat and cmd files are not always considered executable in cygwin causing which
37856  # to not find them
37857  if test "x$new_path" = x \
37858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37860    new_path=`$CYGPATH -u "$path"`
37861  fi
37862  if test "x$new_path" = x; then
37863    # Oops. Which didn't find the executable.
37864    # The splitting of arguments from the executable at a space might have been incorrect,
37865    # since paths with space are more likely in Windows. Give it another try with the whole
37866    # argument.
37867    path="$complete"
37868    arguments="EOL"
37869    new_path=`$CYGPATH -u "$path"`
37870    new_path=`$WHICH "$new_path" 2> /dev/null`
37871    # bat and cmd files are not always considered executable in cygwin causing which
37872    # to not find them
37873    if test "x$new_path" = x \
37874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37876      new_path=`$CYGPATH -u "$path"`
37877    fi
37878    if test "x$new_path" = x; then
37879      # It's still not found. Now this is an unrecoverable error.
37880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37881$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37882      has_space=`$ECHO "$complete" | $GREP " "`
37883      if test "x$has_space" != x; then
37884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37886      fi
37887      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37888    fi
37889  fi
37890
37891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37894  # "foo.exe" is OK but "foo" is an error.
37895  #
37896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37897  # It is also a way to make sure we got the proper file name for the real test later on.
37898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37899  if test "x$test_shortpath" = x; then
37900    # Short path failed, file does not exist as specified.
37901    # Try adding .exe or .cmd
37902    if test -f "${new_path}.exe"; then
37903      input_to_shortpath="${new_path}.exe"
37904    elif test -f "${new_path}.cmd"; then
37905      input_to_shortpath="${new_path}.cmd"
37906    else
37907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37908$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37911      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37912    fi
37913  else
37914    input_to_shortpath="$new_path"
37915  fi
37916
37917  # Call helper function which possibly converts this using DOS-style short mode.
37918  # If so, the updated path is stored in $new_path.
37919  new_path="$input_to_shortpath"
37920
37921  input_path="$input_to_shortpath"
37922  # Check if we need to convert this using DOS-style short mode. If the path
37923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37924  # take no chances and rewrite it.
37925  # Note: m4 eats our [], so we need to use [ and ] instead.
37926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37927  if test "x$has_forbidden_chars" != x; then
37928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37932      # Going to short mode and back again did indeed matter. Since short mode is
37933      # case insensitive, let's make it lowercase to improve readability.
37934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37935      # Now convert it back to Unix-style (cygpath)
37936      input_path=`$CYGPATH -u "$shortmode_path"`
37937      new_path="$input_path"
37938    fi
37939  fi
37940
37941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37942  if test "x$test_cygdrive_prefix" = x; then
37943    # As a simple fix, exclude /usr/bin since it's not a real path.
37944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37946      # a path prefixed by /cygdrive for fixpath to work.
37947      new_path="$CYGWIN_ROOT_PATH$input_path"
37948    fi
37949  fi
37950
37951  # remove trailing .exe if any
37952  new_path="${new_path/%.exe/}"
37953
37954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37955
37956  # First separate the path from the arguments. This will split at the first
37957  # space.
37958  complete="$AS"
37959  path="${complete%% *}"
37960  tmp="$complete EOL"
37961  arguments="${tmp#* }"
37962
37963  # Input might be given as Windows format, start by converting to
37964  # unix format.
37965  new_path="$path"
37966
37967  windows_path="$new_path"
37968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37969    unix_path=`$CYGPATH -u "$windows_path"`
37970    new_path="$unix_path"
37971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37973    new_path="$unix_path"
37974  fi
37975
37976
37977  # Now try to locate executable using which
37978  new_path=`$WHICH "$new_path" 2> /dev/null`
37979
37980  if test "x$new_path" = x; then
37981    # Oops. Which didn't find the executable.
37982    # The splitting of arguments from the executable at a space might have been incorrect,
37983    # since paths with space are more likely in Windows. Give it another try with the whole
37984    # argument.
37985    path="$complete"
37986    arguments="EOL"
37987    new_path="$path"
37988
37989  windows_path="$new_path"
37990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37991    unix_path=`$CYGPATH -u "$windows_path"`
37992    new_path="$unix_path"
37993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37995    new_path="$unix_path"
37996  fi
37997
37998
37999    new_path=`$WHICH "$new_path" 2> /dev/null`
38000    # bat and cmd files are not always considered executable in MSYS causing which
38001    # to not find them
38002    if test "x$new_path" = x \
38003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38005      new_path="$path"
38006
38007  windows_path="$new_path"
38008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38009    unix_path=`$CYGPATH -u "$windows_path"`
38010    new_path="$unix_path"
38011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38013    new_path="$unix_path"
38014  fi
38015
38016    fi
38017
38018    if test "x$new_path" = x; then
38019      # It's still not found. Now this is an unrecoverable error.
38020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38021$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38022      has_space=`$ECHO "$complete" | $GREP " "`
38023      if test "x$has_space" != x; then
38024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38026      fi
38027      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38028    fi
38029  fi
38030
38031  # Now new_path has a complete unix path to the binary
38032  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38033    # Keep paths in /bin as-is, but remove trailing .exe if any
38034    new_path="${new_path/%.exe/}"
38035    # Do not save /bin paths to all_fixpath_prefixes!
38036  else
38037    # Not in mixed or Windows style, start by that.
38038    new_path=`cmd //c echo $new_path`
38039
38040  input_path="$new_path"
38041  # Check if we need to convert this using DOS-style short mode. If the path
38042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38043  # take no chances and rewrite it.
38044  # Note: m4 eats our [], so we need to use [ and ] instead.
38045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38046  if test "x$has_forbidden_chars" != x; then
38047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38049  fi
38050
38051    # Output is in $new_path
38052
38053  windows_path="$new_path"
38054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38055    unix_path=`$CYGPATH -u "$windows_path"`
38056    new_path="$unix_path"
38057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38059    new_path="$unix_path"
38060  fi
38061
38062    # remove trailing .exe if any
38063    new_path="${new_path/%.exe/}"
38064
38065    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38066    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38067  fi
38068
38069    else
38070      # We're on a unix platform. Hooray! :)
38071      # First separate the path from the arguments. This will split at the first
38072      # space.
38073      complete="$AS"
38074      path="${complete%% *}"
38075      tmp="$complete EOL"
38076      arguments="${tmp#* }"
38077
38078      # Cannot rely on the command "which" here since it doesn't always work.
38079      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38080      if test -z "$is_absolute_path"; then
38081        # Path to executable is not absolute. Find it.
38082        IFS_save="$IFS"
38083        IFS=:
38084        for p in $PATH; do
38085          if test -f "$p/$path" && test -x "$p/$path"; then
38086            new_path="$p/$path"
38087            break
38088          fi
38089        done
38090        IFS="$IFS_save"
38091      else
38092        # This is an absolute path, we can use it without further modifications.
38093        new_path="$path"
38094      fi
38095
38096      if test "x$new_path" = x; then
38097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38098$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38099        has_space=`$ECHO "$complete" | $GREP " "`
38100        if test "x$has_space" != x; then
38101          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38103        fi
38104        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38105      fi
38106    fi
38107
38108    # Now join together the path and the arguments once again
38109    if test "x$arguments" != xEOL; then
38110      new_complete="$new_path ${arguments% *}"
38111    else
38112      new_complete="$new_path"
38113    fi
38114
38115    if test "x$complete" != "x$new_complete"; then
38116      AS="$new_complete"
38117      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38118$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38119    fi
38120  fi
38121
38122    if test "x$AS" = x; then
38123      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38124    fi
38125  else
38126    # FIXME: is this correct for microsoft?
38127    AS="$CC -c"
38128  fi
38129
38130
38131  #
38132  # Setup the archiver (AR)
38133  #
38134  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38135    # The corresponding ar tool is lib.exe (used to create static libraries)
38136    # Extract the first word of "lib", so it can be a program name with args.
38137set dummy lib; ac_word=$2
38138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38139$as_echo_n "checking for $ac_word... " >&6; }
38140if ${ac_cv_prog_AR+:} false; then :
38141  $as_echo_n "(cached) " >&6
38142else
38143  if test -n "$AR"; then
38144  ac_cv_prog_AR="$AR" # Let the user override the test.
38145else
38146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38147for as_dir in $PATH
38148do
38149  IFS=$as_save_IFS
38150  test -z "$as_dir" && as_dir=.
38151    for ac_exec_ext in '' $ac_executable_extensions; do
38152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38153    ac_cv_prog_AR="lib"
38154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38155    break 2
38156  fi
38157done
38158  done
38159IFS=$as_save_IFS
38160
38161fi
38162fi
38163AR=$ac_cv_prog_AR
38164if test -n "$AR"; then
38165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38166$as_echo "$AR" >&6; }
38167else
38168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38169$as_echo "no" >&6; }
38170fi
38171
38172
38173  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38174
38175
38176  # Publish this variable in the help.
38177
38178
38179  if [ -z "${AR+x}" ]; then
38180    # The variable is not set by user, try to locate tool using the code snippet
38181    if test -n "$ac_tool_prefix"; then
38182  for ac_prog in ar gcc-ar
38183  do
38184    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38185set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38187$as_echo_n "checking for $ac_word... " >&6; }
38188if ${ac_cv_prog_AR+:} false; then :
38189  $as_echo_n "(cached) " >&6
38190else
38191  if test -n "$AR"; then
38192  ac_cv_prog_AR="$AR" # Let the user override the test.
38193else
38194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38195for as_dir in $PATH
38196do
38197  IFS=$as_save_IFS
38198  test -z "$as_dir" && as_dir=.
38199    for ac_exec_ext in '' $ac_executable_extensions; do
38200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38201    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38203    break 2
38204  fi
38205done
38206  done
38207IFS=$as_save_IFS
38208
38209fi
38210fi
38211AR=$ac_cv_prog_AR
38212if test -n "$AR"; then
38213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38214$as_echo "$AR" >&6; }
38215else
38216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38217$as_echo "no" >&6; }
38218fi
38219
38220
38221    test -n "$AR" && break
38222  done
38223fi
38224if test -z "$AR"; then
38225  ac_ct_AR=$AR
38226  for ac_prog in ar gcc-ar
38227do
38228  # Extract the first word of "$ac_prog", so it can be a program name with args.
38229set dummy $ac_prog; ac_word=$2
38230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38231$as_echo_n "checking for $ac_word... " >&6; }
38232if ${ac_cv_prog_ac_ct_AR+:} false; then :
38233  $as_echo_n "(cached) " >&6
38234else
38235  if test -n "$ac_ct_AR"; then
38236  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38237else
38238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38239for as_dir in $PATH
38240do
38241  IFS=$as_save_IFS
38242  test -z "$as_dir" && as_dir=.
38243    for ac_exec_ext in '' $ac_executable_extensions; do
38244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38245    ac_cv_prog_ac_ct_AR="$ac_prog"
38246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38247    break 2
38248  fi
38249done
38250  done
38251IFS=$as_save_IFS
38252
38253fi
38254fi
38255ac_ct_AR=$ac_cv_prog_ac_ct_AR
38256if test -n "$ac_ct_AR"; then
38257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38258$as_echo "$ac_ct_AR" >&6; }
38259else
38260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38261$as_echo "no" >&6; }
38262fi
38263
38264
38265  test -n "$ac_ct_AR" && break
38266done
38267
38268  if test "x$ac_ct_AR" = x; then
38269    AR=""
38270  else
38271    case $cross_compiling:$ac_tool_warned in
38272yes:)
38273{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38274$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38275ac_tool_warned=yes ;;
38276esac
38277    AR=$ac_ct_AR
38278  fi
38279fi
38280
38281  else
38282    # The variable is set, but is it from the command line or the environment?
38283
38284    # Try to remove the string !AR! from our list.
38285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38287      # If it failed, the variable was not from the command line. Ignore it,
38288      # but warn the user (except for BASH, which is always set by the calling BASH).
38289      if test "xAR" != xBASH; then
38290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38291$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38292      fi
38293      # Try to locate tool using the code snippet
38294      if test -n "$ac_tool_prefix"; then
38295  for ac_prog in ar gcc-ar
38296  do
38297    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38298set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38300$as_echo_n "checking for $ac_word... " >&6; }
38301if ${ac_cv_prog_AR+:} false; then :
38302  $as_echo_n "(cached) " >&6
38303else
38304  if test -n "$AR"; then
38305  ac_cv_prog_AR="$AR" # Let the user override the test.
38306else
38307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38308for as_dir in $PATH
38309do
38310  IFS=$as_save_IFS
38311  test -z "$as_dir" && as_dir=.
38312    for ac_exec_ext in '' $ac_executable_extensions; do
38313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38314    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38316    break 2
38317  fi
38318done
38319  done
38320IFS=$as_save_IFS
38321
38322fi
38323fi
38324AR=$ac_cv_prog_AR
38325if test -n "$AR"; then
38326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38327$as_echo "$AR" >&6; }
38328else
38329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38330$as_echo "no" >&6; }
38331fi
38332
38333
38334    test -n "$AR" && break
38335  done
38336fi
38337if test -z "$AR"; then
38338  ac_ct_AR=$AR
38339  for ac_prog in ar gcc-ar
38340do
38341  # Extract the first word of "$ac_prog", so it can be a program name with args.
38342set dummy $ac_prog; ac_word=$2
38343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38344$as_echo_n "checking for $ac_word... " >&6; }
38345if ${ac_cv_prog_ac_ct_AR+:} false; then :
38346  $as_echo_n "(cached) " >&6
38347else
38348  if test -n "$ac_ct_AR"; then
38349  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38350else
38351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38352for as_dir in $PATH
38353do
38354  IFS=$as_save_IFS
38355  test -z "$as_dir" && as_dir=.
38356    for ac_exec_ext in '' $ac_executable_extensions; do
38357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38358    ac_cv_prog_ac_ct_AR="$ac_prog"
38359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38360    break 2
38361  fi
38362done
38363  done
38364IFS=$as_save_IFS
38365
38366fi
38367fi
38368ac_ct_AR=$ac_cv_prog_ac_ct_AR
38369if test -n "$ac_ct_AR"; then
38370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38371$as_echo "$ac_ct_AR" >&6; }
38372else
38373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38374$as_echo "no" >&6; }
38375fi
38376
38377
38378  test -n "$ac_ct_AR" && break
38379done
38380
38381  if test "x$ac_ct_AR" = x; then
38382    AR=""
38383  else
38384    case $cross_compiling:$ac_tool_warned in
38385yes:)
38386{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38387$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38388ac_tool_warned=yes ;;
38389esac
38390    AR=$ac_ct_AR
38391  fi
38392fi
38393
38394    else
38395      # If it succeeded, then it was overridden by the user. We will use it
38396      # for the tool.
38397
38398      # First remove it from the list of overridden variables, so we can test
38399      # for unknown variables in the end.
38400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38401
38402      # Check if we try to supply an empty value
38403      if test "x$AR" = x; then
38404        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38405$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38407$as_echo_n "checking for AR... " >&6; }
38408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38409$as_echo "disabled" >&6; }
38410      else
38411        # Check if the provided tool contains a complete path.
38412        tool_specified="$AR"
38413        tool_basename="${tool_specified##*/}"
38414        if test "x$tool_basename" = "x$tool_specified"; then
38415          # A command without a complete path is provided, search $PATH.
38416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38417$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38418          # Extract the first word of "$tool_basename", so it can be a program name with args.
38419set dummy $tool_basename; ac_word=$2
38420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38421$as_echo_n "checking for $ac_word... " >&6; }
38422if ${ac_cv_path_AR+:} false; then :
38423  $as_echo_n "(cached) " >&6
38424else
38425  case $AR in
38426  [\\/]* | ?:[\\/]*)
38427  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38428  ;;
38429  *)
38430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38431for as_dir in $PATH
38432do
38433  IFS=$as_save_IFS
38434  test -z "$as_dir" && as_dir=.
38435    for ac_exec_ext in '' $ac_executable_extensions; do
38436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38437    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38439    break 2
38440  fi
38441done
38442  done
38443IFS=$as_save_IFS
38444
38445  ;;
38446esac
38447fi
38448AR=$ac_cv_path_AR
38449if test -n "$AR"; then
38450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38451$as_echo "$AR" >&6; }
38452else
38453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38454$as_echo "no" >&6; }
38455fi
38456
38457
38458          if test "x$AR" = x; then
38459            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38460          fi
38461        else
38462          # Otherwise we believe it is a complete path. Use it as it is.
38463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38464$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38465          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38466$as_echo_n "checking for AR... " >&6; }
38467          if test ! -x "$tool_specified"; then
38468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38469$as_echo "not found" >&6; }
38470            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38471          fi
38472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38473$as_echo "$tool_specified" >&6; }
38474        fi
38475      fi
38476    fi
38477
38478  fi
38479
38480
38481  else
38482
38483
38484  # Publish this variable in the help.
38485
38486
38487  if [ -z "${AR+x}" ]; then
38488    # The variable is not set by user, try to locate tool using the code snippet
38489    if test -n "$ac_tool_prefix"; then
38490  for ac_prog in ar
38491  do
38492    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38493set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38495$as_echo_n "checking for $ac_word... " >&6; }
38496if ${ac_cv_prog_AR+:} false; then :
38497  $as_echo_n "(cached) " >&6
38498else
38499  if test -n "$AR"; then
38500  ac_cv_prog_AR="$AR" # Let the user override the test.
38501else
38502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38503for as_dir in $PATH
38504do
38505  IFS=$as_save_IFS
38506  test -z "$as_dir" && as_dir=.
38507    for ac_exec_ext in '' $ac_executable_extensions; do
38508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38509    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38511    break 2
38512  fi
38513done
38514  done
38515IFS=$as_save_IFS
38516
38517fi
38518fi
38519AR=$ac_cv_prog_AR
38520if test -n "$AR"; then
38521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38522$as_echo "$AR" >&6; }
38523else
38524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38525$as_echo "no" >&6; }
38526fi
38527
38528
38529    test -n "$AR" && break
38530  done
38531fi
38532if test -z "$AR"; then
38533  ac_ct_AR=$AR
38534  for ac_prog in ar
38535do
38536  # Extract the first word of "$ac_prog", so it can be a program name with args.
38537set dummy $ac_prog; ac_word=$2
38538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38539$as_echo_n "checking for $ac_word... " >&6; }
38540if ${ac_cv_prog_ac_ct_AR+:} false; then :
38541  $as_echo_n "(cached) " >&6
38542else
38543  if test -n "$ac_ct_AR"; then
38544  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38545else
38546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38547for as_dir in $PATH
38548do
38549  IFS=$as_save_IFS
38550  test -z "$as_dir" && as_dir=.
38551    for ac_exec_ext in '' $ac_executable_extensions; do
38552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38553    ac_cv_prog_ac_ct_AR="$ac_prog"
38554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38555    break 2
38556  fi
38557done
38558  done
38559IFS=$as_save_IFS
38560
38561fi
38562fi
38563ac_ct_AR=$ac_cv_prog_ac_ct_AR
38564if test -n "$ac_ct_AR"; then
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38566$as_echo "$ac_ct_AR" >&6; }
38567else
38568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38569$as_echo "no" >&6; }
38570fi
38571
38572
38573  test -n "$ac_ct_AR" && break
38574done
38575
38576  if test "x$ac_ct_AR" = x; then
38577    AR=""
38578  else
38579    case $cross_compiling:$ac_tool_warned in
38580yes:)
38581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38583ac_tool_warned=yes ;;
38584esac
38585    AR=$ac_ct_AR
38586  fi
38587fi
38588
38589  else
38590    # The variable is set, but is it from the command line or the environment?
38591
38592    # Try to remove the string !AR! from our list.
38593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38595      # If it failed, the variable was not from the command line. Ignore it,
38596      # but warn the user (except for BASH, which is always set by the calling BASH).
38597      if test "xAR" != xBASH; then
38598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38599$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38600      fi
38601      # Try to locate tool using the code snippet
38602      if test -n "$ac_tool_prefix"; then
38603  for ac_prog in ar
38604  do
38605    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38606set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38608$as_echo_n "checking for $ac_word... " >&6; }
38609if ${ac_cv_prog_AR+:} false; then :
38610  $as_echo_n "(cached) " >&6
38611else
38612  if test -n "$AR"; then
38613  ac_cv_prog_AR="$AR" # Let the user override the test.
38614else
38615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38616for as_dir in $PATH
38617do
38618  IFS=$as_save_IFS
38619  test -z "$as_dir" && as_dir=.
38620    for ac_exec_ext in '' $ac_executable_extensions; do
38621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38622    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38624    break 2
38625  fi
38626done
38627  done
38628IFS=$as_save_IFS
38629
38630fi
38631fi
38632AR=$ac_cv_prog_AR
38633if test -n "$AR"; then
38634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38635$as_echo "$AR" >&6; }
38636else
38637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38638$as_echo "no" >&6; }
38639fi
38640
38641
38642    test -n "$AR" && break
38643  done
38644fi
38645if test -z "$AR"; then
38646  ac_ct_AR=$AR
38647  for ac_prog in ar
38648do
38649  # Extract the first word of "$ac_prog", so it can be a program name with args.
38650set dummy $ac_prog; ac_word=$2
38651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38652$as_echo_n "checking for $ac_word... " >&6; }
38653if ${ac_cv_prog_ac_ct_AR+:} false; then :
38654  $as_echo_n "(cached) " >&6
38655else
38656  if test -n "$ac_ct_AR"; then
38657  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38658else
38659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38660for as_dir in $PATH
38661do
38662  IFS=$as_save_IFS
38663  test -z "$as_dir" && as_dir=.
38664    for ac_exec_ext in '' $ac_executable_extensions; do
38665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38666    ac_cv_prog_ac_ct_AR="$ac_prog"
38667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38668    break 2
38669  fi
38670done
38671  done
38672IFS=$as_save_IFS
38673
38674fi
38675fi
38676ac_ct_AR=$ac_cv_prog_ac_ct_AR
38677if test -n "$ac_ct_AR"; then
38678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38679$as_echo "$ac_ct_AR" >&6; }
38680else
38681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38682$as_echo "no" >&6; }
38683fi
38684
38685
38686  test -n "$ac_ct_AR" && break
38687done
38688
38689  if test "x$ac_ct_AR" = x; then
38690    AR=""
38691  else
38692    case $cross_compiling:$ac_tool_warned in
38693yes:)
38694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38696ac_tool_warned=yes ;;
38697esac
38698    AR=$ac_ct_AR
38699  fi
38700fi
38701
38702    else
38703      # If it succeeded, then it was overridden by the user. We will use it
38704      # for the tool.
38705
38706      # First remove it from the list of overridden variables, so we can test
38707      # for unknown variables in the end.
38708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38709
38710      # Check if we try to supply an empty value
38711      if test "x$AR" = x; then
38712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38713$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38715$as_echo_n "checking for AR... " >&6; }
38716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38717$as_echo "disabled" >&6; }
38718      else
38719        # Check if the provided tool contains a complete path.
38720        tool_specified="$AR"
38721        tool_basename="${tool_specified##*/}"
38722        if test "x$tool_basename" = "x$tool_specified"; then
38723          # A command without a complete path is provided, search $PATH.
38724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38725$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38726          # Extract the first word of "$tool_basename", so it can be a program name with args.
38727set dummy $tool_basename; ac_word=$2
38728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38729$as_echo_n "checking for $ac_word... " >&6; }
38730if ${ac_cv_path_AR+:} false; then :
38731  $as_echo_n "(cached) " >&6
38732else
38733  case $AR in
38734  [\\/]* | ?:[\\/]*)
38735  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38736  ;;
38737  *)
38738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38739for as_dir in $PATH
38740do
38741  IFS=$as_save_IFS
38742  test -z "$as_dir" && as_dir=.
38743    for ac_exec_ext in '' $ac_executable_extensions; do
38744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38745    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38747    break 2
38748  fi
38749done
38750  done
38751IFS=$as_save_IFS
38752
38753  ;;
38754esac
38755fi
38756AR=$ac_cv_path_AR
38757if test -n "$AR"; then
38758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38759$as_echo "$AR" >&6; }
38760else
38761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38762$as_echo "no" >&6; }
38763fi
38764
38765
38766          if test "x$AR" = x; then
38767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38768          fi
38769        else
38770          # Otherwise we believe it is a complete path. Use it as it is.
38771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38772$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38774$as_echo_n "checking for AR... " >&6; }
38775          if test ! -x "$tool_specified"; then
38776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38777$as_echo "not found" >&6; }
38778            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38779          fi
38780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38781$as_echo "$tool_specified" >&6; }
38782        fi
38783      fi
38784    fi
38785
38786  fi
38787
38788
38789  fi
38790
38791  # Only process if variable expands to non-empty
38792
38793  if test "x$AR" != x; then
38794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38795
38796  # First separate the path from the arguments. This will split at the first
38797  # space.
38798  complete="$AR"
38799  path="${complete%% *}"
38800  tmp="$complete EOL"
38801  arguments="${tmp#* }"
38802
38803  # Input might be given as Windows format, start by converting to
38804  # unix format.
38805  new_path=`$CYGPATH -u "$path"`
38806
38807  # Now try to locate executable using which
38808  new_path=`$WHICH "$new_path" 2> /dev/null`
38809  # bat and cmd files are not always considered executable in cygwin causing which
38810  # to not find them
38811  if test "x$new_path" = x \
38812      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38813      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38814    new_path=`$CYGPATH -u "$path"`
38815  fi
38816  if test "x$new_path" = x; then
38817    # Oops. Which didn't find the executable.
38818    # The splitting of arguments from the executable at a space might have been incorrect,
38819    # since paths with space are more likely in Windows. Give it another try with the whole
38820    # argument.
38821    path="$complete"
38822    arguments="EOL"
38823    new_path=`$CYGPATH -u "$path"`
38824    new_path=`$WHICH "$new_path" 2> /dev/null`
38825    # bat and cmd files are not always considered executable in cygwin causing which
38826    # to not find them
38827    if test "x$new_path" = x \
38828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38830      new_path=`$CYGPATH -u "$path"`
38831    fi
38832    if test "x$new_path" = x; then
38833      # It's still not found. Now this is an unrecoverable error.
38834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38835$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38836      has_space=`$ECHO "$complete" | $GREP " "`
38837      if test "x$has_space" != x; then
38838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38840      fi
38841      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38842    fi
38843  fi
38844
38845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38848  # "foo.exe" is OK but "foo" is an error.
38849  #
38850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38851  # It is also a way to make sure we got the proper file name for the real test later on.
38852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38853  if test "x$test_shortpath" = x; then
38854    # Short path failed, file does not exist as specified.
38855    # Try adding .exe or .cmd
38856    if test -f "${new_path}.exe"; then
38857      input_to_shortpath="${new_path}.exe"
38858    elif test -f "${new_path}.cmd"; then
38859      input_to_shortpath="${new_path}.cmd"
38860    else
38861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38862$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38865      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38866    fi
38867  else
38868    input_to_shortpath="$new_path"
38869  fi
38870
38871  # Call helper function which possibly converts this using DOS-style short mode.
38872  # If so, the updated path is stored in $new_path.
38873  new_path="$input_to_shortpath"
38874
38875  input_path="$input_to_shortpath"
38876  # Check if we need to convert this using DOS-style short mode. If the path
38877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38878  # take no chances and rewrite it.
38879  # Note: m4 eats our [], so we need to use [ and ] instead.
38880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38881  if test "x$has_forbidden_chars" != x; then
38882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38886      # Going to short mode and back again did indeed matter. Since short mode is
38887      # case insensitive, let's make it lowercase to improve readability.
38888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38889      # Now convert it back to Unix-style (cygpath)
38890      input_path=`$CYGPATH -u "$shortmode_path"`
38891      new_path="$input_path"
38892    fi
38893  fi
38894
38895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38896  if test "x$test_cygdrive_prefix" = x; then
38897    # As a simple fix, exclude /usr/bin since it's not a real path.
38898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38900      # a path prefixed by /cygdrive for fixpath to work.
38901      new_path="$CYGWIN_ROOT_PATH$input_path"
38902    fi
38903  fi
38904
38905  # remove trailing .exe if any
38906  new_path="${new_path/%.exe/}"
38907
38908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38909
38910  # First separate the path from the arguments. This will split at the first
38911  # space.
38912  complete="$AR"
38913  path="${complete%% *}"
38914  tmp="$complete EOL"
38915  arguments="${tmp#* }"
38916
38917  # Input might be given as Windows format, start by converting to
38918  # unix format.
38919  new_path="$path"
38920
38921  windows_path="$new_path"
38922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38923    unix_path=`$CYGPATH -u "$windows_path"`
38924    new_path="$unix_path"
38925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38927    new_path="$unix_path"
38928  fi
38929
38930
38931  # Now try to locate executable using which
38932  new_path=`$WHICH "$new_path" 2> /dev/null`
38933
38934  if test "x$new_path" = x; then
38935    # Oops. Which didn't find the executable.
38936    # The splitting of arguments from the executable at a space might have been incorrect,
38937    # since paths with space are more likely in Windows. Give it another try with the whole
38938    # argument.
38939    path="$complete"
38940    arguments="EOL"
38941    new_path="$path"
38942
38943  windows_path="$new_path"
38944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38945    unix_path=`$CYGPATH -u "$windows_path"`
38946    new_path="$unix_path"
38947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38949    new_path="$unix_path"
38950  fi
38951
38952
38953    new_path=`$WHICH "$new_path" 2> /dev/null`
38954    # bat and cmd files are not always considered executable in MSYS causing which
38955    # to not find them
38956    if test "x$new_path" = x \
38957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38959      new_path="$path"
38960
38961  windows_path="$new_path"
38962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38963    unix_path=`$CYGPATH -u "$windows_path"`
38964    new_path="$unix_path"
38965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38967    new_path="$unix_path"
38968  fi
38969
38970    fi
38971
38972    if test "x$new_path" = x; then
38973      # It's still not found. Now this is an unrecoverable error.
38974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38975$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38976      has_space=`$ECHO "$complete" | $GREP " "`
38977      if test "x$has_space" != x; then
38978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38980      fi
38981      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38982    fi
38983  fi
38984
38985  # Now new_path has a complete unix path to the binary
38986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38987    # Keep paths in /bin as-is, but remove trailing .exe if any
38988    new_path="${new_path/%.exe/}"
38989    # Do not save /bin paths to all_fixpath_prefixes!
38990  else
38991    # Not in mixed or Windows style, start by that.
38992    new_path=`cmd //c echo $new_path`
38993
38994  input_path="$new_path"
38995  # Check if we need to convert this using DOS-style short mode. If the path
38996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38997  # take no chances and rewrite it.
38998  # Note: m4 eats our [], so we need to use [ and ] instead.
38999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39000  if test "x$has_forbidden_chars" != x; then
39001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39003  fi
39004
39005    # Output is in $new_path
39006
39007  windows_path="$new_path"
39008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39009    unix_path=`$CYGPATH -u "$windows_path"`
39010    new_path="$unix_path"
39011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39013    new_path="$unix_path"
39014  fi
39015
39016    # remove trailing .exe if any
39017    new_path="${new_path/%.exe/}"
39018
39019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39021  fi
39022
39023    else
39024      # We're on a unix platform. Hooray! :)
39025      # First separate the path from the arguments. This will split at the first
39026      # space.
39027      complete="$AR"
39028      path="${complete%% *}"
39029      tmp="$complete EOL"
39030      arguments="${tmp#* }"
39031
39032      # Cannot rely on the command "which" here since it doesn't always work.
39033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39034      if test -z "$is_absolute_path"; then
39035        # Path to executable is not absolute. Find it.
39036        IFS_save="$IFS"
39037        IFS=:
39038        for p in $PATH; do
39039          if test -f "$p/$path" && test -x "$p/$path"; then
39040            new_path="$p/$path"
39041            break
39042          fi
39043        done
39044        IFS="$IFS_save"
39045      else
39046        # This is an absolute path, we can use it without further modifications.
39047        new_path="$path"
39048      fi
39049
39050      if test "x$new_path" = x; then
39051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
39052$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
39053        has_space=`$ECHO "$complete" | $GREP " "`
39054        if test "x$has_space" != x; then
39055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39057        fi
39058        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39059      fi
39060    fi
39061
39062    # Now join together the path and the arguments once again
39063    if test "x$arguments" != xEOL; then
39064      new_complete="$new_path ${arguments% *}"
39065    else
39066      new_complete="$new_path"
39067    fi
39068
39069    if test "x$complete" != "x$new_complete"; then
39070      AR="$new_complete"
39071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39072$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39073    fi
39074  fi
39075
39076
39077
39078  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39079
39080
39081  # Publish this variable in the help.
39082
39083
39084  if [ -z "${LIPO+x}" ]; then
39085    # The variable is not set by user, try to locate tool using the code snippet
39086    for ac_prog in lipo
39087do
39088  # Extract the first word of "$ac_prog", so it can be a program name with args.
39089set dummy $ac_prog; ac_word=$2
39090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39091$as_echo_n "checking for $ac_word... " >&6; }
39092if ${ac_cv_path_LIPO+:} false; then :
39093  $as_echo_n "(cached) " >&6
39094else
39095  case $LIPO in
39096  [\\/]* | ?:[\\/]*)
39097  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39098  ;;
39099  *)
39100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39101for as_dir in $PATH
39102do
39103  IFS=$as_save_IFS
39104  test -z "$as_dir" && as_dir=.
39105    for ac_exec_ext in '' $ac_executable_extensions; do
39106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39107    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39109    break 2
39110  fi
39111done
39112  done
39113IFS=$as_save_IFS
39114
39115  ;;
39116esac
39117fi
39118LIPO=$ac_cv_path_LIPO
39119if test -n "$LIPO"; then
39120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39121$as_echo "$LIPO" >&6; }
39122else
39123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39124$as_echo "no" >&6; }
39125fi
39126
39127
39128  test -n "$LIPO" && break
39129done
39130
39131  else
39132    # The variable is set, but is it from the command line or the environment?
39133
39134    # Try to remove the string !LIPO! from our list.
39135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39137      # If it failed, the variable was not from the command line. Ignore it,
39138      # but warn the user (except for BASH, which is always set by the calling BASH).
39139      if test "xLIPO" != xBASH; then
39140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39141$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39142      fi
39143      # Try to locate tool using the code snippet
39144      for ac_prog in lipo
39145do
39146  # Extract the first word of "$ac_prog", so it can be a program name with args.
39147set dummy $ac_prog; ac_word=$2
39148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39149$as_echo_n "checking for $ac_word... " >&6; }
39150if ${ac_cv_path_LIPO+:} false; then :
39151  $as_echo_n "(cached) " >&6
39152else
39153  case $LIPO in
39154  [\\/]* | ?:[\\/]*)
39155  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39156  ;;
39157  *)
39158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39159for as_dir in $PATH
39160do
39161  IFS=$as_save_IFS
39162  test -z "$as_dir" && as_dir=.
39163    for ac_exec_ext in '' $ac_executable_extensions; do
39164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39165    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39167    break 2
39168  fi
39169done
39170  done
39171IFS=$as_save_IFS
39172
39173  ;;
39174esac
39175fi
39176LIPO=$ac_cv_path_LIPO
39177if test -n "$LIPO"; then
39178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39179$as_echo "$LIPO" >&6; }
39180else
39181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39182$as_echo "no" >&6; }
39183fi
39184
39185
39186  test -n "$LIPO" && break
39187done
39188
39189    else
39190      # If it succeeded, then it was overridden by the user. We will use it
39191      # for the tool.
39192
39193      # First remove it from the list of overridden variables, so we can test
39194      # for unknown variables in the end.
39195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39196
39197      # Check if we try to supply an empty value
39198      if test "x$LIPO" = x; then
39199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39200$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39202$as_echo_n "checking for LIPO... " >&6; }
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39204$as_echo "disabled" >&6; }
39205      else
39206        # Check if the provided tool contains a complete path.
39207        tool_specified="$LIPO"
39208        tool_basename="${tool_specified##*/}"
39209        if test "x$tool_basename" = "x$tool_specified"; then
39210          # A command without a complete path is provided, search $PATH.
39211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39212$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39213          # Extract the first word of "$tool_basename", so it can be a program name with args.
39214set dummy $tool_basename; ac_word=$2
39215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39216$as_echo_n "checking for $ac_word... " >&6; }
39217if ${ac_cv_path_LIPO+:} false; then :
39218  $as_echo_n "(cached) " >&6
39219else
39220  case $LIPO in
39221  [\\/]* | ?:[\\/]*)
39222  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39223  ;;
39224  *)
39225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39226for as_dir in $PATH
39227do
39228  IFS=$as_save_IFS
39229  test -z "$as_dir" && as_dir=.
39230    for ac_exec_ext in '' $ac_executable_extensions; do
39231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39232    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39234    break 2
39235  fi
39236done
39237  done
39238IFS=$as_save_IFS
39239
39240  ;;
39241esac
39242fi
39243LIPO=$ac_cv_path_LIPO
39244if test -n "$LIPO"; then
39245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39246$as_echo "$LIPO" >&6; }
39247else
39248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39249$as_echo "no" >&6; }
39250fi
39251
39252
39253          if test "x$LIPO" = x; then
39254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39255          fi
39256        else
39257          # Otherwise we believe it is a complete path. Use it as it is.
39258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39259$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39261$as_echo_n "checking for LIPO... " >&6; }
39262          if test ! -x "$tool_specified"; then
39263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39264$as_echo "not found" >&6; }
39265            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39266          fi
39267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39268$as_echo "$tool_specified" >&6; }
39269        fi
39270      fi
39271    fi
39272
39273  fi
39274
39275
39276
39277  # Only process if variable expands to non-empty
39278
39279  if test "x$LIPO" != x; then
39280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39281
39282  # First separate the path from the arguments. This will split at the first
39283  # space.
39284  complete="$LIPO"
39285  path="${complete%% *}"
39286  tmp="$complete EOL"
39287  arguments="${tmp#* }"
39288
39289  # Input might be given as Windows format, start by converting to
39290  # unix format.
39291  new_path=`$CYGPATH -u "$path"`
39292
39293  # Now try to locate executable using which
39294  new_path=`$WHICH "$new_path" 2> /dev/null`
39295  # bat and cmd files are not always considered executable in cygwin causing which
39296  # to not find them
39297  if test "x$new_path" = x \
39298      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39299      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39300    new_path=`$CYGPATH -u "$path"`
39301  fi
39302  if test "x$new_path" = x; then
39303    # Oops. Which didn't find the executable.
39304    # The splitting of arguments from the executable at a space might have been incorrect,
39305    # since paths with space are more likely in Windows. Give it another try with the whole
39306    # argument.
39307    path="$complete"
39308    arguments="EOL"
39309    new_path=`$CYGPATH -u "$path"`
39310    new_path=`$WHICH "$new_path" 2> /dev/null`
39311    # bat and cmd files are not always considered executable in cygwin causing which
39312    # to not find them
39313    if test "x$new_path" = x \
39314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39316      new_path=`$CYGPATH -u "$path"`
39317    fi
39318    if test "x$new_path" = x; then
39319      # It's still not found. Now this is an unrecoverable error.
39320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39321$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39322      has_space=`$ECHO "$complete" | $GREP " "`
39323      if test "x$has_space" != x; then
39324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39326      fi
39327      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39328    fi
39329  fi
39330
39331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39334  # "foo.exe" is OK but "foo" is an error.
39335  #
39336  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39337  # It is also a way to make sure we got the proper file name for the real test later on.
39338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39339  if test "x$test_shortpath" = x; then
39340    # Short path failed, file does not exist as specified.
39341    # Try adding .exe or .cmd
39342    if test -f "${new_path}.exe"; then
39343      input_to_shortpath="${new_path}.exe"
39344    elif test -f "${new_path}.cmd"; then
39345      input_to_shortpath="${new_path}.cmd"
39346    else
39347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39348$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39351      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39352    fi
39353  else
39354    input_to_shortpath="$new_path"
39355  fi
39356
39357  # Call helper function which possibly converts this using DOS-style short mode.
39358  # If so, the updated path is stored in $new_path.
39359  new_path="$input_to_shortpath"
39360
39361  input_path="$input_to_shortpath"
39362  # Check if we need to convert this using DOS-style short mode. If the path
39363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39364  # take no chances and rewrite it.
39365  # Note: m4 eats our [], so we need to use [ and ] instead.
39366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39367  if test "x$has_forbidden_chars" != x; then
39368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39372      # Going to short mode and back again did indeed matter. Since short mode is
39373      # case insensitive, let's make it lowercase to improve readability.
39374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39375      # Now convert it back to Unix-style (cygpath)
39376      input_path=`$CYGPATH -u "$shortmode_path"`
39377      new_path="$input_path"
39378    fi
39379  fi
39380
39381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39382  if test "x$test_cygdrive_prefix" = x; then
39383    # As a simple fix, exclude /usr/bin since it's not a real path.
39384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39386      # a path prefixed by /cygdrive for fixpath to work.
39387      new_path="$CYGWIN_ROOT_PATH$input_path"
39388    fi
39389  fi
39390
39391  # remove trailing .exe if any
39392  new_path="${new_path/%.exe/}"
39393
39394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39395
39396  # First separate the path from the arguments. This will split at the first
39397  # space.
39398  complete="$LIPO"
39399  path="${complete%% *}"
39400  tmp="$complete EOL"
39401  arguments="${tmp#* }"
39402
39403  # Input might be given as Windows format, start by converting to
39404  # unix format.
39405  new_path="$path"
39406
39407  windows_path="$new_path"
39408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39409    unix_path=`$CYGPATH -u "$windows_path"`
39410    new_path="$unix_path"
39411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39413    new_path="$unix_path"
39414  fi
39415
39416
39417  # Now try to locate executable using which
39418  new_path=`$WHICH "$new_path" 2> /dev/null`
39419
39420  if test "x$new_path" = x; then
39421    # Oops. Which didn't find the executable.
39422    # The splitting of arguments from the executable at a space might have been incorrect,
39423    # since paths with space are more likely in Windows. Give it another try with the whole
39424    # argument.
39425    path="$complete"
39426    arguments="EOL"
39427    new_path="$path"
39428
39429  windows_path="$new_path"
39430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39431    unix_path=`$CYGPATH -u "$windows_path"`
39432    new_path="$unix_path"
39433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39435    new_path="$unix_path"
39436  fi
39437
39438
39439    new_path=`$WHICH "$new_path" 2> /dev/null`
39440    # bat and cmd files are not always considered executable in MSYS causing which
39441    # to not find them
39442    if test "x$new_path" = x \
39443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39445      new_path="$path"
39446
39447  windows_path="$new_path"
39448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39449    unix_path=`$CYGPATH -u "$windows_path"`
39450    new_path="$unix_path"
39451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39453    new_path="$unix_path"
39454  fi
39455
39456    fi
39457
39458    if test "x$new_path" = x; then
39459      # It's still not found. Now this is an unrecoverable error.
39460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39461$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39462      has_space=`$ECHO "$complete" | $GREP " "`
39463      if test "x$has_space" != x; then
39464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39466      fi
39467      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39468    fi
39469  fi
39470
39471  # Now new_path has a complete unix path to the binary
39472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39473    # Keep paths in /bin as-is, but remove trailing .exe if any
39474    new_path="${new_path/%.exe/}"
39475    # Do not save /bin paths to all_fixpath_prefixes!
39476  else
39477    # Not in mixed or Windows style, start by that.
39478    new_path=`cmd //c echo $new_path`
39479
39480  input_path="$new_path"
39481  # Check if we need to convert this using DOS-style short mode. If the path
39482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39483  # take no chances and rewrite it.
39484  # Note: m4 eats our [], so we need to use [ and ] instead.
39485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39486  if test "x$has_forbidden_chars" != x; then
39487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39489  fi
39490
39491    # Output is in $new_path
39492
39493  windows_path="$new_path"
39494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39495    unix_path=`$CYGPATH -u "$windows_path"`
39496    new_path="$unix_path"
39497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39499    new_path="$unix_path"
39500  fi
39501
39502    # remove trailing .exe if any
39503    new_path="${new_path/%.exe/}"
39504
39505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39507  fi
39508
39509    else
39510      # We're on a unix platform. Hooray! :)
39511      # First separate the path from the arguments. This will split at the first
39512      # space.
39513      complete="$LIPO"
39514      path="${complete%% *}"
39515      tmp="$complete EOL"
39516      arguments="${tmp#* }"
39517
39518      # Cannot rely on the command "which" here since it doesn't always work.
39519      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39520      if test -z "$is_absolute_path"; then
39521        # Path to executable is not absolute. Find it.
39522        IFS_save="$IFS"
39523        IFS=:
39524        for p in $PATH; do
39525          if test -f "$p/$path" && test -x "$p/$path"; then
39526            new_path="$p/$path"
39527            break
39528          fi
39529        done
39530        IFS="$IFS_save"
39531      else
39532        # This is an absolute path, we can use it without further modifications.
39533        new_path="$path"
39534      fi
39535
39536      if test "x$new_path" = x; then
39537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39538$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39539        has_space=`$ECHO "$complete" | $GREP " "`
39540        if test "x$has_space" != x; then
39541          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39542$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39543        fi
39544        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39545      fi
39546    fi
39547
39548    # Now join together the path and the arguments once again
39549    if test "x$arguments" != xEOL; then
39550      new_complete="$new_path ${arguments% *}"
39551    else
39552      new_complete="$new_path"
39553    fi
39554
39555    if test "x$complete" != "x$new_complete"; then
39556      LIPO="$new_complete"
39557      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39558$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39559    fi
39560  fi
39561
39562  fi
39563
39564  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39565    # Extract the first word of "mt", so it can be a program name with args.
39566set dummy mt; ac_word=$2
39567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39568$as_echo_n "checking for $ac_word... " >&6; }
39569if ${ac_cv_prog_MT+:} false; then :
39570  $as_echo_n "(cached) " >&6
39571else
39572  if test -n "$MT"; then
39573  ac_cv_prog_MT="$MT" # Let the user override the test.
39574else
39575  ac_prog_rejected=no
39576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39577for as_dir in $PATH
39578do
39579  IFS=$as_save_IFS
39580  test -z "$as_dir" && as_dir=.
39581    for ac_exec_ext in '' $ac_executable_extensions; do
39582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39583    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39584       ac_prog_rejected=yes
39585       continue
39586     fi
39587    ac_cv_prog_MT="mt"
39588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39589    break 2
39590  fi
39591done
39592  done
39593IFS=$as_save_IFS
39594
39595if test $ac_prog_rejected = yes; then
39596  # We found a bogon in the path, so make sure we never use it.
39597  set dummy $ac_cv_prog_MT
39598  shift
39599  if test $# != 0; then
39600    # We chose a different compiler from the bogus one.
39601    # However, it has the same basename, so the bogon will be chosen
39602    # first if we set MT to just the basename; use the full file name.
39603    shift
39604    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39605  fi
39606fi
39607fi
39608fi
39609MT=$ac_cv_prog_MT
39610if test -n "$MT"; then
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39612$as_echo "$MT" >&6; }
39613else
39614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39615$as_echo "no" >&6; }
39616fi
39617
39618
39619
39620  # Only process if variable expands to non-empty
39621
39622  if test "x$MT" != x; then
39623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39624
39625  # First separate the path from the arguments. This will split at the first
39626  # space.
39627  complete="$MT"
39628  path="${complete%% *}"
39629  tmp="$complete EOL"
39630  arguments="${tmp#* }"
39631
39632  # Input might be given as Windows format, start by converting to
39633  # unix format.
39634  new_path=`$CYGPATH -u "$path"`
39635
39636  # Now try to locate executable using which
39637  new_path=`$WHICH "$new_path" 2> /dev/null`
39638  # bat and cmd files are not always considered executable in cygwin causing which
39639  # to not find them
39640  if test "x$new_path" = x \
39641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39643    new_path=`$CYGPATH -u "$path"`
39644  fi
39645  if test "x$new_path" = x; then
39646    # Oops. Which didn't find the executable.
39647    # The splitting of arguments from the executable at a space might have been incorrect,
39648    # since paths with space are more likely in Windows. Give it another try with the whole
39649    # argument.
39650    path="$complete"
39651    arguments="EOL"
39652    new_path=`$CYGPATH -u "$path"`
39653    new_path=`$WHICH "$new_path" 2> /dev/null`
39654    # bat and cmd files are not always considered executable in cygwin causing which
39655    # to not find them
39656    if test "x$new_path" = x \
39657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39659      new_path=`$CYGPATH -u "$path"`
39660    fi
39661    if test "x$new_path" = x; then
39662      # It's still not found. Now this is an unrecoverable error.
39663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39664$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39665      has_space=`$ECHO "$complete" | $GREP " "`
39666      if test "x$has_space" != x; then
39667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39669      fi
39670      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39671    fi
39672  fi
39673
39674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39677  # "foo.exe" is OK but "foo" is an error.
39678  #
39679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39680  # It is also a way to make sure we got the proper file name for the real test later on.
39681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39682  if test "x$test_shortpath" = x; then
39683    # Short path failed, file does not exist as specified.
39684    # Try adding .exe or .cmd
39685    if test -f "${new_path}.exe"; then
39686      input_to_shortpath="${new_path}.exe"
39687    elif test -f "${new_path}.cmd"; then
39688      input_to_shortpath="${new_path}.cmd"
39689    else
39690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39691$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39694      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39695    fi
39696  else
39697    input_to_shortpath="$new_path"
39698  fi
39699
39700  # Call helper function which possibly converts this using DOS-style short mode.
39701  # If so, the updated path is stored in $new_path.
39702  new_path="$input_to_shortpath"
39703
39704  input_path="$input_to_shortpath"
39705  # Check if we need to convert this using DOS-style short mode. If the path
39706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39707  # take no chances and rewrite it.
39708  # Note: m4 eats our [], so we need to use [ and ] instead.
39709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39710  if test "x$has_forbidden_chars" != x; then
39711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39715      # Going to short mode and back again did indeed matter. Since short mode is
39716      # case insensitive, let's make it lowercase to improve readability.
39717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39718      # Now convert it back to Unix-style (cygpath)
39719      input_path=`$CYGPATH -u "$shortmode_path"`
39720      new_path="$input_path"
39721    fi
39722  fi
39723
39724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39725  if test "x$test_cygdrive_prefix" = x; then
39726    # As a simple fix, exclude /usr/bin since it's not a real path.
39727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39729      # a path prefixed by /cygdrive for fixpath to work.
39730      new_path="$CYGWIN_ROOT_PATH$input_path"
39731    fi
39732  fi
39733
39734  # remove trailing .exe if any
39735  new_path="${new_path/%.exe/}"
39736
39737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39738
39739  # First separate the path from the arguments. This will split at the first
39740  # space.
39741  complete="$MT"
39742  path="${complete%% *}"
39743  tmp="$complete EOL"
39744  arguments="${tmp#* }"
39745
39746  # Input might be given as Windows format, start by converting to
39747  # unix format.
39748  new_path="$path"
39749
39750  windows_path="$new_path"
39751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752    unix_path=`$CYGPATH -u "$windows_path"`
39753    new_path="$unix_path"
39754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39756    new_path="$unix_path"
39757  fi
39758
39759
39760  # Now try to locate executable using which
39761  new_path=`$WHICH "$new_path" 2> /dev/null`
39762
39763  if test "x$new_path" = x; then
39764    # Oops. Which didn't find the executable.
39765    # The splitting of arguments from the executable at a space might have been incorrect,
39766    # since paths with space are more likely in Windows. Give it another try with the whole
39767    # argument.
39768    path="$complete"
39769    arguments="EOL"
39770    new_path="$path"
39771
39772  windows_path="$new_path"
39773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39774    unix_path=`$CYGPATH -u "$windows_path"`
39775    new_path="$unix_path"
39776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39778    new_path="$unix_path"
39779  fi
39780
39781
39782    new_path=`$WHICH "$new_path" 2> /dev/null`
39783    # bat and cmd files are not always considered executable in MSYS causing which
39784    # to not find them
39785    if test "x$new_path" = x \
39786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39788      new_path="$path"
39789
39790  windows_path="$new_path"
39791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39792    unix_path=`$CYGPATH -u "$windows_path"`
39793    new_path="$unix_path"
39794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39796    new_path="$unix_path"
39797  fi
39798
39799    fi
39800
39801    if test "x$new_path" = x; then
39802      # It's still not found. Now this is an unrecoverable error.
39803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39804$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39805      has_space=`$ECHO "$complete" | $GREP " "`
39806      if test "x$has_space" != x; then
39807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39809      fi
39810      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39811    fi
39812  fi
39813
39814  # Now new_path has a complete unix path to the binary
39815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39816    # Keep paths in /bin as-is, but remove trailing .exe if any
39817    new_path="${new_path/%.exe/}"
39818    # Do not save /bin paths to all_fixpath_prefixes!
39819  else
39820    # Not in mixed or Windows style, start by that.
39821    new_path=`cmd //c echo $new_path`
39822
39823  input_path="$new_path"
39824  # Check if we need to convert this using DOS-style short mode. If the path
39825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39826  # take no chances and rewrite it.
39827  # Note: m4 eats our [], so we need to use [ and ] instead.
39828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39829  if test "x$has_forbidden_chars" != x; then
39830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39832  fi
39833
39834    # Output is in $new_path
39835
39836  windows_path="$new_path"
39837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39838    unix_path=`$CYGPATH -u "$windows_path"`
39839    new_path="$unix_path"
39840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39842    new_path="$unix_path"
39843  fi
39844
39845    # remove trailing .exe if any
39846    new_path="${new_path/%.exe/}"
39847
39848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39850  fi
39851
39852    else
39853      # We're on a unix platform. Hooray! :)
39854      # First separate the path from the arguments. This will split at the first
39855      # space.
39856      complete="$MT"
39857      path="${complete%% *}"
39858      tmp="$complete EOL"
39859      arguments="${tmp#* }"
39860
39861      # Cannot rely on the command "which" here since it doesn't always work.
39862      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39863      if test -z "$is_absolute_path"; then
39864        # Path to executable is not absolute. Find it.
39865        IFS_save="$IFS"
39866        IFS=:
39867        for p in $PATH; do
39868          if test -f "$p/$path" && test -x "$p/$path"; then
39869            new_path="$p/$path"
39870            break
39871          fi
39872        done
39873        IFS="$IFS_save"
39874      else
39875        # This is an absolute path, we can use it without further modifications.
39876        new_path="$path"
39877      fi
39878
39879      if test "x$new_path" = x; then
39880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39881$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39882        has_space=`$ECHO "$complete" | $GREP " "`
39883        if test "x$has_space" != x; then
39884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39886        fi
39887        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39888      fi
39889    fi
39890
39891    # Now join together the path and the arguments once again
39892    if test "x$arguments" != xEOL; then
39893      new_complete="$new_path ${arguments% *}"
39894    else
39895      new_complete="$new_path"
39896    fi
39897
39898    if test "x$complete" != "x$new_complete"; then
39899      MT="$new_complete"
39900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39901$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39902    fi
39903  fi
39904
39905    # Setup the resource compiler (RC)
39906    # Extract the first word of "rc", so it can be a program name with args.
39907set dummy rc; ac_word=$2
39908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39909$as_echo_n "checking for $ac_word... " >&6; }
39910if ${ac_cv_prog_RC+:} false; then :
39911  $as_echo_n "(cached) " >&6
39912else
39913  if test -n "$RC"; then
39914  ac_cv_prog_RC="$RC" # Let the user override the test.
39915else
39916  ac_prog_rejected=no
39917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39918for as_dir in $PATH
39919do
39920  IFS=$as_save_IFS
39921  test -z "$as_dir" && as_dir=.
39922    for ac_exec_ext in '' $ac_executable_extensions; do
39923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39924    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39925       ac_prog_rejected=yes
39926       continue
39927     fi
39928    ac_cv_prog_RC="rc"
39929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39930    break 2
39931  fi
39932done
39933  done
39934IFS=$as_save_IFS
39935
39936if test $ac_prog_rejected = yes; then
39937  # We found a bogon in the path, so make sure we never use it.
39938  set dummy $ac_cv_prog_RC
39939  shift
39940  if test $# != 0; then
39941    # We chose a different compiler from the bogus one.
39942    # However, it has the same basename, so the bogon will be chosen
39943    # first if we set RC to just the basename; use the full file name.
39944    shift
39945    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39946  fi
39947fi
39948fi
39949fi
39950RC=$ac_cv_prog_RC
39951if test -n "$RC"; then
39952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39953$as_echo "$RC" >&6; }
39954else
39955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39956$as_echo "no" >&6; }
39957fi
39958
39959
39960
39961  # Only process if variable expands to non-empty
39962
39963  if test "x$RC" != x; then
39964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39965
39966  # First separate the path from the arguments. This will split at the first
39967  # space.
39968  complete="$RC"
39969  path="${complete%% *}"
39970  tmp="$complete EOL"
39971  arguments="${tmp#* }"
39972
39973  # Input might be given as Windows format, start by converting to
39974  # unix format.
39975  new_path=`$CYGPATH -u "$path"`
39976
39977  # Now try to locate executable using which
39978  new_path=`$WHICH "$new_path" 2> /dev/null`
39979  # bat and cmd files are not always considered executable in cygwin causing which
39980  # to not find them
39981  if test "x$new_path" = x \
39982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39984    new_path=`$CYGPATH -u "$path"`
39985  fi
39986  if test "x$new_path" = x; then
39987    # Oops. Which didn't find the executable.
39988    # The splitting of arguments from the executable at a space might have been incorrect,
39989    # since paths with space are more likely in Windows. Give it another try with the whole
39990    # argument.
39991    path="$complete"
39992    arguments="EOL"
39993    new_path=`$CYGPATH -u "$path"`
39994    new_path=`$WHICH "$new_path" 2> /dev/null`
39995    # bat and cmd files are not always considered executable in cygwin causing which
39996    # to not find them
39997    if test "x$new_path" = x \
39998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40000      new_path=`$CYGPATH -u "$path"`
40001    fi
40002    if test "x$new_path" = x; then
40003      # It's still not found. Now this is an unrecoverable error.
40004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40005$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40006      has_space=`$ECHO "$complete" | $GREP " "`
40007      if test "x$has_space" != x; then
40008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40010      fi
40011      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40012    fi
40013  fi
40014
40015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40018  # "foo.exe" is OK but "foo" is an error.
40019  #
40020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40021  # It is also a way to make sure we got the proper file name for the real test later on.
40022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40023  if test "x$test_shortpath" = x; then
40024    # Short path failed, file does not exist as specified.
40025    # Try adding .exe or .cmd
40026    if test -f "${new_path}.exe"; then
40027      input_to_shortpath="${new_path}.exe"
40028    elif test -f "${new_path}.cmd"; then
40029      input_to_shortpath="${new_path}.cmd"
40030    else
40031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
40032$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
40033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40035      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40036    fi
40037  else
40038    input_to_shortpath="$new_path"
40039  fi
40040
40041  # Call helper function which possibly converts this using DOS-style short mode.
40042  # If so, the updated path is stored in $new_path.
40043  new_path="$input_to_shortpath"
40044
40045  input_path="$input_to_shortpath"
40046  # Check if we need to convert this using DOS-style short mode. If the path
40047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40048  # take no chances and rewrite it.
40049  # Note: m4 eats our [], so we need to use [ and ] instead.
40050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40051  if test "x$has_forbidden_chars" != x; then
40052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40056      # Going to short mode and back again did indeed matter. Since short mode is
40057      # case insensitive, let's make it lowercase to improve readability.
40058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40059      # Now convert it back to Unix-style (cygpath)
40060      input_path=`$CYGPATH -u "$shortmode_path"`
40061      new_path="$input_path"
40062    fi
40063  fi
40064
40065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40066  if test "x$test_cygdrive_prefix" = x; then
40067    # As a simple fix, exclude /usr/bin since it's not a real path.
40068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40070      # a path prefixed by /cygdrive for fixpath to work.
40071      new_path="$CYGWIN_ROOT_PATH$input_path"
40072    fi
40073  fi
40074
40075  # remove trailing .exe if any
40076  new_path="${new_path/%.exe/}"
40077
40078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40079
40080  # First separate the path from the arguments. This will split at the first
40081  # space.
40082  complete="$RC"
40083  path="${complete%% *}"
40084  tmp="$complete EOL"
40085  arguments="${tmp#* }"
40086
40087  # Input might be given as Windows format, start by converting to
40088  # unix format.
40089  new_path="$path"
40090
40091  windows_path="$new_path"
40092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40093    unix_path=`$CYGPATH -u "$windows_path"`
40094    new_path="$unix_path"
40095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40097    new_path="$unix_path"
40098  fi
40099
40100
40101  # Now try to locate executable using which
40102  new_path=`$WHICH "$new_path" 2> /dev/null`
40103
40104  if test "x$new_path" = x; then
40105    # Oops. Which didn't find the executable.
40106    # The splitting of arguments from the executable at a space might have been incorrect,
40107    # since paths with space are more likely in Windows. Give it another try with the whole
40108    # argument.
40109    path="$complete"
40110    arguments="EOL"
40111    new_path="$path"
40112
40113  windows_path="$new_path"
40114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40115    unix_path=`$CYGPATH -u "$windows_path"`
40116    new_path="$unix_path"
40117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40119    new_path="$unix_path"
40120  fi
40121
40122
40123    new_path=`$WHICH "$new_path" 2> /dev/null`
40124    # bat and cmd files are not always considered executable in MSYS causing which
40125    # to not find them
40126    if test "x$new_path" = x \
40127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40129      new_path="$path"
40130
40131  windows_path="$new_path"
40132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40133    unix_path=`$CYGPATH -u "$windows_path"`
40134    new_path="$unix_path"
40135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40137    new_path="$unix_path"
40138  fi
40139
40140    fi
40141
40142    if test "x$new_path" = x; then
40143      # It's still not found. Now this is an unrecoverable error.
40144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40145$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40146      has_space=`$ECHO "$complete" | $GREP " "`
40147      if test "x$has_space" != x; then
40148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40150      fi
40151      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40152    fi
40153  fi
40154
40155  # Now new_path has a complete unix path to the binary
40156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40157    # Keep paths in /bin as-is, but remove trailing .exe if any
40158    new_path="${new_path/%.exe/}"
40159    # Do not save /bin paths to all_fixpath_prefixes!
40160  else
40161    # Not in mixed or Windows style, start by that.
40162    new_path=`cmd //c echo $new_path`
40163
40164  input_path="$new_path"
40165  # Check if we need to convert this using DOS-style short mode. If the path
40166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40167  # take no chances and rewrite it.
40168  # Note: m4 eats our [], so we need to use [ and ] instead.
40169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40170  if test "x$has_forbidden_chars" != x; then
40171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40173  fi
40174
40175    # Output is in $new_path
40176
40177  windows_path="$new_path"
40178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40179    unix_path=`$CYGPATH -u "$windows_path"`
40180    new_path="$unix_path"
40181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40183    new_path="$unix_path"
40184  fi
40185
40186    # remove trailing .exe if any
40187    new_path="${new_path/%.exe/}"
40188
40189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40191  fi
40192
40193    else
40194      # We're on a unix platform. Hooray! :)
40195      # First separate the path from the arguments. This will split at the first
40196      # space.
40197      complete="$RC"
40198      path="${complete%% *}"
40199      tmp="$complete EOL"
40200      arguments="${tmp#* }"
40201
40202      # Cannot rely on the command "which" here since it doesn't always work.
40203      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40204      if test -z "$is_absolute_path"; then
40205        # Path to executable is not absolute. Find it.
40206        IFS_save="$IFS"
40207        IFS=:
40208        for p in $PATH; do
40209          if test -f "$p/$path" && test -x "$p/$path"; then
40210            new_path="$p/$path"
40211            break
40212          fi
40213        done
40214        IFS="$IFS_save"
40215      else
40216        # This is an absolute path, we can use it without further modifications.
40217        new_path="$path"
40218      fi
40219
40220      if test "x$new_path" = x; then
40221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40222$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40223        has_space=`$ECHO "$complete" | $GREP " "`
40224        if test "x$has_space" != x; then
40225          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40227        fi
40228        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40229      fi
40230    fi
40231
40232    # Now join together the path and the arguments once again
40233    if test "x$arguments" != xEOL; then
40234      new_complete="$new_path ${arguments% *}"
40235    else
40236      new_complete="$new_path"
40237    fi
40238
40239    if test "x$complete" != "x$new_complete"; then
40240      RC="$new_complete"
40241      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40242$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40243    fi
40244  fi
40245
40246    # Extract the first word of "dumpbin", so it can be a program name with args.
40247set dummy dumpbin; ac_word=$2
40248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40249$as_echo_n "checking for $ac_word... " >&6; }
40250if ${ac_cv_prog_DUMPBIN+:} false; then :
40251  $as_echo_n "(cached) " >&6
40252else
40253  if test -n "$DUMPBIN"; then
40254  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40255else
40256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40257for as_dir in $PATH
40258do
40259  IFS=$as_save_IFS
40260  test -z "$as_dir" && as_dir=.
40261    for ac_exec_ext in '' $ac_executable_extensions; do
40262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40263    ac_cv_prog_DUMPBIN="dumpbin"
40264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40265    break 2
40266  fi
40267done
40268  done
40269IFS=$as_save_IFS
40270
40271fi
40272fi
40273DUMPBIN=$ac_cv_prog_DUMPBIN
40274if test -n "$DUMPBIN"; then
40275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40276$as_echo "$DUMPBIN" >&6; }
40277else
40278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40279$as_echo "no" >&6; }
40280fi
40281
40282
40283
40284  # Only process if variable expands to non-empty
40285
40286  if test "x$DUMPBIN" != x; then
40287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40288
40289  # First separate the path from the arguments. This will split at the first
40290  # space.
40291  complete="$DUMPBIN"
40292  path="${complete%% *}"
40293  tmp="$complete EOL"
40294  arguments="${tmp#* }"
40295
40296  # Input might be given as Windows format, start by converting to
40297  # unix format.
40298  new_path=`$CYGPATH -u "$path"`
40299
40300  # Now try to locate executable using which
40301  new_path=`$WHICH "$new_path" 2> /dev/null`
40302  # bat and cmd files are not always considered executable in cygwin causing which
40303  # to not find them
40304  if test "x$new_path" = x \
40305      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40306      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40307    new_path=`$CYGPATH -u "$path"`
40308  fi
40309  if test "x$new_path" = x; then
40310    # Oops. Which didn't find the executable.
40311    # The splitting of arguments from the executable at a space might have been incorrect,
40312    # since paths with space are more likely in Windows. Give it another try with the whole
40313    # argument.
40314    path="$complete"
40315    arguments="EOL"
40316    new_path=`$CYGPATH -u "$path"`
40317    new_path=`$WHICH "$new_path" 2> /dev/null`
40318    # bat and cmd files are not always considered executable in cygwin causing which
40319    # to not find them
40320    if test "x$new_path" = x \
40321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40323      new_path=`$CYGPATH -u "$path"`
40324    fi
40325    if test "x$new_path" = x; then
40326      # It's still not found. Now this is an unrecoverable error.
40327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40328$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40329      has_space=`$ECHO "$complete" | $GREP " "`
40330      if test "x$has_space" != x; then
40331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40333      fi
40334      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40335    fi
40336  fi
40337
40338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40341  # "foo.exe" is OK but "foo" is an error.
40342  #
40343  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40344  # It is also a way to make sure we got the proper file name for the real test later on.
40345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40346  if test "x$test_shortpath" = x; then
40347    # Short path failed, file does not exist as specified.
40348    # Try adding .exe or .cmd
40349    if test -f "${new_path}.exe"; then
40350      input_to_shortpath="${new_path}.exe"
40351    elif test -f "${new_path}.cmd"; then
40352      input_to_shortpath="${new_path}.cmd"
40353    else
40354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40355$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40358      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40359    fi
40360  else
40361    input_to_shortpath="$new_path"
40362  fi
40363
40364  # Call helper function which possibly converts this using DOS-style short mode.
40365  # If so, the updated path is stored in $new_path.
40366  new_path="$input_to_shortpath"
40367
40368  input_path="$input_to_shortpath"
40369  # Check if we need to convert this using DOS-style short mode. If the path
40370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40371  # take no chances and rewrite it.
40372  # Note: m4 eats our [], so we need to use [ and ] instead.
40373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40374  if test "x$has_forbidden_chars" != x; then
40375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40379      # Going to short mode and back again did indeed matter. Since short mode is
40380      # case insensitive, let's make it lowercase to improve readability.
40381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40382      # Now convert it back to Unix-style (cygpath)
40383      input_path=`$CYGPATH -u "$shortmode_path"`
40384      new_path="$input_path"
40385    fi
40386  fi
40387
40388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40389  if test "x$test_cygdrive_prefix" = x; then
40390    # As a simple fix, exclude /usr/bin since it's not a real path.
40391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40393      # a path prefixed by /cygdrive for fixpath to work.
40394      new_path="$CYGWIN_ROOT_PATH$input_path"
40395    fi
40396  fi
40397
40398  # remove trailing .exe if any
40399  new_path="${new_path/%.exe/}"
40400
40401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402
40403  # First separate the path from the arguments. This will split at the first
40404  # space.
40405  complete="$DUMPBIN"
40406  path="${complete%% *}"
40407  tmp="$complete EOL"
40408  arguments="${tmp#* }"
40409
40410  # Input might be given as Windows format, start by converting to
40411  # unix format.
40412  new_path="$path"
40413
40414  windows_path="$new_path"
40415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40416    unix_path=`$CYGPATH -u "$windows_path"`
40417    new_path="$unix_path"
40418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40420    new_path="$unix_path"
40421  fi
40422
40423
40424  # Now try to locate executable using which
40425  new_path=`$WHICH "$new_path" 2> /dev/null`
40426
40427  if test "x$new_path" = x; then
40428    # Oops. Which didn't find the executable.
40429    # The splitting of arguments from the executable at a space might have been incorrect,
40430    # since paths with space are more likely in Windows. Give it another try with the whole
40431    # argument.
40432    path="$complete"
40433    arguments="EOL"
40434    new_path="$path"
40435
40436  windows_path="$new_path"
40437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40438    unix_path=`$CYGPATH -u "$windows_path"`
40439    new_path="$unix_path"
40440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40442    new_path="$unix_path"
40443  fi
40444
40445
40446    new_path=`$WHICH "$new_path" 2> /dev/null`
40447    # bat and cmd files are not always considered executable in MSYS causing which
40448    # to not find them
40449    if test "x$new_path" = x \
40450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40452      new_path="$path"
40453
40454  windows_path="$new_path"
40455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40456    unix_path=`$CYGPATH -u "$windows_path"`
40457    new_path="$unix_path"
40458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40460    new_path="$unix_path"
40461  fi
40462
40463    fi
40464
40465    if test "x$new_path" = x; then
40466      # It's still not found. Now this is an unrecoverable error.
40467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40468$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40469      has_space=`$ECHO "$complete" | $GREP " "`
40470      if test "x$has_space" != x; then
40471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40473      fi
40474      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40475    fi
40476  fi
40477
40478  # Now new_path has a complete unix path to the binary
40479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40480    # Keep paths in /bin as-is, but remove trailing .exe if any
40481    new_path="${new_path/%.exe/}"
40482    # Do not save /bin paths to all_fixpath_prefixes!
40483  else
40484    # Not in mixed or Windows style, start by that.
40485    new_path=`cmd //c echo $new_path`
40486
40487  input_path="$new_path"
40488  # Check if we need to convert this using DOS-style short mode. If the path
40489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40490  # take no chances and rewrite it.
40491  # Note: m4 eats our [], so we need to use [ and ] instead.
40492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40493  if test "x$has_forbidden_chars" != x; then
40494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40496  fi
40497
40498    # Output is in $new_path
40499
40500  windows_path="$new_path"
40501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40502    unix_path=`$CYGPATH -u "$windows_path"`
40503    new_path="$unix_path"
40504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40506    new_path="$unix_path"
40507  fi
40508
40509    # remove trailing .exe if any
40510    new_path="${new_path/%.exe/}"
40511
40512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40514  fi
40515
40516    else
40517      # We're on a unix platform. Hooray! :)
40518      # First separate the path from the arguments. This will split at the first
40519      # space.
40520      complete="$DUMPBIN"
40521      path="${complete%% *}"
40522      tmp="$complete EOL"
40523      arguments="${tmp#* }"
40524
40525      # Cannot rely on the command "which" here since it doesn't always work.
40526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40527      if test -z "$is_absolute_path"; then
40528        # Path to executable is not absolute. Find it.
40529        IFS_save="$IFS"
40530        IFS=:
40531        for p in $PATH; do
40532          if test -f "$p/$path" && test -x "$p/$path"; then
40533            new_path="$p/$path"
40534            break
40535          fi
40536        done
40537        IFS="$IFS_save"
40538      else
40539        # This is an absolute path, we can use it without further modifications.
40540        new_path="$path"
40541      fi
40542
40543      if test "x$new_path" = x; then
40544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40545$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40546        has_space=`$ECHO "$complete" | $GREP " "`
40547        if test "x$has_space" != x; then
40548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40550        fi
40551        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40552      fi
40553    fi
40554
40555    # Now join together the path and the arguments once again
40556    if test "x$arguments" != xEOL; then
40557      new_complete="$new_path ${arguments% *}"
40558    else
40559      new_complete="$new_path"
40560    fi
40561
40562    if test "x$complete" != "x$new_complete"; then
40563      DUMPBIN="$new_complete"
40564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40565$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40566    fi
40567  fi
40568
40569    # We need to check for 'msbuild.exe' because at the place where we expect to
40570    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40571    # won't find the 'msbuild.exe' executable in that case (and the
40572    # 'ac_executable_extensions' is unusable due to performance reasons).
40573    # Notice that we intentionally don't fix up the path to MSBUILD because we
40574    # will call it in a DOS shell during freetype detection on Windows (see
40575    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40576    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40577set dummy msbuild.exe; ac_word=$2
40578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40579$as_echo_n "checking for $ac_word... " >&6; }
40580if ${ac_cv_prog_MSBUILD+:} false; then :
40581  $as_echo_n "(cached) " >&6
40582else
40583  if test -n "$MSBUILD"; then
40584  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40585else
40586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40587for as_dir in $PATH
40588do
40589  IFS=$as_save_IFS
40590  test -z "$as_dir" && as_dir=.
40591    for ac_exec_ext in '' $ac_executable_extensions; do
40592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40593    ac_cv_prog_MSBUILD="msbuild.exe"
40594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40595    break 2
40596  fi
40597done
40598  done
40599IFS=$as_save_IFS
40600
40601fi
40602fi
40603MSBUILD=$ac_cv_prog_MSBUILD
40604if test -n "$MSBUILD"; then
40605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40606$as_echo "$MSBUILD" >&6; }
40607else
40608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40609$as_echo "no" >&6; }
40610fi
40611
40612
40613  fi
40614
40615  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40616
40617
40618  # Publish this variable in the help.
40619
40620
40621  if [ -z "${STRIP+x}" ]; then
40622    # The variable is not set by user, try to locate tool using the code snippet
40623    for ac_prog in strip
40624do
40625  # Extract the first word of "$ac_prog", so it can be a program name with args.
40626set dummy $ac_prog; ac_word=$2
40627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40628$as_echo_n "checking for $ac_word... " >&6; }
40629if ${ac_cv_path_STRIP+:} false; then :
40630  $as_echo_n "(cached) " >&6
40631else
40632  case $STRIP in
40633  [\\/]* | ?:[\\/]*)
40634  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40635  ;;
40636  *)
40637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40638for as_dir in $PATH
40639do
40640  IFS=$as_save_IFS
40641  test -z "$as_dir" && as_dir=.
40642    for ac_exec_ext in '' $ac_executable_extensions; do
40643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40644    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40646    break 2
40647  fi
40648done
40649  done
40650IFS=$as_save_IFS
40651
40652  ;;
40653esac
40654fi
40655STRIP=$ac_cv_path_STRIP
40656if test -n "$STRIP"; then
40657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40658$as_echo "$STRIP" >&6; }
40659else
40660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40661$as_echo "no" >&6; }
40662fi
40663
40664
40665  test -n "$STRIP" && break
40666done
40667
40668  else
40669    # The variable is set, but is it from the command line or the environment?
40670
40671    # Try to remove the string !STRIP! from our list.
40672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40674      # If it failed, the variable was not from the command line. Ignore it,
40675      # but warn the user (except for BASH, which is always set by the calling BASH).
40676      if test "xSTRIP" != xBASH; then
40677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40678$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40679      fi
40680      # Try to locate tool using the code snippet
40681      for ac_prog in strip
40682do
40683  # Extract the first word of "$ac_prog", so it can be a program name with args.
40684set dummy $ac_prog; ac_word=$2
40685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40686$as_echo_n "checking for $ac_word... " >&6; }
40687if ${ac_cv_path_STRIP+:} false; then :
40688  $as_echo_n "(cached) " >&6
40689else
40690  case $STRIP in
40691  [\\/]* | ?:[\\/]*)
40692  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40693  ;;
40694  *)
40695  as_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_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
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
40710  ;;
40711esac
40712fi
40713STRIP=$ac_cv_path_STRIP
40714if test -n "$STRIP"; then
40715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40716$as_echo "$STRIP" >&6; }
40717else
40718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40719$as_echo "no" >&6; }
40720fi
40721
40722
40723  test -n "$STRIP" && break
40724done
40725
40726    else
40727      # If it succeeded, then it was overridden by the user. We will use it
40728      # for the tool.
40729
40730      # First remove it from the list of overridden variables, so we can test
40731      # for unknown variables in the end.
40732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40733
40734      # Check if we try to supply an empty value
40735      if test "x$STRIP" = x; then
40736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40737$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40739$as_echo_n "checking for STRIP... " >&6; }
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40741$as_echo "disabled" >&6; }
40742      else
40743        # Check if the provided tool contains a complete path.
40744        tool_specified="$STRIP"
40745        tool_basename="${tool_specified##*/}"
40746        if test "x$tool_basename" = "x$tool_specified"; then
40747          # A command without a complete path is provided, search $PATH.
40748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40749$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40750          # Extract the first word of "$tool_basename", so it can be a program name with args.
40751set dummy $tool_basename; ac_word=$2
40752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40753$as_echo_n "checking for $ac_word... " >&6; }
40754if ${ac_cv_path_STRIP+:} false; then :
40755  $as_echo_n "(cached) " >&6
40756else
40757  case $STRIP in
40758  [\\/]* | ?:[\\/]*)
40759  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40760  ;;
40761  *)
40762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40763for as_dir in $PATH
40764do
40765  IFS=$as_save_IFS
40766  test -z "$as_dir" && as_dir=.
40767    for ac_exec_ext in '' $ac_executable_extensions; do
40768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40769    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40771    break 2
40772  fi
40773done
40774  done
40775IFS=$as_save_IFS
40776
40777  ;;
40778esac
40779fi
40780STRIP=$ac_cv_path_STRIP
40781if test -n "$STRIP"; then
40782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40783$as_echo "$STRIP" >&6; }
40784else
40785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40786$as_echo "no" >&6; }
40787fi
40788
40789
40790          if test "x$STRIP" = x; then
40791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40792          fi
40793        else
40794          # Otherwise we believe it is a complete path. Use it as it is.
40795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40796$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40798$as_echo_n "checking for STRIP... " >&6; }
40799          if test ! -x "$tool_specified"; then
40800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40801$as_echo "not found" >&6; }
40802            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40803          fi
40804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40805$as_echo "$tool_specified" >&6; }
40806        fi
40807      fi
40808    fi
40809
40810  fi
40811
40812
40813
40814  # Only process if variable expands to non-empty
40815
40816  if test "x$STRIP" != x; then
40817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40818
40819  # First separate the path from the arguments. This will split at the first
40820  # space.
40821  complete="$STRIP"
40822  path="${complete%% *}"
40823  tmp="$complete EOL"
40824  arguments="${tmp#* }"
40825
40826  # Input might be given as Windows format, start by converting to
40827  # unix format.
40828  new_path=`$CYGPATH -u "$path"`
40829
40830  # Now try to locate executable using which
40831  new_path=`$WHICH "$new_path" 2> /dev/null`
40832  # bat and cmd files are not always considered executable in cygwin causing which
40833  # to not find them
40834  if test "x$new_path" = x \
40835      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40836      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40837    new_path=`$CYGPATH -u "$path"`
40838  fi
40839  if test "x$new_path" = x; then
40840    # Oops. Which didn't find the executable.
40841    # The splitting of arguments from the executable at a space might have been incorrect,
40842    # since paths with space are more likely in Windows. Give it another try with the whole
40843    # argument.
40844    path="$complete"
40845    arguments="EOL"
40846    new_path=`$CYGPATH -u "$path"`
40847    new_path=`$WHICH "$new_path" 2> /dev/null`
40848    # bat and cmd files are not always considered executable in cygwin causing which
40849    # to not find them
40850    if test "x$new_path" = x \
40851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40853      new_path=`$CYGPATH -u "$path"`
40854    fi
40855    if test "x$new_path" = x; then
40856      # It's still not found. Now this is an unrecoverable error.
40857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40858$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40859      has_space=`$ECHO "$complete" | $GREP " "`
40860      if test "x$has_space" != x; then
40861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40863      fi
40864      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40865    fi
40866  fi
40867
40868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40871  # "foo.exe" is OK but "foo" is an error.
40872  #
40873  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40874  # It is also a way to make sure we got the proper file name for the real test later on.
40875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40876  if test "x$test_shortpath" = x; then
40877    # Short path failed, file does not exist as specified.
40878    # Try adding .exe or .cmd
40879    if test -f "${new_path}.exe"; then
40880      input_to_shortpath="${new_path}.exe"
40881    elif test -f "${new_path}.cmd"; then
40882      input_to_shortpath="${new_path}.cmd"
40883    else
40884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40885$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40888      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40889    fi
40890  else
40891    input_to_shortpath="$new_path"
40892  fi
40893
40894  # Call helper function which possibly converts this using DOS-style short mode.
40895  # If so, the updated path is stored in $new_path.
40896  new_path="$input_to_shortpath"
40897
40898  input_path="$input_to_shortpath"
40899  # Check if we need to convert this using DOS-style short mode. If the path
40900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40901  # take no chances and rewrite it.
40902  # Note: m4 eats our [], so we need to use [ and ] instead.
40903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40904  if test "x$has_forbidden_chars" != x; then
40905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40909      # Going to short mode and back again did indeed matter. Since short mode is
40910      # case insensitive, let's make it lowercase to improve readability.
40911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40912      # Now convert it back to Unix-style (cygpath)
40913      input_path=`$CYGPATH -u "$shortmode_path"`
40914      new_path="$input_path"
40915    fi
40916  fi
40917
40918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40919  if test "x$test_cygdrive_prefix" = x; then
40920    # As a simple fix, exclude /usr/bin since it's not a real path.
40921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40923      # a path prefixed by /cygdrive for fixpath to work.
40924      new_path="$CYGWIN_ROOT_PATH$input_path"
40925    fi
40926  fi
40927
40928  # remove trailing .exe if any
40929  new_path="${new_path/%.exe/}"
40930
40931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40932
40933  # First separate the path from the arguments. This will split at the first
40934  # space.
40935  complete="$STRIP"
40936  path="${complete%% *}"
40937  tmp="$complete EOL"
40938  arguments="${tmp#* }"
40939
40940  # Input might be given as Windows format, start by converting to
40941  # unix format.
40942  new_path="$path"
40943
40944  windows_path="$new_path"
40945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40946    unix_path=`$CYGPATH -u "$windows_path"`
40947    new_path="$unix_path"
40948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40950    new_path="$unix_path"
40951  fi
40952
40953
40954  # Now try to locate executable using which
40955  new_path=`$WHICH "$new_path" 2> /dev/null`
40956
40957  if test "x$new_path" = x; then
40958    # Oops. Which didn't find the executable.
40959    # The splitting of arguments from the executable at a space might have been incorrect,
40960    # since paths with space are more likely in Windows. Give it another try with the whole
40961    # argument.
40962    path="$complete"
40963    arguments="EOL"
40964    new_path="$path"
40965
40966  windows_path="$new_path"
40967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40968    unix_path=`$CYGPATH -u "$windows_path"`
40969    new_path="$unix_path"
40970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40972    new_path="$unix_path"
40973  fi
40974
40975
40976    new_path=`$WHICH "$new_path" 2> /dev/null`
40977    # bat and cmd files are not always considered executable in MSYS causing which
40978    # to not find them
40979    if test "x$new_path" = x \
40980        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40981        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40982      new_path="$path"
40983
40984  windows_path="$new_path"
40985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40986    unix_path=`$CYGPATH -u "$windows_path"`
40987    new_path="$unix_path"
40988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40990    new_path="$unix_path"
40991  fi
40992
40993    fi
40994
40995    if test "x$new_path" = x; then
40996      # It's still not found. Now this is an unrecoverable error.
40997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40998$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40999      has_space=`$ECHO "$complete" | $GREP " "`
41000      if test "x$has_space" != x; then
41001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41003      fi
41004      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41005    fi
41006  fi
41007
41008  # Now new_path has a complete unix path to the binary
41009  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41010    # Keep paths in /bin as-is, but remove trailing .exe if any
41011    new_path="${new_path/%.exe/}"
41012    # Do not save /bin paths to all_fixpath_prefixes!
41013  else
41014    # Not in mixed or Windows style, start by that.
41015    new_path=`cmd //c echo $new_path`
41016
41017  input_path="$new_path"
41018  # Check if we need to convert this using DOS-style short mode. If the path
41019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41020  # take no chances and rewrite it.
41021  # Note: m4 eats our [], so we need to use [ and ] instead.
41022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41023  if test "x$has_forbidden_chars" != x; then
41024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41026  fi
41027
41028    # Output is in $new_path
41029
41030  windows_path="$new_path"
41031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41032    unix_path=`$CYGPATH -u "$windows_path"`
41033    new_path="$unix_path"
41034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41036    new_path="$unix_path"
41037  fi
41038
41039    # remove trailing .exe if any
41040    new_path="${new_path/%.exe/}"
41041
41042    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41043    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41044  fi
41045
41046    else
41047      # We're on a unix platform. Hooray! :)
41048      # First separate the path from the arguments. This will split at the first
41049      # space.
41050      complete="$STRIP"
41051      path="${complete%% *}"
41052      tmp="$complete EOL"
41053      arguments="${tmp#* }"
41054
41055      # Cannot rely on the command "which" here since it doesn't always work.
41056      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41057      if test -z "$is_absolute_path"; then
41058        # Path to executable is not absolute. Find it.
41059        IFS_save="$IFS"
41060        IFS=:
41061        for p in $PATH; do
41062          if test -f "$p/$path" && test -x "$p/$path"; then
41063            new_path="$p/$path"
41064            break
41065          fi
41066        done
41067        IFS="$IFS_save"
41068      else
41069        # This is an absolute path, we can use it without further modifications.
41070        new_path="$path"
41071      fi
41072
41073      if test "x$new_path" = x; then
41074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41075$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41076        has_space=`$ECHO "$complete" | $GREP " "`
41077        if test "x$has_space" != x; then
41078          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41080        fi
41081        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41082      fi
41083    fi
41084
41085    # Now join together the path and the arguments once again
41086    if test "x$arguments" != xEOL; then
41087      new_complete="$new_path ${arguments% *}"
41088    else
41089      new_complete="$new_path"
41090    fi
41091
41092    if test "x$complete" != "x$new_complete"; then
41093      STRIP="$new_complete"
41094      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41095$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41096    fi
41097  fi
41098
41099
41100
41101  # Publish this variable in the help.
41102
41103
41104  if [ -z "${NM+x}" ]; then
41105    # The variable is not set by user, try to locate tool using the code snippet
41106    for ac_prog in nm
41107do
41108  # Extract the first word of "$ac_prog", so it can be a program name with args.
41109set dummy $ac_prog; ac_word=$2
41110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41111$as_echo_n "checking for $ac_word... " >&6; }
41112if ${ac_cv_path_NM+:} false; then :
41113  $as_echo_n "(cached) " >&6
41114else
41115  case $NM in
41116  [\\/]* | ?:[\\/]*)
41117  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41118  ;;
41119  *)
41120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41121for as_dir in $PATH
41122do
41123  IFS=$as_save_IFS
41124  test -z "$as_dir" && as_dir=.
41125    for ac_exec_ext in '' $ac_executable_extensions; do
41126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41127    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41129    break 2
41130  fi
41131done
41132  done
41133IFS=$as_save_IFS
41134
41135  ;;
41136esac
41137fi
41138NM=$ac_cv_path_NM
41139if test -n "$NM"; then
41140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41141$as_echo "$NM" >&6; }
41142else
41143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41144$as_echo "no" >&6; }
41145fi
41146
41147
41148  test -n "$NM" && break
41149done
41150
41151  else
41152    # The variable is set, but is it from the command line or the environment?
41153
41154    # Try to remove the string !NM! from our list.
41155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41157      # If it failed, the variable was not from the command line. Ignore it,
41158      # but warn the user (except for BASH, which is always set by the calling BASH).
41159      if test "xNM" != xBASH; then
41160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41161$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41162      fi
41163      # Try to locate tool using the code snippet
41164      for ac_prog in 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_path_NM+:} false; then :
41171  $as_echo_n "(cached) " >&6
41172else
41173  case $NM in
41174  [\\/]* | ?:[\\/]*)
41175  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41176  ;;
41177  *)
41178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41179for as_dir in $PATH
41180do
41181  IFS=$as_save_IFS
41182  test -z "$as_dir" && as_dir=.
41183    for ac_exec_ext in '' $ac_executable_extensions; do
41184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41185    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41187    break 2
41188  fi
41189done
41190  done
41191IFS=$as_save_IFS
41192
41193  ;;
41194esac
41195fi
41196NM=$ac_cv_path_NM
41197if test -n "$NM"; then
41198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41199$as_echo "$NM" >&6; }
41200else
41201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41202$as_echo "no" >&6; }
41203fi
41204
41205
41206  test -n "$NM" && break
41207done
41208
41209    else
41210      # If it succeeded, then it was overridden by the user. We will use it
41211      # for the tool.
41212
41213      # First remove it from the list of overridden variables, so we can test
41214      # for unknown variables in the end.
41215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41216
41217      # Check if we try to supply an empty value
41218      if test "x$NM" = x; then
41219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41220$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41222$as_echo_n "checking for NM... " >&6; }
41223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41224$as_echo "disabled" >&6; }
41225      else
41226        # Check if the provided tool contains a complete path.
41227        tool_specified="$NM"
41228        tool_basename="${tool_specified##*/}"
41229        if test "x$tool_basename" = "x$tool_specified"; then
41230          # A command without a complete path is provided, search $PATH.
41231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41232$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41233          # Extract the first word of "$tool_basename", so it can be a program name with args.
41234set dummy $tool_basename; ac_word=$2
41235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41236$as_echo_n "checking for $ac_word... " >&6; }
41237if ${ac_cv_path_NM+:} false; then :
41238  $as_echo_n "(cached) " >&6
41239else
41240  case $NM in
41241  [\\/]* | ?:[\\/]*)
41242  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41243  ;;
41244  *)
41245  as_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_path_NM="$as_dir/$ac_word$ac_exec_ext"
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
41260  ;;
41261esac
41262fi
41263NM=$ac_cv_path_NM
41264if test -n "$NM"; then
41265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41266$as_echo "$NM" >&6; }
41267else
41268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41269$as_echo "no" >&6; }
41270fi
41271
41272
41273          if test "x$NM" = x; then
41274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41275          fi
41276        else
41277          # Otherwise we believe it is a complete path. Use it as it is.
41278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41279$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41281$as_echo_n "checking for NM... " >&6; }
41282          if test ! -x "$tool_specified"; then
41283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41284$as_echo "not found" >&6; }
41285            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41286          fi
41287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41288$as_echo "$tool_specified" >&6; }
41289        fi
41290      fi
41291    fi
41292
41293  fi
41294
41295
41296
41297  # Only process if variable expands to non-empty
41298
41299  if test "x$NM" != x; then
41300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41301
41302  # First separate the path from the arguments. This will split at the first
41303  # space.
41304  complete="$NM"
41305  path="${complete%% *}"
41306  tmp="$complete EOL"
41307  arguments="${tmp#* }"
41308
41309  # Input might be given as Windows format, start by converting to
41310  # unix format.
41311  new_path=`$CYGPATH -u "$path"`
41312
41313  # Now try to locate executable using which
41314  new_path=`$WHICH "$new_path" 2> /dev/null`
41315  # bat and cmd files are not always considered executable in cygwin causing which
41316  # to not find them
41317  if test "x$new_path" = x \
41318      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41319      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41320    new_path=`$CYGPATH -u "$path"`
41321  fi
41322  if test "x$new_path" = x; then
41323    # Oops. Which didn't find the executable.
41324    # The splitting of arguments from the executable at a space might have been incorrect,
41325    # since paths with space are more likely in Windows. Give it another try with the whole
41326    # argument.
41327    path="$complete"
41328    arguments="EOL"
41329    new_path=`$CYGPATH -u "$path"`
41330    new_path=`$WHICH "$new_path" 2> /dev/null`
41331    # bat and cmd files are not always considered executable in cygwin causing which
41332    # to not find them
41333    if test "x$new_path" = x \
41334        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41335        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41336      new_path=`$CYGPATH -u "$path"`
41337    fi
41338    if test "x$new_path" = x; then
41339      # It's still not found. Now this is an unrecoverable error.
41340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41341$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41342      has_space=`$ECHO "$complete" | $GREP " "`
41343      if test "x$has_space" != x; then
41344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41346      fi
41347      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41348    fi
41349  fi
41350
41351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41354  # "foo.exe" is OK but "foo" is an error.
41355  #
41356  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41357  # It is also a way to make sure we got the proper file name for the real test later on.
41358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41359  if test "x$test_shortpath" = x; then
41360    # Short path failed, file does not exist as specified.
41361    # Try adding .exe or .cmd
41362    if test -f "${new_path}.exe"; then
41363      input_to_shortpath="${new_path}.exe"
41364    elif test -f "${new_path}.cmd"; then
41365      input_to_shortpath="${new_path}.cmd"
41366    else
41367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41368$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41369      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41370$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41371      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41372    fi
41373  else
41374    input_to_shortpath="$new_path"
41375  fi
41376
41377  # Call helper function which possibly converts this using DOS-style short mode.
41378  # If so, the updated path is stored in $new_path.
41379  new_path="$input_to_shortpath"
41380
41381  input_path="$input_to_shortpath"
41382  # Check if we need to convert this using DOS-style short mode. If the path
41383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41384  # take no chances and rewrite it.
41385  # Note: m4 eats our [], so we need to use [ and ] instead.
41386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41387  if test "x$has_forbidden_chars" != x; then
41388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41392      # Going to short mode and back again did indeed matter. Since short mode is
41393      # case insensitive, let's make it lowercase to improve readability.
41394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41395      # Now convert it back to Unix-style (cygpath)
41396      input_path=`$CYGPATH -u "$shortmode_path"`
41397      new_path="$input_path"
41398    fi
41399  fi
41400
41401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41402  if test "x$test_cygdrive_prefix" = x; then
41403    # As a simple fix, exclude /usr/bin since it's not a real path.
41404    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41406      # a path prefixed by /cygdrive for fixpath to work.
41407      new_path="$CYGWIN_ROOT_PATH$input_path"
41408    fi
41409  fi
41410
41411  # remove trailing .exe if any
41412  new_path="${new_path/%.exe/}"
41413
41414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41415
41416  # First separate the path from the arguments. This will split at the first
41417  # space.
41418  complete="$NM"
41419  path="${complete%% *}"
41420  tmp="$complete EOL"
41421  arguments="${tmp#* }"
41422
41423  # Input might be given as Windows format, start by converting to
41424  # unix format.
41425  new_path="$path"
41426
41427  windows_path="$new_path"
41428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41429    unix_path=`$CYGPATH -u "$windows_path"`
41430    new_path="$unix_path"
41431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41433    new_path="$unix_path"
41434  fi
41435
41436
41437  # Now try to locate executable using which
41438  new_path=`$WHICH "$new_path" 2> /dev/null`
41439
41440  if test "x$new_path" = x; then
41441    # Oops. Which didn't find the executable.
41442    # The splitting of arguments from the executable at a space might have been incorrect,
41443    # since paths with space are more likely in Windows. Give it another try with the whole
41444    # argument.
41445    path="$complete"
41446    arguments="EOL"
41447    new_path="$path"
41448
41449  windows_path="$new_path"
41450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41451    unix_path=`$CYGPATH -u "$windows_path"`
41452    new_path="$unix_path"
41453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41455    new_path="$unix_path"
41456  fi
41457
41458
41459    new_path=`$WHICH "$new_path" 2> /dev/null`
41460    # bat and cmd files are not always considered executable in MSYS causing which
41461    # to not find them
41462    if test "x$new_path" = x \
41463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41465      new_path="$path"
41466
41467  windows_path="$new_path"
41468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41469    unix_path=`$CYGPATH -u "$windows_path"`
41470    new_path="$unix_path"
41471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41473    new_path="$unix_path"
41474  fi
41475
41476    fi
41477
41478    if test "x$new_path" = x; then
41479      # It's still not found. Now this is an unrecoverable error.
41480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41481$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41482      has_space=`$ECHO "$complete" | $GREP " "`
41483      if test "x$has_space" != x; then
41484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41486      fi
41487      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41488    fi
41489  fi
41490
41491  # Now new_path has a complete unix path to the binary
41492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41493    # Keep paths in /bin as-is, but remove trailing .exe if any
41494    new_path="${new_path/%.exe/}"
41495    # Do not save /bin paths to all_fixpath_prefixes!
41496  else
41497    # Not in mixed or Windows style, start by that.
41498    new_path=`cmd //c echo $new_path`
41499
41500  input_path="$new_path"
41501  # Check if we need to convert this using DOS-style short mode. If the path
41502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41503  # take no chances and rewrite it.
41504  # Note: m4 eats our [], so we need to use [ and ] instead.
41505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41506  if test "x$has_forbidden_chars" != x; then
41507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41509  fi
41510
41511    # Output is in $new_path
41512
41513  windows_path="$new_path"
41514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41515    unix_path=`$CYGPATH -u "$windows_path"`
41516    new_path="$unix_path"
41517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41519    new_path="$unix_path"
41520  fi
41521
41522    # remove trailing .exe if any
41523    new_path="${new_path/%.exe/}"
41524
41525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41527  fi
41528
41529    else
41530      # We're on a unix platform. Hooray! :)
41531      # First separate the path from the arguments. This will split at the first
41532      # space.
41533      complete="$NM"
41534      path="${complete%% *}"
41535      tmp="$complete EOL"
41536      arguments="${tmp#* }"
41537
41538      # Cannot rely on the command "which" here since it doesn't always work.
41539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41540      if test -z "$is_absolute_path"; then
41541        # Path to executable is not absolute. Find it.
41542        IFS_save="$IFS"
41543        IFS=:
41544        for p in $PATH; do
41545          if test -f "$p/$path" && test -x "$p/$path"; then
41546            new_path="$p/$path"
41547            break
41548          fi
41549        done
41550        IFS="$IFS_save"
41551      else
41552        # This is an absolute path, we can use it without further modifications.
41553        new_path="$path"
41554      fi
41555
41556      if test "x$new_path" = x; then
41557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41558$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41559        has_space=`$ECHO "$complete" | $GREP " "`
41560        if test "x$has_space" != x; then
41561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41563        fi
41564        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41565      fi
41566    fi
41567
41568    # Now join together the path and the arguments once again
41569    if test "x$arguments" != xEOL; then
41570      new_complete="$new_path ${arguments% *}"
41571    else
41572      new_complete="$new_path"
41573    fi
41574
41575    if test "x$complete" != "x$new_complete"; then
41576      NM="$new_complete"
41577      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41578$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41579    fi
41580  fi
41581
41582
41583
41584  # Publish this variable in the help.
41585
41586
41587  if [ -z "${GNM+x}" ]; then
41588    # The variable is not set by user, try to locate tool using the code snippet
41589    for ac_prog in gnm
41590do
41591  # Extract the first word of "$ac_prog", so it can be a program name with args.
41592set dummy $ac_prog; ac_word=$2
41593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41594$as_echo_n "checking for $ac_word... " >&6; }
41595if ${ac_cv_path_GNM+:} false; then :
41596  $as_echo_n "(cached) " >&6
41597else
41598  case $GNM in
41599  [\\/]* | ?:[\\/]*)
41600  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41601  ;;
41602  *)
41603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41604for as_dir in $PATH
41605do
41606  IFS=$as_save_IFS
41607  test -z "$as_dir" && as_dir=.
41608    for ac_exec_ext in '' $ac_executable_extensions; do
41609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41610    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41612    break 2
41613  fi
41614done
41615  done
41616IFS=$as_save_IFS
41617
41618  ;;
41619esac
41620fi
41621GNM=$ac_cv_path_GNM
41622if test -n "$GNM"; then
41623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41624$as_echo "$GNM" >&6; }
41625else
41626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41627$as_echo "no" >&6; }
41628fi
41629
41630
41631  test -n "$GNM" && break
41632done
41633
41634  else
41635    # The variable is set, but is it from the command line or the environment?
41636
41637    # Try to remove the string !GNM! from our list.
41638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41640      # If it failed, the variable was not from the command line. Ignore it,
41641      # but warn the user (except for BASH, which is always set by the calling BASH).
41642      if test "xGNM" != xBASH; then
41643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41644$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41645      fi
41646      # Try to locate tool using the code snippet
41647      for ac_prog in gnm
41648do
41649  # Extract the first word of "$ac_prog", so it can be a program name with args.
41650set dummy $ac_prog; ac_word=$2
41651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41652$as_echo_n "checking for $ac_word... " >&6; }
41653if ${ac_cv_path_GNM+:} false; then :
41654  $as_echo_n "(cached) " >&6
41655else
41656  case $GNM in
41657  [\\/]* | ?:[\\/]*)
41658  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41659  ;;
41660  *)
41661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41662for as_dir in $PATH
41663do
41664  IFS=$as_save_IFS
41665  test -z "$as_dir" && as_dir=.
41666    for ac_exec_ext in '' $ac_executable_extensions; do
41667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41668    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41670    break 2
41671  fi
41672done
41673  done
41674IFS=$as_save_IFS
41675
41676  ;;
41677esac
41678fi
41679GNM=$ac_cv_path_GNM
41680if test -n "$GNM"; then
41681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41682$as_echo "$GNM" >&6; }
41683else
41684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41685$as_echo "no" >&6; }
41686fi
41687
41688
41689  test -n "$GNM" && break
41690done
41691
41692    else
41693      # If it succeeded, then it was overridden by the user. We will use it
41694      # for the tool.
41695
41696      # First remove it from the list of overridden variables, so we can test
41697      # for unknown variables in the end.
41698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41699
41700      # Check if we try to supply an empty value
41701      if test "x$GNM" = x; then
41702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41703$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41705$as_echo_n "checking for GNM... " >&6; }
41706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41707$as_echo "disabled" >&6; }
41708      else
41709        # Check if the provided tool contains a complete path.
41710        tool_specified="$GNM"
41711        tool_basename="${tool_specified##*/}"
41712        if test "x$tool_basename" = "x$tool_specified"; then
41713          # A command without a complete path is provided, search $PATH.
41714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41715$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41716          # Extract the first word of "$tool_basename", so it can be a program name with args.
41717set dummy $tool_basename; ac_word=$2
41718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41719$as_echo_n "checking for $ac_word... " >&6; }
41720if ${ac_cv_path_GNM+:} false; then :
41721  $as_echo_n "(cached) " >&6
41722else
41723  case $GNM in
41724  [\\/]* | ?:[\\/]*)
41725  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41726  ;;
41727  *)
41728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41729for as_dir in $PATH
41730do
41731  IFS=$as_save_IFS
41732  test -z "$as_dir" && as_dir=.
41733    for ac_exec_ext in '' $ac_executable_extensions; do
41734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41735    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41737    break 2
41738  fi
41739done
41740  done
41741IFS=$as_save_IFS
41742
41743  ;;
41744esac
41745fi
41746GNM=$ac_cv_path_GNM
41747if test -n "$GNM"; then
41748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41749$as_echo "$GNM" >&6; }
41750else
41751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41752$as_echo "no" >&6; }
41753fi
41754
41755
41756          if test "x$GNM" = x; then
41757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41758          fi
41759        else
41760          # Otherwise we believe it is a complete path. Use it as it is.
41761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41762$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41764$as_echo_n "checking for GNM... " >&6; }
41765          if test ! -x "$tool_specified"; then
41766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41767$as_echo "not found" >&6; }
41768            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41769          fi
41770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41771$as_echo "$tool_specified" >&6; }
41772        fi
41773      fi
41774    fi
41775
41776  fi
41777
41778
41779
41780  # Only process if variable expands to non-empty
41781
41782  if test "x$GNM" != x; then
41783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41784
41785  # First separate the path from the arguments. This will split at the first
41786  # space.
41787  complete="$GNM"
41788  path="${complete%% *}"
41789  tmp="$complete EOL"
41790  arguments="${tmp#* }"
41791
41792  # Input might be given as Windows format, start by converting to
41793  # unix format.
41794  new_path=`$CYGPATH -u "$path"`
41795
41796  # Now try to locate executable using which
41797  new_path=`$WHICH "$new_path" 2> /dev/null`
41798  # bat and cmd files are not always considered executable in cygwin causing which
41799  # to not find them
41800  if test "x$new_path" = x \
41801      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41802      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41803    new_path=`$CYGPATH -u "$path"`
41804  fi
41805  if test "x$new_path" = x; then
41806    # Oops. Which didn't find the executable.
41807    # The splitting of arguments from the executable at a space might have been incorrect,
41808    # since paths with space are more likely in Windows. Give it another try with the whole
41809    # argument.
41810    path="$complete"
41811    arguments="EOL"
41812    new_path=`$CYGPATH -u "$path"`
41813    new_path=`$WHICH "$new_path" 2> /dev/null`
41814    # bat and cmd files are not always considered executable in cygwin causing which
41815    # to not find them
41816    if test "x$new_path" = x \
41817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41819      new_path=`$CYGPATH -u "$path"`
41820    fi
41821    if test "x$new_path" = x; then
41822      # It's still not found. Now this is an unrecoverable error.
41823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41824$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41825      has_space=`$ECHO "$complete" | $GREP " "`
41826      if test "x$has_space" != x; then
41827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41829      fi
41830      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41831    fi
41832  fi
41833
41834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41837  # "foo.exe" is OK but "foo" is an error.
41838  #
41839  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41840  # It is also a way to make sure we got the proper file name for the real test later on.
41841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41842  if test "x$test_shortpath" = x; then
41843    # Short path failed, file does not exist as specified.
41844    # Try adding .exe or .cmd
41845    if test -f "${new_path}.exe"; then
41846      input_to_shortpath="${new_path}.exe"
41847    elif test -f "${new_path}.cmd"; then
41848      input_to_shortpath="${new_path}.cmd"
41849    else
41850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41851$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41854      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41855    fi
41856  else
41857    input_to_shortpath="$new_path"
41858  fi
41859
41860  # Call helper function which possibly converts this using DOS-style short mode.
41861  # If so, the updated path is stored in $new_path.
41862  new_path="$input_to_shortpath"
41863
41864  input_path="$input_to_shortpath"
41865  # Check if we need to convert this using DOS-style short mode. If the path
41866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41867  # take no chances and rewrite it.
41868  # Note: m4 eats our [], so we need to use [ and ] instead.
41869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41870  if test "x$has_forbidden_chars" != x; then
41871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41875      # Going to short mode and back again did indeed matter. Since short mode is
41876      # case insensitive, let's make it lowercase to improve readability.
41877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41878      # Now convert it back to Unix-style (cygpath)
41879      input_path=`$CYGPATH -u "$shortmode_path"`
41880      new_path="$input_path"
41881    fi
41882  fi
41883
41884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41885  if test "x$test_cygdrive_prefix" = x; then
41886    # As a simple fix, exclude /usr/bin since it's not a real path.
41887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41889      # a path prefixed by /cygdrive for fixpath to work.
41890      new_path="$CYGWIN_ROOT_PATH$input_path"
41891    fi
41892  fi
41893
41894  # remove trailing .exe if any
41895  new_path="${new_path/%.exe/}"
41896
41897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41898
41899  # First separate the path from the arguments. This will split at the first
41900  # space.
41901  complete="$GNM"
41902  path="${complete%% *}"
41903  tmp="$complete EOL"
41904  arguments="${tmp#* }"
41905
41906  # Input might be given as Windows format, start by converting to
41907  # unix format.
41908  new_path="$path"
41909
41910  windows_path="$new_path"
41911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41912    unix_path=`$CYGPATH -u "$windows_path"`
41913    new_path="$unix_path"
41914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41916    new_path="$unix_path"
41917  fi
41918
41919
41920  # Now try to locate executable using which
41921  new_path=`$WHICH "$new_path" 2> /dev/null`
41922
41923  if test "x$new_path" = x; then
41924    # Oops. Which didn't find the executable.
41925    # The splitting of arguments from the executable at a space might have been incorrect,
41926    # since paths with space are more likely in Windows. Give it another try with the whole
41927    # argument.
41928    path="$complete"
41929    arguments="EOL"
41930    new_path="$path"
41931
41932  windows_path="$new_path"
41933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41934    unix_path=`$CYGPATH -u "$windows_path"`
41935    new_path="$unix_path"
41936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41938    new_path="$unix_path"
41939  fi
41940
41941
41942    new_path=`$WHICH "$new_path" 2> /dev/null`
41943    # bat and cmd files are not always considered executable in MSYS causing which
41944    # to not find them
41945    if test "x$new_path" = x \
41946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41948      new_path="$path"
41949
41950  windows_path="$new_path"
41951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41952    unix_path=`$CYGPATH -u "$windows_path"`
41953    new_path="$unix_path"
41954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41956    new_path="$unix_path"
41957  fi
41958
41959    fi
41960
41961    if test "x$new_path" = x; then
41962      # It's still not found. Now this is an unrecoverable error.
41963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41964$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41965      has_space=`$ECHO "$complete" | $GREP " "`
41966      if test "x$has_space" != x; then
41967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41969      fi
41970      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41971    fi
41972  fi
41973
41974  # Now new_path has a complete unix path to the binary
41975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41976    # Keep paths in /bin as-is, but remove trailing .exe if any
41977    new_path="${new_path/%.exe/}"
41978    # Do not save /bin paths to all_fixpath_prefixes!
41979  else
41980    # Not in mixed or Windows style, start by that.
41981    new_path=`cmd //c echo $new_path`
41982
41983  input_path="$new_path"
41984  # Check if we need to convert this using DOS-style short mode. If the path
41985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41986  # take no chances and rewrite it.
41987  # Note: m4 eats our [], so we need to use [ and ] instead.
41988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41989  if test "x$has_forbidden_chars" != x; then
41990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41992  fi
41993
41994    # Output is in $new_path
41995
41996  windows_path="$new_path"
41997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41998    unix_path=`$CYGPATH -u "$windows_path"`
41999    new_path="$unix_path"
42000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42002    new_path="$unix_path"
42003  fi
42004
42005    # remove trailing .exe if any
42006    new_path="${new_path/%.exe/}"
42007
42008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42010  fi
42011
42012    else
42013      # We're on a unix platform. Hooray! :)
42014      # First separate the path from the arguments. This will split at the first
42015      # space.
42016      complete="$GNM"
42017      path="${complete%% *}"
42018      tmp="$complete EOL"
42019      arguments="${tmp#* }"
42020
42021      # Cannot rely on the command "which" here since it doesn't always work.
42022      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42023      if test -z "$is_absolute_path"; then
42024        # Path to executable is not absolute. Find it.
42025        IFS_save="$IFS"
42026        IFS=:
42027        for p in $PATH; do
42028          if test -f "$p/$path" && test -x "$p/$path"; then
42029            new_path="$p/$path"
42030            break
42031          fi
42032        done
42033        IFS="$IFS_save"
42034      else
42035        # This is an absolute path, we can use it without further modifications.
42036        new_path="$path"
42037      fi
42038
42039      if test "x$new_path" = x; then
42040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42041$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42042        has_space=`$ECHO "$complete" | $GREP " "`
42043        if test "x$has_space" != x; then
42044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42046        fi
42047        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42048      fi
42049    fi
42050
42051    # Now join together the path and the arguments once again
42052    if test "x$arguments" != xEOL; then
42053      new_complete="$new_path ${arguments% *}"
42054    else
42055      new_complete="$new_path"
42056    fi
42057
42058    if test "x$complete" != "x$new_complete"; then
42059      GNM="$new_complete"
42060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42061$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42062    fi
42063  fi
42064
42065  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42066    # FIXME: we should unify this with the solaris case above.
42067
42068
42069  # Publish this variable in the help.
42070
42071
42072  if [ -z "${STRIP+x}" ]; then
42073    # The variable is not set by user, try to locate tool using the code snippet
42074    if test -n "$ac_tool_prefix"; then
42075  for ac_prog in strip
42076  do
42077    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42080$as_echo_n "checking for $ac_word... " >&6; }
42081if ${ac_cv_prog_STRIP+:} false; then :
42082  $as_echo_n "(cached) " >&6
42083else
42084  if test -n "$STRIP"; then
42085  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42086else
42087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42088for as_dir in $PATH
42089do
42090  IFS=$as_save_IFS
42091  test -z "$as_dir" && as_dir=.
42092    for ac_exec_ext in '' $ac_executable_extensions; do
42093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42094    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42096    break 2
42097  fi
42098done
42099  done
42100IFS=$as_save_IFS
42101
42102fi
42103fi
42104STRIP=$ac_cv_prog_STRIP
42105if test -n "$STRIP"; then
42106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42107$as_echo "$STRIP" >&6; }
42108else
42109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42110$as_echo "no" >&6; }
42111fi
42112
42113
42114    test -n "$STRIP" && break
42115  done
42116fi
42117if test -z "$STRIP"; then
42118  ac_ct_STRIP=$STRIP
42119  for ac_prog in strip
42120do
42121  # Extract the first word of "$ac_prog", so it can be a program name with args.
42122set dummy $ac_prog; ac_word=$2
42123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42124$as_echo_n "checking for $ac_word... " >&6; }
42125if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42126  $as_echo_n "(cached) " >&6
42127else
42128  if test -n "$ac_ct_STRIP"; then
42129  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42130else
42131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42132for as_dir in $PATH
42133do
42134  IFS=$as_save_IFS
42135  test -z "$as_dir" && as_dir=.
42136    for ac_exec_ext in '' $ac_executable_extensions; do
42137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42138    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42140    break 2
42141  fi
42142done
42143  done
42144IFS=$as_save_IFS
42145
42146fi
42147fi
42148ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42149if test -n "$ac_ct_STRIP"; then
42150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42151$as_echo "$ac_ct_STRIP" >&6; }
42152else
42153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42154$as_echo "no" >&6; }
42155fi
42156
42157
42158  test -n "$ac_ct_STRIP" && break
42159done
42160
42161  if test "x$ac_ct_STRIP" = x; then
42162    STRIP=""
42163  else
42164    case $cross_compiling:$ac_tool_warned in
42165yes:)
42166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42168ac_tool_warned=yes ;;
42169esac
42170    STRIP=$ac_ct_STRIP
42171  fi
42172fi
42173
42174  else
42175    # The variable is set, but is it from the command line or the environment?
42176
42177    # Try to remove the string !STRIP! from our list.
42178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42180      # If it failed, the variable was not from the command line. Ignore it,
42181      # but warn the user (except for BASH, which is always set by the calling BASH).
42182      if test "xSTRIP" != xBASH; then
42183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42184$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42185      fi
42186      # Try to locate tool using the code snippet
42187      if test -n "$ac_tool_prefix"; then
42188  for ac_prog in strip
42189  do
42190    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42191set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42193$as_echo_n "checking for $ac_word... " >&6; }
42194if ${ac_cv_prog_STRIP+:} false; then :
42195  $as_echo_n "(cached) " >&6
42196else
42197  if test -n "$STRIP"; then
42198  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42199else
42200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42201for as_dir in $PATH
42202do
42203  IFS=$as_save_IFS
42204  test -z "$as_dir" && as_dir=.
42205    for ac_exec_ext in '' $ac_executable_extensions; do
42206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42207    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42209    break 2
42210  fi
42211done
42212  done
42213IFS=$as_save_IFS
42214
42215fi
42216fi
42217STRIP=$ac_cv_prog_STRIP
42218if test -n "$STRIP"; then
42219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42220$as_echo "$STRIP" >&6; }
42221else
42222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42223$as_echo "no" >&6; }
42224fi
42225
42226
42227    test -n "$STRIP" && break
42228  done
42229fi
42230if test -z "$STRIP"; then
42231  ac_ct_STRIP=$STRIP
42232  for ac_prog in strip
42233do
42234  # Extract the first word of "$ac_prog", so it can be a program name with args.
42235set dummy $ac_prog; ac_word=$2
42236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42237$as_echo_n "checking for $ac_word... " >&6; }
42238if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42239  $as_echo_n "(cached) " >&6
42240else
42241  if test -n "$ac_ct_STRIP"; then
42242  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42243else
42244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42245for as_dir in $PATH
42246do
42247  IFS=$as_save_IFS
42248  test -z "$as_dir" && as_dir=.
42249    for ac_exec_ext in '' $ac_executable_extensions; do
42250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42251    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42253    break 2
42254  fi
42255done
42256  done
42257IFS=$as_save_IFS
42258
42259fi
42260fi
42261ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42262if test -n "$ac_ct_STRIP"; then
42263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42264$as_echo "$ac_ct_STRIP" >&6; }
42265else
42266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42267$as_echo "no" >&6; }
42268fi
42269
42270
42271  test -n "$ac_ct_STRIP" && break
42272done
42273
42274  if test "x$ac_ct_STRIP" = x; then
42275    STRIP=""
42276  else
42277    case $cross_compiling:$ac_tool_warned in
42278yes:)
42279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42281ac_tool_warned=yes ;;
42282esac
42283    STRIP=$ac_ct_STRIP
42284  fi
42285fi
42286
42287    else
42288      # If it succeeded, then it was overridden by the user. We will use it
42289      # for the tool.
42290
42291      # First remove it from the list of overridden variables, so we can test
42292      # for unknown variables in the end.
42293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42294
42295      # Check if we try to supply an empty value
42296      if test "x$STRIP" = x; then
42297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42298$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42300$as_echo_n "checking for STRIP... " >&6; }
42301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42302$as_echo "disabled" >&6; }
42303      else
42304        # Check if the provided tool contains a complete path.
42305        tool_specified="$STRIP"
42306        tool_basename="${tool_specified##*/}"
42307        if test "x$tool_basename" = "x$tool_specified"; then
42308          # A command without a complete path is provided, search $PATH.
42309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42310$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42311          # Extract the first word of "$tool_basename", so it can be a program name with args.
42312set dummy $tool_basename; ac_word=$2
42313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42314$as_echo_n "checking for $ac_word... " >&6; }
42315if ${ac_cv_path_STRIP+:} false; then :
42316  $as_echo_n "(cached) " >&6
42317else
42318  case $STRIP in
42319  [\\/]* | ?:[\\/]*)
42320  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42321  ;;
42322  *)
42323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42324for as_dir in $PATH
42325do
42326  IFS=$as_save_IFS
42327  test -z "$as_dir" && as_dir=.
42328    for ac_exec_ext in '' $ac_executable_extensions; do
42329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42330    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42332    break 2
42333  fi
42334done
42335  done
42336IFS=$as_save_IFS
42337
42338  ;;
42339esac
42340fi
42341STRIP=$ac_cv_path_STRIP
42342if test -n "$STRIP"; then
42343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42344$as_echo "$STRIP" >&6; }
42345else
42346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42347$as_echo "no" >&6; }
42348fi
42349
42350
42351          if test "x$STRIP" = x; then
42352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42353          fi
42354        else
42355          # Otherwise we believe it is a complete path. Use it as it is.
42356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42357$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42359$as_echo_n "checking for STRIP... " >&6; }
42360          if test ! -x "$tool_specified"; then
42361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42362$as_echo "not found" >&6; }
42363            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42364          fi
42365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42366$as_echo "$tool_specified" >&6; }
42367        fi
42368      fi
42369    fi
42370
42371  fi
42372
42373
42374
42375  # Only process if variable expands to non-empty
42376
42377  if test "x$STRIP" != x; then
42378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42379
42380  # First separate the path from the arguments. This will split at the first
42381  # space.
42382  complete="$STRIP"
42383  path="${complete%% *}"
42384  tmp="$complete EOL"
42385  arguments="${tmp#* }"
42386
42387  # Input might be given as Windows format, start by converting to
42388  # unix format.
42389  new_path=`$CYGPATH -u "$path"`
42390
42391  # Now try to locate executable using which
42392  new_path=`$WHICH "$new_path" 2> /dev/null`
42393  # bat and cmd files are not always considered executable in cygwin causing which
42394  # to not find them
42395  if test "x$new_path" = x \
42396      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42397      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42398    new_path=`$CYGPATH -u "$path"`
42399  fi
42400  if test "x$new_path" = x; then
42401    # Oops. Which didn't find the executable.
42402    # The splitting of arguments from the executable at a space might have been incorrect,
42403    # since paths with space are more likely in Windows. Give it another try with the whole
42404    # argument.
42405    path="$complete"
42406    arguments="EOL"
42407    new_path=`$CYGPATH -u "$path"`
42408    new_path=`$WHICH "$new_path" 2> /dev/null`
42409    # bat and cmd files are not always considered executable in cygwin causing which
42410    # to not find them
42411    if test "x$new_path" = x \
42412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42414      new_path=`$CYGPATH -u "$path"`
42415    fi
42416    if test "x$new_path" = x; then
42417      # It's still not found. Now this is an unrecoverable error.
42418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42419$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42420      has_space=`$ECHO "$complete" | $GREP " "`
42421      if test "x$has_space" != x; then
42422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42424      fi
42425      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42426    fi
42427  fi
42428
42429  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42430  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42431  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42432  # "foo.exe" is OK but "foo" is an error.
42433  #
42434  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42435  # It is also a way to make sure we got the proper file name for the real test later on.
42436  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42437  if test "x$test_shortpath" = x; then
42438    # Short path failed, file does not exist as specified.
42439    # Try adding .exe or .cmd
42440    if test -f "${new_path}.exe"; then
42441      input_to_shortpath="${new_path}.exe"
42442    elif test -f "${new_path}.cmd"; then
42443      input_to_shortpath="${new_path}.cmd"
42444    else
42445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42446$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42447      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42448$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42449      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42450    fi
42451  else
42452    input_to_shortpath="$new_path"
42453  fi
42454
42455  # Call helper function which possibly converts this using DOS-style short mode.
42456  # If so, the updated path is stored in $new_path.
42457  new_path="$input_to_shortpath"
42458
42459  input_path="$input_to_shortpath"
42460  # Check if we need to convert this using DOS-style short mode. If the path
42461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42462  # take no chances and rewrite it.
42463  # Note: m4 eats our [], so we need to use [ and ] instead.
42464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42465  if test "x$has_forbidden_chars" != x; then
42466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42470      # Going to short mode and back again did indeed matter. Since short mode is
42471      # case insensitive, let's make it lowercase to improve readability.
42472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42473      # Now convert it back to Unix-style (cygpath)
42474      input_path=`$CYGPATH -u "$shortmode_path"`
42475      new_path="$input_path"
42476    fi
42477  fi
42478
42479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42480  if test "x$test_cygdrive_prefix" = x; then
42481    # As a simple fix, exclude /usr/bin since it's not a real path.
42482    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42484      # a path prefixed by /cygdrive for fixpath to work.
42485      new_path="$CYGWIN_ROOT_PATH$input_path"
42486    fi
42487  fi
42488
42489  # remove trailing .exe if any
42490  new_path="${new_path/%.exe/}"
42491
42492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42493
42494  # First separate the path from the arguments. This will split at the first
42495  # space.
42496  complete="$STRIP"
42497  path="${complete%% *}"
42498  tmp="$complete EOL"
42499  arguments="${tmp#* }"
42500
42501  # Input might be given as Windows format, start by converting to
42502  # unix format.
42503  new_path="$path"
42504
42505  windows_path="$new_path"
42506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42507    unix_path=`$CYGPATH -u "$windows_path"`
42508    new_path="$unix_path"
42509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42511    new_path="$unix_path"
42512  fi
42513
42514
42515  # Now try to locate executable using which
42516  new_path=`$WHICH "$new_path" 2> /dev/null`
42517
42518  if test "x$new_path" = x; then
42519    # Oops. Which didn't find the executable.
42520    # The splitting of arguments from the executable at a space might have been incorrect,
42521    # since paths with space are more likely in Windows. Give it another try with the whole
42522    # argument.
42523    path="$complete"
42524    arguments="EOL"
42525    new_path="$path"
42526
42527  windows_path="$new_path"
42528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42529    unix_path=`$CYGPATH -u "$windows_path"`
42530    new_path="$unix_path"
42531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42533    new_path="$unix_path"
42534  fi
42535
42536
42537    new_path=`$WHICH "$new_path" 2> /dev/null`
42538    # bat and cmd files are not always considered executable in MSYS causing which
42539    # to not find them
42540    if test "x$new_path" = x \
42541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42543      new_path="$path"
42544
42545  windows_path="$new_path"
42546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42547    unix_path=`$CYGPATH -u "$windows_path"`
42548    new_path="$unix_path"
42549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42551    new_path="$unix_path"
42552  fi
42553
42554    fi
42555
42556    if test "x$new_path" = x; then
42557      # It's still not found. Now this is an unrecoverable error.
42558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42559$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42560      has_space=`$ECHO "$complete" | $GREP " "`
42561      if test "x$has_space" != x; then
42562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42564      fi
42565      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42566    fi
42567  fi
42568
42569  # Now new_path has a complete unix path to the binary
42570  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42571    # Keep paths in /bin as-is, but remove trailing .exe if any
42572    new_path="${new_path/%.exe/}"
42573    # Do not save /bin paths to all_fixpath_prefixes!
42574  else
42575    # Not in mixed or Windows style, start by that.
42576    new_path=`cmd //c echo $new_path`
42577
42578  input_path="$new_path"
42579  # Check if we need to convert this using DOS-style short mode. If the path
42580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42581  # take no chances and rewrite it.
42582  # Note: m4 eats our [], so we need to use [ and ] instead.
42583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42584  if test "x$has_forbidden_chars" != x; then
42585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42587  fi
42588
42589    # Output is in $new_path
42590
42591  windows_path="$new_path"
42592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42593    unix_path=`$CYGPATH -u "$windows_path"`
42594    new_path="$unix_path"
42595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42597    new_path="$unix_path"
42598  fi
42599
42600    # remove trailing .exe if any
42601    new_path="${new_path/%.exe/}"
42602
42603    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42604    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42605  fi
42606
42607    else
42608      # We're on a unix platform. Hooray! :)
42609      # First separate the path from the arguments. This will split at the first
42610      # space.
42611      complete="$STRIP"
42612      path="${complete%% *}"
42613      tmp="$complete EOL"
42614      arguments="${tmp#* }"
42615
42616      # Cannot rely on the command "which" here since it doesn't always work.
42617      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42618      if test -z "$is_absolute_path"; then
42619        # Path to executable is not absolute. Find it.
42620        IFS_save="$IFS"
42621        IFS=:
42622        for p in $PATH; do
42623          if test -f "$p/$path" && test -x "$p/$path"; then
42624            new_path="$p/$path"
42625            break
42626          fi
42627        done
42628        IFS="$IFS_save"
42629      else
42630        # This is an absolute path, we can use it without further modifications.
42631        new_path="$path"
42632      fi
42633
42634      if test "x$new_path" = x; then
42635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42636$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42637        has_space=`$ECHO "$complete" | $GREP " "`
42638        if test "x$has_space" != x; then
42639          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42640$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42641        fi
42642        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42643      fi
42644    fi
42645
42646    # Now join together the path and the arguments once again
42647    if test "x$arguments" != xEOL; then
42648      new_complete="$new_path ${arguments% *}"
42649    else
42650      new_complete="$new_path"
42651    fi
42652
42653    if test "x$complete" != "x$new_complete"; then
42654      STRIP="$new_complete"
42655      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42656$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42657    fi
42658  fi
42659
42660    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42661
42662
42663  # Publish this variable in the help.
42664
42665
42666  if [ -z "${NM+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 nm gcc-nm
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_NM+:} false; then :
42676  $as_echo_n "(cached) " >&6
42677else
42678  if test -n "$NM"; then
42679  ac_cv_prog_NM="$NM" # 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_NM="$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
42698NM=$ac_cv_prog_NM
42699if test -n "$NM"; then
42700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42701$as_echo "$NM" >&6; }
42702else
42703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42704$as_echo "no" >&6; }
42705fi
42706
42707
42708    test -n "$NM" && break
42709  done
42710fi
42711if test -z "$NM"; then
42712  ac_ct_NM=$NM
42713  for ac_prog in nm gcc-nm
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_NM+:} false; then :
42720  $as_echo_n "(cached) " >&6
42721else
42722  if test -n "$ac_ct_NM"; then
42723  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_NM="$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_NM=$ac_cv_prog_ac_ct_NM
42743if test -n "$ac_ct_NM"; then
42744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42745$as_echo "$ac_ct_NM" >&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_NM" && break
42753done
42754
42755  if test "x$ac_ct_NM" = x; then
42756    NM=""
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    NM=$ac_ct_NM
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 !NM! from our list.
42772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
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 "xNM" != xBASH; then
42777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42778$as_echo "$as_me: WARNING: Ignoring value of NM 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 nm gcc-nm
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_NM+:} false; then :
42789  $as_echo_n "(cached) " >&6
42790else
42791  if test -n "$NM"; then
42792  ac_cv_prog_NM="$NM" # 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_NM="$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
42811NM=$ac_cv_prog_NM
42812if test -n "$NM"; then
42813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42814$as_echo "$NM" >&6; }
42815else
42816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42817$as_echo "no" >&6; }
42818fi
42819
42820
42821    test -n "$NM" && break
42822  done
42823fi
42824if test -z "$NM"; then
42825  ac_ct_NM=$NM
42826  for ac_prog in nm gcc-nm
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_NM+:} false; then :
42833  $as_echo_n "(cached) " >&6
42834else
42835  if test -n "$ac_ct_NM"; then
42836  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_NM="$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_NM=$ac_cv_prog_ac_ct_NM
42856if test -n "$ac_ct_NM"; then
42857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42858$as_echo "$ac_ct_NM" >&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_NM" && break
42866done
42867
42868  if test "x$ac_ct_NM" = x; then
42869    NM=""
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    NM=$ac_ct_NM
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$NM" = x; then
42891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42892$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42894$as_echo_n "checking for NM... " >&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="$NM"
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 NM=$tool_basename" >&5
42904$as_echo "$as_me: Will search for user supplied tool NM=$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_NM+:} false; then :
42910  $as_echo_n "(cached) " >&6
42911else
42912  case $NM in
42913  [\\/]* | ?:[\\/]*)
42914  ac_cv_path_NM="$NM" # 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_NM="$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
42935NM=$ac_cv_path_NM
42936if test -n "$NM"; then
42937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42938$as_echo "$NM" >&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$NM" = 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 NM=$tool_specified" >&5
42951$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42953$as_echo_n "checking for NM... " >&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 NM=$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    else
42969
42970
42971  # Publish this variable in the help.
42972
42973
42974  if [ -z "${NM+x}" ]; then
42975    # The variable is not set by user, try to locate tool using the code snippet
42976    if test -n "$ac_tool_prefix"; then
42977  for ac_prog in nm
42978  do
42979    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42982$as_echo_n "checking for $ac_word... " >&6; }
42983if ${ac_cv_prog_NM+:} false; then :
42984  $as_echo_n "(cached) " >&6
42985else
42986  if test -n "$NM"; then
42987  ac_cv_prog_NM="$NM" # Let the user override the test.
42988else
42989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42990for as_dir in $PATH
42991do
42992  IFS=$as_save_IFS
42993  test -z "$as_dir" && as_dir=.
42994    for ac_exec_ext in '' $ac_executable_extensions; do
42995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42996    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42998    break 2
42999  fi
43000done
43001  done
43002IFS=$as_save_IFS
43003
43004fi
43005fi
43006NM=$ac_cv_prog_NM
43007if test -n "$NM"; then
43008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43009$as_echo "$NM" >&6; }
43010else
43011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43012$as_echo "no" >&6; }
43013fi
43014
43015
43016    test -n "$NM" && break
43017  done
43018fi
43019if test -z "$NM"; then
43020  ac_ct_NM=$NM
43021  for ac_prog in nm
43022do
43023  # Extract the first word of "$ac_prog", so it can be a program name with args.
43024set dummy $ac_prog; ac_word=$2
43025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43026$as_echo_n "checking for $ac_word... " >&6; }
43027if ${ac_cv_prog_ac_ct_NM+:} false; then :
43028  $as_echo_n "(cached) " >&6
43029else
43030  if test -n "$ac_ct_NM"; then
43031  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43032else
43033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43034for as_dir in $PATH
43035do
43036  IFS=$as_save_IFS
43037  test -z "$as_dir" && as_dir=.
43038    for ac_exec_ext in '' $ac_executable_extensions; do
43039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43040    ac_cv_prog_ac_ct_NM="$ac_prog"
43041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43042    break 2
43043  fi
43044done
43045  done
43046IFS=$as_save_IFS
43047
43048fi
43049fi
43050ac_ct_NM=$ac_cv_prog_ac_ct_NM
43051if test -n "$ac_ct_NM"; then
43052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43053$as_echo "$ac_ct_NM" >&6; }
43054else
43055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43056$as_echo "no" >&6; }
43057fi
43058
43059
43060  test -n "$ac_ct_NM" && break
43061done
43062
43063  if test "x$ac_ct_NM" = x; then
43064    NM=""
43065  else
43066    case $cross_compiling:$ac_tool_warned in
43067yes:)
43068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43070ac_tool_warned=yes ;;
43071esac
43072    NM=$ac_ct_NM
43073  fi
43074fi
43075
43076  else
43077    # The variable is set, but is it from the command line or the environment?
43078
43079    # Try to remove the string !NM! from our list.
43080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43082      # If it failed, the variable was not from the command line. Ignore it,
43083      # but warn the user (except for BASH, which is always set by the calling BASH).
43084      if test "xNM" != xBASH; then
43085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43086$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43087      fi
43088      # Try to locate tool using the code snippet
43089      if test -n "$ac_tool_prefix"; then
43090  for ac_prog in nm
43091  do
43092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43095$as_echo_n "checking for $ac_word... " >&6; }
43096if ${ac_cv_prog_NM+:} false; then :
43097  $as_echo_n "(cached) " >&6
43098else
43099  if test -n "$NM"; then
43100  ac_cv_prog_NM="$NM" # Let the user override the test.
43101else
43102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43103for as_dir in $PATH
43104do
43105  IFS=$as_save_IFS
43106  test -z "$as_dir" && as_dir=.
43107    for ac_exec_ext in '' $ac_executable_extensions; do
43108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43109    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43111    break 2
43112  fi
43113done
43114  done
43115IFS=$as_save_IFS
43116
43117fi
43118fi
43119NM=$ac_cv_prog_NM
43120if test -n "$NM"; then
43121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43122$as_echo "$NM" >&6; }
43123else
43124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43125$as_echo "no" >&6; }
43126fi
43127
43128
43129    test -n "$NM" && break
43130  done
43131fi
43132if test -z "$NM"; then
43133  ac_ct_NM=$NM
43134  for ac_prog in nm
43135do
43136  # Extract the first word of "$ac_prog", so it can be a program name with args.
43137set dummy $ac_prog; ac_word=$2
43138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43139$as_echo_n "checking for $ac_word... " >&6; }
43140if ${ac_cv_prog_ac_ct_NM+:} false; then :
43141  $as_echo_n "(cached) " >&6
43142else
43143  if test -n "$ac_ct_NM"; then
43144  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43145else
43146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43147for as_dir in $PATH
43148do
43149  IFS=$as_save_IFS
43150  test -z "$as_dir" && as_dir=.
43151    for ac_exec_ext in '' $ac_executable_extensions; do
43152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43153    ac_cv_prog_ac_ct_NM="$ac_prog"
43154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43155    break 2
43156  fi
43157done
43158  done
43159IFS=$as_save_IFS
43160
43161fi
43162fi
43163ac_ct_NM=$ac_cv_prog_ac_ct_NM
43164if test -n "$ac_ct_NM"; then
43165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43166$as_echo "$ac_ct_NM" >&6; }
43167else
43168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43169$as_echo "no" >&6; }
43170fi
43171
43172
43173  test -n "$ac_ct_NM" && break
43174done
43175
43176  if test "x$ac_ct_NM" = x; then
43177    NM=""
43178  else
43179    case $cross_compiling:$ac_tool_warned in
43180yes:)
43181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43183ac_tool_warned=yes ;;
43184esac
43185    NM=$ac_ct_NM
43186  fi
43187fi
43188
43189    else
43190      # If it succeeded, then it was overridden by the user. We will use it
43191      # for the tool.
43192
43193      # First remove it from the list of overridden variables, so we can test
43194      # for unknown variables in the end.
43195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43196
43197      # Check if we try to supply an empty value
43198      if test "x$NM" = x; then
43199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43200$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43202$as_echo_n "checking for NM... " >&6; }
43203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43204$as_echo "disabled" >&6; }
43205      else
43206        # Check if the provided tool contains a complete path.
43207        tool_specified="$NM"
43208        tool_basename="${tool_specified##*/}"
43209        if test "x$tool_basename" = "x$tool_specified"; then
43210          # A command without a complete path is provided, search $PATH.
43211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43212$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43213          # Extract the first word of "$tool_basename", so it can be a program name with args.
43214set dummy $tool_basename; ac_word=$2
43215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43216$as_echo_n "checking for $ac_word... " >&6; }
43217if ${ac_cv_path_NM+:} false; then :
43218  $as_echo_n "(cached) " >&6
43219else
43220  case $NM in
43221  [\\/]* | ?:[\\/]*)
43222  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43223  ;;
43224  *)
43225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43226for as_dir in $PATH
43227do
43228  IFS=$as_save_IFS
43229  test -z "$as_dir" && as_dir=.
43230    for ac_exec_ext in '' $ac_executable_extensions; do
43231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43232    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43234    break 2
43235  fi
43236done
43237  done
43238IFS=$as_save_IFS
43239
43240  ;;
43241esac
43242fi
43243NM=$ac_cv_path_NM
43244if test -n "$NM"; then
43245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43246$as_echo "$NM" >&6; }
43247else
43248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43249$as_echo "no" >&6; }
43250fi
43251
43252
43253          if test "x$NM" = x; then
43254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43255          fi
43256        else
43257          # Otherwise we believe it is a complete path. Use it as it is.
43258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43259$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43261$as_echo_n "checking for NM... " >&6; }
43262          if test ! -x "$tool_specified"; then
43263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43264$as_echo "not found" >&6; }
43265            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43266          fi
43267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43268$as_echo "$tool_specified" >&6; }
43269        fi
43270      fi
43271    fi
43272
43273  fi
43274
43275
43276    fi
43277
43278  # Only process if variable expands to non-empty
43279
43280  if test "x$NM" != x; then
43281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43282
43283  # First separate the path from the arguments. This will split at the first
43284  # space.
43285  complete="$NM"
43286  path="${complete%% *}"
43287  tmp="$complete EOL"
43288  arguments="${tmp#* }"
43289
43290  # Input might be given as Windows format, start by converting to
43291  # unix format.
43292  new_path=`$CYGPATH -u "$path"`
43293
43294  # Now try to locate executable using which
43295  new_path=`$WHICH "$new_path" 2> /dev/null`
43296  # bat and cmd files are not always considered executable in cygwin causing which
43297  # to not find them
43298  if test "x$new_path" = x \
43299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43301    new_path=`$CYGPATH -u "$path"`
43302  fi
43303  if test "x$new_path" = x; then
43304    # Oops. Which didn't find the executable.
43305    # The splitting of arguments from the executable at a space might have been incorrect,
43306    # since paths with space are more likely in Windows. Give it another try with the whole
43307    # argument.
43308    path="$complete"
43309    arguments="EOL"
43310    new_path=`$CYGPATH -u "$path"`
43311    new_path=`$WHICH "$new_path" 2> /dev/null`
43312    # bat and cmd files are not always considered executable in cygwin causing which
43313    # to not find them
43314    if test "x$new_path" = x \
43315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43317      new_path=`$CYGPATH -u "$path"`
43318    fi
43319    if test "x$new_path" = x; then
43320      # It's still not found. Now this is an unrecoverable error.
43321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43322$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43323      has_space=`$ECHO "$complete" | $GREP " "`
43324      if test "x$has_space" != x; then
43325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43327      fi
43328      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43329    fi
43330  fi
43331
43332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43335  # "foo.exe" is OK but "foo" is an error.
43336  #
43337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43338  # It is also a way to make sure we got the proper file name for the real test later on.
43339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43340  if test "x$test_shortpath" = x; then
43341    # Short path failed, file does not exist as specified.
43342    # Try adding .exe or .cmd
43343    if test -f "${new_path}.exe"; then
43344      input_to_shortpath="${new_path}.exe"
43345    elif test -f "${new_path}.cmd"; then
43346      input_to_shortpath="${new_path}.cmd"
43347    else
43348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43349$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43352      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43353    fi
43354  else
43355    input_to_shortpath="$new_path"
43356  fi
43357
43358  # Call helper function which possibly converts this using DOS-style short mode.
43359  # If so, the updated path is stored in $new_path.
43360  new_path="$input_to_shortpath"
43361
43362  input_path="$input_to_shortpath"
43363  # Check if we need to convert this using DOS-style short mode. If the path
43364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43365  # take no chances and rewrite it.
43366  # Note: m4 eats our [], so we need to use [ and ] instead.
43367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43368  if test "x$has_forbidden_chars" != x; then
43369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43373      # Going to short mode and back again did indeed matter. Since short mode is
43374      # case insensitive, let's make it lowercase to improve readability.
43375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43376      # Now convert it back to Unix-style (cygpath)
43377      input_path=`$CYGPATH -u "$shortmode_path"`
43378      new_path="$input_path"
43379    fi
43380  fi
43381
43382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43383  if test "x$test_cygdrive_prefix" = x; then
43384    # As a simple fix, exclude /usr/bin since it's not a real path.
43385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43387      # a path prefixed by /cygdrive for fixpath to work.
43388      new_path="$CYGWIN_ROOT_PATH$input_path"
43389    fi
43390  fi
43391
43392  # remove trailing .exe if any
43393  new_path="${new_path/%.exe/}"
43394
43395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43396
43397  # First separate the path from the arguments. This will split at the first
43398  # space.
43399  complete="$NM"
43400  path="${complete%% *}"
43401  tmp="$complete EOL"
43402  arguments="${tmp#* }"
43403
43404  # Input might be given as Windows format, start by converting to
43405  # unix format.
43406  new_path="$path"
43407
43408  windows_path="$new_path"
43409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43410    unix_path=`$CYGPATH -u "$windows_path"`
43411    new_path="$unix_path"
43412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43414    new_path="$unix_path"
43415  fi
43416
43417
43418  # Now try to locate executable using which
43419  new_path=`$WHICH "$new_path" 2> /dev/null`
43420
43421  if test "x$new_path" = x; then
43422    # Oops. Which didn't find the executable.
43423    # The splitting of arguments from the executable at a space might have been incorrect,
43424    # since paths with space are more likely in Windows. Give it another try with the whole
43425    # argument.
43426    path="$complete"
43427    arguments="EOL"
43428    new_path="$path"
43429
43430  windows_path="$new_path"
43431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43432    unix_path=`$CYGPATH -u "$windows_path"`
43433    new_path="$unix_path"
43434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43436    new_path="$unix_path"
43437  fi
43438
43439
43440    new_path=`$WHICH "$new_path" 2> /dev/null`
43441    # bat and cmd files are not always considered executable in MSYS causing which
43442    # to not find them
43443    if test "x$new_path" = x \
43444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43446      new_path="$path"
43447
43448  windows_path="$new_path"
43449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43450    unix_path=`$CYGPATH -u "$windows_path"`
43451    new_path="$unix_path"
43452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43454    new_path="$unix_path"
43455  fi
43456
43457    fi
43458
43459    if test "x$new_path" = x; then
43460      # It's still not found. Now this is an unrecoverable error.
43461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43462$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43463      has_space=`$ECHO "$complete" | $GREP " "`
43464      if test "x$has_space" != x; then
43465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43467      fi
43468      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43469    fi
43470  fi
43471
43472  # Now new_path has a complete unix path to the binary
43473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43474    # Keep paths in /bin as-is, but remove trailing .exe if any
43475    new_path="${new_path/%.exe/}"
43476    # Do not save /bin paths to all_fixpath_prefixes!
43477  else
43478    # Not in mixed or Windows style, start by that.
43479    new_path=`cmd //c echo $new_path`
43480
43481  input_path="$new_path"
43482  # Check if we need to convert this using DOS-style short mode. If the path
43483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43484  # take no chances and rewrite it.
43485  # Note: m4 eats our [], so we need to use [ and ] instead.
43486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43487  if test "x$has_forbidden_chars" != x; then
43488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43490  fi
43491
43492    # Output is in $new_path
43493
43494  windows_path="$new_path"
43495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43496    unix_path=`$CYGPATH -u "$windows_path"`
43497    new_path="$unix_path"
43498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43500    new_path="$unix_path"
43501  fi
43502
43503    # remove trailing .exe if any
43504    new_path="${new_path/%.exe/}"
43505
43506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43508  fi
43509
43510    else
43511      # We're on a unix platform. Hooray! :)
43512      # First separate the path from the arguments. This will split at the first
43513      # space.
43514      complete="$NM"
43515      path="${complete%% *}"
43516      tmp="$complete EOL"
43517      arguments="${tmp#* }"
43518
43519      # Cannot rely on the command "which" here since it doesn't always work.
43520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43521      if test -z "$is_absolute_path"; then
43522        # Path to executable is not absolute. Find it.
43523        IFS_save="$IFS"
43524        IFS=:
43525        for p in $PATH; do
43526          if test -f "$p/$path" && test -x "$p/$path"; then
43527            new_path="$p/$path"
43528            break
43529          fi
43530        done
43531        IFS="$IFS_save"
43532      else
43533        # This is an absolute path, we can use it without further modifications.
43534        new_path="$path"
43535      fi
43536
43537      if test "x$new_path" = x; then
43538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43539$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43540        has_space=`$ECHO "$complete" | $GREP " "`
43541        if test "x$has_space" != x; then
43542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43544        fi
43545        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43546      fi
43547    fi
43548
43549    # Now join together the path and the arguments once again
43550    if test "x$arguments" != xEOL; then
43551      new_complete="$new_path ${arguments% *}"
43552    else
43553      new_complete="$new_path"
43554    fi
43555
43556    if test "x$complete" != "x$new_complete"; then
43557      NM="$new_complete"
43558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43559$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43560    fi
43561  fi
43562
43563    GNM="$NM"
43564
43565  fi
43566
43567  # objcopy is used for moving debug symbols to separate files when
43568  # full debug symbols are enabled.
43569  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43570
43571
43572  # Publish this variable in the help.
43573
43574
43575  if [ -z "${OBJCOPY+x}" ]; then
43576    # The variable is not set by user, try to locate tool using the code snippet
43577    if test -n "$ac_tool_prefix"; then
43578  for ac_prog in gobjcopy objcopy
43579  do
43580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43583$as_echo_n "checking for $ac_word... " >&6; }
43584if ${ac_cv_prog_OBJCOPY+:} false; then :
43585  $as_echo_n "(cached) " >&6
43586else
43587  if test -n "$OBJCOPY"; then
43588  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43589else
43590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43591for as_dir in $PATH
43592do
43593  IFS=$as_save_IFS
43594  test -z "$as_dir" && as_dir=.
43595    for ac_exec_ext in '' $ac_executable_extensions; do
43596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43597    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43599    break 2
43600  fi
43601done
43602  done
43603IFS=$as_save_IFS
43604
43605fi
43606fi
43607OBJCOPY=$ac_cv_prog_OBJCOPY
43608if test -n "$OBJCOPY"; then
43609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43610$as_echo "$OBJCOPY" >&6; }
43611else
43612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43613$as_echo "no" >&6; }
43614fi
43615
43616
43617    test -n "$OBJCOPY" && break
43618  done
43619fi
43620if test -z "$OBJCOPY"; then
43621  ac_ct_OBJCOPY=$OBJCOPY
43622  for ac_prog in gobjcopy objcopy
43623do
43624  # Extract the first word of "$ac_prog", so it can be a program name with args.
43625set dummy $ac_prog; ac_word=$2
43626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43627$as_echo_n "checking for $ac_word... " >&6; }
43628if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43629  $as_echo_n "(cached) " >&6
43630else
43631  if test -n "$ac_ct_OBJCOPY"; then
43632  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43633else
43634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43635for as_dir in $PATH
43636do
43637  IFS=$as_save_IFS
43638  test -z "$as_dir" && as_dir=.
43639    for ac_exec_ext in '' $ac_executable_extensions; do
43640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43641    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43643    break 2
43644  fi
43645done
43646  done
43647IFS=$as_save_IFS
43648
43649fi
43650fi
43651ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43652if test -n "$ac_ct_OBJCOPY"; then
43653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43654$as_echo "$ac_ct_OBJCOPY" >&6; }
43655else
43656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43657$as_echo "no" >&6; }
43658fi
43659
43660
43661  test -n "$ac_ct_OBJCOPY" && break
43662done
43663
43664  if test "x$ac_ct_OBJCOPY" = x; then
43665    OBJCOPY=""
43666  else
43667    case $cross_compiling:$ac_tool_warned in
43668yes:)
43669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43671ac_tool_warned=yes ;;
43672esac
43673    OBJCOPY=$ac_ct_OBJCOPY
43674  fi
43675fi
43676
43677  else
43678    # The variable is set, but is it from the command line or the environment?
43679
43680    # Try to remove the string !OBJCOPY! from our list.
43681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43683      # If it failed, the variable was not from the command line. Ignore it,
43684      # but warn the user (except for BASH, which is always set by the calling BASH).
43685      if test "xOBJCOPY" != xBASH; then
43686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43687$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43688      fi
43689      # Try to locate tool using the code snippet
43690      if test -n "$ac_tool_prefix"; then
43691  for ac_prog in gobjcopy objcopy
43692  do
43693    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43696$as_echo_n "checking for $ac_word... " >&6; }
43697if ${ac_cv_prog_OBJCOPY+:} false; then :
43698  $as_echo_n "(cached) " >&6
43699else
43700  if test -n "$OBJCOPY"; then
43701  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43702else
43703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43704for as_dir in $PATH
43705do
43706  IFS=$as_save_IFS
43707  test -z "$as_dir" && as_dir=.
43708    for ac_exec_ext in '' $ac_executable_extensions; do
43709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43710    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43712    break 2
43713  fi
43714done
43715  done
43716IFS=$as_save_IFS
43717
43718fi
43719fi
43720OBJCOPY=$ac_cv_prog_OBJCOPY
43721if test -n "$OBJCOPY"; then
43722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43723$as_echo "$OBJCOPY" >&6; }
43724else
43725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43726$as_echo "no" >&6; }
43727fi
43728
43729
43730    test -n "$OBJCOPY" && break
43731  done
43732fi
43733if test -z "$OBJCOPY"; then
43734  ac_ct_OBJCOPY=$OBJCOPY
43735  for ac_prog in gobjcopy objcopy
43736do
43737  # Extract the first word of "$ac_prog", so it can be a program name with args.
43738set dummy $ac_prog; ac_word=$2
43739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43740$as_echo_n "checking for $ac_word... " >&6; }
43741if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43742  $as_echo_n "(cached) " >&6
43743else
43744  if test -n "$ac_ct_OBJCOPY"; then
43745  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43746else
43747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43748for as_dir in $PATH
43749do
43750  IFS=$as_save_IFS
43751  test -z "$as_dir" && as_dir=.
43752    for ac_exec_ext in '' $ac_executable_extensions; do
43753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43754    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43756    break 2
43757  fi
43758done
43759  done
43760IFS=$as_save_IFS
43761
43762fi
43763fi
43764ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43765if test -n "$ac_ct_OBJCOPY"; then
43766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43767$as_echo "$ac_ct_OBJCOPY" >&6; }
43768else
43769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43770$as_echo "no" >&6; }
43771fi
43772
43773
43774  test -n "$ac_ct_OBJCOPY" && break
43775done
43776
43777  if test "x$ac_ct_OBJCOPY" = x; then
43778    OBJCOPY=""
43779  else
43780    case $cross_compiling:$ac_tool_warned in
43781yes:)
43782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43784ac_tool_warned=yes ;;
43785esac
43786    OBJCOPY=$ac_ct_OBJCOPY
43787  fi
43788fi
43789
43790    else
43791      # If it succeeded, then it was overridden by the user. We will use it
43792      # for the tool.
43793
43794      # First remove it from the list of overridden variables, so we can test
43795      # for unknown variables in the end.
43796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43797
43798      # Check if we try to supply an empty value
43799      if test "x$OBJCOPY" = x; then
43800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43801$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43803$as_echo_n "checking for OBJCOPY... " >&6; }
43804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43805$as_echo "disabled" >&6; }
43806      else
43807        # Check if the provided tool contains a complete path.
43808        tool_specified="$OBJCOPY"
43809        tool_basename="${tool_specified##*/}"
43810        if test "x$tool_basename" = "x$tool_specified"; then
43811          # A command without a complete path is provided, search $PATH.
43812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43813$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43814          # Extract the first word of "$tool_basename", so it can be a program name with args.
43815set dummy $tool_basename; ac_word=$2
43816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43817$as_echo_n "checking for $ac_word... " >&6; }
43818if ${ac_cv_path_OBJCOPY+:} false; then :
43819  $as_echo_n "(cached) " >&6
43820else
43821  case $OBJCOPY in
43822  [\\/]* | ?:[\\/]*)
43823  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43824  ;;
43825  *)
43826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43827for as_dir in $PATH
43828do
43829  IFS=$as_save_IFS
43830  test -z "$as_dir" && as_dir=.
43831    for ac_exec_ext in '' $ac_executable_extensions; do
43832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43833    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43835    break 2
43836  fi
43837done
43838  done
43839IFS=$as_save_IFS
43840
43841  ;;
43842esac
43843fi
43844OBJCOPY=$ac_cv_path_OBJCOPY
43845if test -n "$OBJCOPY"; then
43846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43847$as_echo "$OBJCOPY" >&6; }
43848else
43849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43850$as_echo "no" >&6; }
43851fi
43852
43853
43854          if test "x$OBJCOPY" = x; then
43855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43856          fi
43857        else
43858          # Otherwise we believe it is a complete path. Use it as it is.
43859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43860$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43862$as_echo_n "checking for OBJCOPY... " >&6; }
43863          if test ! -x "$tool_specified"; then
43864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43865$as_echo "not found" >&6; }
43866            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43867          fi
43868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43869$as_echo "$tool_specified" >&6; }
43870        fi
43871      fi
43872    fi
43873
43874  fi
43875
43876
43877    # Only call fixup if objcopy was found.
43878    if test -n "$OBJCOPY"; then
43879
43880  # Only process if variable expands to non-empty
43881
43882  if test "x$OBJCOPY" != x; then
43883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43884
43885  # First separate the path from the arguments. This will split at the first
43886  # space.
43887  complete="$OBJCOPY"
43888  path="${complete%% *}"
43889  tmp="$complete EOL"
43890  arguments="${tmp#* }"
43891
43892  # Input might be given as Windows format, start by converting to
43893  # unix format.
43894  new_path=`$CYGPATH -u "$path"`
43895
43896  # Now try to locate executable using which
43897  new_path=`$WHICH "$new_path" 2> /dev/null`
43898  # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
43904  fi
43905  if test "x$new_path" = x; then
43906    # Oops. Which didn't find the executable.
43907    # The splitting of arguments from the executable at a space might have been incorrect,
43908    # since paths with space are more likely in Windows. Give it another try with the whole
43909    # argument.
43910    path="$complete"
43911    arguments="EOL"
43912    new_path=`$CYGPATH -u "$path"`
43913    new_path=`$WHICH "$new_path" 2> /dev/null`
43914    # bat and cmd files are not always considered executable in cygwin causing which
43915    # to not find them
43916    if test "x$new_path" = x \
43917        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43918        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43919      new_path=`$CYGPATH -u "$path"`
43920    fi
43921    if test "x$new_path" = x; then
43922      # It's still not found. Now this is an unrecoverable error.
43923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43924$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43925      has_space=`$ECHO "$complete" | $GREP " "`
43926      if test "x$has_space" != x; then
43927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43929      fi
43930      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43931    fi
43932  fi
43933
43934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43937  # "foo.exe" is OK but "foo" is an error.
43938  #
43939  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43940  # It is also a way to make sure we got the proper file name for the real test later on.
43941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43942  if test "x$test_shortpath" = x; then
43943    # Short path failed, file does not exist as specified.
43944    # Try adding .exe or .cmd
43945    if test -f "${new_path}.exe"; then
43946      input_to_shortpath="${new_path}.exe"
43947    elif test -f "${new_path}.cmd"; then
43948      input_to_shortpath="${new_path}.cmd"
43949    else
43950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43951$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43952      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43953$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43954      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43955    fi
43956  else
43957    input_to_shortpath="$new_path"
43958  fi
43959
43960  # Call helper function which possibly converts this using DOS-style short mode.
43961  # If so, the updated path is stored in $new_path.
43962  new_path="$input_to_shortpath"
43963
43964  input_path="$input_to_shortpath"
43965  # Check if we need to convert this using DOS-style short mode. If the path
43966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43967  # take no chances and rewrite it.
43968  # Note: m4 eats our [], so we need to use [ and ] instead.
43969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43970  if test "x$has_forbidden_chars" != x; then
43971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43975      # Going to short mode and back again did indeed matter. Since short mode is
43976      # case insensitive, let's make it lowercase to improve readability.
43977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43978      # Now convert it back to Unix-style (cygpath)
43979      input_path=`$CYGPATH -u "$shortmode_path"`
43980      new_path="$input_path"
43981    fi
43982  fi
43983
43984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43985  if test "x$test_cygdrive_prefix" = x; then
43986    # As a simple fix, exclude /usr/bin since it's not a real path.
43987    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43989      # a path prefixed by /cygdrive for fixpath to work.
43990      new_path="$CYGWIN_ROOT_PATH$input_path"
43991    fi
43992  fi
43993
43994  # remove trailing .exe if any
43995  new_path="${new_path/%.exe/}"
43996
43997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43998
43999  # First separate the path from the arguments. This will split at the first
44000  # space.
44001  complete="$OBJCOPY"
44002  path="${complete%% *}"
44003  tmp="$complete EOL"
44004  arguments="${tmp#* }"
44005
44006  # Input might be given as Windows format, start by converting to
44007  # unix format.
44008  new_path="$path"
44009
44010  windows_path="$new_path"
44011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44012    unix_path=`$CYGPATH -u "$windows_path"`
44013    new_path="$unix_path"
44014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44016    new_path="$unix_path"
44017  fi
44018
44019
44020  # Now try to locate executable using which
44021  new_path=`$WHICH "$new_path" 2> /dev/null`
44022
44023  if test "x$new_path" = x; then
44024    # Oops. Which didn't find the executable.
44025    # The splitting of arguments from the executable at a space might have been incorrect,
44026    # since paths with space are more likely in Windows. Give it another try with the whole
44027    # argument.
44028    path="$complete"
44029    arguments="EOL"
44030    new_path="$path"
44031
44032  windows_path="$new_path"
44033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44034    unix_path=`$CYGPATH -u "$windows_path"`
44035    new_path="$unix_path"
44036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44038    new_path="$unix_path"
44039  fi
44040
44041
44042    new_path=`$WHICH "$new_path" 2> /dev/null`
44043    # bat and cmd files are not always considered executable in MSYS causing which
44044    # to not find them
44045    if test "x$new_path" = x \
44046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44048      new_path="$path"
44049
44050  windows_path="$new_path"
44051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44052    unix_path=`$CYGPATH -u "$windows_path"`
44053    new_path="$unix_path"
44054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44056    new_path="$unix_path"
44057  fi
44058
44059    fi
44060
44061    if test "x$new_path" = x; then
44062      # It's still not found. Now this is an unrecoverable error.
44063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44064$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44065      has_space=`$ECHO "$complete" | $GREP " "`
44066      if test "x$has_space" != x; then
44067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44069      fi
44070      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44071    fi
44072  fi
44073
44074  # Now new_path has a complete unix path to the binary
44075  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44076    # Keep paths in /bin as-is, but remove trailing .exe if any
44077    new_path="${new_path/%.exe/}"
44078    # Do not save /bin paths to all_fixpath_prefixes!
44079  else
44080    # Not in mixed or Windows style, start by that.
44081    new_path=`cmd //c echo $new_path`
44082
44083  input_path="$new_path"
44084  # Check if we need to convert this using DOS-style short mode. If the path
44085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44086  # take no chances and rewrite it.
44087  # Note: m4 eats our [], so we need to use [ and ] instead.
44088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44089  if test "x$has_forbidden_chars" != x; then
44090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44092  fi
44093
44094    # Output is in $new_path
44095
44096  windows_path="$new_path"
44097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44098    unix_path=`$CYGPATH -u "$windows_path"`
44099    new_path="$unix_path"
44100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44102    new_path="$unix_path"
44103  fi
44104
44105    # remove trailing .exe if any
44106    new_path="${new_path/%.exe/}"
44107
44108    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44109    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44110  fi
44111
44112    else
44113      # We're on a unix platform. Hooray! :)
44114      # First separate the path from the arguments. This will split at the first
44115      # space.
44116      complete="$OBJCOPY"
44117      path="${complete%% *}"
44118      tmp="$complete EOL"
44119      arguments="${tmp#* }"
44120
44121      # Cannot rely on the command "which" here since it doesn't always work.
44122      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44123      if test -z "$is_absolute_path"; then
44124        # Path to executable is not absolute. Find it.
44125        IFS_save="$IFS"
44126        IFS=:
44127        for p in $PATH; do
44128          if test -f "$p/$path" && test -x "$p/$path"; then
44129            new_path="$p/$path"
44130            break
44131          fi
44132        done
44133        IFS="$IFS_save"
44134      else
44135        # This is an absolute path, we can use it without further modifications.
44136        new_path="$path"
44137      fi
44138
44139      if test "x$new_path" = x; then
44140        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44141$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44142        has_space=`$ECHO "$complete" | $GREP " "`
44143        if test "x$has_space" != x; then
44144          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44145$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44146        fi
44147        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44148      fi
44149    fi
44150
44151    # Now join together the path and the arguments once again
44152    if test "x$arguments" != xEOL; then
44153      new_complete="$new_path ${arguments% *}"
44154    else
44155      new_complete="$new_path"
44156    fi
44157
44158    if test "x$complete" != "x$new_complete"; then
44159      OBJCOPY="$new_complete"
44160      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44161$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44162    fi
44163  fi
44164
44165      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44166        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44167        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44168        # - version number is last blank separate word on first line
44169        # - version number formats that have been seen:
44170        #   - <major>.<minor>
44171        #   - <major>.<minor>.<micro>
44172        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44173        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44174         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44175              -e 's/.* //' \
44176              -e '/^[01]\./b bad' \
44177              -e '/^2\./{' \
44178              -e '  s/^2\.//' \
44179              -e '  /^[0-9]$/b bad' \
44180              -e '  /^[0-9]\./b bad' \
44181              -e '  /^1[0-9]$/b bad' \
44182              -e '  /^1[0-9]\./b bad' \
44183              -e '  /^20\./b bad' \
44184              -e '  /^21\.0$/b bad' \
44185              -e '  /^21\.0\./b bad' \
44186              -e '}' \
44187              -e ':good' \
44188              -e 's/.*/VALID_VERSION/p' \
44189              -e 'q' \
44190              -e ':bad' \
44191              -e 's/.*/BAD_VERSION/p' \
44192              -e 'q'`
44193        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44194          OBJCOPY=
44195          { $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
44196$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44197          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44198$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44199          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44200$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44201          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44202$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44203          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44204$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44205        fi
44206      fi
44207    fi
44208  fi
44209
44210
44211
44212  # Publish this variable in the help.
44213
44214
44215  if [ -z "${OBJDUMP+x}" ]; then
44216    # The variable is not set by user, try to locate tool using the code snippet
44217    if test -n "$ac_tool_prefix"; then
44218  for ac_prog in gobjdump objdump
44219  do
44220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44223$as_echo_n "checking for $ac_word... " >&6; }
44224if ${ac_cv_prog_OBJDUMP+:} false; then :
44225  $as_echo_n "(cached) " >&6
44226else
44227  if test -n "$OBJDUMP"; then
44228  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44229else
44230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44231for as_dir in $PATH
44232do
44233  IFS=$as_save_IFS
44234  test -z "$as_dir" && as_dir=.
44235    for ac_exec_ext in '' $ac_executable_extensions; do
44236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44237    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44239    break 2
44240  fi
44241done
44242  done
44243IFS=$as_save_IFS
44244
44245fi
44246fi
44247OBJDUMP=$ac_cv_prog_OBJDUMP
44248if test -n "$OBJDUMP"; then
44249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44250$as_echo "$OBJDUMP" >&6; }
44251else
44252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44253$as_echo "no" >&6; }
44254fi
44255
44256
44257    test -n "$OBJDUMP" && break
44258  done
44259fi
44260if test -z "$OBJDUMP"; then
44261  ac_ct_OBJDUMP=$OBJDUMP
44262  for ac_prog in gobjdump objdump
44263do
44264  # Extract the first word of "$ac_prog", so it can be a program name with args.
44265set dummy $ac_prog; ac_word=$2
44266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44267$as_echo_n "checking for $ac_word... " >&6; }
44268if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44269  $as_echo_n "(cached) " >&6
44270else
44271  if test -n "$ac_ct_OBJDUMP"; then
44272  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44273else
44274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44275for as_dir in $PATH
44276do
44277  IFS=$as_save_IFS
44278  test -z "$as_dir" && as_dir=.
44279    for ac_exec_ext in '' $ac_executable_extensions; do
44280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44281    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44283    break 2
44284  fi
44285done
44286  done
44287IFS=$as_save_IFS
44288
44289fi
44290fi
44291ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44292if test -n "$ac_ct_OBJDUMP"; then
44293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44294$as_echo "$ac_ct_OBJDUMP" >&6; }
44295else
44296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44297$as_echo "no" >&6; }
44298fi
44299
44300
44301  test -n "$ac_ct_OBJDUMP" && break
44302done
44303
44304  if test "x$ac_ct_OBJDUMP" = x; then
44305    OBJDUMP=""
44306  else
44307    case $cross_compiling:$ac_tool_warned in
44308yes:)
44309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44311ac_tool_warned=yes ;;
44312esac
44313    OBJDUMP=$ac_ct_OBJDUMP
44314  fi
44315fi
44316
44317  else
44318    # The variable is set, but is it from the command line or the environment?
44319
44320    # Try to remove the string !OBJDUMP! from our list.
44321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44323      # If it failed, the variable was not from the command line. Ignore it,
44324      # but warn the user (except for BASH, which is always set by the calling BASH).
44325      if test "xOBJDUMP" != xBASH; then
44326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44327$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44328      fi
44329      # Try to locate tool using the code snippet
44330      if test -n "$ac_tool_prefix"; then
44331  for ac_prog in gobjdump objdump
44332  do
44333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44336$as_echo_n "checking for $ac_word... " >&6; }
44337if ${ac_cv_prog_OBJDUMP+:} false; then :
44338  $as_echo_n "(cached) " >&6
44339else
44340  if test -n "$OBJDUMP"; then
44341  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44342else
44343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44344for as_dir in $PATH
44345do
44346  IFS=$as_save_IFS
44347  test -z "$as_dir" && as_dir=.
44348    for ac_exec_ext in '' $ac_executable_extensions; do
44349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44350    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44352    break 2
44353  fi
44354done
44355  done
44356IFS=$as_save_IFS
44357
44358fi
44359fi
44360OBJDUMP=$ac_cv_prog_OBJDUMP
44361if test -n "$OBJDUMP"; then
44362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44363$as_echo "$OBJDUMP" >&6; }
44364else
44365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44366$as_echo "no" >&6; }
44367fi
44368
44369
44370    test -n "$OBJDUMP" && break
44371  done
44372fi
44373if test -z "$OBJDUMP"; then
44374  ac_ct_OBJDUMP=$OBJDUMP
44375  for ac_prog in gobjdump objdump
44376do
44377  # Extract the first word of "$ac_prog", so it can be a program name with args.
44378set dummy $ac_prog; ac_word=$2
44379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44380$as_echo_n "checking for $ac_word... " >&6; }
44381if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44382  $as_echo_n "(cached) " >&6
44383else
44384  if test -n "$ac_ct_OBJDUMP"; then
44385  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44386else
44387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44388for as_dir in $PATH
44389do
44390  IFS=$as_save_IFS
44391  test -z "$as_dir" && as_dir=.
44392    for ac_exec_ext in '' $ac_executable_extensions; do
44393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44394    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44396    break 2
44397  fi
44398done
44399  done
44400IFS=$as_save_IFS
44401
44402fi
44403fi
44404ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44405if test -n "$ac_ct_OBJDUMP"; then
44406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44407$as_echo "$ac_ct_OBJDUMP" >&6; }
44408else
44409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44410$as_echo "no" >&6; }
44411fi
44412
44413
44414  test -n "$ac_ct_OBJDUMP" && break
44415done
44416
44417  if test "x$ac_ct_OBJDUMP" = x; then
44418    OBJDUMP=""
44419  else
44420    case $cross_compiling:$ac_tool_warned in
44421yes:)
44422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44424ac_tool_warned=yes ;;
44425esac
44426    OBJDUMP=$ac_ct_OBJDUMP
44427  fi
44428fi
44429
44430    else
44431      # If it succeeded, then it was overridden by the user. We will use it
44432      # for the tool.
44433
44434      # First remove it from the list of overridden variables, so we can test
44435      # for unknown variables in the end.
44436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44437
44438      # Check if we try to supply an empty value
44439      if test "x$OBJDUMP" = x; then
44440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44441$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44443$as_echo_n "checking for OBJDUMP... " >&6; }
44444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44445$as_echo "disabled" >&6; }
44446      else
44447        # Check if the provided tool contains a complete path.
44448        tool_specified="$OBJDUMP"
44449        tool_basename="${tool_specified##*/}"
44450        if test "x$tool_basename" = "x$tool_specified"; then
44451          # A command without a complete path is provided, search $PATH.
44452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44453$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44454          # Extract the first word of "$tool_basename", so it can be a program name with args.
44455set dummy $tool_basename; ac_word=$2
44456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44457$as_echo_n "checking for $ac_word... " >&6; }
44458if ${ac_cv_path_OBJDUMP+:} false; then :
44459  $as_echo_n "(cached) " >&6
44460else
44461  case $OBJDUMP in
44462  [\\/]* | ?:[\\/]*)
44463  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44464  ;;
44465  *)
44466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44467for as_dir in $PATH
44468do
44469  IFS=$as_save_IFS
44470  test -z "$as_dir" && as_dir=.
44471    for ac_exec_ext in '' $ac_executable_extensions; do
44472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44473    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44475    break 2
44476  fi
44477done
44478  done
44479IFS=$as_save_IFS
44480
44481  ;;
44482esac
44483fi
44484OBJDUMP=$ac_cv_path_OBJDUMP
44485if test -n "$OBJDUMP"; then
44486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44487$as_echo "$OBJDUMP" >&6; }
44488else
44489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44490$as_echo "no" >&6; }
44491fi
44492
44493
44494          if test "x$OBJDUMP" = x; then
44495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44496          fi
44497        else
44498          # Otherwise we believe it is a complete path. Use it as it is.
44499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44500$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44502$as_echo_n "checking for OBJDUMP... " >&6; }
44503          if test ! -x "$tool_specified"; then
44504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44505$as_echo "not found" >&6; }
44506            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44507          fi
44508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44509$as_echo "$tool_specified" >&6; }
44510        fi
44511      fi
44512    fi
44513
44514  fi
44515
44516
44517  if test "x$OBJDUMP" != x; then
44518    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44519    # bails if argument is missing.
44520
44521  # Only process if variable expands to non-empty
44522
44523  if test "x$OBJDUMP" != x; then
44524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44525
44526  # First separate the path from the arguments. This will split at the first
44527  # space.
44528  complete="$OBJDUMP"
44529  path="${complete%% *}"
44530  tmp="$complete EOL"
44531  arguments="${tmp#* }"
44532
44533  # Input might be given as Windows format, start by converting to
44534  # unix format.
44535  new_path=`$CYGPATH -u "$path"`
44536
44537  # Now try to locate executable using which
44538  new_path=`$WHICH "$new_path" 2> /dev/null`
44539  # bat and cmd files are not always considered executable in cygwin causing which
44540  # to not find them
44541  if test "x$new_path" = x \
44542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44544    new_path=`$CYGPATH -u "$path"`
44545  fi
44546  if test "x$new_path" = x; then
44547    # Oops. Which didn't find the executable.
44548    # The splitting of arguments from the executable at a space might have been incorrect,
44549    # since paths with space are more likely in Windows. Give it another try with the whole
44550    # argument.
44551    path="$complete"
44552    arguments="EOL"
44553    new_path=`$CYGPATH -u "$path"`
44554    new_path=`$WHICH "$new_path" 2> /dev/null`
44555    # bat and cmd files are not always considered executable in cygwin causing which
44556    # to not find them
44557    if test "x$new_path" = x \
44558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44560      new_path=`$CYGPATH -u "$path"`
44561    fi
44562    if test "x$new_path" = x; then
44563      # It's still not found. Now this is an unrecoverable error.
44564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44565$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44566      has_space=`$ECHO "$complete" | $GREP " "`
44567      if test "x$has_space" != x; then
44568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44570      fi
44571      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44572    fi
44573  fi
44574
44575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44578  # "foo.exe" is OK but "foo" is an error.
44579  #
44580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44581  # It is also a way to make sure we got the proper file name for the real test later on.
44582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44583  if test "x$test_shortpath" = x; then
44584    # Short path failed, file does not exist as specified.
44585    # Try adding .exe or .cmd
44586    if test -f "${new_path}.exe"; then
44587      input_to_shortpath="${new_path}.exe"
44588    elif test -f "${new_path}.cmd"; then
44589      input_to_shortpath="${new_path}.cmd"
44590    else
44591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44592$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44595      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44596    fi
44597  else
44598    input_to_shortpath="$new_path"
44599  fi
44600
44601  # Call helper function which possibly converts this using DOS-style short mode.
44602  # If so, the updated path is stored in $new_path.
44603  new_path="$input_to_shortpath"
44604
44605  input_path="$input_to_shortpath"
44606  # Check if we need to convert this using DOS-style short mode. If the path
44607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44608  # take no chances and rewrite it.
44609  # Note: m4 eats our [], so we need to use [ and ] instead.
44610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44611  if test "x$has_forbidden_chars" != x; then
44612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44616      # Going to short mode and back again did indeed matter. Since short mode is
44617      # case insensitive, let's make it lowercase to improve readability.
44618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44619      # Now convert it back to Unix-style (cygpath)
44620      input_path=`$CYGPATH -u "$shortmode_path"`
44621      new_path="$input_path"
44622    fi
44623  fi
44624
44625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44626  if test "x$test_cygdrive_prefix" = x; then
44627    # As a simple fix, exclude /usr/bin since it's not a real path.
44628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44630      # a path prefixed by /cygdrive for fixpath to work.
44631      new_path="$CYGWIN_ROOT_PATH$input_path"
44632    fi
44633  fi
44634
44635  # remove trailing .exe if any
44636  new_path="${new_path/%.exe/}"
44637
44638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44639
44640  # First separate the path from the arguments. This will split at the first
44641  # space.
44642  complete="$OBJDUMP"
44643  path="${complete%% *}"
44644  tmp="$complete EOL"
44645  arguments="${tmp#* }"
44646
44647  # Input might be given as Windows format, start by converting to
44648  # unix format.
44649  new_path="$path"
44650
44651  windows_path="$new_path"
44652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44653    unix_path=`$CYGPATH -u "$windows_path"`
44654    new_path="$unix_path"
44655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44657    new_path="$unix_path"
44658  fi
44659
44660
44661  # Now try to locate executable using which
44662  new_path=`$WHICH "$new_path" 2> /dev/null`
44663
44664  if test "x$new_path" = x; then
44665    # Oops. Which didn't find the executable.
44666    # The splitting of arguments from the executable at a space might have been incorrect,
44667    # since paths with space are more likely in Windows. Give it another try with the whole
44668    # argument.
44669    path="$complete"
44670    arguments="EOL"
44671    new_path="$path"
44672
44673  windows_path="$new_path"
44674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44675    unix_path=`$CYGPATH -u "$windows_path"`
44676    new_path="$unix_path"
44677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44679    new_path="$unix_path"
44680  fi
44681
44682
44683    new_path=`$WHICH "$new_path" 2> /dev/null`
44684    # bat and cmd files are not always considered executable in MSYS causing which
44685    # to not find them
44686    if test "x$new_path" = x \
44687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44689      new_path="$path"
44690
44691  windows_path="$new_path"
44692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44693    unix_path=`$CYGPATH -u "$windows_path"`
44694    new_path="$unix_path"
44695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44697    new_path="$unix_path"
44698  fi
44699
44700    fi
44701
44702    if test "x$new_path" = x; then
44703      # It's still not found. Now this is an unrecoverable error.
44704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44705$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44706      has_space=`$ECHO "$complete" | $GREP " "`
44707      if test "x$has_space" != x; then
44708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44710      fi
44711      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44712    fi
44713  fi
44714
44715  # Now new_path has a complete unix path to the binary
44716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44717    # Keep paths in /bin as-is, but remove trailing .exe if any
44718    new_path="${new_path/%.exe/}"
44719    # Do not save /bin paths to all_fixpath_prefixes!
44720  else
44721    # Not in mixed or Windows style, start by that.
44722    new_path=`cmd //c echo $new_path`
44723
44724  input_path="$new_path"
44725  # Check if we need to convert this using DOS-style short mode. If the path
44726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44727  # take no chances and rewrite it.
44728  # Note: m4 eats our [], so we need to use [ and ] instead.
44729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44730  if test "x$has_forbidden_chars" != x; then
44731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44733  fi
44734
44735    # Output is in $new_path
44736
44737  windows_path="$new_path"
44738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44739    unix_path=`$CYGPATH -u "$windows_path"`
44740    new_path="$unix_path"
44741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44743    new_path="$unix_path"
44744  fi
44745
44746    # remove trailing .exe if any
44747    new_path="${new_path/%.exe/}"
44748
44749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44751  fi
44752
44753    else
44754      # We're on a unix platform. Hooray! :)
44755      # First separate the path from the arguments. This will split at the first
44756      # space.
44757      complete="$OBJDUMP"
44758      path="${complete%% *}"
44759      tmp="$complete EOL"
44760      arguments="${tmp#* }"
44761
44762      # Cannot rely on the command "which" here since it doesn't always work.
44763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44764      if test -z "$is_absolute_path"; then
44765        # Path to executable is not absolute. Find it.
44766        IFS_save="$IFS"
44767        IFS=:
44768        for p in $PATH; do
44769          if test -f "$p/$path" && test -x "$p/$path"; then
44770            new_path="$p/$path"
44771            break
44772          fi
44773        done
44774        IFS="$IFS_save"
44775      else
44776        # This is an absolute path, we can use it without further modifications.
44777        new_path="$path"
44778      fi
44779
44780      if test "x$new_path" = x; then
44781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44782$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44783        has_space=`$ECHO "$complete" | $GREP " "`
44784        if test "x$has_space" != x; then
44785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44787        fi
44788        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44789      fi
44790    fi
44791
44792    # Now join together the path and the arguments once again
44793    if test "x$arguments" != xEOL; then
44794      new_complete="$new_path ${arguments% *}"
44795    else
44796      new_complete="$new_path"
44797    fi
44798
44799    if test "x$complete" != "x$new_complete"; then
44800      OBJDUMP="$new_complete"
44801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44802$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44803    fi
44804  fi
44805
44806  fi
44807
44808
44809  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44810  # to remain in place. Otherwise the compiler will not work in some siutations
44811  # in later configure checks.
44812  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44813    PATH="$OLD_PATH"
44814  fi
44815
44816  # Restore the flags to the user specified values.
44817  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44818  CFLAGS="$ORG_CFLAGS"
44819  CXXFLAGS="$ORG_CXXFLAGS"
44820
44821
44822# Finally do some processing after the detection phase
44823
44824  if test "x$COMPILE_TYPE" = "xcross"; then
44825    # Now we need to find a C/C++ compiler that can build executables for the
44826    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44827    # used once. Also, we need to do this without adding a tools dir to the
44828    # path, otherwise we might pick up cross-compilers which don't use standard
44829    # naming.
44830
44831    OLDPATH="$PATH"
44832
44833
44834# Check whether --with-build-devkit was given.
44835if test "${with_build_devkit+set}" = set; then :
44836  withval=$with_build_devkit;
44837fi
44838
44839    if test "x$with_build_devkit" = "xyes"; then
44840      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44841    elif test -n "$with_build_devkit"; then
44842      if test ! -d "$with_build_devkit"; then
44843        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44844      else
44845
44846  # Only process if variable expands to non-empty
44847
44848  if test "x$with_build_devkit" != x; then
44849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44850
44851  # Input might be given as Windows format, start by converting to
44852  # unix format.
44853  path="$with_build_devkit"
44854  new_path=`$CYGPATH -u "$path"`
44855
44856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44859  # "foo.exe" is OK but "foo" is an error.
44860  #
44861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44862  # It is also a way to make sure we got the proper file name for the real test later on.
44863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44864  if test "x$test_shortpath" = x; then
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44866$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44867    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44868  fi
44869
44870  # Call helper function which possibly converts this using DOS-style short mode.
44871  # If so, the updated path is stored in $new_path.
44872
44873  input_path="$new_path"
44874  # Check if we need to convert this using DOS-style short mode. If the path
44875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44876  # take no chances and rewrite it.
44877  # Note: m4 eats our [], so we need to use [ and ] instead.
44878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44879  if test "x$has_forbidden_chars" != x; then
44880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44884      # Going to short mode and back again did indeed matter. Since short mode is
44885      # case insensitive, let's make it lowercase to improve readability.
44886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44887      # Now convert it back to Unix-style (cygpath)
44888      input_path=`$CYGPATH -u "$shortmode_path"`
44889      new_path="$input_path"
44890    fi
44891  fi
44892
44893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44894  if test "x$test_cygdrive_prefix" = x; then
44895    # As a simple fix, exclude /usr/bin since it's not a real path.
44896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44898      # a path prefixed by /cygdrive for fixpath to work.
44899      new_path="$CYGWIN_ROOT_PATH$input_path"
44900    fi
44901  fi
44902
44903
44904  if test "x$path" != "x$new_path"; then
44905    with_build_devkit="$new_path"
44906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44907$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44908  fi
44909
44910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44911
44912  path="$with_build_devkit"
44913  has_colon=`$ECHO $path | $GREP ^.:`
44914  new_path="$path"
44915  if test "x$has_colon" = x; then
44916    # Not in mixed or Windows style, start by that.
44917    new_path=`cmd //c echo $path`
44918  fi
44919
44920
44921  input_path="$new_path"
44922  # Check if we need to convert this using DOS-style short mode. If the path
44923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44924  # take no chances and rewrite it.
44925  # Note: m4 eats our [], so we need to use [ and ] instead.
44926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44927  if test "x$has_forbidden_chars" != x; then
44928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44930  fi
44931
44932
44933  windows_path="$new_path"
44934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44935    unix_path=`$CYGPATH -u "$windows_path"`
44936    new_path="$unix_path"
44937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44939    new_path="$unix_path"
44940  fi
44941
44942  if test "x$path" != "x$new_path"; then
44943    with_build_devkit="$new_path"
44944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44945$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44946  fi
44947
44948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44950
44951    else
44952      # We're on a unix platform. Hooray! :)
44953      path="$with_build_devkit"
44954      has_space=`$ECHO "$path" | $GREP " "`
44955      if test "x$has_space" != x; then
44956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44957$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44959      fi
44960
44961      # Use eval to expand a potential ~
44962      eval path="$path"
44963      if test ! -f "$path" && test ! -d "$path"; then
44964        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44965      fi
44966
44967      if test -d "$path"; then
44968        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44969      else
44970        dir="`$DIRNAME "$path"`"
44971        base="`$BASENAME "$path"`"
44972        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44973      fi
44974    fi
44975  fi
44976
44977        BUILD_DEVKIT_ROOT="$with_build_devkit"
44978        # Check for a meta data info file in the root of the devkit
44979        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44980          # Process devkit.info so that existing devkit variables are not
44981          # modified by this
44982          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44983              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44984              -e "s/\$host/\$build/g" \
44985              $BUILD_DEVKIT_ROOT/devkit.info \
44986              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44987          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44988          # This potentially sets the following:
44989          # A descriptive name of the devkit
44990
44991  if test "x$BUILD_DEVKIT_NAME" = x; then
44992    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44993  fi
44994
44995          # Corresponds to --with-extra-path
44996
44997  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44998    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44999  fi
45000
45001          # Corresponds to --with-toolchain-path
45002
45003  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45004    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
45005  fi
45006
45007          # Corresponds to --with-sysroot
45008
45009  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
45010    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
45011  fi
45012
45013          # Skip the Window specific parts
45014        fi
45015
45016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
45017$as_echo_n "checking for build platform devkit... " >&6; }
45018        if test "x$BUILD_DEVKIT_NAME" != x; then
45019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
45020$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
45021        else
45022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
45023$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
45024        fi
45025
45026        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
45027
45028  if test "x$BUILD_SYSROOT" != "x"; then
45029    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45030      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45031        # Solaris Studio does not have a concept of sysroot. Instead we must
45032        # make sure the default include and lib dirs are appended to each
45033        # compile and link command line. Must also add -I-xbuiltin to enable
45034        # inlining of system functions and intrinsics.
45035        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
45036        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
45037            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
45038      fi
45039    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45040      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
45041      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
45042    elif test "x$TOOLCHAIN_TYPE" = xclang; then
45043      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
45044      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
45045    fi
45046    # The global CFLAGS and LDFLAGS variables need these for configure to function
45047    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
45048    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
45049    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
45050    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
45051  fi
45052
45053  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45054    # We also need -iframework<path>/System/Library/Frameworks
45055    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45056    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45057    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
45058    # set this here so it doesn't have to be peppered throughout the forest
45059    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45060    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45061  fi
45062
45063
45064
45065
45066
45067         # Fallback default of just /bin if DEVKIT_PATH is not defined
45068        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45069          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45070        fi
45071        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45072      fi
45073    fi
45074
45075    # FIXME: we should list the discovered compilers as an exclude pattern!
45076    # If we do that, we can do this detection before POST_DETECTION, and still
45077    # find the build compilers in the tools dir, if needed.
45078
45079
45080
45081  # Publish this variable in the help.
45082
45083
45084  if [ -z "${BUILD_CC+x}" ]; then
45085    # The variable is not set by user, try to locate tool using the code snippet
45086    for ac_prog in cl cc gcc
45087do
45088  # Extract the first word of "$ac_prog", so it can be a program name with args.
45089set dummy $ac_prog; ac_word=$2
45090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45091$as_echo_n "checking for $ac_word... " >&6; }
45092if ${ac_cv_path_BUILD_CC+:} false; then :
45093  $as_echo_n "(cached) " >&6
45094else
45095  case $BUILD_CC in
45096  [\\/]* | ?:[\\/]*)
45097  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45098  ;;
45099  *)
45100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45101for as_dir in $PATH
45102do
45103  IFS=$as_save_IFS
45104  test -z "$as_dir" && as_dir=.
45105    for ac_exec_ext in '' $ac_executable_extensions; do
45106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45107    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45109    break 2
45110  fi
45111done
45112  done
45113IFS=$as_save_IFS
45114
45115  ;;
45116esac
45117fi
45118BUILD_CC=$ac_cv_path_BUILD_CC
45119if test -n "$BUILD_CC"; then
45120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45121$as_echo "$BUILD_CC" >&6; }
45122else
45123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45124$as_echo "no" >&6; }
45125fi
45126
45127
45128  test -n "$BUILD_CC" && break
45129done
45130
45131  else
45132    # The variable is set, but is it from the command line or the environment?
45133
45134    # Try to remove the string !BUILD_CC! from our list.
45135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45137      # If it failed, the variable was not from the command line. Ignore it,
45138      # but warn the user (except for BASH, which is always set by the calling BASH).
45139      if test "xBUILD_CC" != xBASH; then
45140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45141$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45142      fi
45143      # Try to locate tool using the code snippet
45144      for ac_prog in cl cc gcc
45145do
45146  # Extract the first word of "$ac_prog", so it can be a program name with args.
45147set dummy $ac_prog; ac_word=$2
45148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45149$as_echo_n "checking for $ac_word... " >&6; }
45150if ${ac_cv_path_BUILD_CC+:} false; then :
45151  $as_echo_n "(cached) " >&6
45152else
45153  case $BUILD_CC in
45154  [\\/]* | ?:[\\/]*)
45155  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45156  ;;
45157  *)
45158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45159for as_dir in $PATH
45160do
45161  IFS=$as_save_IFS
45162  test -z "$as_dir" && as_dir=.
45163    for ac_exec_ext in '' $ac_executable_extensions; do
45164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45165    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45167    break 2
45168  fi
45169done
45170  done
45171IFS=$as_save_IFS
45172
45173  ;;
45174esac
45175fi
45176BUILD_CC=$ac_cv_path_BUILD_CC
45177if test -n "$BUILD_CC"; then
45178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45179$as_echo "$BUILD_CC" >&6; }
45180else
45181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45182$as_echo "no" >&6; }
45183fi
45184
45185
45186  test -n "$BUILD_CC" && break
45187done
45188
45189    else
45190      # If it succeeded, then it was overridden by the user. We will use it
45191      # for the tool.
45192
45193      # First remove it from the list of overridden variables, so we can test
45194      # for unknown variables in the end.
45195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45196
45197      # Check if we try to supply an empty value
45198      if test "x$BUILD_CC" = x; then
45199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45200$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45202$as_echo_n "checking for BUILD_CC... " >&6; }
45203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45204$as_echo "disabled" >&6; }
45205      else
45206        # Check if the provided tool contains a complete path.
45207        tool_specified="$BUILD_CC"
45208        tool_basename="${tool_specified##*/}"
45209        if test "x$tool_basename" = "x$tool_specified"; then
45210          # A command without a complete path is provided, search $PATH.
45211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45212$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45213          # Extract the first word of "$tool_basename", so it can be a program name with args.
45214set dummy $tool_basename; ac_word=$2
45215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45216$as_echo_n "checking for $ac_word... " >&6; }
45217if ${ac_cv_path_BUILD_CC+:} false; then :
45218  $as_echo_n "(cached) " >&6
45219else
45220  case $BUILD_CC in
45221  [\\/]* | ?:[\\/]*)
45222  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45223  ;;
45224  *)
45225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45226for as_dir in $PATH
45227do
45228  IFS=$as_save_IFS
45229  test -z "$as_dir" && as_dir=.
45230    for ac_exec_ext in '' $ac_executable_extensions; do
45231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45232    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45234    break 2
45235  fi
45236done
45237  done
45238IFS=$as_save_IFS
45239
45240  ;;
45241esac
45242fi
45243BUILD_CC=$ac_cv_path_BUILD_CC
45244if test -n "$BUILD_CC"; then
45245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45246$as_echo "$BUILD_CC" >&6; }
45247else
45248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45249$as_echo "no" >&6; }
45250fi
45251
45252
45253          if test "x$BUILD_CC" = x; then
45254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45255          fi
45256        else
45257          # Otherwise we believe it is a complete path. Use it as it is.
45258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45259$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45261$as_echo_n "checking for BUILD_CC... " >&6; }
45262          if test ! -x "$tool_specified"; then
45263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45264$as_echo "not found" >&6; }
45265            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45266          fi
45267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45268$as_echo "$tool_specified" >&6; }
45269        fi
45270      fi
45271    fi
45272
45273  fi
45274
45275
45276
45277  if test "x$BUILD_CC" = x; then
45278    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45279  fi
45280
45281
45282
45283  # Only process if variable expands to non-empty
45284
45285  if test "x$BUILD_CC" != x; then
45286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45287
45288  # First separate the path from the arguments. This will split at the first
45289  # space.
45290  complete="$BUILD_CC"
45291  path="${complete%% *}"
45292  tmp="$complete EOL"
45293  arguments="${tmp#* }"
45294
45295  # Input might be given as Windows format, start by converting to
45296  # unix format.
45297  new_path=`$CYGPATH -u "$path"`
45298
45299  # Now try to locate executable using which
45300  new_path=`$WHICH "$new_path" 2> /dev/null`
45301  # bat and cmd files are not always considered executable in cygwin causing which
45302  # to not find them
45303  if test "x$new_path" = x \
45304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45306    new_path=`$CYGPATH -u "$path"`
45307  fi
45308  if test "x$new_path" = x; then
45309    # Oops. Which didn't find the executable.
45310    # The splitting of arguments from the executable at a space might have been incorrect,
45311    # since paths with space are more likely in Windows. Give it another try with the whole
45312    # argument.
45313    path="$complete"
45314    arguments="EOL"
45315    new_path=`$CYGPATH -u "$path"`
45316    new_path=`$WHICH "$new_path" 2> /dev/null`
45317    # bat and cmd files are not always considered executable in cygwin causing which
45318    # to not find them
45319    if test "x$new_path" = x \
45320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45322      new_path=`$CYGPATH -u "$path"`
45323    fi
45324    if test "x$new_path" = x; then
45325      # It's still not found. Now this is an unrecoverable error.
45326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45327$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45328      has_space=`$ECHO "$complete" | $GREP " "`
45329      if test "x$has_space" != x; then
45330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45332      fi
45333      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45334    fi
45335  fi
45336
45337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45340  # "foo.exe" is OK but "foo" is an error.
45341  #
45342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45343  # It is also a way to make sure we got the proper file name for the real test later on.
45344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45345  if test "x$test_shortpath" = x; then
45346    # Short path failed, file does not exist as specified.
45347    # Try adding .exe or .cmd
45348    if test -f "${new_path}.exe"; then
45349      input_to_shortpath="${new_path}.exe"
45350    elif test -f "${new_path}.cmd"; then
45351      input_to_shortpath="${new_path}.cmd"
45352    else
45353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45354$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45357      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45358    fi
45359  else
45360    input_to_shortpath="$new_path"
45361  fi
45362
45363  # Call helper function which possibly converts this using DOS-style short mode.
45364  # If so, the updated path is stored in $new_path.
45365  new_path="$input_to_shortpath"
45366
45367  input_path="$input_to_shortpath"
45368  # Check if we need to convert this using DOS-style short mode. If the path
45369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45370  # take no chances and rewrite it.
45371  # Note: m4 eats our [], so we need to use [ and ] instead.
45372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45373  if test "x$has_forbidden_chars" != x; then
45374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45378      # Going to short mode and back again did indeed matter. Since short mode is
45379      # case insensitive, let's make it lowercase to improve readability.
45380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45381      # Now convert it back to Unix-style (cygpath)
45382      input_path=`$CYGPATH -u "$shortmode_path"`
45383      new_path="$input_path"
45384    fi
45385  fi
45386
45387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45388  if test "x$test_cygdrive_prefix" = x; then
45389    # As a simple fix, exclude /usr/bin since it's not a real path.
45390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45392      # a path prefixed by /cygdrive for fixpath to work.
45393      new_path="$CYGWIN_ROOT_PATH$input_path"
45394    fi
45395  fi
45396
45397  # remove trailing .exe if any
45398  new_path="${new_path/%.exe/}"
45399
45400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45401
45402  # First separate the path from the arguments. This will split at the first
45403  # space.
45404  complete="$BUILD_CC"
45405  path="${complete%% *}"
45406  tmp="$complete EOL"
45407  arguments="${tmp#* }"
45408
45409  # Input might be given as Windows format, start by converting to
45410  # unix format.
45411  new_path="$path"
45412
45413  windows_path="$new_path"
45414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45415    unix_path=`$CYGPATH -u "$windows_path"`
45416    new_path="$unix_path"
45417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45419    new_path="$unix_path"
45420  fi
45421
45422
45423  # Now try to locate executable using which
45424  new_path=`$WHICH "$new_path" 2> /dev/null`
45425
45426  if test "x$new_path" = x; then
45427    # Oops. Which didn't find the executable.
45428    # The splitting of arguments from the executable at a space might have been incorrect,
45429    # since paths with space are more likely in Windows. Give it another try with the whole
45430    # argument.
45431    path="$complete"
45432    arguments="EOL"
45433    new_path="$path"
45434
45435  windows_path="$new_path"
45436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45437    unix_path=`$CYGPATH -u "$windows_path"`
45438    new_path="$unix_path"
45439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45441    new_path="$unix_path"
45442  fi
45443
45444
45445    new_path=`$WHICH "$new_path" 2> /dev/null`
45446    # bat and cmd files are not always considered executable in MSYS causing which
45447    # to not find them
45448    if test "x$new_path" = x \
45449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45451      new_path="$path"
45452
45453  windows_path="$new_path"
45454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45455    unix_path=`$CYGPATH -u "$windows_path"`
45456    new_path="$unix_path"
45457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45459    new_path="$unix_path"
45460  fi
45461
45462    fi
45463
45464    if test "x$new_path" = x; then
45465      # It's still not found. Now this is an unrecoverable error.
45466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45467$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45468      has_space=`$ECHO "$complete" | $GREP " "`
45469      if test "x$has_space" != x; then
45470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45472      fi
45473      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45474    fi
45475  fi
45476
45477  # Now new_path has a complete unix path to the binary
45478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45479    # Keep paths in /bin as-is, but remove trailing .exe if any
45480    new_path="${new_path/%.exe/}"
45481    # Do not save /bin paths to all_fixpath_prefixes!
45482  else
45483    # Not in mixed or Windows style, start by that.
45484    new_path=`cmd //c echo $new_path`
45485
45486  input_path="$new_path"
45487  # Check if we need to convert this using DOS-style short mode. If the path
45488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45489  # take no chances and rewrite it.
45490  # Note: m4 eats our [], so we need to use [ and ] instead.
45491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45492  if test "x$has_forbidden_chars" != x; then
45493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45495  fi
45496
45497    # Output is in $new_path
45498
45499  windows_path="$new_path"
45500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45501    unix_path=`$CYGPATH -u "$windows_path"`
45502    new_path="$unix_path"
45503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45505    new_path="$unix_path"
45506  fi
45507
45508    # remove trailing .exe if any
45509    new_path="${new_path/%.exe/}"
45510
45511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45513  fi
45514
45515    else
45516      # We're on a unix platform. Hooray! :)
45517      # First separate the path from the arguments. This will split at the first
45518      # space.
45519      complete="$BUILD_CC"
45520      path="${complete%% *}"
45521      tmp="$complete EOL"
45522      arguments="${tmp#* }"
45523
45524      # Cannot rely on the command "which" here since it doesn't always work.
45525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45526      if test -z "$is_absolute_path"; then
45527        # Path to executable is not absolute. Find it.
45528        IFS_save="$IFS"
45529        IFS=:
45530        for p in $PATH; do
45531          if test -f "$p/$path" && test -x "$p/$path"; then
45532            new_path="$p/$path"
45533            break
45534          fi
45535        done
45536        IFS="$IFS_save"
45537      else
45538        # This is an absolute path, we can use it without further modifications.
45539        new_path="$path"
45540      fi
45541
45542      if test "x$new_path" = x; then
45543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45544$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45545        has_space=`$ECHO "$complete" | $GREP " "`
45546        if test "x$has_space" != x; then
45547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45549        fi
45550        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45551      fi
45552    fi
45553
45554    # Now join together the path and the arguments once again
45555    if test "x$arguments" != xEOL; then
45556      new_complete="$new_path ${arguments% *}"
45557    else
45558      new_complete="$new_path"
45559    fi
45560
45561    if test "x$complete" != "x$new_complete"; then
45562      BUILD_CC="$new_complete"
45563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45564$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45565    fi
45566  fi
45567
45568
45569
45570
45571  # Publish this variable in the help.
45572
45573
45574  if [ -z "${BUILD_CXX+x}" ]; then
45575    # The variable is not set by user, try to locate tool using the code snippet
45576    for ac_prog in cl CC g++
45577do
45578  # Extract the first word of "$ac_prog", so it can be a program name with args.
45579set dummy $ac_prog; ac_word=$2
45580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45581$as_echo_n "checking for $ac_word... " >&6; }
45582if ${ac_cv_path_BUILD_CXX+:} false; then :
45583  $as_echo_n "(cached) " >&6
45584else
45585  case $BUILD_CXX in
45586  [\\/]* | ?:[\\/]*)
45587  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45588  ;;
45589  *)
45590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45591for as_dir in $PATH
45592do
45593  IFS=$as_save_IFS
45594  test -z "$as_dir" && as_dir=.
45595    for ac_exec_ext in '' $ac_executable_extensions; do
45596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45597    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45599    break 2
45600  fi
45601done
45602  done
45603IFS=$as_save_IFS
45604
45605  ;;
45606esac
45607fi
45608BUILD_CXX=$ac_cv_path_BUILD_CXX
45609if test -n "$BUILD_CXX"; then
45610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45611$as_echo "$BUILD_CXX" >&6; }
45612else
45613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45614$as_echo "no" >&6; }
45615fi
45616
45617
45618  test -n "$BUILD_CXX" && break
45619done
45620
45621  else
45622    # The variable is set, but is it from the command line or the environment?
45623
45624    # Try to remove the string !BUILD_CXX! from our list.
45625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45627      # If it failed, the variable was not from the command line. Ignore it,
45628      # but warn the user (except for BASH, which is always set by the calling BASH).
45629      if test "xBUILD_CXX" != xBASH; then
45630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45631$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45632      fi
45633      # Try to locate tool using the code snippet
45634      for ac_prog in cl CC g++
45635do
45636  # Extract the first word of "$ac_prog", so it can be a program name with args.
45637set dummy $ac_prog; ac_word=$2
45638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45639$as_echo_n "checking for $ac_word... " >&6; }
45640if ${ac_cv_path_BUILD_CXX+:} false; then :
45641  $as_echo_n "(cached) " >&6
45642else
45643  case $BUILD_CXX in
45644  [\\/]* | ?:[\\/]*)
45645  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45646  ;;
45647  *)
45648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45649for as_dir in $PATH
45650do
45651  IFS=$as_save_IFS
45652  test -z "$as_dir" && as_dir=.
45653    for ac_exec_ext in '' $ac_executable_extensions; do
45654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45655    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45657    break 2
45658  fi
45659done
45660  done
45661IFS=$as_save_IFS
45662
45663  ;;
45664esac
45665fi
45666BUILD_CXX=$ac_cv_path_BUILD_CXX
45667if test -n "$BUILD_CXX"; then
45668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45669$as_echo "$BUILD_CXX" >&6; }
45670else
45671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45672$as_echo "no" >&6; }
45673fi
45674
45675
45676  test -n "$BUILD_CXX" && break
45677done
45678
45679    else
45680      # If it succeeded, then it was overridden by the user. We will use it
45681      # for the tool.
45682
45683      # First remove it from the list of overridden variables, so we can test
45684      # for unknown variables in the end.
45685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45686
45687      # Check if we try to supply an empty value
45688      if test "x$BUILD_CXX" = x; then
45689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45690$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45692$as_echo_n "checking for BUILD_CXX... " >&6; }
45693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45694$as_echo "disabled" >&6; }
45695      else
45696        # Check if the provided tool contains a complete path.
45697        tool_specified="$BUILD_CXX"
45698        tool_basename="${tool_specified##*/}"
45699        if test "x$tool_basename" = "x$tool_specified"; then
45700          # A command without a complete path is provided, search $PATH.
45701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45702$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45703          # Extract the first word of "$tool_basename", so it can be a program name with args.
45704set dummy $tool_basename; ac_word=$2
45705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45706$as_echo_n "checking for $ac_word... " >&6; }
45707if ${ac_cv_path_BUILD_CXX+:} false; then :
45708  $as_echo_n "(cached) " >&6
45709else
45710  case $BUILD_CXX in
45711  [\\/]* | ?:[\\/]*)
45712  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45713  ;;
45714  *)
45715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45716for as_dir in $PATH
45717do
45718  IFS=$as_save_IFS
45719  test -z "$as_dir" && as_dir=.
45720    for ac_exec_ext in '' $ac_executable_extensions; do
45721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45722    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45724    break 2
45725  fi
45726done
45727  done
45728IFS=$as_save_IFS
45729
45730  ;;
45731esac
45732fi
45733BUILD_CXX=$ac_cv_path_BUILD_CXX
45734if test -n "$BUILD_CXX"; then
45735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45736$as_echo "$BUILD_CXX" >&6; }
45737else
45738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45739$as_echo "no" >&6; }
45740fi
45741
45742
45743          if test "x$BUILD_CXX" = x; then
45744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45745          fi
45746        else
45747          # Otherwise we believe it is a complete path. Use it as it is.
45748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45749$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45751$as_echo_n "checking for BUILD_CXX... " >&6; }
45752          if test ! -x "$tool_specified"; then
45753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45754$as_echo "not found" >&6; }
45755            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45756          fi
45757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45758$as_echo "$tool_specified" >&6; }
45759        fi
45760      fi
45761    fi
45762
45763  fi
45764
45765
45766
45767  if test "x$BUILD_CXX" = x; then
45768    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45769  fi
45770
45771
45772
45773  # Only process if variable expands to non-empty
45774
45775  if test "x$BUILD_CXX" != x; then
45776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45777
45778  # First separate the path from the arguments. This will split at the first
45779  # space.
45780  complete="$BUILD_CXX"
45781  path="${complete%% *}"
45782  tmp="$complete EOL"
45783  arguments="${tmp#* }"
45784
45785  # Input might be given as Windows format, start by converting to
45786  # unix format.
45787  new_path=`$CYGPATH -u "$path"`
45788
45789  # Now try to locate executable using which
45790  new_path=`$WHICH "$new_path" 2> /dev/null`
45791  # bat and cmd files are not always considered executable in cygwin causing which
45792  # to not find them
45793  if test "x$new_path" = x \
45794      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45795      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45796    new_path=`$CYGPATH -u "$path"`
45797  fi
45798  if test "x$new_path" = x; then
45799    # Oops. Which didn't find the executable.
45800    # The splitting of arguments from the executable at a space might have been incorrect,
45801    # since paths with space are more likely in Windows. Give it another try with the whole
45802    # argument.
45803    path="$complete"
45804    arguments="EOL"
45805    new_path=`$CYGPATH -u "$path"`
45806    new_path=`$WHICH "$new_path" 2> /dev/null`
45807    # bat and cmd files are not always considered executable in cygwin causing which
45808    # to not find them
45809    if test "x$new_path" = x \
45810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45812      new_path=`$CYGPATH -u "$path"`
45813    fi
45814    if test "x$new_path" = x; then
45815      # It's still not found. Now this is an unrecoverable error.
45816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45817$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45818      has_space=`$ECHO "$complete" | $GREP " "`
45819      if test "x$has_space" != x; then
45820        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45821$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45822      fi
45823      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45824    fi
45825  fi
45826
45827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45830  # "foo.exe" is OK but "foo" is an error.
45831  #
45832  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45833  # It is also a way to make sure we got the proper file name for the real test later on.
45834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45835  if test "x$test_shortpath" = x; then
45836    # Short path failed, file does not exist as specified.
45837    # Try adding .exe or .cmd
45838    if test -f "${new_path}.exe"; then
45839      input_to_shortpath="${new_path}.exe"
45840    elif test -f "${new_path}.cmd"; then
45841      input_to_shortpath="${new_path}.cmd"
45842    else
45843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45844$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45845      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45846$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45847      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45848    fi
45849  else
45850    input_to_shortpath="$new_path"
45851  fi
45852
45853  # Call helper function which possibly converts this using DOS-style short mode.
45854  # If so, the updated path is stored in $new_path.
45855  new_path="$input_to_shortpath"
45856
45857  input_path="$input_to_shortpath"
45858  # Check if we need to convert this using DOS-style short mode. If the path
45859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45860  # take no chances and rewrite it.
45861  # Note: m4 eats our [], so we need to use [ and ] instead.
45862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45863  if test "x$has_forbidden_chars" != x; then
45864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45868      # Going to short mode and back again did indeed matter. Since short mode is
45869      # case insensitive, let's make it lowercase to improve readability.
45870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45871      # Now convert it back to Unix-style (cygpath)
45872      input_path=`$CYGPATH -u "$shortmode_path"`
45873      new_path="$input_path"
45874    fi
45875  fi
45876
45877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45878  if test "x$test_cygdrive_prefix" = x; then
45879    # As a simple fix, exclude /usr/bin since it's not a real path.
45880    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45882      # a path prefixed by /cygdrive for fixpath to work.
45883      new_path="$CYGWIN_ROOT_PATH$input_path"
45884    fi
45885  fi
45886
45887  # remove trailing .exe if any
45888  new_path="${new_path/%.exe/}"
45889
45890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45891
45892  # First separate the path from the arguments. This will split at the first
45893  # space.
45894  complete="$BUILD_CXX"
45895  path="${complete%% *}"
45896  tmp="$complete EOL"
45897  arguments="${tmp#* }"
45898
45899  # Input might be given as Windows format, start by converting to
45900  # unix format.
45901  new_path="$path"
45902
45903  windows_path="$new_path"
45904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45905    unix_path=`$CYGPATH -u "$windows_path"`
45906    new_path="$unix_path"
45907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45909    new_path="$unix_path"
45910  fi
45911
45912
45913  # Now try to locate executable using which
45914  new_path=`$WHICH "$new_path" 2> /dev/null`
45915
45916  if test "x$new_path" = x; then
45917    # Oops. Which didn't find the executable.
45918    # The splitting of arguments from the executable at a space might have been incorrect,
45919    # since paths with space are more likely in Windows. Give it another try with the whole
45920    # argument.
45921    path="$complete"
45922    arguments="EOL"
45923    new_path="$path"
45924
45925  windows_path="$new_path"
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927    unix_path=`$CYGPATH -u "$windows_path"`
45928    new_path="$unix_path"
45929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45931    new_path="$unix_path"
45932  fi
45933
45934
45935    new_path=`$WHICH "$new_path" 2> /dev/null`
45936    # bat and cmd files are not always considered executable in MSYS causing which
45937    # to not find them
45938    if test "x$new_path" = x \
45939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45941      new_path="$path"
45942
45943  windows_path="$new_path"
45944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45945    unix_path=`$CYGPATH -u "$windows_path"`
45946    new_path="$unix_path"
45947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45949    new_path="$unix_path"
45950  fi
45951
45952    fi
45953
45954    if test "x$new_path" = x; then
45955      # It's still not found. Now this is an unrecoverable error.
45956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45957$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45958      has_space=`$ECHO "$complete" | $GREP " "`
45959      if test "x$has_space" != x; then
45960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45962      fi
45963      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45964    fi
45965  fi
45966
45967  # Now new_path has a complete unix path to the binary
45968  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45969    # Keep paths in /bin as-is, but remove trailing .exe if any
45970    new_path="${new_path/%.exe/}"
45971    # Do not save /bin paths to all_fixpath_prefixes!
45972  else
45973    # Not in mixed or Windows style, start by that.
45974    new_path=`cmd //c echo $new_path`
45975
45976  input_path="$new_path"
45977  # Check if we need to convert this using DOS-style short mode. If the path
45978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45979  # take no chances and rewrite it.
45980  # Note: m4 eats our [], so we need to use [ and ] instead.
45981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45982  if test "x$has_forbidden_chars" != x; then
45983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45985  fi
45986
45987    # Output is in $new_path
45988
45989  windows_path="$new_path"
45990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45991    unix_path=`$CYGPATH -u "$windows_path"`
45992    new_path="$unix_path"
45993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45995    new_path="$unix_path"
45996  fi
45997
45998    # remove trailing .exe if any
45999    new_path="${new_path/%.exe/}"
46000
46001    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46002    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46003  fi
46004
46005    else
46006      # We're on a unix platform. Hooray! :)
46007      # First separate the path from the arguments. This will split at the first
46008      # space.
46009      complete="$BUILD_CXX"
46010      path="${complete%% *}"
46011      tmp="$complete EOL"
46012      arguments="${tmp#* }"
46013
46014      # Cannot rely on the command "which" here since it doesn't always work.
46015      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46016      if test -z "$is_absolute_path"; then
46017        # Path to executable is not absolute. Find it.
46018        IFS_save="$IFS"
46019        IFS=:
46020        for p in $PATH; do
46021          if test -f "$p/$path" && test -x "$p/$path"; then
46022            new_path="$p/$path"
46023            break
46024          fi
46025        done
46026        IFS="$IFS_save"
46027      else
46028        # This is an absolute path, we can use it without further modifications.
46029        new_path="$path"
46030      fi
46031
46032      if test "x$new_path" = x; then
46033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46034$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46035        has_space=`$ECHO "$complete" | $GREP " "`
46036        if test "x$has_space" != x; then
46037          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46038$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46039        fi
46040        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46041      fi
46042    fi
46043
46044    # Now join together the path and the arguments once again
46045    if test "x$arguments" != xEOL; then
46046      new_complete="$new_path ${arguments% *}"
46047    else
46048      new_complete="$new_path"
46049    fi
46050
46051    if test "x$complete" != "x$new_complete"; then
46052      BUILD_CXX="$new_complete"
46053      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
46054$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
46055    fi
46056  fi
46057
46058
46059
46060  # Publish this variable in the help.
46061
46062
46063  if [ -z "${BUILD_NM+x}" ]; then
46064    # The variable is not set by user, try to locate tool using the code snippet
46065    for ac_prog in nm gcc-nm
46066do
46067  # Extract the first word of "$ac_prog", so it can be a program name with args.
46068set dummy $ac_prog; ac_word=$2
46069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46070$as_echo_n "checking for $ac_word... " >&6; }
46071if ${ac_cv_path_BUILD_NM+:} false; then :
46072  $as_echo_n "(cached) " >&6
46073else
46074  case $BUILD_NM in
46075  [\\/]* | ?:[\\/]*)
46076  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46077  ;;
46078  *)
46079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46080for as_dir in $PATH
46081do
46082  IFS=$as_save_IFS
46083  test -z "$as_dir" && as_dir=.
46084    for ac_exec_ext in '' $ac_executable_extensions; do
46085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46086    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46088    break 2
46089  fi
46090done
46091  done
46092IFS=$as_save_IFS
46093
46094  ;;
46095esac
46096fi
46097BUILD_NM=$ac_cv_path_BUILD_NM
46098if test -n "$BUILD_NM"; then
46099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46100$as_echo "$BUILD_NM" >&6; }
46101else
46102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46103$as_echo "no" >&6; }
46104fi
46105
46106
46107  test -n "$BUILD_NM" && break
46108done
46109
46110  else
46111    # The variable is set, but is it from the command line or the environment?
46112
46113    # Try to remove the string !BUILD_NM! from our list.
46114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46116      # If it failed, the variable was not from the command line. Ignore it,
46117      # but warn the user (except for BASH, which is always set by the calling BASH).
46118      if test "xBUILD_NM" != xBASH; then
46119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46120$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46121      fi
46122      # Try to locate tool using the code snippet
46123      for ac_prog in nm gcc-nm
46124do
46125  # Extract the first word of "$ac_prog", so it can be a program name with args.
46126set dummy $ac_prog; ac_word=$2
46127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46128$as_echo_n "checking for $ac_word... " >&6; }
46129if ${ac_cv_path_BUILD_NM+:} false; then :
46130  $as_echo_n "(cached) " >&6
46131else
46132  case $BUILD_NM in
46133  [\\/]* | ?:[\\/]*)
46134  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46135  ;;
46136  *)
46137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46138for as_dir in $PATH
46139do
46140  IFS=$as_save_IFS
46141  test -z "$as_dir" && as_dir=.
46142    for ac_exec_ext in '' $ac_executable_extensions; do
46143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46144    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46146    break 2
46147  fi
46148done
46149  done
46150IFS=$as_save_IFS
46151
46152  ;;
46153esac
46154fi
46155BUILD_NM=$ac_cv_path_BUILD_NM
46156if test -n "$BUILD_NM"; then
46157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46158$as_echo "$BUILD_NM" >&6; }
46159else
46160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46161$as_echo "no" >&6; }
46162fi
46163
46164
46165  test -n "$BUILD_NM" && break
46166done
46167
46168    else
46169      # If it succeeded, then it was overridden by the user. We will use it
46170      # for the tool.
46171
46172      # First remove it from the list of overridden variables, so we can test
46173      # for unknown variables in the end.
46174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46175
46176      # Check if we try to supply an empty value
46177      if test "x$BUILD_NM" = x; then
46178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46179$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46181$as_echo_n "checking for BUILD_NM... " >&6; }
46182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46183$as_echo "disabled" >&6; }
46184      else
46185        # Check if the provided tool contains a complete path.
46186        tool_specified="$BUILD_NM"
46187        tool_basename="${tool_specified##*/}"
46188        if test "x$tool_basename" = "x$tool_specified"; then
46189          # A command without a complete path is provided, search $PATH.
46190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46191$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46192          # Extract the first word of "$tool_basename", so it can be a program name with args.
46193set dummy $tool_basename; ac_word=$2
46194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46195$as_echo_n "checking for $ac_word... " >&6; }
46196if ${ac_cv_path_BUILD_NM+:} false; then :
46197  $as_echo_n "(cached) " >&6
46198else
46199  case $BUILD_NM in
46200  [\\/]* | ?:[\\/]*)
46201  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46202  ;;
46203  *)
46204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46205for as_dir in $PATH
46206do
46207  IFS=$as_save_IFS
46208  test -z "$as_dir" && as_dir=.
46209    for ac_exec_ext in '' $ac_executable_extensions; do
46210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46211    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46213    break 2
46214  fi
46215done
46216  done
46217IFS=$as_save_IFS
46218
46219  ;;
46220esac
46221fi
46222BUILD_NM=$ac_cv_path_BUILD_NM
46223if test -n "$BUILD_NM"; then
46224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46225$as_echo "$BUILD_NM" >&6; }
46226else
46227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46228$as_echo "no" >&6; }
46229fi
46230
46231
46232          if test "x$BUILD_NM" = x; then
46233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46234          fi
46235        else
46236          # Otherwise we believe it is a complete path. Use it as it is.
46237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46238$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46240$as_echo_n "checking for BUILD_NM... " >&6; }
46241          if test ! -x "$tool_specified"; then
46242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46243$as_echo "not found" >&6; }
46244            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46245          fi
46246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46247$as_echo "$tool_specified" >&6; }
46248        fi
46249      fi
46250    fi
46251
46252  fi
46253
46254
46255
46256  # Only process if variable expands to non-empty
46257
46258  if test "x$BUILD_NM" != x; then
46259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46260
46261  # First separate the path from the arguments. This will split at the first
46262  # space.
46263  complete="$BUILD_NM"
46264  path="${complete%% *}"
46265  tmp="$complete EOL"
46266  arguments="${tmp#* }"
46267
46268  # Input might be given as Windows format, start by converting to
46269  # unix format.
46270  new_path=`$CYGPATH -u "$path"`
46271
46272  # Now try to locate executable using which
46273  new_path=`$WHICH "$new_path" 2> /dev/null`
46274  # bat and cmd files are not always considered executable in cygwin causing which
46275  # to not find them
46276  if test "x$new_path" = x \
46277      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46278      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46279    new_path=`$CYGPATH -u "$path"`
46280  fi
46281  if test "x$new_path" = x; then
46282    # Oops. Which didn't find the executable.
46283    # The splitting of arguments from the executable at a space might have been incorrect,
46284    # since paths with space are more likely in Windows. Give it another try with the whole
46285    # argument.
46286    path="$complete"
46287    arguments="EOL"
46288    new_path=`$CYGPATH -u "$path"`
46289    new_path=`$WHICH "$new_path" 2> /dev/null`
46290    # bat and cmd files are not always considered executable in cygwin causing which
46291    # to not find them
46292    if test "x$new_path" = x \
46293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46295      new_path=`$CYGPATH -u "$path"`
46296    fi
46297    if test "x$new_path" = x; then
46298      # It's still not found. Now this is an unrecoverable error.
46299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46300$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46301      has_space=`$ECHO "$complete" | $GREP " "`
46302      if test "x$has_space" != x; then
46303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46305      fi
46306      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46307    fi
46308  fi
46309
46310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46313  # "foo.exe" is OK but "foo" is an error.
46314  #
46315  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46316  # It is also a way to make sure we got the proper file name for the real test later on.
46317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46318  if test "x$test_shortpath" = x; then
46319    # Short path failed, file does not exist as specified.
46320    # Try adding .exe or .cmd
46321    if test -f "${new_path}.exe"; then
46322      input_to_shortpath="${new_path}.exe"
46323    elif test -f "${new_path}.cmd"; then
46324      input_to_shortpath="${new_path}.cmd"
46325    else
46326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46327$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46328      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46329$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46330      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46331    fi
46332  else
46333    input_to_shortpath="$new_path"
46334  fi
46335
46336  # Call helper function which possibly converts this using DOS-style short mode.
46337  # If so, the updated path is stored in $new_path.
46338  new_path="$input_to_shortpath"
46339
46340  input_path="$input_to_shortpath"
46341  # Check if we need to convert this using DOS-style short mode. If the path
46342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46343  # take no chances and rewrite it.
46344  # Note: m4 eats our [], so we need to use [ and ] instead.
46345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46346  if test "x$has_forbidden_chars" != x; then
46347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46351      # Going to short mode and back again did indeed matter. Since short mode is
46352      # case insensitive, let's make it lowercase to improve readability.
46353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46354      # Now convert it back to Unix-style (cygpath)
46355      input_path=`$CYGPATH -u "$shortmode_path"`
46356      new_path="$input_path"
46357    fi
46358  fi
46359
46360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46361  if test "x$test_cygdrive_prefix" = x; then
46362    # As a simple fix, exclude /usr/bin since it's not a real path.
46363    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46365      # a path prefixed by /cygdrive for fixpath to work.
46366      new_path="$CYGWIN_ROOT_PATH$input_path"
46367    fi
46368  fi
46369
46370  # remove trailing .exe if any
46371  new_path="${new_path/%.exe/}"
46372
46373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46374
46375  # First separate the path from the arguments. This will split at the first
46376  # space.
46377  complete="$BUILD_NM"
46378  path="${complete%% *}"
46379  tmp="$complete EOL"
46380  arguments="${tmp#* }"
46381
46382  # Input might be given as Windows format, start by converting to
46383  # unix format.
46384  new_path="$path"
46385
46386  windows_path="$new_path"
46387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46388    unix_path=`$CYGPATH -u "$windows_path"`
46389    new_path="$unix_path"
46390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46392    new_path="$unix_path"
46393  fi
46394
46395
46396  # Now try to locate executable using which
46397  new_path=`$WHICH "$new_path" 2> /dev/null`
46398
46399  if test "x$new_path" = x; then
46400    # Oops. Which didn't find the executable.
46401    # The splitting of arguments from the executable at a space might have been incorrect,
46402    # since paths with space are more likely in Windows. Give it another try with the whole
46403    # argument.
46404    path="$complete"
46405    arguments="EOL"
46406    new_path="$path"
46407
46408  windows_path="$new_path"
46409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46410    unix_path=`$CYGPATH -u "$windows_path"`
46411    new_path="$unix_path"
46412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46414    new_path="$unix_path"
46415  fi
46416
46417
46418    new_path=`$WHICH "$new_path" 2> /dev/null`
46419    # bat and cmd files are not always considered executable in MSYS causing which
46420    # to not find them
46421    if test "x$new_path" = x \
46422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46424      new_path="$path"
46425
46426  windows_path="$new_path"
46427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46428    unix_path=`$CYGPATH -u "$windows_path"`
46429    new_path="$unix_path"
46430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46432    new_path="$unix_path"
46433  fi
46434
46435    fi
46436
46437    if test "x$new_path" = x; then
46438      # It's still not found. Now this is an unrecoverable error.
46439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46440$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46441      has_space=`$ECHO "$complete" | $GREP " "`
46442      if test "x$has_space" != x; then
46443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46445      fi
46446      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46447    fi
46448  fi
46449
46450  # Now new_path has a complete unix path to the binary
46451  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46452    # Keep paths in /bin as-is, but remove trailing .exe if any
46453    new_path="${new_path/%.exe/}"
46454    # Do not save /bin paths to all_fixpath_prefixes!
46455  else
46456    # Not in mixed or Windows style, start by that.
46457    new_path=`cmd //c echo $new_path`
46458
46459  input_path="$new_path"
46460  # Check if we need to convert this using DOS-style short mode. If the path
46461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46462  # take no chances and rewrite it.
46463  # Note: m4 eats our [], so we need to use [ and ] instead.
46464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46465  if test "x$has_forbidden_chars" != x; then
46466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46468  fi
46469
46470    # Output is in $new_path
46471
46472  windows_path="$new_path"
46473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46474    unix_path=`$CYGPATH -u "$windows_path"`
46475    new_path="$unix_path"
46476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46478    new_path="$unix_path"
46479  fi
46480
46481    # remove trailing .exe if any
46482    new_path="${new_path/%.exe/}"
46483
46484    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46485    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46486  fi
46487
46488    else
46489      # We're on a unix platform. Hooray! :)
46490      # First separate the path from the arguments. This will split at the first
46491      # space.
46492      complete="$BUILD_NM"
46493      path="${complete%% *}"
46494      tmp="$complete EOL"
46495      arguments="${tmp#* }"
46496
46497      # Cannot rely on the command "which" here since it doesn't always work.
46498      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46499      if test -z "$is_absolute_path"; then
46500        # Path to executable is not absolute. Find it.
46501        IFS_save="$IFS"
46502        IFS=:
46503        for p in $PATH; do
46504          if test -f "$p/$path" && test -x "$p/$path"; then
46505            new_path="$p/$path"
46506            break
46507          fi
46508        done
46509        IFS="$IFS_save"
46510      else
46511        # This is an absolute path, we can use it without further modifications.
46512        new_path="$path"
46513      fi
46514
46515      if test "x$new_path" = x; then
46516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46517$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46518        has_space=`$ECHO "$complete" | $GREP " "`
46519        if test "x$has_space" != x; then
46520          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46521$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46522        fi
46523        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46524      fi
46525    fi
46526
46527    # Now join together the path and the arguments once again
46528    if test "x$arguments" != xEOL; then
46529      new_complete="$new_path ${arguments% *}"
46530    else
46531      new_complete="$new_path"
46532    fi
46533
46534    if test "x$complete" != "x$new_complete"; then
46535      BUILD_NM="$new_complete"
46536      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46537$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46538    fi
46539  fi
46540
46541
46542
46543  # Publish this variable in the help.
46544
46545
46546  if [ -z "${BUILD_AR+x}" ]; then
46547    # The variable is not set by user, try to locate tool using the code snippet
46548    for ac_prog in ar gcc-ar
46549do
46550  # Extract the first word of "$ac_prog", so it can be a program name with args.
46551set dummy $ac_prog; ac_word=$2
46552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46553$as_echo_n "checking for $ac_word... " >&6; }
46554if ${ac_cv_path_BUILD_AR+:} false; then :
46555  $as_echo_n "(cached) " >&6
46556else
46557  case $BUILD_AR in
46558  [\\/]* | ?:[\\/]*)
46559  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46560  ;;
46561  *)
46562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46563for as_dir in $PATH
46564do
46565  IFS=$as_save_IFS
46566  test -z "$as_dir" && as_dir=.
46567    for ac_exec_ext in '' $ac_executable_extensions; do
46568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46569    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46571    break 2
46572  fi
46573done
46574  done
46575IFS=$as_save_IFS
46576
46577  ;;
46578esac
46579fi
46580BUILD_AR=$ac_cv_path_BUILD_AR
46581if test -n "$BUILD_AR"; then
46582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46583$as_echo "$BUILD_AR" >&6; }
46584else
46585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46586$as_echo "no" >&6; }
46587fi
46588
46589
46590  test -n "$BUILD_AR" && break
46591done
46592
46593  else
46594    # The variable is set, but is it from the command line or the environment?
46595
46596    # Try to remove the string !BUILD_AR! from our list.
46597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46599      # If it failed, the variable was not from the command line. Ignore it,
46600      # but warn the user (except for BASH, which is always set by the calling BASH).
46601      if test "xBUILD_AR" != xBASH; then
46602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46603$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46604      fi
46605      # Try to locate tool using the code snippet
46606      for ac_prog in ar gcc-ar
46607do
46608  # Extract the first word of "$ac_prog", so it can be a program name with args.
46609set dummy $ac_prog; ac_word=$2
46610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46611$as_echo_n "checking for $ac_word... " >&6; }
46612if ${ac_cv_path_BUILD_AR+:} false; then :
46613  $as_echo_n "(cached) " >&6
46614else
46615  case $BUILD_AR in
46616  [\\/]* | ?:[\\/]*)
46617  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46618  ;;
46619  *)
46620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46621for as_dir in $PATH
46622do
46623  IFS=$as_save_IFS
46624  test -z "$as_dir" && as_dir=.
46625    for ac_exec_ext in '' $ac_executable_extensions; do
46626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46627    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46629    break 2
46630  fi
46631done
46632  done
46633IFS=$as_save_IFS
46634
46635  ;;
46636esac
46637fi
46638BUILD_AR=$ac_cv_path_BUILD_AR
46639if test -n "$BUILD_AR"; then
46640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46641$as_echo "$BUILD_AR" >&6; }
46642else
46643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46644$as_echo "no" >&6; }
46645fi
46646
46647
46648  test -n "$BUILD_AR" && break
46649done
46650
46651    else
46652      # If it succeeded, then it was overridden by the user. We will use it
46653      # for the tool.
46654
46655      # First remove it from the list of overridden variables, so we can test
46656      # for unknown variables in the end.
46657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46658
46659      # Check if we try to supply an empty value
46660      if test "x$BUILD_AR" = x; then
46661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46662$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46664$as_echo_n "checking for BUILD_AR... " >&6; }
46665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46666$as_echo "disabled" >&6; }
46667      else
46668        # Check if the provided tool contains a complete path.
46669        tool_specified="$BUILD_AR"
46670        tool_basename="${tool_specified##*/}"
46671        if test "x$tool_basename" = "x$tool_specified"; then
46672          # A command without a complete path is provided, search $PATH.
46673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46674$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46675          # Extract the first word of "$tool_basename", so it can be a program name with args.
46676set dummy $tool_basename; ac_word=$2
46677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46678$as_echo_n "checking for $ac_word... " >&6; }
46679if ${ac_cv_path_BUILD_AR+:} false; then :
46680  $as_echo_n "(cached) " >&6
46681else
46682  case $BUILD_AR in
46683  [\\/]* | ?:[\\/]*)
46684  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46685  ;;
46686  *)
46687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46688for as_dir in $PATH
46689do
46690  IFS=$as_save_IFS
46691  test -z "$as_dir" && as_dir=.
46692    for ac_exec_ext in '' $ac_executable_extensions; do
46693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46694    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46696    break 2
46697  fi
46698done
46699  done
46700IFS=$as_save_IFS
46701
46702  ;;
46703esac
46704fi
46705BUILD_AR=$ac_cv_path_BUILD_AR
46706if test -n "$BUILD_AR"; then
46707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46708$as_echo "$BUILD_AR" >&6; }
46709else
46710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46711$as_echo "no" >&6; }
46712fi
46713
46714
46715          if test "x$BUILD_AR" = x; then
46716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46717          fi
46718        else
46719          # Otherwise we believe it is a complete path. Use it as it is.
46720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46721$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46723$as_echo_n "checking for BUILD_AR... " >&6; }
46724          if test ! -x "$tool_specified"; then
46725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46726$as_echo "not found" >&6; }
46727            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46728          fi
46729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46730$as_echo "$tool_specified" >&6; }
46731        fi
46732      fi
46733    fi
46734
46735  fi
46736
46737
46738
46739  # Only process if variable expands to non-empty
46740
46741  if test "x$BUILD_AR" != x; then
46742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46743
46744  # First separate the path from the arguments. This will split at the first
46745  # space.
46746  complete="$BUILD_AR"
46747  path="${complete%% *}"
46748  tmp="$complete EOL"
46749  arguments="${tmp#* }"
46750
46751  # Input might be given as Windows format, start by converting to
46752  # unix format.
46753  new_path=`$CYGPATH -u "$path"`
46754
46755  # Now try to locate executable using which
46756  new_path=`$WHICH "$new_path" 2> /dev/null`
46757  # bat and cmd files are not always considered executable in cygwin causing which
46758  # to not find them
46759  if test "x$new_path" = x \
46760      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46761      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46762    new_path=`$CYGPATH -u "$path"`
46763  fi
46764  if test "x$new_path" = x; then
46765    # Oops. Which didn't find the executable.
46766    # The splitting of arguments from the executable at a space might have been incorrect,
46767    # since paths with space are more likely in Windows. Give it another try with the whole
46768    # argument.
46769    path="$complete"
46770    arguments="EOL"
46771    new_path=`$CYGPATH -u "$path"`
46772    new_path=`$WHICH "$new_path" 2> /dev/null`
46773    # bat and cmd files are not always considered executable in cygwin causing which
46774    # to not find them
46775    if test "x$new_path" = x \
46776        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46777        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46778      new_path=`$CYGPATH -u "$path"`
46779    fi
46780    if test "x$new_path" = x; then
46781      # It's still not found. Now this is an unrecoverable error.
46782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46783$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46784      has_space=`$ECHO "$complete" | $GREP " "`
46785      if test "x$has_space" != x; then
46786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46788      fi
46789      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46790    fi
46791  fi
46792
46793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46796  # "foo.exe" is OK but "foo" is an error.
46797  #
46798  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46799  # It is also a way to make sure we got the proper file name for the real test later on.
46800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46801  if test "x$test_shortpath" = x; then
46802    # Short path failed, file does not exist as specified.
46803    # Try adding .exe or .cmd
46804    if test -f "${new_path}.exe"; then
46805      input_to_shortpath="${new_path}.exe"
46806    elif test -f "${new_path}.cmd"; then
46807      input_to_shortpath="${new_path}.cmd"
46808    else
46809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46810$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46813      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46814    fi
46815  else
46816    input_to_shortpath="$new_path"
46817  fi
46818
46819  # Call helper function which possibly converts this using DOS-style short mode.
46820  # If so, the updated path is stored in $new_path.
46821  new_path="$input_to_shortpath"
46822
46823  input_path="$input_to_shortpath"
46824  # Check if we need to convert this using DOS-style short mode. If the path
46825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46826  # take no chances and rewrite it.
46827  # Note: m4 eats our [], so we need to use [ and ] instead.
46828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46829  if test "x$has_forbidden_chars" != x; then
46830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46834      # Going to short mode and back again did indeed matter. Since short mode is
46835      # case insensitive, let's make it lowercase to improve readability.
46836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46837      # Now convert it back to Unix-style (cygpath)
46838      input_path=`$CYGPATH -u "$shortmode_path"`
46839      new_path="$input_path"
46840    fi
46841  fi
46842
46843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46844  if test "x$test_cygdrive_prefix" = x; then
46845    # As a simple fix, exclude /usr/bin since it's not a real path.
46846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46848      # a path prefixed by /cygdrive for fixpath to work.
46849      new_path="$CYGWIN_ROOT_PATH$input_path"
46850    fi
46851  fi
46852
46853  # remove trailing .exe if any
46854  new_path="${new_path/%.exe/}"
46855
46856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46857
46858  # First separate the path from the arguments. This will split at the first
46859  # space.
46860  complete="$BUILD_AR"
46861  path="${complete%% *}"
46862  tmp="$complete EOL"
46863  arguments="${tmp#* }"
46864
46865  # Input might be given as Windows format, start by converting to
46866  # unix format.
46867  new_path="$path"
46868
46869  windows_path="$new_path"
46870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46871    unix_path=`$CYGPATH -u "$windows_path"`
46872    new_path="$unix_path"
46873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46875    new_path="$unix_path"
46876  fi
46877
46878
46879  # Now try to locate executable using which
46880  new_path=`$WHICH "$new_path" 2> /dev/null`
46881
46882  if test "x$new_path" = x; then
46883    # Oops. Which didn't find the executable.
46884    # The splitting of arguments from the executable at a space might have been incorrect,
46885    # since paths with space are more likely in Windows. Give it another try with the whole
46886    # argument.
46887    path="$complete"
46888    arguments="EOL"
46889    new_path="$path"
46890
46891  windows_path="$new_path"
46892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46893    unix_path=`$CYGPATH -u "$windows_path"`
46894    new_path="$unix_path"
46895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46897    new_path="$unix_path"
46898  fi
46899
46900
46901    new_path=`$WHICH "$new_path" 2> /dev/null`
46902    # bat and cmd files are not always considered executable in MSYS causing which
46903    # to not find them
46904    if test "x$new_path" = x \
46905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46907      new_path="$path"
46908
46909  windows_path="$new_path"
46910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46911    unix_path=`$CYGPATH -u "$windows_path"`
46912    new_path="$unix_path"
46913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46915    new_path="$unix_path"
46916  fi
46917
46918    fi
46919
46920    if test "x$new_path" = x; then
46921      # It's still not found. Now this is an unrecoverable error.
46922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46923$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46924      has_space=`$ECHO "$complete" | $GREP " "`
46925      if test "x$has_space" != x; then
46926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46928      fi
46929      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46930    fi
46931  fi
46932
46933  # Now new_path has a complete unix path to the binary
46934  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46935    # Keep paths in /bin as-is, but remove trailing .exe if any
46936    new_path="${new_path/%.exe/}"
46937    # Do not save /bin paths to all_fixpath_prefixes!
46938  else
46939    # Not in mixed or Windows style, start by that.
46940    new_path=`cmd //c echo $new_path`
46941
46942  input_path="$new_path"
46943  # Check if we need to convert this using DOS-style short mode. If the path
46944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46945  # take no chances and rewrite it.
46946  # Note: m4 eats our [], so we need to use [ and ] instead.
46947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46948  if test "x$has_forbidden_chars" != x; then
46949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46951  fi
46952
46953    # Output is in $new_path
46954
46955  windows_path="$new_path"
46956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46957    unix_path=`$CYGPATH -u "$windows_path"`
46958    new_path="$unix_path"
46959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46961    new_path="$unix_path"
46962  fi
46963
46964    # remove trailing .exe if any
46965    new_path="${new_path/%.exe/}"
46966
46967    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46968    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46969  fi
46970
46971    else
46972      # We're on a unix platform. Hooray! :)
46973      # First separate the path from the arguments. This will split at the first
46974      # space.
46975      complete="$BUILD_AR"
46976      path="${complete%% *}"
46977      tmp="$complete EOL"
46978      arguments="${tmp#* }"
46979
46980      # Cannot rely on the command "which" here since it doesn't always work.
46981      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46982      if test -z "$is_absolute_path"; then
46983        # Path to executable is not absolute. Find it.
46984        IFS_save="$IFS"
46985        IFS=:
46986        for p in $PATH; do
46987          if test -f "$p/$path" && test -x "$p/$path"; then
46988            new_path="$p/$path"
46989            break
46990          fi
46991        done
46992        IFS="$IFS_save"
46993      else
46994        # This is an absolute path, we can use it without further modifications.
46995        new_path="$path"
46996      fi
46997
46998      if test "x$new_path" = x; then
46999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47000$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47001        has_space=`$ECHO "$complete" | $GREP " "`
47002        if test "x$has_space" != x; then
47003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47005        fi
47006        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47007      fi
47008    fi
47009
47010    # Now join together the path and the arguments once again
47011    if test "x$arguments" != xEOL; then
47012      new_complete="$new_path ${arguments% *}"
47013    else
47014      new_complete="$new_path"
47015    fi
47016
47017    if test "x$complete" != "x$new_complete"; then
47018      BUILD_AR="$new_complete"
47019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
47020$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
47021    fi
47022  fi
47023
47024
47025
47026  # Publish this variable in the help.
47027
47028
47029  if [ -z "${BUILD_OBJCOPY+x}" ]; then
47030    # The variable is not set by user, try to locate tool using the code snippet
47031    for ac_prog in objcopy
47032do
47033  # Extract the first word of "$ac_prog", so it can be a program name with args.
47034set dummy $ac_prog; ac_word=$2
47035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47036$as_echo_n "checking for $ac_word... " >&6; }
47037if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47038  $as_echo_n "(cached) " >&6
47039else
47040  case $BUILD_OBJCOPY in
47041  [\\/]* | ?:[\\/]*)
47042  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47043  ;;
47044  *)
47045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47046for as_dir in $PATH
47047do
47048  IFS=$as_save_IFS
47049  test -z "$as_dir" && as_dir=.
47050    for ac_exec_ext in '' $ac_executable_extensions; do
47051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47052    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47054    break 2
47055  fi
47056done
47057  done
47058IFS=$as_save_IFS
47059
47060  ;;
47061esac
47062fi
47063BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47064if test -n "$BUILD_OBJCOPY"; then
47065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47066$as_echo "$BUILD_OBJCOPY" >&6; }
47067else
47068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47069$as_echo "no" >&6; }
47070fi
47071
47072
47073  test -n "$BUILD_OBJCOPY" && break
47074done
47075
47076  else
47077    # The variable is set, but is it from the command line or the environment?
47078
47079    # Try to remove the string !BUILD_OBJCOPY! from our list.
47080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47082      # If it failed, the variable was not from the command line. Ignore it,
47083      # but warn the user (except for BASH, which is always set by the calling BASH).
47084      if test "xBUILD_OBJCOPY" != xBASH; then
47085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47086$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47087      fi
47088      # Try to locate tool using the code snippet
47089      for ac_prog in objcopy
47090do
47091  # Extract the first word of "$ac_prog", so it can be a program name with args.
47092set dummy $ac_prog; ac_word=$2
47093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47094$as_echo_n "checking for $ac_word... " >&6; }
47095if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47096  $as_echo_n "(cached) " >&6
47097else
47098  case $BUILD_OBJCOPY in
47099  [\\/]* | ?:[\\/]*)
47100  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47101  ;;
47102  *)
47103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47104for as_dir in $PATH
47105do
47106  IFS=$as_save_IFS
47107  test -z "$as_dir" && as_dir=.
47108    for ac_exec_ext in '' $ac_executable_extensions; do
47109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47110    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47112    break 2
47113  fi
47114done
47115  done
47116IFS=$as_save_IFS
47117
47118  ;;
47119esac
47120fi
47121BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47122if test -n "$BUILD_OBJCOPY"; then
47123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47124$as_echo "$BUILD_OBJCOPY" >&6; }
47125else
47126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47127$as_echo "no" >&6; }
47128fi
47129
47130
47131  test -n "$BUILD_OBJCOPY" && break
47132done
47133
47134    else
47135      # If it succeeded, then it was overridden by the user. We will use it
47136      # for the tool.
47137
47138      # First remove it from the list of overridden variables, so we can test
47139      # for unknown variables in the end.
47140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47141
47142      # Check if we try to supply an empty value
47143      if test "x$BUILD_OBJCOPY" = x; then
47144        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47145$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47147$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47149$as_echo "disabled" >&6; }
47150      else
47151        # Check if the provided tool contains a complete path.
47152        tool_specified="$BUILD_OBJCOPY"
47153        tool_basename="${tool_specified##*/}"
47154        if test "x$tool_basename" = "x$tool_specified"; then
47155          # A command without a complete path is provided, search $PATH.
47156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47157$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47158          # Extract the first word of "$tool_basename", so it can be a program name with args.
47159set dummy $tool_basename; ac_word=$2
47160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47161$as_echo_n "checking for $ac_word... " >&6; }
47162if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47163  $as_echo_n "(cached) " >&6
47164else
47165  case $BUILD_OBJCOPY in
47166  [\\/]* | ?:[\\/]*)
47167  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47168  ;;
47169  *)
47170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47171for as_dir in $PATH
47172do
47173  IFS=$as_save_IFS
47174  test -z "$as_dir" && as_dir=.
47175    for ac_exec_ext in '' $ac_executable_extensions; do
47176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47177    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47179    break 2
47180  fi
47181done
47182  done
47183IFS=$as_save_IFS
47184
47185  ;;
47186esac
47187fi
47188BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47189if test -n "$BUILD_OBJCOPY"; then
47190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47191$as_echo "$BUILD_OBJCOPY" >&6; }
47192else
47193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47194$as_echo "no" >&6; }
47195fi
47196
47197
47198          if test "x$BUILD_OBJCOPY" = x; then
47199            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47200          fi
47201        else
47202          # Otherwise we believe it is a complete path. Use it as it is.
47203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47204$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47205          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47206$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47207          if test ! -x "$tool_specified"; then
47208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47209$as_echo "not found" >&6; }
47210            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47211          fi
47212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47213$as_echo "$tool_specified" >&6; }
47214        fi
47215      fi
47216    fi
47217
47218  fi
47219
47220
47221
47222  # Only process if variable expands to non-empty
47223
47224  if test "x$BUILD_OBJCOPY" != x; then
47225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47226
47227  # First separate the path from the arguments. This will split at the first
47228  # space.
47229  complete="$BUILD_OBJCOPY"
47230  path="${complete%% *}"
47231  tmp="$complete EOL"
47232  arguments="${tmp#* }"
47233
47234  # Input might be given as Windows format, start by converting to
47235  # unix format.
47236  new_path=`$CYGPATH -u "$path"`
47237
47238  # Now try to locate executable using which
47239  new_path=`$WHICH "$new_path" 2> /dev/null`
47240  # bat and cmd files are not always considered executable in cygwin causing which
47241  # to not find them
47242  if test "x$new_path" = x \
47243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47245    new_path=`$CYGPATH -u "$path"`
47246  fi
47247  if test "x$new_path" = x; then
47248    # Oops. Which didn't find the executable.
47249    # The splitting of arguments from the executable at a space might have been incorrect,
47250    # since paths with space are more likely in Windows. Give it another try with the whole
47251    # argument.
47252    path="$complete"
47253    arguments="EOL"
47254    new_path=`$CYGPATH -u "$path"`
47255    new_path=`$WHICH "$new_path" 2> /dev/null`
47256    # bat and cmd files are not always considered executable in cygwin causing which
47257    # to not find them
47258    if test "x$new_path" = x \
47259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47261      new_path=`$CYGPATH -u "$path"`
47262    fi
47263    if test "x$new_path" = x; then
47264      # It's still not found. Now this is an unrecoverable error.
47265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47266$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47267      has_space=`$ECHO "$complete" | $GREP " "`
47268      if test "x$has_space" != x; then
47269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47271      fi
47272      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47273    fi
47274  fi
47275
47276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47279  # "foo.exe" is OK but "foo" is an error.
47280  #
47281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47282  # It is also a way to make sure we got the proper file name for the real test later on.
47283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47284  if test "x$test_shortpath" = x; then
47285    # Short path failed, file does not exist as specified.
47286    # Try adding .exe or .cmd
47287    if test -f "${new_path}.exe"; then
47288      input_to_shortpath="${new_path}.exe"
47289    elif test -f "${new_path}.cmd"; then
47290      input_to_shortpath="${new_path}.cmd"
47291    else
47292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47293$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47296      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47297    fi
47298  else
47299    input_to_shortpath="$new_path"
47300  fi
47301
47302  # Call helper function which possibly converts this using DOS-style short mode.
47303  # If so, the updated path is stored in $new_path.
47304  new_path="$input_to_shortpath"
47305
47306  input_path="$input_to_shortpath"
47307  # Check if we need to convert this using DOS-style short mode. If the path
47308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47309  # take no chances and rewrite it.
47310  # Note: m4 eats our [], so we need to use [ and ] instead.
47311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47312  if test "x$has_forbidden_chars" != x; then
47313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47317      # Going to short mode and back again did indeed matter. Since short mode is
47318      # case insensitive, let's make it lowercase to improve readability.
47319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47320      # Now convert it back to Unix-style (cygpath)
47321      input_path=`$CYGPATH -u "$shortmode_path"`
47322      new_path="$input_path"
47323    fi
47324  fi
47325
47326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47327  if test "x$test_cygdrive_prefix" = x; then
47328    # As a simple fix, exclude /usr/bin since it's not a real path.
47329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47331      # a path prefixed by /cygdrive for fixpath to work.
47332      new_path="$CYGWIN_ROOT_PATH$input_path"
47333    fi
47334  fi
47335
47336  # remove trailing .exe if any
47337  new_path="${new_path/%.exe/}"
47338
47339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47340
47341  # First separate the path from the arguments. This will split at the first
47342  # space.
47343  complete="$BUILD_OBJCOPY"
47344  path="${complete%% *}"
47345  tmp="$complete EOL"
47346  arguments="${tmp#* }"
47347
47348  # Input might be given as Windows format, start by converting to
47349  # unix format.
47350  new_path="$path"
47351
47352  windows_path="$new_path"
47353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47354    unix_path=`$CYGPATH -u "$windows_path"`
47355    new_path="$unix_path"
47356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47358    new_path="$unix_path"
47359  fi
47360
47361
47362  # Now try to locate executable using which
47363  new_path=`$WHICH "$new_path" 2> /dev/null`
47364
47365  if test "x$new_path" = x; then
47366    # Oops. Which didn't find the executable.
47367    # The splitting of arguments from the executable at a space might have been incorrect,
47368    # since paths with space are more likely in Windows. Give it another try with the whole
47369    # argument.
47370    path="$complete"
47371    arguments="EOL"
47372    new_path="$path"
47373
47374  windows_path="$new_path"
47375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47376    unix_path=`$CYGPATH -u "$windows_path"`
47377    new_path="$unix_path"
47378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47380    new_path="$unix_path"
47381  fi
47382
47383
47384    new_path=`$WHICH "$new_path" 2> /dev/null`
47385    # bat and cmd files are not always considered executable in MSYS causing which
47386    # to not find them
47387    if test "x$new_path" = x \
47388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47390      new_path="$path"
47391
47392  windows_path="$new_path"
47393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47394    unix_path=`$CYGPATH -u "$windows_path"`
47395    new_path="$unix_path"
47396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47398    new_path="$unix_path"
47399  fi
47400
47401    fi
47402
47403    if test "x$new_path" = x; then
47404      # It's still not found. Now this is an unrecoverable error.
47405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47406$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47407      has_space=`$ECHO "$complete" | $GREP " "`
47408      if test "x$has_space" != x; then
47409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47411      fi
47412      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47413    fi
47414  fi
47415
47416  # Now new_path has a complete unix path to the binary
47417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47418    # Keep paths in /bin as-is, but remove trailing .exe if any
47419    new_path="${new_path/%.exe/}"
47420    # Do not save /bin paths to all_fixpath_prefixes!
47421  else
47422    # Not in mixed or Windows style, start by that.
47423    new_path=`cmd //c echo $new_path`
47424
47425  input_path="$new_path"
47426  # Check if we need to convert this using DOS-style short mode. If the path
47427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47428  # take no chances and rewrite it.
47429  # Note: m4 eats our [], so we need to use [ and ] instead.
47430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47431  if test "x$has_forbidden_chars" != x; then
47432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47434  fi
47435
47436    # Output is in $new_path
47437
47438  windows_path="$new_path"
47439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47440    unix_path=`$CYGPATH -u "$windows_path"`
47441    new_path="$unix_path"
47442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47444    new_path="$unix_path"
47445  fi
47446
47447    # remove trailing .exe if any
47448    new_path="${new_path/%.exe/}"
47449
47450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47452  fi
47453
47454    else
47455      # We're on a unix platform. Hooray! :)
47456      # First separate the path from the arguments. This will split at the first
47457      # space.
47458      complete="$BUILD_OBJCOPY"
47459      path="${complete%% *}"
47460      tmp="$complete EOL"
47461      arguments="${tmp#* }"
47462
47463      # Cannot rely on the command "which" here since it doesn't always work.
47464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47465      if test -z "$is_absolute_path"; then
47466        # Path to executable is not absolute. Find it.
47467        IFS_save="$IFS"
47468        IFS=:
47469        for p in $PATH; do
47470          if test -f "$p/$path" && test -x "$p/$path"; then
47471            new_path="$p/$path"
47472            break
47473          fi
47474        done
47475        IFS="$IFS_save"
47476      else
47477        # This is an absolute path, we can use it without further modifications.
47478        new_path="$path"
47479      fi
47480
47481      if test "x$new_path" = x; then
47482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47483$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47484        has_space=`$ECHO "$complete" | $GREP " "`
47485        if test "x$has_space" != x; then
47486          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47488        fi
47489        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47490      fi
47491    fi
47492
47493    # Now join together the path and the arguments once again
47494    if test "x$arguments" != xEOL; then
47495      new_complete="$new_path ${arguments% *}"
47496    else
47497      new_complete="$new_path"
47498    fi
47499
47500    if test "x$complete" != "x$new_complete"; then
47501      BUILD_OBJCOPY="$new_complete"
47502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47503$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47504    fi
47505  fi
47506
47507
47508
47509  # Publish this variable in the help.
47510
47511
47512  if [ -z "${BUILD_STRIP+x}" ]; then
47513    # The variable is not set by user, try to locate tool using the code snippet
47514    for ac_prog in strip
47515do
47516  # Extract the first word of "$ac_prog", so it can be a program name with args.
47517set dummy $ac_prog; ac_word=$2
47518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47519$as_echo_n "checking for $ac_word... " >&6; }
47520if ${ac_cv_path_BUILD_STRIP+:} false; then :
47521  $as_echo_n "(cached) " >&6
47522else
47523  case $BUILD_STRIP in
47524  [\\/]* | ?:[\\/]*)
47525  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47526  ;;
47527  *)
47528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47529for as_dir in $PATH
47530do
47531  IFS=$as_save_IFS
47532  test -z "$as_dir" && as_dir=.
47533    for ac_exec_ext in '' $ac_executable_extensions; do
47534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47535    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47537    break 2
47538  fi
47539done
47540  done
47541IFS=$as_save_IFS
47542
47543  ;;
47544esac
47545fi
47546BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47547if test -n "$BUILD_STRIP"; then
47548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47549$as_echo "$BUILD_STRIP" >&6; }
47550else
47551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47552$as_echo "no" >&6; }
47553fi
47554
47555
47556  test -n "$BUILD_STRIP" && break
47557done
47558
47559  else
47560    # The variable is set, but is it from the command line or the environment?
47561
47562    # Try to remove the string !BUILD_STRIP! from our list.
47563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47565      # If it failed, the variable was not from the command line. Ignore it,
47566      # but warn the user (except for BASH, which is always set by the calling BASH).
47567      if test "xBUILD_STRIP" != xBASH; then
47568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47569$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47570      fi
47571      # Try to locate tool using the code snippet
47572      for ac_prog in strip
47573do
47574  # Extract the first word of "$ac_prog", so it can be a program name with args.
47575set dummy $ac_prog; ac_word=$2
47576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47577$as_echo_n "checking for $ac_word... " >&6; }
47578if ${ac_cv_path_BUILD_STRIP+:} false; then :
47579  $as_echo_n "(cached) " >&6
47580else
47581  case $BUILD_STRIP in
47582  [\\/]* | ?:[\\/]*)
47583  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47584  ;;
47585  *)
47586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47587for as_dir in $PATH
47588do
47589  IFS=$as_save_IFS
47590  test -z "$as_dir" && as_dir=.
47591    for ac_exec_ext in '' $ac_executable_extensions; do
47592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47593    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47595    break 2
47596  fi
47597done
47598  done
47599IFS=$as_save_IFS
47600
47601  ;;
47602esac
47603fi
47604BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47605if test -n "$BUILD_STRIP"; then
47606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47607$as_echo "$BUILD_STRIP" >&6; }
47608else
47609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47610$as_echo "no" >&6; }
47611fi
47612
47613
47614  test -n "$BUILD_STRIP" && break
47615done
47616
47617    else
47618      # If it succeeded, then it was overridden by the user. We will use it
47619      # for the tool.
47620
47621      # First remove it from the list of overridden variables, so we can test
47622      # for unknown variables in the end.
47623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47624
47625      # Check if we try to supply an empty value
47626      if test "x$BUILD_STRIP" = x; then
47627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47628$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47630$as_echo_n "checking for BUILD_STRIP... " >&6; }
47631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47632$as_echo "disabled" >&6; }
47633      else
47634        # Check if the provided tool contains a complete path.
47635        tool_specified="$BUILD_STRIP"
47636        tool_basename="${tool_specified##*/}"
47637        if test "x$tool_basename" = "x$tool_specified"; then
47638          # A command without a complete path is provided, search $PATH.
47639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47640$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47641          # Extract the first word of "$tool_basename", so it can be a program name with args.
47642set dummy $tool_basename; ac_word=$2
47643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47644$as_echo_n "checking for $ac_word... " >&6; }
47645if ${ac_cv_path_BUILD_STRIP+:} false; then :
47646  $as_echo_n "(cached) " >&6
47647else
47648  case $BUILD_STRIP in
47649  [\\/]* | ?:[\\/]*)
47650  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47651  ;;
47652  *)
47653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47654for as_dir in $PATH
47655do
47656  IFS=$as_save_IFS
47657  test -z "$as_dir" && as_dir=.
47658    for ac_exec_ext in '' $ac_executable_extensions; do
47659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47660    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47662    break 2
47663  fi
47664done
47665  done
47666IFS=$as_save_IFS
47667
47668  ;;
47669esac
47670fi
47671BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47672if test -n "$BUILD_STRIP"; then
47673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47674$as_echo "$BUILD_STRIP" >&6; }
47675else
47676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47677$as_echo "no" >&6; }
47678fi
47679
47680
47681          if test "x$BUILD_STRIP" = x; then
47682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47683          fi
47684        else
47685          # Otherwise we believe it is a complete path. Use it as it is.
47686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47687$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47689$as_echo_n "checking for BUILD_STRIP... " >&6; }
47690          if test ! -x "$tool_specified"; then
47691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47692$as_echo "not found" >&6; }
47693            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47694          fi
47695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47696$as_echo "$tool_specified" >&6; }
47697        fi
47698      fi
47699    fi
47700
47701  fi
47702
47703
47704
47705  # Only process if variable expands to non-empty
47706
47707  if test "x$BUILD_STRIP" != x; then
47708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47709
47710  # First separate the path from the arguments. This will split at the first
47711  # space.
47712  complete="$BUILD_STRIP"
47713  path="${complete%% *}"
47714  tmp="$complete EOL"
47715  arguments="${tmp#* }"
47716
47717  # Input might be given as Windows format, start by converting to
47718  # unix format.
47719  new_path=`$CYGPATH -u "$path"`
47720
47721  # Now try to locate executable using which
47722  new_path=`$WHICH "$new_path" 2> /dev/null`
47723  # bat and cmd files are not always considered executable in cygwin causing which
47724  # to not find them
47725  if test "x$new_path" = x \
47726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47728    new_path=`$CYGPATH -u "$path"`
47729  fi
47730  if test "x$new_path" = x; then
47731    # Oops. Which didn't find the executable.
47732    # The splitting of arguments from the executable at a space might have been incorrect,
47733    # since paths with space are more likely in Windows. Give it another try with the whole
47734    # argument.
47735    path="$complete"
47736    arguments="EOL"
47737    new_path=`$CYGPATH -u "$path"`
47738    new_path=`$WHICH "$new_path" 2> /dev/null`
47739    # bat and cmd files are not always considered executable in cygwin causing which
47740    # to not find them
47741    if test "x$new_path" = x \
47742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47744      new_path=`$CYGPATH -u "$path"`
47745    fi
47746    if test "x$new_path" = x; then
47747      # It's still not found. Now this is an unrecoverable error.
47748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47749$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47750      has_space=`$ECHO "$complete" | $GREP " "`
47751      if test "x$has_space" != x; then
47752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47754      fi
47755      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47756    fi
47757  fi
47758
47759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47762  # "foo.exe" is OK but "foo" is an error.
47763  #
47764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47765  # It is also a way to make sure we got the proper file name for the real test later on.
47766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47767  if test "x$test_shortpath" = x; then
47768    # Short path failed, file does not exist as specified.
47769    # Try adding .exe or .cmd
47770    if test -f "${new_path}.exe"; then
47771      input_to_shortpath="${new_path}.exe"
47772    elif test -f "${new_path}.cmd"; then
47773      input_to_shortpath="${new_path}.cmd"
47774    else
47775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47776$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47779      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47780    fi
47781  else
47782    input_to_shortpath="$new_path"
47783  fi
47784
47785  # Call helper function which possibly converts this using DOS-style short mode.
47786  # If so, the updated path is stored in $new_path.
47787  new_path="$input_to_shortpath"
47788
47789  input_path="$input_to_shortpath"
47790  # Check if we need to convert this using DOS-style short mode. If the path
47791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47792  # take no chances and rewrite it.
47793  # Note: m4 eats our [], so we need to use [ and ] instead.
47794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47795  if test "x$has_forbidden_chars" != x; then
47796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47800      # Going to short mode and back again did indeed matter. Since short mode is
47801      # case insensitive, let's make it lowercase to improve readability.
47802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47803      # Now convert it back to Unix-style (cygpath)
47804      input_path=`$CYGPATH -u "$shortmode_path"`
47805      new_path="$input_path"
47806    fi
47807  fi
47808
47809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47810  if test "x$test_cygdrive_prefix" = x; then
47811    # As a simple fix, exclude /usr/bin since it's not a real path.
47812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47814      # a path prefixed by /cygdrive for fixpath to work.
47815      new_path="$CYGWIN_ROOT_PATH$input_path"
47816    fi
47817  fi
47818
47819  # remove trailing .exe if any
47820  new_path="${new_path/%.exe/}"
47821
47822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47823
47824  # First separate the path from the arguments. This will split at the first
47825  # space.
47826  complete="$BUILD_STRIP"
47827  path="${complete%% *}"
47828  tmp="$complete EOL"
47829  arguments="${tmp#* }"
47830
47831  # Input might be given as Windows format, start by converting to
47832  # unix format.
47833  new_path="$path"
47834
47835  windows_path="$new_path"
47836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47837    unix_path=`$CYGPATH -u "$windows_path"`
47838    new_path="$unix_path"
47839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47841    new_path="$unix_path"
47842  fi
47843
47844
47845  # Now try to locate executable using which
47846  new_path=`$WHICH "$new_path" 2> /dev/null`
47847
47848  if test "x$new_path" = x; then
47849    # Oops. Which didn't find the executable.
47850    # The splitting of arguments from the executable at a space might have been incorrect,
47851    # since paths with space are more likely in Windows. Give it another try with the whole
47852    # argument.
47853    path="$complete"
47854    arguments="EOL"
47855    new_path="$path"
47856
47857  windows_path="$new_path"
47858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47859    unix_path=`$CYGPATH -u "$windows_path"`
47860    new_path="$unix_path"
47861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47863    new_path="$unix_path"
47864  fi
47865
47866
47867    new_path=`$WHICH "$new_path" 2> /dev/null`
47868    # bat and cmd files are not always considered executable in MSYS causing which
47869    # to not find them
47870    if test "x$new_path" = x \
47871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47873      new_path="$path"
47874
47875  windows_path="$new_path"
47876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47877    unix_path=`$CYGPATH -u "$windows_path"`
47878    new_path="$unix_path"
47879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47881    new_path="$unix_path"
47882  fi
47883
47884    fi
47885
47886    if test "x$new_path" = x; then
47887      # It's still not found. Now this is an unrecoverable error.
47888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47889$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47890      has_space=`$ECHO "$complete" | $GREP " "`
47891      if test "x$has_space" != x; then
47892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47894      fi
47895      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47896    fi
47897  fi
47898
47899  # Now new_path has a complete unix path to the binary
47900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47901    # Keep paths in /bin as-is, but remove trailing .exe if any
47902    new_path="${new_path/%.exe/}"
47903    # Do not save /bin paths to all_fixpath_prefixes!
47904  else
47905    # Not in mixed or Windows style, start by that.
47906    new_path=`cmd //c echo $new_path`
47907
47908  input_path="$new_path"
47909  # Check if we need to convert this using DOS-style short mode. If the path
47910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47911  # take no chances and rewrite it.
47912  # Note: m4 eats our [], so we need to use [ and ] instead.
47913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47914  if test "x$has_forbidden_chars" != x; then
47915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47917  fi
47918
47919    # Output is in $new_path
47920
47921  windows_path="$new_path"
47922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47923    unix_path=`$CYGPATH -u "$windows_path"`
47924    new_path="$unix_path"
47925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47927    new_path="$unix_path"
47928  fi
47929
47930    # remove trailing .exe if any
47931    new_path="${new_path/%.exe/}"
47932
47933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47935  fi
47936
47937    else
47938      # We're on a unix platform. Hooray! :)
47939      # First separate the path from the arguments. This will split at the first
47940      # space.
47941      complete="$BUILD_STRIP"
47942      path="${complete%% *}"
47943      tmp="$complete EOL"
47944      arguments="${tmp#* }"
47945
47946      # Cannot rely on the command "which" here since it doesn't always work.
47947      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47948      if test -z "$is_absolute_path"; then
47949        # Path to executable is not absolute. Find it.
47950        IFS_save="$IFS"
47951        IFS=:
47952        for p in $PATH; do
47953          if test -f "$p/$path" && test -x "$p/$path"; then
47954            new_path="$p/$path"
47955            break
47956          fi
47957        done
47958        IFS="$IFS_save"
47959      else
47960        # This is an absolute path, we can use it without further modifications.
47961        new_path="$path"
47962      fi
47963
47964      if test "x$new_path" = x; then
47965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47966$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47967        has_space=`$ECHO "$complete" | $GREP " "`
47968        if test "x$has_space" != x; then
47969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47971        fi
47972        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47973      fi
47974    fi
47975
47976    # Now join together the path and the arguments once again
47977    if test "x$arguments" != xEOL; then
47978      new_complete="$new_path ${arguments% *}"
47979    else
47980      new_complete="$new_path"
47981    fi
47982
47983    if test "x$complete" != "x$new_complete"; then
47984      BUILD_STRIP="$new_complete"
47985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47986$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47987    fi
47988  fi
47989
47990    # Assume the C compiler is the assembler
47991    BUILD_AS="$BUILD_CC -c"
47992    # Just like for the target compiler, use the compiler as linker
47993    BUILD_LD="$BUILD_CC"
47994    BUILD_LDCXX="$BUILD_CXX"
47995
47996    PATH="$OLDPATH"
47997
47998
47999  COMPILER=$BUILD_CC
48000  COMPILER_NAME=BuildC
48001
48002  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48003    # cc -V output typically looks like
48004    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48005    # or
48006    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48007    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48008    # Check that this is likely to be the Solaris Studio cc.
48009    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48010    if test $? -ne 0; then
48011      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48012      { $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
48013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48015$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48016      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48017$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48018      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48019    fi
48020    # Remove usage instructions (if present), and
48021    # collapse compiler output into a single line
48022    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48023        $SED -e 's/ *[Uu]sage:.*//'`
48024    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48025        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48026  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48027    # xlc -qversion output typically looks like
48028    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48029    #     Version: 11.01.0000.0015
48030    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48031    # Check that this is likely to be the IBM XL C compiler.
48032    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48033    if test $? -ne 0; then
48034      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48035      { $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
48036$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48037      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48038$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48039      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48040$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48041      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48042    fi
48043    # Collapse compiler output into a single line
48044    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48045    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48046        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48047  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48048    # There is no specific version flag, but all output starts with a version string.
48049    # First line typically looks something like:
48050    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48051    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48052    # Check that this is likely to be Microsoft CL.EXE.
48053    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48054    if test $? -ne 0; then
48055      { $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
48056$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48058$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48059      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48060    fi
48061    # Collapse compiler output into a single line
48062    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48063    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48064        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48065  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48066    # gcc --version output typically looks like
48067    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48068    #     Copyright (C) 2013 Free Software Foundation, Inc.
48069    #     This is free software; see the source for copying conditions.  There is NO
48070    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48071    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48072    # Check that this is likely to be GCC.
48073    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48074    if test $? -ne 0; then
48075      { $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
48076$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48077      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48078$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48079      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48080    fi
48081    # Remove Copyright and legalese from version string, and
48082    # collapse into a single line
48083    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48084        $SED -e 's/ *Copyright .*//'`
48085    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48086        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48087  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48088    # clang --version output typically looks like
48089    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48090    #    clang version 3.3 (tags/RELEASE_33/final)
48091    # or
48092    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48093    #    Target: x86_64-pc-linux-gnu
48094    #    Thread model: posix
48095    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48096    # Check that this is likely to be clang
48097    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48098    if test $? -ne 0; then
48099      { $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
48100$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48101      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48102$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48103      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48104    fi
48105    # Collapse compiler output into a single line
48106    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48107    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48108        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48109  else
48110      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48111  fi
48112  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48113  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48114  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48115  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48116
48117  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48118$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48119
48120
48121  COMPILER=$BUILD_CXX
48122  COMPILER_NAME=BuildC++
48123
48124  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48125    # cc -V output typically looks like
48126    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48127    # or
48128    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48129    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48130    # Check that this is likely to be the Solaris Studio cc.
48131    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48132    if test $? -ne 0; then
48133      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48134      { $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
48135$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48136      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48137$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48138      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48139$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48140      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48141    fi
48142    # Remove usage instructions (if present), and
48143    # collapse compiler output into a single line
48144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48145        $SED -e 's/ *[Uu]sage:.*//'`
48146    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48147        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48148  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48149    # xlc -qversion output typically looks like
48150    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48151    #     Version: 11.01.0000.0015
48152    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48153    # Check that this is likely to be the IBM XL C compiler.
48154    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48155    if test $? -ne 0; then
48156      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48157      { $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
48158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48160$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48162$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48163      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48164    fi
48165    # Collapse compiler output into a single line
48166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48168        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48169  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48170    # There is no specific version flag, but all output starts with a version string.
48171    # First line typically looks something like:
48172    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48173    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48174    # Check that this is likely to be Microsoft CL.EXE.
48175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48176    if test $? -ne 0; then
48177      { $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
48178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48180$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48181      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48182    fi
48183    # Collapse compiler output into a single line
48184    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48185    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48186        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48187  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48188    # gcc --version output typically looks like
48189    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48190    #     Copyright (C) 2013 Free Software Foundation, Inc.
48191    #     This is free software; see the source for copying conditions.  There is NO
48192    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48193    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48194    # Check that this is likely to be GCC.
48195    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48196    if test $? -ne 0; then
48197      { $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
48198$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48199      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48200$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48201      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48202    fi
48203    # Remove Copyright and legalese from version string, and
48204    # collapse into a single line
48205    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48206        $SED -e 's/ *Copyright .*//'`
48207    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48208        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48209  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48210    # clang --version output typically looks like
48211    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48212    #    clang version 3.3 (tags/RELEASE_33/final)
48213    # or
48214    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48215    #    Target: x86_64-pc-linux-gnu
48216    #    Thread model: posix
48217    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48218    # Check that this is likely to be clang
48219    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48220    if test $? -ne 0; then
48221      { $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
48222$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48223      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48224$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48225      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48226    fi
48227    # Collapse compiler output into a single line
48228    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48229    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48230        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48231  else
48232      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48233  fi
48234  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48235  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48236  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48237  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48238
48239  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48240$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48241
48242
48243  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48244    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
48245$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48246    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48247$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48248  fi
48249
48250  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48251  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48252    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48253$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48254  fi
48255
48256  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48258$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48259  fi
48260
48261  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48262
48263  else
48264    # If we are not cross compiling, use the normal target compilers for
48265    # building the build platform executables.
48266    BUILD_CC="$CC"
48267    BUILD_CXX="$CXX"
48268    BUILD_LD="$LD"
48269    BUILD_LDCXX="$LDCXX"
48270    BUILD_NM="$NM"
48271    BUILD_AS="$AS"
48272    BUILD_OBJCOPY="$OBJCOPY"
48273    BUILD_STRIP="$STRIP"
48274    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48275    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48276    BUILD_AR="$AR"
48277
48278
48279  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48280    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48281$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48283$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48284  fi
48285
48286  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48287  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48288    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48289$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48290  fi
48291
48292  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48293    { $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
48294$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48295  fi
48296
48297  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48298
48299  fi
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314  # The package path is used only on macosx?
48315  # FIXME: clean this up, and/or move it elsewhere.
48316  PACKAGE_PATH=/opt/local
48317
48318
48319  # Check for extra potential brokenness.
48320  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48321    # On Windows, double-check that we got the right compiler.
48322    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48323    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48324    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48325      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48326        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
48327      fi
48328    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48329      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48330        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48331      fi
48332    fi
48333  fi
48334
48335  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48336    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48337    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48338    # This is later checked when setting flags.
48339
48340    # "-Og" suppported for GCC 4.8 and later
48341    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389    # Execute function body
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438    # Execute function body
48439
48440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48441$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48442  supports=yes
48443
48444  saved_cflags="$CFLAGS"
48445  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48446  ac_ext=c
48447ac_cpp='$CPP $CPPFLAGS'
48448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48450ac_compiler_gnu=$ac_cv_c_compiler_gnu
48451
48452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48453/* end confdefs.h.  */
48454int i;
48455_ACEOF
48456if ac_fn_c_try_compile "$LINENO"; then :
48457
48458else
48459  supports=no
48460fi
48461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48462  ac_ext=cpp
48463ac_cpp='$CXXCPP $CPPFLAGS'
48464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48467
48468  CFLAGS="$saved_cflags"
48469
48470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48471$as_echo "$supports" >&6; }
48472  if test "x$supports" = "xyes" ; then
48473    :
48474    C_COMP_SUPPORTS="yes"
48475  else
48476    :
48477    C_COMP_SUPPORTS="no"
48478  fi
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
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    # Execute function body
48539
48540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48541$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48542  supports=yes
48543
48544  saved_cxxflags="$CXXFLAGS"
48545  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48546  ac_ext=cpp
48547ac_cpp='$CXXCPP $CPPFLAGS'
48548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48551
48552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48553/* end confdefs.h.  */
48554int i;
48555_ACEOF
48556if ac_fn_cxx_try_compile "$LINENO"; then :
48557
48558else
48559  supports=no
48560fi
48561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48562  ac_ext=cpp
48563ac_cpp='$CXXCPP $CPPFLAGS'
48564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48567
48568  CXXFLAGS="$saved_cxxflags"
48569
48570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48571$as_echo "$supports" >&6; }
48572  if test "x$supports" = "xyes" ; then
48573    :
48574    CXX_COMP_SUPPORTS="yes"
48575  else
48576    :
48577    CXX_COMP_SUPPORTS="no"
48578  fi
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48593$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48594  supports=no
48595  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48596
48597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48598$as_echo "$supports" >&6; }
48599  if test "x$supports" = "xyes" ; then
48600    :
48601    HAS_CFLAG_OPTIMIZE_DEBUG=true
48602  else
48603    :
48604    HAS_CFLAG_OPTIMIZE_DEBUG=false
48605  fi
48606
48607
48608
48609
48610
48611
48612
48613    # "-z relro" supported in GNU binutils 2.17 and later
48614    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662    # Execute function body
48663
48664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48665$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48666  supports=yes
48667
48668  saved_ldflags="$LDFLAGS"
48669  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48670  ac_ext=c
48671ac_cpp='$CPP $CPPFLAGS'
48672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48674ac_compiler_gnu=$ac_cv_c_compiler_gnu
48675
48676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48677/* end confdefs.h.  */
48678
48679int
48680main ()
48681{
48682
48683  ;
48684  return 0;
48685}
48686_ACEOF
48687if ac_fn_c_try_link "$LINENO"; then :
48688
48689else
48690  supports=no
48691fi
48692rm -f core conftest.err conftest.$ac_objext \
48693    conftest$ac_exeext conftest.$ac_ext
48694  ac_ext=cpp
48695ac_cpp='$CXXCPP $CPPFLAGS'
48696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48699
48700  LDFLAGS="$saved_ldflags"
48701
48702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48703$as_echo "$supports" >&6; }
48704  if test "x$supports" = "xyes" ; then
48705    :
48706    HAS_LINKER_RELRO=true
48707  else
48708    :
48709    HAS_LINKER_RELRO=false
48710  fi
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722
48723
48724    # "-z now" supported in GNU binutils 2.11 and later
48725    LINKER_NOW_FLAG="-Wl,-z,now"
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773    # Execute function body
48774
48775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48776$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48777  supports=yes
48778
48779  saved_ldflags="$LDFLAGS"
48780  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48781  ac_ext=c
48782ac_cpp='$CPP $CPPFLAGS'
48783ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48784ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48785ac_compiler_gnu=$ac_cv_c_compiler_gnu
48786
48787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48788/* end confdefs.h.  */
48789
48790int
48791main ()
48792{
48793
48794  ;
48795  return 0;
48796}
48797_ACEOF
48798if ac_fn_c_try_link "$LINENO"; then :
48799
48800else
48801  supports=no
48802fi
48803rm -f core conftest.err conftest.$ac_objext \
48804    conftest$ac_exeext conftest.$ac_ext
48805  ac_ext=cpp
48806ac_cpp='$CXXCPP $CPPFLAGS'
48807ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48808ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48809ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48810
48811  LDFLAGS="$saved_ldflags"
48812
48813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48814$as_echo "$supports" >&6; }
48815  if test "x$supports" = "xyes" ; then
48816    :
48817    HAS_LINKER_NOW=true
48818  else
48819    :
48820    HAS_LINKER_NOW=false
48821  fi
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834  fi
48835
48836  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48837  # in executable.'
48838  USING_BROKEN_SUSE_LD=no
48839  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48841$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48842    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48843    $ECHO "int main() { }" > main.c
48844    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48846$as_echo "no" >&6; }
48847      USING_BROKEN_SUSE_LD=no
48848    else
48849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48850$as_echo "yes" >&6; }
48851      USING_BROKEN_SUSE_LD=yes
48852    fi
48853    $RM version-script.map main.c a.out
48854  fi
48855
48856
48857  # Setup hotspot lecagy names for toolchains
48858  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48859  if test "x$TOOLCHAIN_TYPE" = xclang; then
48860    HOTSPOT_TOOLCHAIN_TYPE=gcc
48861  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48862    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48863  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48864    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48865  fi
48866
48867
48868
48869# Setup the JTReg Regression Test Harness.
48870
48871
48872# Check whether --with-jtreg was given.
48873if test "${with_jtreg+set}" = set; then :
48874  withval=$with_jtreg;
48875fi
48876
48877
48878  if test "x$with_jtreg" = xno; then
48879    # jtreg disabled
48880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48881$as_echo_n "checking for jtreg test harness... " >&6; }
48882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48883$as_echo "no, disabled" >&6; }
48884  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48885    # An explicit path is specified, use it.
48886    JT_HOME="$with_jtreg"
48887    if test ! -d "$JT_HOME"; then
48888      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48889    fi
48890
48891    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48892      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48893    fi
48894
48895    JTREGEXE="$JT_HOME/bin/jtreg"
48896    if test ! -x "$JTREGEXE"; then
48897      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48898    fi
48899
48900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48901$as_echo_n "checking for jtreg test harness... " >&6; }
48902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48903$as_echo "$JT_HOME" >&6; }
48904  else
48905    # Try to locate jtreg
48906    if test "x$JT_HOME" != x; then
48907      # JT_HOME set in environment, use it
48908      if test ! -d "$JT_HOME"; then
48909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48910$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48911        JT_HOME=
48912      else
48913        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48914          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48915$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48916          JT_HOME=
48917        elif test ! -x "$JT_HOME/bin/jtreg"; then
48918          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48919$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48920          JT_HOME=
48921        else
48922          JTREGEXE="$JT_HOME/bin/jtreg"
48923          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48924$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48925        fi
48926      fi
48927    fi
48928
48929    if test "x$JT_HOME" = x; then
48930      # JT_HOME is not set in environment, or was deemed invalid.
48931      # Try to find jtreg on path
48932
48933
48934  # Publish this variable in the help.
48935
48936
48937  if [ -z "${JTREGEXE+x}" ]; then
48938    # The variable is not set by user, try to locate tool using the code snippet
48939    for ac_prog in jtreg
48940do
48941  # Extract the first word of "$ac_prog", so it can be a program name with args.
48942set dummy $ac_prog; ac_word=$2
48943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48944$as_echo_n "checking for $ac_word... " >&6; }
48945if ${ac_cv_path_JTREGEXE+:} false; then :
48946  $as_echo_n "(cached) " >&6
48947else
48948  case $JTREGEXE in
48949  [\\/]* | ?:[\\/]*)
48950  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48951  ;;
48952  *)
48953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48954for as_dir in $PATH
48955do
48956  IFS=$as_save_IFS
48957  test -z "$as_dir" && as_dir=.
48958    for ac_exec_ext in '' $ac_executable_extensions; do
48959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48960    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48962    break 2
48963  fi
48964done
48965  done
48966IFS=$as_save_IFS
48967
48968  ;;
48969esac
48970fi
48971JTREGEXE=$ac_cv_path_JTREGEXE
48972if test -n "$JTREGEXE"; then
48973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48974$as_echo "$JTREGEXE" >&6; }
48975else
48976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48977$as_echo "no" >&6; }
48978fi
48979
48980
48981  test -n "$JTREGEXE" && break
48982done
48983
48984  else
48985    # The variable is set, but is it from the command line or the environment?
48986
48987    # Try to remove the string !JTREGEXE! from our list.
48988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48990      # If it failed, the variable was not from the command line. Ignore it,
48991      # but warn the user (except for BASH, which is always set by the calling BASH).
48992      if test "xJTREGEXE" != xBASH; then
48993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48994$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48995      fi
48996      # Try to locate tool using the code snippet
48997      for ac_prog in jtreg
48998do
48999  # Extract the first word of "$ac_prog", so it can be a program name with args.
49000set dummy $ac_prog; ac_word=$2
49001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49002$as_echo_n "checking for $ac_word... " >&6; }
49003if ${ac_cv_path_JTREGEXE+:} false; then :
49004  $as_echo_n "(cached) " >&6
49005else
49006  case $JTREGEXE in
49007  [\\/]* | ?:[\\/]*)
49008  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49009  ;;
49010  *)
49011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49012for as_dir in $PATH
49013do
49014  IFS=$as_save_IFS
49015  test -z "$as_dir" && as_dir=.
49016    for ac_exec_ext in '' $ac_executable_extensions; do
49017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49018    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49020    break 2
49021  fi
49022done
49023  done
49024IFS=$as_save_IFS
49025
49026  ;;
49027esac
49028fi
49029JTREGEXE=$ac_cv_path_JTREGEXE
49030if test -n "$JTREGEXE"; then
49031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49032$as_echo "$JTREGEXE" >&6; }
49033else
49034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49035$as_echo "no" >&6; }
49036fi
49037
49038
49039  test -n "$JTREGEXE" && break
49040done
49041
49042    else
49043      # If it succeeded, then it was overridden by the user. We will use it
49044      # for the tool.
49045
49046      # First remove it from the list of overridden variables, so we can test
49047      # for unknown variables in the end.
49048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49049
49050      # Check if we try to supply an empty value
49051      if test "x$JTREGEXE" = x; then
49052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49053$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49055$as_echo_n "checking for JTREGEXE... " >&6; }
49056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49057$as_echo "disabled" >&6; }
49058      else
49059        # Check if the provided tool contains a complete path.
49060        tool_specified="$JTREGEXE"
49061        tool_basename="${tool_specified##*/}"
49062        if test "x$tool_basename" = "x$tool_specified"; then
49063          # A command without a complete path is provided, search $PATH.
49064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49065$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49066          # Extract the first word of "$tool_basename", so it can be a program name with args.
49067set dummy $tool_basename; ac_word=$2
49068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49069$as_echo_n "checking for $ac_word... " >&6; }
49070if ${ac_cv_path_JTREGEXE+:} false; then :
49071  $as_echo_n "(cached) " >&6
49072else
49073  case $JTREGEXE in
49074  [\\/]* | ?:[\\/]*)
49075  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49076  ;;
49077  *)
49078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49079for as_dir in $PATH
49080do
49081  IFS=$as_save_IFS
49082  test -z "$as_dir" && as_dir=.
49083    for ac_exec_ext in '' $ac_executable_extensions; do
49084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49085    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49087    break 2
49088  fi
49089done
49090  done
49091IFS=$as_save_IFS
49092
49093  ;;
49094esac
49095fi
49096JTREGEXE=$ac_cv_path_JTREGEXE
49097if test -n "$JTREGEXE"; then
49098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49099$as_echo "$JTREGEXE" >&6; }
49100else
49101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49102$as_echo "no" >&6; }
49103fi
49104
49105
49106          if test "x$JTREGEXE" = x; then
49107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49108          fi
49109        else
49110          # Otherwise we believe it is a complete path. Use it as it is.
49111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49112$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49114$as_echo_n "checking for JTREGEXE... " >&6; }
49115          if test ! -x "$tool_specified"; then
49116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49117$as_echo "not found" >&6; }
49118            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49119          fi
49120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49121$as_echo "$tool_specified" >&6; }
49122        fi
49123      fi
49124    fi
49125
49126  fi
49127
49128
49129      if test "x$JTREGEXE" != x; then
49130        # That's good, now try to derive JT_HOME
49131        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49132        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49133          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49134$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49135          JT_HOME=
49136          JTREGEXE=
49137        else
49138          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49139$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49140        fi
49141      fi
49142    fi
49143
49144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49145$as_echo_n "checking for jtreg test harness... " >&6; }
49146    if test "x$JT_HOME" != x; then
49147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49148$as_echo "$JT_HOME" >&6; }
49149    else
49150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49151$as_echo "no, not found" >&6; }
49152
49153      if test "x$with_jtreg" = xyes; then
49154        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49155      fi
49156    fi
49157  fi
49158
49159
49160  # Only process if variable expands to non-empty
49161
49162  if test "x$JTREGEXE" != x; then
49163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49164
49165  # First separate the path from the arguments. This will split at the first
49166  # space.
49167  complete="$JTREGEXE"
49168  path="${complete%% *}"
49169  tmp="$complete EOL"
49170  arguments="${tmp#* }"
49171
49172  # Input might be given as Windows format, start by converting to
49173  # unix format.
49174  new_path=`$CYGPATH -u "$path"`
49175
49176  # Now try to locate executable using which
49177  new_path=`$WHICH "$new_path" 2> /dev/null`
49178  # bat and cmd files are not always considered executable in cygwin causing which
49179  # to not find them
49180  if test "x$new_path" = x \
49181      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49182      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49183    new_path=`$CYGPATH -u "$path"`
49184  fi
49185  if test "x$new_path" = x; then
49186    # Oops. Which didn't find the executable.
49187    # The splitting of arguments from the executable at a space might have been incorrect,
49188    # since paths with space are more likely in Windows. Give it another try with the whole
49189    # argument.
49190    path="$complete"
49191    arguments="EOL"
49192    new_path=`$CYGPATH -u "$path"`
49193    new_path=`$WHICH "$new_path" 2> /dev/null`
49194    # bat and cmd files are not always considered executable in cygwin causing which
49195    # to not find them
49196    if test "x$new_path" = x \
49197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49199      new_path=`$CYGPATH -u "$path"`
49200    fi
49201    if test "x$new_path" = x; then
49202      # It's still not found. Now this is an unrecoverable error.
49203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49204$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49205      has_space=`$ECHO "$complete" | $GREP " "`
49206      if test "x$has_space" != x; then
49207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49209      fi
49210      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49211    fi
49212  fi
49213
49214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49217  # "foo.exe" is OK but "foo" is an error.
49218  #
49219  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49220  # It is also a way to make sure we got the proper file name for the real test later on.
49221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49222  if test "x$test_shortpath" = x; then
49223    # Short path failed, file does not exist as specified.
49224    # Try adding .exe or .cmd
49225    if test -f "${new_path}.exe"; then
49226      input_to_shortpath="${new_path}.exe"
49227    elif test -f "${new_path}.cmd"; then
49228      input_to_shortpath="${new_path}.cmd"
49229    else
49230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49231$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49232      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49233$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49234      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49235    fi
49236  else
49237    input_to_shortpath="$new_path"
49238  fi
49239
49240  # Call helper function which possibly converts this using DOS-style short mode.
49241  # If so, the updated path is stored in $new_path.
49242  new_path="$input_to_shortpath"
49243
49244  input_path="$input_to_shortpath"
49245  # Check if we need to convert this using DOS-style short mode. If the path
49246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49247  # take no chances and rewrite it.
49248  # Note: m4 eats our [], so we need to use [ and ] instead.
49249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49250  if test "x$has_forbidden_chars" != x; then
49251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49255      # Going to short mode and back again did indeed matter. Since short mode is
49256      # case insensitive, let's make it lowercase to improve readability.
49257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49258      # Now convert it back to Unix-style (cygpath)
49259      input_path=`$CYGPATH -u "$shortmode_path"`
49260      new_path="$input_path"
49261    fi
49262  fi
49263
49264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49265  if test "x$test_cygdrive_prefix" = x; then
49266    # As a simple fix, exclude /usr/bin since it's not a real path.
49267    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49269      # a path prefixed by /cygdrive for fixpath to work.
49270      new_path="$CYGWIN_ROOT_PATH$input_path"
49271    fi
49272  fi
49273
49274  # remove trailing .exe if any
49275  new_path="${new_path/%.exe/}"
49276
49277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49278
49279  # First separate the path from the arguments. This will split at the first
49280  # space.
49281  complete="$JTREGEXE"
49282  path="${complete%% *}"
49283  tmp="$complete EOL"
49284  arguments="${tmp#* }"
49285
49286  # Input might be given as Windows format, start by converting to
49287  # unix format.
49288  new_path="$path"
49289
49290  windows_path="$new_path"
49291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49292    unix_path=`$CYGPATH -u "$windows_path"`
49293    new_path="$unix_path"
49294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49296    new_path="$unix_path"
49297  fi
49298
49299
49300  # Now try to locate executable using which
49301  new_path=`$WHICH "$new_path" 2> /dev/null`
49302
49303  if test "x$new_path" = x; then
49304    # Oops. Which didn't find the executable.
49305    # The splitting of arguments from the executable at a space might have been incorrect,
49306    # since paths with space are more likely in Windows. Give it another try with the whole
49307    # argument.
49308    path="$complete"
49309    arguments="EOL"
49310    new_path="$path"
49311
49312  windows_path="$new_path"
49313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49314    unix_path=`$CYGPATH -u "$windows_path"`
49315    new_path="$unix_path"
49316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49318    new_path="$unix_path"
49319  fi
49320
49321
49322    new_path=`$WHICH "$new_path" 2> /dev/null`
49323    # bat and cmd files are not always considered executable in MSYS causing which
49324    # to not find them
49325    if test "x$new_path" = x \
49326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49328      new_path="$path"
49329
49330  windows_path="$new_path"
49331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49332    unix_path=`$CYGPATH -u "$windows_path"`
49333    new_path="$unix_path"
49334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49336    new_path="$unix_path"
49337  fi
49338
49339    fi
49340
49341    if test "x$new_path" = x; then
49342      # It's still not found. Now this is an unrecoverable error.
49343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49344$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49345      has_space=`$ECHO "$complete" | $GREP " "`
49346      if test "x$has_space" != x; then
49347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49349      fi
49350      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49351    fi
49352  fi
49353
49354  # Now new_path has a complete unix path to the binary
49355  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49356    # Keep paths in /bin as-is, but remove trailing .exe if any
49357    new_path="${new_path/%.exe/}"
49358    # Do not save /bin paths to all_fixpath_prefixes!
49359  else
49360    # Not in mixed or Windows style, start by that.
49361    new_path=`cmd //c echo $new_path`
49362
49363  input_path="$new_path"
49364  # Check if we need to convert this using DOS-style short mode. If the path
49365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49366  # take no chances and rewrite it.
49367  # Note: m4 eats our [], so we need to use [ and ] instead.
49368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49369  if test "x$has_forbidden_chars" != x; then
49370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49372  fi
49373
49374    # Output is in $new_path
49375
49376  windows_path="$new_path"
49377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49378    unix_path=`$CYGPATH -u "$windows_path"`
49379    new_path="$unix_path"
49380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49382    new_path="$unix_path"
49383  fi
49384
49385    # remove trailing .exe if any
49386    new_path="${new_path/%.exe/}"
49387
49388    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49389    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49390  fi
49391
49392    else
49393      # We're on a unix platform. Hooray! :)
49394      # First separate the path from the arguments. This will split at the first
49395      # space.
49396      complete="$JTREGEXE"
49397      path="${complete%% *}"
49398      tmp="$complete EOL"
49399      arguments="${tmp#* }"
49400
49401      # Cannot rely on the command "which" here since it doesn't always work.
49402      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49403      if test -z "$is_absolute_path"; then
49404        # Path to executable is not absolute. Find it.
49405        IFS_save="$IFS"
49406        IFS=:
49407        for p in $PATH; do
49408          if test -f "$p/$path" && test -x "$p/$path"; then
49409            new_path="$p/$path"
49410            break
49411          fi
49412        done
49413        IFS="$IFS_save"
49414      else
49415        # This is an absolute path, we can use it without further modifications.
49416        new_path="$path"
49417      fi
49418
49419      if test "x$new_path" = x; then
49420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49421$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49422        has_space=`$ECHO "$complete" | $GREP " "`
49423        if test "x$has_space" != x; then
49424          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49425$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49426        fi
49427        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49428      fi
49429    fi
49430
49431    # Now join together the path and the arguments once again
49432    if test "x$arguments" != xEOL; then
49433      new_complete="$new_path ${arguments% *}"
49434    else
49435      new_complete="$new_path"
49436    fi
49437
49438    if test "x$complete" != "x$new_complete"; then
49439      JTREGEXE="$new_complete"
49440      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49441$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49442    fi
49443  fi
49444
49445
49446  # Only process if variable expands to non-empty
49447
49448  if test "x$JT_HOME" != x; then
49449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49450
49451  # Input might be given as Windows format, start by converting to
49452  # unix format.
49453  path="$JT_HOME"
49454  new_path=`$CYGPATH -u "$path"`
49455
49456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49459  # "foo.exe" is OK but "foo" is an error.
49460  #
49461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49462  # It is also a way to make sure we got the proper file name for the real test later on.
49463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49464  if test "x$test_shortpath" = x; then
49465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49466$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49467    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49468  fi
49469
49470  # Call helper function which possibly converts this using DOS-style short mode.
49471  # If so, the updated path is stored in $new_path.
49472
49473  input_path="$new_path"
49474  # Check if we need to convert this using DOS-style short mode. If the path
49475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49476  # take no chances and rewrite it.
49477  # Note: m4 eats our [], so we need to use [ and ] instead.
49478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49479  if test "x$has_forbidden_chars" != x; then
49480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49484      # Going to short mode and back again did indeed matter. Since short mode is
49485      # case insensitive, let's make it lowercase to improve readability.
49486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49487      # Now convert it back to Unix-style (cygpath)
49488      input_path=`$CYGPATH -u "$shortmode_path"`
49489      new_path="$input_path"
49490    fi
49491  fi
49492
49493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49494  if test "x$test_cygdrive_prefix" = x; then
49495    # As a simple fix, exclude /usr/bin since it's not a real path.
49496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49498      # a path prefixed by /cygdrive for fixpath to work.
49499      new_path="$CYGWIN_ROOT_PATH$input_path"
49500    fi
49501  fi
49502
49503
49504  if test "x$path" != "x$new_path"; then
49505    JT_HOME="$new_path"
49506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49507$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49508  fi
49509
49510    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49511
49512  path="$JT_HOME"
49513  has_colon=`$ECHO $path | $GREP ^.:`
49514  new_path="$path"
49515  if test "x$has_colon" = x; then
49516    # Not in mixed or Windows style, start by that.
49517    new_path=`cmd //c echo $path`
49518  fi
49519
49520
49521  input_path="$new_path"
49522  # Check if we need to convert this using DOS-style short mode. If the path
49523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49524  # take no chances and rewrite it.
49525  # Note: m4 eats our [], so we need to use [ and ] instead.
49526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49527  if test "x$has_forbidden_chars" != x; then
49528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49530  fi
49531
49532
49533  windows_path="$new_path"
49534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49535    unix_path=`$CYGPATH -u "$windows_path"`
49536    new_path="$unix_path"
49537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49539    new_path="$unix_path"
49540  fi
49541
49542  if test "x$path" != "x$new_path"; then
49543    JT_HOME="$new_path"
49544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49545$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49546  fi
49547
49548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49550
49551    else
49552      # We're on a unix platform. Hooray! :)
49553      path="$JT_HOME"
49554      has_space=`$ECHO "$path" | $GREP " "`
49555      if test "x$has_space" != x; then
49556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49557$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49558        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49559      fi
49560
49561      # Use eval to expand a potential ~
49562      eval path="$path"
49563      if test ! -f "$path" && test ! -d "$path"; then
49564        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49565      fi
49566
49567      if test -d "$path"; then
49568        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49569      else
49570        dir="`$DIRNAME "$path"`"
49571        base="`$BASENAME "$path"`"
49572        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49573      fi
49574    fi
49575  fi
49576
49577
49578
49579
49580
49581# Setup Jib dependency tool
49582
49583
49584# Check whether --with-jib was given.
49585if test "${with_jib+set}" = set; then :
49586  withval=$with_jib;
49587fi
49588
49589
49590  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49591    # jib disabled
49592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49593$as_echo_n "checking for jib... " >&6; }
49594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49595$as_echo "no" >&6; }
49596  elif test "x$with_jib" = xyes; then
49597    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49598  else
49599    JIB_HOME="${with_jib}"
49600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49601$as_echo_n "checking for jib... " >&6; }
49602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49603$as_echo "${JIB_HOME}" >&6; }
49604    if test ! -d "${JIB_HOME}"; then
49605      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49606    fi
49607    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49608    if test ! -f "${JIB_JAR}"; then
49609      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49610    fi
49611  fi
49612
49613
49614
49615
49616
49617  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49618  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49619  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49620  #                              commands produced by the link step (currently AIX only)
49621  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49622    COMPILER_TARGET_BITS_FLAG="-q"
49623    COMPILER_COMMAND_FILE_FLAG="-f"
49624    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49625  else
49626    COMPILER_TARGET_BITS_FLAG="-m"
49627    COMPILER_COMMAND_FILE_FLAG="@"
49628    COMPILER_BINDCMD_FILE_FLAG=""
49629
49630    # The solstudio linker does not support @-files.
49631    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49632      COMPILER_COMMAND_FILE_FLAG=
49633    fi
49634
49635    # Check if @file is supported by gcc
49636    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49638$as_echo_n "checking if @file is supported by gcc... " >&6; }
49639      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49640      $ECHO "" "--version" > command.file
49641      if $CXX @command.file 2>&5 >&5; then
49642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49643$as_echo "yes" >&6; }
49644        COMPILER_COMMAND_FILE_FLAG="@"
49645      else
49646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49647$as_echo "no" >&6; }
49648        COMPILER_COMMAND_FILE_FLAG=
49649      fi
49650      $RM command.file
49651    fi
49652  fi
49653
49654
49655
49656
49657  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49658  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49659    ARFLAGS="-r"
49660  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49661    ARFLAGS="-X64"
49662  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49663    # lib.exe is used as AR to create static libraries.
49664    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49665  else
49666    ARFLAGS=""
49667  fi
49668
49669
49670  ## Setup strip.
49671  # FIXME: should this really be per platform, or should it be per toolchain type?
49672  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49673  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49674  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49675    STRIPFLAGS="-g"
49676  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49677    STRIPFLAGS="-x"
49678  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49679    STRIPFLAGS="-S"
49680  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49681    STRIPFLAGS="-X32_64"
49682  fi
49683
49684
49685
49686  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49687    CC_OUT_OPTION=-Fo
49688    EXE_OUT_OPTION=-out:
49689    LD_OUT_OPTION=-out:
49690    AR_OUT_OPTION=-out:
49691  else
49692    # The option used to specify the target .o,.a or .so file.
49693    # When compiling, how to specify the to be created object file.
49694    CC_OUT_OPTION='-o$(SPACE)'
49695    # When linking, how to specify the to be created executable.
49696    EXE_OUT_OPTION='-o$(SPACE)'
49697    # When linking, how to specify the to be created dynamically linkable library.
49698    LD_OUT_OPTION='-o$(SPACE)'
49699    # When archiving, how to specify the to be create static archive for object files.
49700    AR_OUT_OPTION='rcs$(SPACE)'
49701  fi
49702
49703
49704
49705
49706
49707  # On Windows, we need to set RC flags.
49708  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49709    RC_FLAGS="-nologo -l0x409"
49710    JVM_RCFLAGS="-nologo"
49711    if test "x$DEBUG_LEVEL" = xrelease; then
49712      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49713      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49714    fi
49715
49716    # The version variables used to create RC_FLAGS may be overridden
49717    # in a custom configure script, or possibly the command line.
49718    # Let those variables be expanded at make time in spec.gmk.
49719    # The \$ are escaped to the shell, and the $(...) variables
49720    # are evaluated by make.
49721    RC_FLAGS="$RC_FLAGS \
49722        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49723        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49724        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49725        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49726        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49727        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49728        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49729
49730    JVM_RCFLAGS="$JVM_RCFLAGS \
49731        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49732        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49733        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49734        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49735        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49736        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49737        -D\"HS_FNAME=jvm.dll\" \
49738        -D\"HS_INTERNAL_NAME=jvm\""
49739  fi
49740
49741
49742
49743  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49744    # silence copyright notice and other headers.
49745    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49746  fi
49747
49748
49749# Now we can test some aspects on the target using configure macros.
49750
49751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49752$as_echo_n "checking for ANSI C header files... " >&6; }
49753if ${ac_cv_header_stdc+:} false; then :
49754  $as_echo_n "(cached) " >&6
49755else
49756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49757/* end confdefs.h.  */
49758#include <stdlib.h>
49759#include <stdarg.h>
49760#include <string.h>
49761#include <float.h>
49762
49763int
49764main ()
49765{
49766
49767  ;
49768  return 0;
49769}
49770_ACEOF
49771if ac_fn_cxx_try_compile "$LINENO"; then :
49772  ac_cv_header_stdc=yes
49773else
49774  ac_cv_header_stdc=no
49775fi
49776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49777
49778if test $ac_cv_header_stdc = yes; then
49779  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49781/* end confdefs.h.  */
49782#include <string.h>
49783
49784_ACEOF
49785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49786  $EGREP "memchr" >/dev/null 2>&1; then :
49787
49788else
49789  ac_cv_header_stdc=no
49790fi
49791rm -f conftest*
49792
49793fi
49794
49795if test $ac_cv_header_stdc = yes; then
49796  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49798/* end confdefs.h.  */
49799#include <stdlib.h>
49800
49801_ACEOF
49802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49803  $EGREP "free" >/dev/null 2>&1; then :
49804
49805else
49806  ac_cv_header_stdc=no
49807fi
49808rm -f conftest*
49809
49810fi
49811
49812if test $ac_cv_header_stdc = yes; then
49813  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49814  if test "$cross_compiling" = yes; then :
49815  :
49816else
49817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49818/* end confdefs.h.  */
49819#include <ctype.h>
49820#include <stdlib.h>
49821#if ((' ' & 0x0FF) == 0x020)
49822# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49823# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49824#else
49825# define ISLOWER(c) \
49826		   (('a' <= (c) && (c) <= 'i') \
49827		     || ('j' <= (c) && (c) <= 'r') \
49828		     || ('s' <= (c) && (c) <= 'z'))
49829# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49830#endif
49831
49832#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49833int
49834main ()
49835{
49836  int i;
49837  for (i = 0; i < 256; i++)
49838    if (XOR (islower (i), ISLOWER (i))
49839	|| toupper (i) != TOUPPER (i))
49840      return 2;
49841  return 0;
49842}
49843_ACEOF
49844if ac_fn_cxx_try_run "$LINENO"; then :
49845
49846else
49847  ac_cv_header_stdc=no
49848fi
49849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49850  conftest.$ac_objext conftest.beam conftest.$ac_ext
49851fi
49852
49853fi
49854fi
49855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49856$as_echo "$ac_cv_header_stdc" >&6; }
49857if test $ac_cv_header_stdc = yes; then
49858
49859$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49860
49861fi
49862
49863# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49864for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49865		  inttypes.h stdint.h unistd.h
49866do :
49867  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49868ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49869"
49870if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49871  cat >>confdefs.h <<_ACEOF
49872#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49873_ACEOF
49874
49875fi
49876
49877done
49878
49879
49880
49881  ###############################################################################
49882  #
49883  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49884  # (The JVM can use 32 or 64 bit Java pointers but that decision
49885  # is made at runtime.)
49886  #
49887
49888  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49889    # Always specify -m flag on Solaris
49890    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49891
49892  # When we add flags to the "official" CFLAGS etc, we need to
49893  # keep track of these additions in ADDED_CFLAGS etc. These
49894  # will later be checked to make sure only controlled additions
49895  # have been made to CFLAGS etc.
49896  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49897  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49898  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49899
49900  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49901  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49902  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49903
49904  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49905  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49906  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49907
49908  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49909  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49910  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49911
49912  elif test "x$COMPILE_TYPE" = xreduced; then
49913    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49914      # Specify -m if running reduced on unix platforms
49915
49916  # When we add flags to the "official" CFLAGS etc, we need to
49917  # keep track of these additions in ADDED_CFLAGS etc. These
49918  # will later be checked to make sure only controlled additions
49919  # have been made to CFLAGS etc.
49920  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49921  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49922  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49923
49924  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49925  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49926  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49927
49928  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49929  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49930  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49931
49932  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49933  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49934  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49935
49936    fi
49937  fi
49938  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49939    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49940    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49941    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49942  fi
49943
49944  # Make compilation sanity check
49945  for ac_header in stdio.h
49946do :
49947  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49948if test "x$ac_cv_header_stdio_h" = xyes; then :
49949  cat >>confdefs.h <<_ACEOF
49950#define HAVE_STDIO_H 1
49951_ACEOF
49952
49953else
49954
49955    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49956$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49957    if test "x$COMPILE_TYPE" = xreduced; then
49958
49959  # Print a helpful message on how to acquire the necessary build dependency.
49960  # reduced is the help tag: freetype, cups, alsa etc
49961  MISSING_DEPENDENCY=reduced
49962
49963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49964    cygwin_help $MISSING_DEPENDENCY
49965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49966    msys_help $MISSING_DEPENDENCY
49967  else
49968    PKGHANDLER_COMMAND=
49969
49970    case $PKGHANDLER in
49971      apt-get)
49972        apt_help     $MISSING_DEPENDENCY ;;
49973      yum)
49974        yum_help     $MISSING_DEPENDENCY ;;
49975      brew)
49976        brew_help    $MISSING_DEPENDENCY ;;
49977      port)
49978        port_help    $MISSING_DEPENDENCY ;;
49979      pkgutil)
49980        pkgutil_help $MISSING_DEPENDENCY ;;
49981      pkgadd)
49982        pkgadd_help  $MISSING_DEPENDENCY ;;
49983    esac
49984
49985    if test "x$PKGHANDLER_COMMAND" != x; then
49986      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49987    fi
49988  fi
49989
49990      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49991$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49992    elif test "x$COMPILE_TYPE" = xcross; then
49993      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49994$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49995    fi
49996    as_fn_error $? "Cannot continue." "$LINENO" 5
49997
49998fi
49999
50000done
50001
50002
50003  # The cast to long int works around a bug in the HP C Compiler
50004# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50005# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50006# This bug is HP SR number 8606223364.
50007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50008$as_echo_n "checking size of int *... " >&6; }
50009if ${ac_cv_sizeof_int_p+:} false; then :
50010  $as_echo_n "(cached) " >&6
50011else
50012  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50013
50014else
50015  if test "$ac_cv_type_int_p" = yes; then
50016     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50018as_fn_error 77 "cannot compute sizeof (int *)
50019See \`config.log' for more details" "$LINENO" 5; }
50020   else
50021     ac_cv_sizeof_int_p=0
50022   fi
50023fi
50024
50025fi
50026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50027$as_echo "$ac_cv_sizeof_int_p" >&6; }
50028
50029
50030
50031cat >>confdefs.h <<_ACEOF
50032#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50033_ACEOF
50034
50035
50036
50037  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50038  if test "x$ac_cv_sizeof_int_p" = x; then
50039    # The test failed, lets stick to the assumed value.
50040    { $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
50041$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50042  else
50043    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50044
50045    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50046      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50047      # Let's try to implicitely set the compilers target architecture and retry the test
50048      { $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
50049$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;}
50050      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50051$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50052
50053  # When we add flags to the "official" CFLAGS etc, we need to
50054  # keep track of these additions in ADDED_CFLAGS etc. These
50055  # will later be checked to make sure only controlled additions
50056  # have been made to CFLAGS etc.
50057  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50058  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50059  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50060
50061  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50062  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50063  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50064
50065  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50066  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50067  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50068
50069  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50070  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50071  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50072
50073
50074      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50075      unset ac_cv_sizeof_int_p
50076      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50077      cat >>confdefs.h <<_ACEOF
50078#undef SIZEOF_INT_P
50079_ACEOF
50080
50081      # The cast to long int works around a bug in the HP C Compiler
50082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50084# This bug is HP SR number 8606223364.
50085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50086$as_echo_n "checking size of int *... " >&6; }
50087if ${ac_cv_sizeof_int_p+:} false; then :
50088  $as_echo_n "(cached) " >&6
50089else
50090  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50091
50092else
50093  if test "$ac_cv_type_int_p" = yes; then
50094     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50096as_fn_error 77 "cannot compute sizeof (int *)
50097See \`config.log' for more details" "$LINENO" 5; }
50098   else
50099     ac_cv_sizeof_int_p=0
50100   fi
50101fi
50102
50103fi
50104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50105$as_echo "$ac_cv_sizeof_int_p" >&6; }
50106
50107
50108
50109cat >>confdefs.h <<_ACEOF
50110#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50111_ACEOF
50112
50113
50114
50115      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50116
50117      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50118        { $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
50119$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;}
50120        if test "x$COMPILE_TYPE" = xreduced; then
50121
50122  # Print a helpful message on how to acquire the necessary build dependency.
50123  # reduced is the help tag: freetype, cups, alsa etc
50124  MISSING_DEPENDENCY=reduced
50125
50126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50127    cygwin_help $MISSING_DEPENDENCY
50128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50129    msys_help $MISSING_DEPENDENCY
50130  else
50131    PKGHANDLER_COMMAND=
50132
50133    case $PKGHANDLER in
50134      apt-get)
50135        apt_help     $MISSING_DEPENDENCY ;;
50136      yum)
50137        yum_help     $MISSING_DEPENDENCY ;;
50138      brew)
50139        brew_help    $MISSING_DEPENDENCY ;;
50140      port)
50141        port_help    $MISSING_DEPENDENCY ;;
50142      pkgutil)
50143        pkgutil_help $MISSING_DEPENDENCY ;;
50144      pkgadd)
50145        pkgadd_help  $MISSING_DEPENDENCY ;;
50146    esac
50147
50148    if test "x$PKGHANDLER_COMMAND" != x; then
50149      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50150    fi
50151  fi
50152
50153          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50154$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50155        elif test "x$COMPILE_TYPE" = xcross; then
50156          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50157$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50158        fi
50159        as_fn_error $? "Cannot continue." "$LINENO" 5
50160      fi
50161    fi
50162  fi
50163
50164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50165$as_echo_n "checking for target address size... " >&6; }
50166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50167$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50168
50169
50170  ###############################################################################
50171  #
50172  # Is the target little of big endian?
50173  #
50174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50175$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50176if ${ac_cv_c_bigendian+:} false; then :
50177  $as_echo_n "(cached) " >&6
50178else
50179  ac_cv_c_bigendian=unknown
50180    # See if we're dealing with a universal compiler.
50181    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50182/* end confdefs.h.  */
50183#ifndef __APPLE_CC__
50184	       not a universal capable compiler
50185	     #endif
50186	     typedef int dummy;
50187
50188_ACEOF
50189if ac_fn_cxx_try_compile "$LINENO"; then :
50190
50191	# Check for potential -arch flags.  It is not universal unless
50192	# there are at least two -arch flags with different values.
50193	ac_arch=
50194	ac_prev=
50195	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50196	 if test -n "$ac_prev"; then
50197	   case $ac_word in
50198	     i?86 | x86_64 | ppc | ppc64)
50199	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50200		 ac_arch=$ac_word
50201	       else
50202		 ac_cv_c_bigendian=universal
50203		 break
50204	       fi
50205	       ;;
50206	   esac
50207	   ac_prev=
50208	 elif test "x$ac_word" = "x-arch"; then
50209	   ac_prev=arch
50210	 fi
50211       done
50212fi
50213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50214    if test $ac_cv_c_bigendian = unknown; then
50215      # See if sys/param.h defines the BYTE_ORDER macro.
50216      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50217/* end confdefs.h.  */
50218#include <sys/types.h>
50219	     #include <sys/param.h>
50220
50221int
50222main ()
50223{
50224#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50225		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50226		     && LITTLE_ENDIAN)
50227	      bogus endian macros
50228	     #endif
50229
50230  ;
50231  return 0;
50232}
50233_ACEOF
50234if ac_fn_cxx_try_compile "$LINENO"; then :
50235  # It does; now see whether it defined to BIG_ENDIAN or not.
50236	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50237/* end confdefs.h.  */
50238#include <sys/types.h>
50239		#include <sys/param.h>
50240
50241int
50242main ()
50243{
50244#if BYTE_ORDER != BIG_ENDIAN
50245		 not big endian
50246		#endif
50247
50248  ;
50249  return 0;
50250}
50251_ACEOF
50252if ac_fn_cxx_try_compile "$LINENO"; then :
50253  ac_cv_c_bigendian=yes
50254else
50255  ac_cv_c_bigendian=no
50256fi
50257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50258fi
50259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50260    fi
50261    if test $ac_cv_c_bigendian = unknown; then
50262      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50263      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50264/* end confdefs.h.  */
50265#include <limits.h>
50266
50267int
50268main ()
50269{
50270#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50271	      bogus endian macros
50272	     #endif
50273
50274  ;
50275  return 0;
50276}
50277_ACEOF
50278if ac_fn_cxx_try_compile "$LINENO"; then :
50279  # It does; now see whether it defined to _BIG_ENDIAN or not.
50280	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50281/* end confdefs.h.  */
50282#include <limits.h>
50283
50284int
50285main ()
50286{
50287#ifndef _BIG_ENDIAN
50288		 not big endian
50289		#endif
50290
50291  ;
50292  return 0;
50293}
50294_ACEOF
50295if ac_fn_cxx_try_compile "$LINENO"; then :
50296  ac_cv_c_bigendian=yes
50297else
50298  ac_cv_c_bigendian=no
50299fi
50300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50301fi
50302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50303    fi
50304    if test $ac_cv_c_bigendian = unknown; then
50305      # Compile a test program.
50306      if test "$cross_compiling" = yes; then :
50307  # Try to guess by grepping values from an object file.
50308	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50309/* end confdefs.h.  */
50310short int ascii_mm[] =
50311		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50312		short int ascii_ii[] =
50313		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50314		int use_ascii (int i) {
50315		  return ascii_mm[i] + ascii_ii[i];
50316		}
50317		short int ebcdic_ii[] =
50318		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50319		short int ebcdic_mm[] =
50320		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50321		int use_ebcdic (int i) {
50322		  return ebcdic_mm[i] + ebcdic_ii[i];
50323		}
50324		extern int foo;
50325
50326int
50327main ()
50328{
50329return use_ascii (foo) == use_ebcdic (foo);
50330  ;
50331  return 0;
50332}
50333_ACEOF
50334if ac_fn_cxx_try_compile "$LINENO"; then :
50335  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50336	      ac_cv_c_bigendian=yes
50337	    fi
50338	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50339	      if test "$ac_cv_c_bigendian" = unknown; then
50340		ac_cv_c_bigendian=no
50341	      else
50342		# finding both strings is unlikely to happen, but who knows?
50343		ac_cv_c_bigendian=unknown
50344	      fi
50345	    fi
50346fi
50347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50348else
50349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50350/* end confdefs.h.  */
50351$ac_includes_default
50352int
50353main ()
50354{
50355
50356	     /* Are we little or big endian?  From Harbison&Steele.  */
50357	     union
50358	     {
50359	       long int l;
50360	       char c[sizeof (long int)];
50361	     } u;
50362	     u.l = 1;
50363	     return u.c[sizeof (long int) - 1] == 1;
50364
50365  ;
50366  return 0;
50367}
50368_ACEOF
50369if ac_fn_cxx_try_run "$LINENO"; then :
50370  ac_cv_c_bigendian=no
50371else
50372  ac_cv_c_bigendian=yes
50373fi
50374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50375  conftest.$ac_objext conftest.beam conftest.$ac_ext
50376fi
50377
50378    fi
50379fi
50380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50381$as_echo "$ac_cv_c_bigendian" >&6; }
50382 case $ac_cv_c_bigendian in #(
50383   yes)
50384     ENDIAN="big";; #(
50385   no)
50386     ENDIAN="little" ;; #(
50387   universal)
50388     ENDIAN="universal_endianness"
50389     ;; #(
50390   *)
50391     ENDIAN="unknown" ;;
50392 esac
50393
50394
50395  if test "x$ENDIAN" = xuniversal_endianness; then
50396    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50397  fi
50398  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50399    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
50400  fi
50401
50402
50403# Configure flags for the tools
50404
50405  ###############################################################################
50406  #
50407  # How to compile shared libraries.
50408  #
50409
50410  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50411    PICFLAG="-fPIC"
50412    C_FLAG_REORDER=''
50413    CXX_FLAG_REORDER=''
50414
50415    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50416      # Linking is different on MacOSX
50417      if test "x$STATIC_BUILD" = xtrue; then
50418        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50419      else
50420        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50421        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50422      fi
50423      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50424      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50425      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50426      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50427    else
50428      # Default works for linux, might work on other platforms as well.
50429      SHARED_LIBRARY_FLAGS='-shared'
50430      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50431      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50432      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50433      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50434    fi
50435  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50436    C_FLAG_REORDER=''
50437    CXX_FLAG_REORDER=''
50438
50439    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50440      # Linking is different on MacOSX
50441      PICFLAG=''
50442      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50443      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50444      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50445      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50446      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50447
50448      if test "x$STATIC_BUILD" = xfalse; then
50449        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50450      fi
50451    else
50452      # Default works for linux, might work on other platforms as well.
50453      PICFLAG='-fPIC'
50454      SHARED_LIBRARY_FLAGS='-shared'
50455      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50456      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50457      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50458
50459      # arm specific settings
50460      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50461        # '-Wl,-z,origin' isn't used on arm.
50462        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50463      else
50464        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50465      fi
50466
50467    fi
50468  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50469    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50470      PICFLAG="-xcode=pic32"
50471    else
50472      PICFLAG="-KPIC"
50473    fi
50474    C_FLAG_REORDER='-xF'
50475    CXX_FLAG_REORDER='-xF'
50476    SHARED_LIBRARY_FLAGS="-G"
50477    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50478    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50479    SET_SHARED_LIBRARY_NAME='-h $1'
50480    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50481  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50482    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50483    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50484    # will have to patch this single instruction with a call to some out-of-order code which
50485    # does the load from the TOC. This is of course slow. But in that case we also would have
50486    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50487    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50488    # can be patched directly by the linker and does not require a jump to out-of-order code.
50489    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50490    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50491    # loads for accessing a global variable). But there are rumors that this may be seen as a
50492    # 'performance feature' because of improved code locality of the symbols used in a
50493    # compilation unit.
50494    PICFLAG="-qpic"
50495    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50496    C_FLAG_REORDER=''
50497    CXX_FLAG_REORDER=''
50498    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50499    SET_EXECUTABLE_ORIGIN=""
50500    SET_SHARED_LIBRARY_ORIGIN=''
50501    SET_SHARED_LIBRARY_NAME=''
50502    SET_SHARED_LIBRARY_MAPFILE=''
50503  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50504    PICFLAG=""
50505    C_FLAG_REORDER=''
50506    CXX_FLAG_REORDER=''
50507    SHARED_LIBRARY_FLAGS="-dll"
50508    SET_EXECUTABLE_ORIGIN=''
50509    SET_SHARED_LIBRARY_ORIGIN=''
50510    SET_SHARED_LIBRARY_NAME=''
50511    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50512  fi
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522  # The (cross) compiler is now configured, we can now test capabilities
50523  # of the target platform.
50524
50525
50526
50527  ###############################################################################
50528  #
50529  # Setup the opt flags for different compilers
50530  # and different operating systems.
50531  #
50532
50533  # FIXME: this was indirectly the old default, but just inherited.
50534  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50535  #   C_FLAG_DEPS="-MMD -MF"
50536  # fi
50537
50538  # Generate make dependency files
50539  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50540    C_FLAG_DEPS="-MMD -MF"
50541  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50542    C_FLAG_DEPS="-MMD -MF"
50543  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50544    C_FLAG_DEPS="-xMMD -xMF"
50545  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50546    C_FLAG_DEPS="-qmakedep=gcc -MF"
50547  fi
50548  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50549
50550
50551
50552  # Debug symbols
50553  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50554    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50555      # reduce from default "-g2" option to save space
50556      CFLAGS_DEBUG_SYMBOLS="-g1"
50557      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50558    else
50559      CFLAGS_DEBUG_SYMBOLS="-g"
50560      CXXFLAGS_DEBUG_SYMBOLS="-g"
50561    fi
50562  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50563    CFLAGS_DEBUG_SYMBOLS="-g"
50564    CXXFLAGS_DEBUG_SYMBOLS="-g"
50565  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50566    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50567    # -g0 enables debug symbols without disabling inlining.
50568    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50569  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50570    CFLAGS_DEBUG_SYMBOLS="-g"
50571    CXXFLAGS_DEBUG_SYMBOLS="-g"
50572  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50573    CFLAGS_DEBUG_SYMBOLS="-Zi"
50574    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50575  fi
50576
50577
50578
50579  # Debug symbols for JVM_CFLAGS
50580  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50581    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50582    if test "x$DEBUG_LEVEL" = xslowdebug; then
50583      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50584    else
50585      # -g0 does not disable inlining, which -g does.
50586      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50587    fi
50588  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50589    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50590  else
50591    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50592  fi
50593
50594
50595  # bounds, memory and behavior checking options
50596  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50597    case $DEBUG_LEVEL in
50598    release )
50599      # no adjustment
50600      ;;
50601    fastdebug )
50602      # no adjustment
50603      ;;
50604    slowdebug )
50605      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50606      # get's added conditionally on whether we produce debug symbols or not.
50607      # This is most likely not really correct.
50608
50609      # Add runtime stack smashing and undefined behavior checks.
50610      # Not all versions of gcc support -fstack-protector
50611      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654    # Execute function body
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703    # Execute function body
50704
50705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50706$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50707  supports=yes
50708
50709  saved_cflags="$CFLAGS"
50710  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50711  ac_ext=c
50712ac_cpp='$CPP $CPPFLAGS'
50713ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50714ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50715ac_compiler_gnu=$ac_cv_c_compiler_gnu
50716
50717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50718/* end confdefs.h.  */
50719int i;
50720_ACEOF
50721if ac_fn_c_try_compile "$LINENO"; then :
50722
50723else
50724  supports=no
50725fi
50726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50727  ac_ext=cpp
50728ac_cpp='$CXXCPP $CPPFLAGS'
50729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50732
50733  CFLAGS="$saved_cflags"
50734
50735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50736$as_echo "$supports" >&6; }
50737  if test "x$supports" = "xyes" ; then
50738    :
50739    C_COMP_SUPPORTS="yes"
50740  else
50741    :
50742    C_COMP_SUPPORTS="no"
50743  fi
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803    # Execute function body
50804
50805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50806$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50807  supports=yes
50808
50809  saved_cxxflags="$CXXFLAGS"
50810  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50811  ac_ext=cpp
50812ac_cpp='$CXXCPP $CPPFLAGS'
50813ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50814ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50815ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50816
50817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50818/* end confdefs.h.  */
50819int i;
50820_ACEOF
50821if ac_fn_cxx_try_compile "$LINENO"; then :
50822
50823else
50824  supports=no
50825fi
50826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50827  ac_ext=cpp
50828ac_cpp='$CXXCPP $CPPFLAGS'
50829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50832
50833  CXXFLAGS="$saved_cxxflags"
50834
50835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50836$as_echo "$supports" >&6; }
50837  if test "x$supports" = "xyes" ; then
50838    :
50839    CXX_COMP_SUPPORTS="yes"
50840  else
50841    :
50842    CXX_COMP_SUPPORTS="no"
50843  fi
50844
50845
50846
50847
50848
50849
50850
50851
50852
50853
50854
50855
50856
50857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50858$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50859  supports=no
50860  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50861
50862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50863$as_echo "$supports" >&6; }
50864  if test "x$supports" = "xyes" ; then
50865    :
50866
50867  else
50868    :
50869    STACK_PROTECTOR_CFLAG=""
50870  fi
50871
50872
50873
50874
50875
50876
50877
50878      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50879      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50880      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50881        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50882      fi
50883      ;;
50884    esac
50885  fi
50886
50887  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50888    if test "x$DEBUG_LEVEL" != xrelease; then
50889      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50890        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50891      fi
50892    fi
50893  fi
50894
50895  # Optimization levels
50896  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50897    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50898
50899    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50900      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50901      C_O_FLAG_HIGHEST_JVM="-xO4"
50902      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50903      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50904      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50905      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50906      C_O_FLAG_DEBUG_JVM=""
50907      C_O_FLAG_NONE="-xregs=no%frameptr"
50908      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50909      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50910      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50911      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50912      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50913      CXX_O_FLAG_DEBUG_JVM=""
50914      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50915      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50916        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50917        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50918      fi
50919    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50920      C_O_FLAG_HIGHEST_JVM="-xO4"
50921      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50922      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50923      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50924      C_O_FLAG_DEBUG=""
50925      C_O_FLAG_DEBUG_JVM=""
50926      C_O_FLAG_NONE=""
50927      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50928      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50929      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50930      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50931      CXX_O_FLAG_DEBUG=""
50932      CXX_O_FLAG_DEBUG_JVM=""
50933      CXX_O_FLAG_NONE=""
50934    fi
50935  else
50936    # The remaining toolchains share opt flags between CC and CXX;
50937    # setup for C and duplicate afterwards.
50938    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50939      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50940        # On MacOSX we optimize for size, something
50941        # we should do for all platforms?
50942        C_O_FLAG_HIGHEST_JVM="-Os"
50943        C_O_FLAG_HIGHEST="-Os"
50944        C_O_FLAG_HI="-Os"
50945        C_O_FLAG_NORM="-Os"
50946        C_O_FLAG_SIZE="-Os"
50947      else
50948        C_O_FLAG_HIGHEST_JVM="-O3"
50949        C_O_FLAG_HIGHEST="-O3"
50950        C_O_FLAG_HI="-O3"
50951        C_O_FLAG_NORM="-O2"
50952        C_O_FLAG_SIZE="-Os"
50953      fi
50954      C_O_FLAG_DEBUG="-O0"
50955      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50956        C_O_FLAG_DEBUG_JVM=""
50957      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50958        C_O_FLAG_DEBUG_JVM="-O0"
50959      fi
50960      C_O_FLAG_NONE="-O0"
50961    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50962      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50963        # On MacOSX we optimize for size, something
50964        # we should do for all platforms?
50965        C_O_FLAG_HIGHEST_JVM="-Os"
50966        C_O_FLAG_HIGHEST="-Os"
50967        C_O_FLAG_HI="-Os"
50968        C_O_FLAG_NORM="-Os"
50969        C_O_FLAG_SIZE="-Os"
50970      else
50971        C_O_FLAG_HIGHEST_JVM="-O3"
50972        C_O_FLAG_HIGHEST="-O3"
50973        C_O_FLAG_HI="-O3"
50974        C_O_FLAG_NORM="-O2"
50975        C_O_FLAG_SIZE="-Os"
50976      fi
50977      C_O_FLAG_DEBUG="-O0"
50978      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50979        C_O_FLAG_DEBUG_JVM=""
50980      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50981        C_O_FLAG_DEBUG_JVM="-O0"
50982      fi
50983      C_O_FLAG_NONE="-O0"
50984    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50985      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50986      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50987      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50988      C_O_FLAG_NORM="-O2"
50989      C_O_FLAG_DEBUG="-qnoopt"
50990      # FIXME: Value below not verified.
50991      C_O_FLAG_DEBUG_JVM=""
50992      C_O_FLAG_NONE="-qnoopt"
50993    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50994      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50995      C_O_FLAG_HIGHEST="-O2"
50996      C_O_FLAG_HI="-O1"
50997      C_O_FLAG_NORM="-O1"
50998      C_O_FLAG_DEBUG="-Od"
50999      C_O_FLAG_DEBUG_JVM=""
51000      C_O_FLAG_NONE="-Od"
51001      C_O_FLAG_SIZE="-Os"
51002    fi
51003    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
51004    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51005    CXX_O_FLAG_HI="$C_O_FLAG_HI"
51006    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51007    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51008    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51009    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51010    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51011  fi
51012
51013  # Adjust optimization flags according to debug level.
51014  case $DEBUG_LEVEL in
51015    release )
51016      # no adjustment
51017      ;;
51018    fastdebug )
51019      # Not quite so much optimization
51020      C_O_FLAG_HI="$C_O_FLAG_NORM"
51021      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51022      ;;
51023    slowdebug )
51024      # Disable optimization
51025      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51026      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51027      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51028      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51029      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51030      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51031      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51032      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51033      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51034      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51035      ;;
51036  esac
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057# Check whether --with-abi-profile was given.
51058if test "${with_abi_profile+set}" = set; then :
51059  withval=$with_abi_profile;
51060fi
51061
51062
51063  if test "x$with_abi_profile" != x; then
51064    if test "x$OPENJDK_TARGET_CPU" != xarm && \
51065        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51066      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51067    fi
51068
51069    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51071$as_echo_n "checking for ABI profle... " >&6; }
51072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51073$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51074
51075    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51076      ARM_FLOAT_TYPE=vfp-sflt
51077      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51078    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51079      ARM_FLOAT_TYPE=vfp-hflt
51080      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51081    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51082      ARM_FLOAT_TYPE=sflt
51083      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51084    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51085      ARM_FLOAT_TYPE=vfp-sflt
51086      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51087    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51088      ARM_FLOAT_TYPE=vfp-hflt
51089      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
51090    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
51091      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51092      ARM_FLOAT_TYPE=
51093      ARM_ARCH_TYPE_FLAGS=
51094    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51095      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51096      ARM_FLOAT_TYPE=
51097      ARM_ARCH_TYPE_FLAGS=
51098    else
51099      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51100    fi
51101
51102    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51103      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51104    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51105      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51106    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51107      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51108    fi
51109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51110$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51112$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51113
51114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51115$as_echo_n "checking for arch type flags... " >&6; }
51116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51117$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51118
51119    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51120    # autoconf target triplet.
51121     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51122    # Sanity check that it is a known ABI.
51123    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51124        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51125        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51126          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51127$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51128    fi
51129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51130$as_echo_n "checking for ABI property name... " >&6; }
51131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51132$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51133
51134
51135    # Pass these on to the open part of configure as if they were set using
51136    # --with-extra-c[xx]flags.
51137    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51138    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51139    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51140    # FIXME: This should not really be set using extra_cflags.
51141    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51142        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51143        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51144    fi
51145    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51146    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51147    # And pass the architecture flags to the linker as well
51148    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51149  fi
51150
51151  # When building with an abi profile, the name of that profile is appended on the
51152  # bundle platform, which is used in bundle names.
51153  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51154    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51155  fi
51156
51157
51158  # Optional POSIX functionality needed by the JVM
51159  #
51160  # Check if clock_gettime is available and in which library. This indicates
51161  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51162  # don't let it update LIBS.
51163  save_LIBS="$LIBS"
51164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51165$as_echo_n "checking for library containing clock_gettime... " >&6; }
51166if ${ac_cv_search_clock_gettime+:} false; then :
51167  $as_echo_n "(cached) " >&6
51168else
51169  ac_func_search_save_LIBS=$LIBS
51170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51171/* end confdefs.h.  */
51172
51173/* Override any GCC internal prototype to avoid an error.
51174   Use char because int might match the return type of a GCC
51175   builtin and then its argument prototype would still apply.  */
51176#ifdef __cplusplus
51177extern "C"
51178#endif
51179char clock_gettime ();
51180int
51181main ()
51182{
51183return clock_gettime ();
51184  ;
51185  return 0;
51186}
51187_ACEOF
51188for ac_lib in '' rt; do
51189  if test -z "$ac_lib"; then
51190    ac_res="none required"
51191  else
51192    ac_res=-l$ac_lib
51193    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51194  fi
51195  if ac_fn_cxx_try_link "$LINENO"; then :
51196  ac_cv_search_clock_gettime=$ac_res
51197fi
51198rm -f core conftest.err conftest.$ac_objext \
51199    conftest$ac_exeext
51200  if ${ac_cv_search_clock_gettime+:} false; then :
51201  break
51202fi
51203done
51204if ${ac_cv_search_clock_gettime+:} false; then :
51205
51206else
51207  ac_cv_search_clock_gettime=no
51208fi
51209rm conftest.$ac_ext
51210LIBS=$ac_func_search_save_LIBS
51211fi
51212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51213$as_echo "$ac_cv_search_clock_gettime" >&6; }
51214ac_res=$ac_cv_search_clock_gettime
51215if test "$ac_res" != no; then :
51216  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51217  HAS_CLOCK_GETTIME=true
51218fi
51219
51220  if test "x$LIBS" = "x-lrt "; then
51221    CLOCK_GETTIME_IN_LIBRT=true
51222  fi
51223  LIBS="$save_LIBS"
51224
51225
51226  # Special extras...
51227  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51228    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51229      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51230      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51231    fi
51232    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51233    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51234  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51235    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51236    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51237  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51238    CXXSTD_CXXFLAG="-std=gnu++98"
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281    # Execute function body
51282
51283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51284$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51285  supports=yes
51286
51287  saved_cxxflags="$CXXFLAGS"
51288  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51289  ac_ext=cpp
51290ac_cpp='$CXXCPP $CPPFLAGS'
51291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51294
51295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51296/* end confdefs.h.  */
51297int i;
51298_ACEOF
51299if ac_fn_cxx_try_compile "$LINENO"; then :
51300
51301else
51302  supports=no
51303fi
51304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51305  ac_ext=cpp
51306ac_cpp='$CXXCPP $CPPFLAGS'
51307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51310
51311  CXXFLAGS="$saved_cxxflags"
51312
51313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51314$as_echo "$supports" >&6; }
51315  if test "x$supports" = "xyes" ; then
51316    :
51317
51318  else
51319    :
51320    CXXSTD_CXXFLAG=""
51321  fi
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51335    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51336
51337  fi
51338  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51339    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51340    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51341  fi
51342
51343  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51344  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51345  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51346
51347  ###############################################################################
51348  #
51349  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51350  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51351  #
51352
51353  # Setup compiler/platform specific flags into
51354  #    CFLAGS_JDK    - C Compiler flags
51355  #    CXXFLAGS_JDK  - C++ Compiler flags
51356  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51357  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51358    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51359    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51360    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51361    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51362      # Force compatibility with i586 on 32 bit intel platforms.
51363      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51364      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51365    fi
51366    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51367        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51368    case $OPENJDK_TARGET_CPU_ARCH in
51369      arm )
51370        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51371        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51372        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51373        ;;
51374      ppc )
51375        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51376        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51377        ;;
51378      s390 )
51379        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51380        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51381        ;;
51382      * )
51383        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51384        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51385        ;;
51386    esac
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441    # Execute function body
51442
51443  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51444  REFERENCE_VERSION=6
51445
51446  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51447    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51448  fi
51449
51450  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51451    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51452  fi
51453
51454  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51455  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51456
51457  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51458    :
51459
51460  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51461  # runs afoul of the more aggressive versions of these optimisations.
51462  # Notably, value range propagation now assumes that the this pointer of C++
51463  # member functions is non-null.
51464  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51465        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51466        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51467$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51468  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51469  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51470
51471  else
51472    :
51473
51474  fi
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51490    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51491
51492    # Restrict the debug information created by Clang to avoid
51493    # too big object files and speed the build up a little bit
51494    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51495    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51496    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51497      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51498        # Force compatibility with i586 on 32 bit intel platforms.
51499        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51500        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51501      fi
51502      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51503      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51504          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51505      case $OPENJDK_TARGET_CPU_ARCH in
51506        ppc )
51507          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51508          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51509          ;;
51510        * )
51511          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51512          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51513          ;;
51514      esac
51515    fi
51516  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51517    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51518    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51519    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51520      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51521    fi
51522
51523    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51524    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51525  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51526    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51527    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51528    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51529  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51530    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51531        -MD -Zc:wchar_t- -W3 -wd4800 \
51532        -DWIN32_LEAN_AND_MEAN \
51533        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51534        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51535        -DWIN32 -DIAL"
51536    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51537      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51538    else
51539      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51540    fi
51541    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51542    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51543    # studio.
51544    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51545      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51546      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51547      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51548    fi
51549  fi
51550
51551  ###############################################################################
51552
51553  # Adjust flags according to debug level.
51554  case $DEBUG_LEVEL in
51555    fastdebug | slowdebug )
51556      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51557      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51558      ;;
51559    release )
51560      ;;
51561    * )
51562      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51563      ;;
51564  esac
51565
51566  # Set some common defines. These works for all compilers, but assume
51567  # -D is universally accepted.
51568
51569  # Setup endianness
51570  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51571    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51572    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51573    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51574    #   Note: -Dmacro         is the same as    #define macro 1
51575    #         -Dmacro=        is the same as    #define macro
51576    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51577      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51578    else
51579      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51580    fi
51581  else
51582    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51583    # are defined in the system?
51584    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51585      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51586    else
51587      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51588    fi
51589  fi
51590
51591  # Always enable optional macros for VM.
51592  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51593  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51594  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51595
51596  # Setup target OS define. Use OS target name but in upper case.
51597  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51598  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51599
51600  # Setup target CPU
51601  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51602      $OPENJDK_TARGET_ADD_LP64 \
51603      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51604
51605  # Setup debug/release defines
51606  if test "x$DEBUG_LEVEL" = xrelease; then
51607    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51608    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51609      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51610    fi
51611  else
51612    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51613  fi
51614
51615  # Optional POSIX functionality needed by the VM
51616
51617  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51618    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51619    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51620      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51621    fi
51622  fi
51623
51624
51625  # Set some additional per-OS defines.
51626  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51627    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51628    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51629        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51630  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51631    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51632    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51633        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51634  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51635    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51636    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51637    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51638    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51639        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51640        -fno-omit-frame-pointer"
51641  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51642    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51643    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51644        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51645        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51646    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51647    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51648    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51649    if test "x$DEBUG_LEVEL" = xslowdebug; then
51650      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51651    fi
51652  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51653    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51654  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51655    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51656    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51657  fi
51658
51659  # Set some additional per-CPU defines.
51660  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51661    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51662  elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
51663    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51664  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51665    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51666      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51667      # fixes `relocation truncated to fit' error for gcc 4.1.
51668      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51669      # Use ppc64 instructions, but schedule for power5
51670      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51671    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51672      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51673    fi
51674  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51675    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51676      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51677      # Little endian machine uses ELFv2 ABI.
51678      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51679      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51680      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51681    fi
51682  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51683    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51684      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51685    fi
51686  fi
51687
51688  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51689    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51690  fi
51691
51692  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51693    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51694      # Solaris does not have _LP64=1 in the old build.
51695      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51696      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51697    fi
51698  fi
51699
51700  # Set JVM_CFLAGS warning handling
51701  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51702    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51703        -Wunused-value -Woverloaded-virtual"
51704
51705    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760    # Execute function body
51761
51762  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51763  REFERENCE_VERSION=4.8
51764
51765  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51766    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51767  fi
51768
51769  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51770    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51771  fi
51772
51773  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51774  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51775
51776  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51777    :
51778
51779            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51780            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51781
51782
51783  else
51784    :
51785
51786  fi
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801    fi
51802    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51803      # Non-zero builds have stricter warnings
51804      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51805    else
51806      if test "x$TOOLCHAIN_TYPE" = xclang; then
51807        # Some versions of llvm do not like -Wundef
51808        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51809      fi
51810    fi
51811  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51812    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51813        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51814  fi
51815
51816  # Additional macosx handling
51817  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51818    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51819    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51820    # JDK can be built and makes the linked binaries compatible even if built on
51821    # a newer version of the OS.
51822    MACOSX_VERSION_MIN=10.7.0
51823
51824
51825    # Setting --with-macosx-version-max=<version> makes it an error to build or
51826    # link to macosx APIs that are newer than the given OS version. The expected
51827    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51828
51829# Check whether --with-macosx-version-max was given.
51830if test "${with_macosx_version_max+set}" = set; then :
51831  withval=$with_macosx_version_max;
51832          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51833              MACOSX_VERSION_MAX=$with_macosx_version_max
51834          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51835              MACOSX_VERSION_MAX=$with_macosx_version_max
51836          elif test "x$with_macosx_version_max" = "xno"; then
51837              # Use build system default
51838              MACOSX_VERSION_MAX=
51839          else
51840              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51841          fi
51842
51843else
51844  MACOSX_VERSION_MAX=
51845
51846fi
51847
51848
51849
51850    # Let the flags variables get resolved in make for easier override on make
51851    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51852    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51853        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51854        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51855    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51856    JVM_CFLAGS="$JVM_CFLAGS \
51857        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51858        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51859
51860    if test -n "$MACOSX_VERSION_MAX"; then
51861        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51862            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51863        JVM_CFLAGS="$JVM_CFLAGS \
51864            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51865    fi
51866  fi
51867
51868  # Setup some hard coded includes
51869  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51870      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51871      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51872      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51873      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51874      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51875      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51876
51877  # The shared libraries are compiled using the picflag.
51878  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51879      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51880  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51881      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51882
51883  # Executable flags
51884  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51885  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51886
51887
51888
51889
51890
51891
51892  # Setup LDFLAGS et al.
51893  #
51894
51895  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51896    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51897    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51898    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51899    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51900      LDFLAGS_SAFESH="-safeseh"
51901      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51902      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51903      # NOTE: Old build added -machine. Probably not needed.
51904      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51905    else
51906      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51907    fi
51908  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51909      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51910      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51911        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51912        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51913    fi
51914  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51915    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51916    # We have previously set HAS_GNU_HASH if this is the case
51917    if test -n "$HAS_GNU_HASH"; then
51918      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51919      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51920      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51921    fi
51922      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51923        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51924    fi
51925    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51926      # And since we now know that the linker is gnu, then add -z defs, to forbid
51927      # undefined symbols in object files.
51928      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51929      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51930      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51931      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51932      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51933      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51934        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51935      fi
51936      case $DEBUG_LEVEL in
51937        release )
51938          # tell linker to optimize libraries.
51939          # Should this be supplied to the OSS linker as well?
51940          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51941          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51942          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51943          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51944            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51945          fi
51946          ;;
51947        slowdebug )
51948          # Hotspot always let the linker optimize
51949          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51950          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51951            # do relocations at load
51952            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51953            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51954            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51955          fi
51956          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51957            # mark relocations read only
51958            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51959            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51960            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51961          fi
51962          ;;
51963        fastdebug )
51964          # Hotspot always let the linker optimize
51965          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51966          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51967            # mark relocations read only
51968            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51969            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51970            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51971          fi
51972          ;;
51973        * )
51974          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51975          ;;
51976        esac
51977    fi
51978  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51979    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51980    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51981    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51982    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51983    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51984    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51985      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51986    fi
51987  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51988    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51989    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51990    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51991    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51992    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51993    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51994    if test "x$DEBUG_LEVEL" = xslowdebug; then
51995      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
51996    fi
51997  fi
51998
51999  # Customize LDFLAGS for executables
52000
52001  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
52002
52003  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52004    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52005      LDFLAGS_STACK_SIZE=1048576
52006    else
52007      LDFLAGS_STACK_SIZE=327680
52008    fi
52009    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52010  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52011    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52012  fi
52013
52014  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52015
52016  # Customize LDFLAGS for libs
52017  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52018
52019  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52020  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52021    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52022        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52023    JDKLIB_LIBS=""
52024  else
52025    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52026        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52027
52028    if test "xTARGET" = "xTARGET"; then
52029      # On some platforms (mac) the linker warns about non existing -L dirs.
52030      # For any of the variants server, client or minimal, the dir matches the
52031      # variant name. The "main" variant should be used for linking. For the
52032      # rest, the dir is just server.
52033      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52034          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52035        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52036            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52037      else
52038        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52039            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52040      fi
52041    elif test "xTARGET" = "xBUILD"; then
52042      # When building a buildjdk, it's always only the server variant
52043      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52044          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52045    fi
52046
52047    JDKLIB_LIBS="-ljava -ljvm"
52048    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52049      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52050    fi
52051
52052  fi
52053
52054LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52055
52056  # Set JVM_LIBS (per os)
52057  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52058    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52059  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52060    # FIXME: This hard-coded path is not really proper.
52061    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52062      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52063    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52064      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52065    fi
52066    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52067        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52068  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52069    JVM_LIBS="$JVM_LIBS -lm"
52070  elif test "x$OPENJDK_TARGET_OS" = xaix; then
52071    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52072  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52073    JVM_LIBS="$JVM_LIBS -lm"
52074  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52075    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52076        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52077        wsock32.lib winmm.lib version.lib psapi.lib"
52078    fi
52079
52080  # Set JVM_ASFLAGS
52081  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52082    if test "x$OPENJDK_TARGET_CPU" = xx86; then
52083      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52084    fi
52085  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52086    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52087  fi
52088
52089  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105  # Special extras...
52106  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52107    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52108      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52109      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52110    fi
52111    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52112    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52113  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52114    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52115    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52116  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52117    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160    # Execute function body
52161
52162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52163$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52164  supports=yes
52165
52166  saved_cxxflags="$CXXFLAGS"
52167  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52168  ac_ext=cpp
52169ac_cpp='$CXXCPP $CPPFLAGS'
52170ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52171ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52172ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52173
52174  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52175/* end confdefs.h.  */
52176int i;
52177_ACEOF
52178if ac_fn_cxx_try_compile "$LINENO"; then :
52179
52180else
52181  supports=no
52182fi
52183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52184  ac_ext=cpp
52185ac_cpp='$CXXCPP $CPPFLAGS'
52186ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52187ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52188ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52189
52190  CXXFLAGS="$saved_cxxflags"
52191
52192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52193$as_echo "$supports" >&6; }
52194  if test "x$supports" = "xyes" ; then
52195    :
52196
52197  else
52198    :
52199    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52200  fi
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52214    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52215
52216  fi
52217  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52218    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52219    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52220  fi
52221
52222  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52223  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52224  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52225
52226  ###############################################################################
52227  #
52228  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52229  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52230  #
52231
52232  # Setup compiler/platform specific flags into
52233  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52234  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52235  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52236  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52237    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52238    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52239    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52240    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52241      # Force compatibility with i586 on 32 bit intel platforms.
52242      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52243      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52244    fi
52245    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52246        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52247    case $OPENJDK_BUILD_CPU_ARCH in
52248      arm )
52249        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52250        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52251        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52252        ;;
52253      ppc )
52254        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52255        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52256        ;;
52257      s390 )
52258        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52259        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52260        ;;
52261      * )
52262        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52263        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52264        ;;
52265    esac
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320    # Execute function body
52321
52322  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52323  REFERENCE_VERSION=6
52324
52325  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52326    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52327  fi
52328
52329  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52330    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52331  fi
52332
52333  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52334  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52335
52336  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52337    :
52338
52339  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52340  # runs afoul of the more aggressive versions of these optimisations.
52341  # Notably, value range propagation now assumes that the this pointer of C++
52342  # member functions is non-null.
52343  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52344        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52345        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52346$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52347  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52348  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52349
52350  else
52351    :
52352
52353  fi
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52369    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52370
52371    # Restrict the debug information created by Clang to avoid
52372    # too big object files and speed the build up a little bit
52373    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52374    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52375    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52376      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52377        # Force compatibility with i586 on 32 bit intel platforms.
52378        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52379        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52380      fi
52381      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52382      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52383          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52384      case $OPENJDK_BUILD_CPU_ARCH in
52385        ppc )
52386          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52387          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52388          ;;
52389        * )
52390          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52391          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52392          ;;
52393      esac
52394    fi
52395  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52396    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52397    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52398    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52399      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52400    fi
52401
52402    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52403    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52404  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52405    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52406    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52407    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52408  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52409    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52410        -MD -Zc:wchar_t- -W3 -wd4800 \
52411        -DWIN32_LEAN_AND_MEAN \
52412        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52413        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52414        -DWIN32 -DIAL"
52415    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52416      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52417    else
52418      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52419    fi
52420    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52421    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52422    # studio.
52423    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52424      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52425      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52426      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52427    fi
52428  fi
52429
52430  ###############################################################################
52431
52432  # Adjust flags according to debug level.
52433  case $DEBUG_LEVEL in
52434    fastdebug | slowdebug )
52435      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52436      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52437      ;;
52438    release )
52439      ;;
52440    * )
52441      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52442      ;;
52443  esac
52444
52445  # Set some common defines. These works for all compilers, but assume
52446  # -D is universally accepted.
52447
52448  # Setup endianness
52449  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52450    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52451    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52452    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52453    #   Note: -Dmacro         is the same as    #define macro 1
52454    #         -Dmacro=        is the same as    #define macro
52455    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52456      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52457    else
52458      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52459    fi
52460  else
52461    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52462    # are defined in the system?
52463    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52464      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52465    else
52466      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52467    fi
52468  fi
52469
52470  # Always enable optional macros for VM.
52471  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52472  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52473  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52474
52475  # Setup target OS define. Use OS target name but in upper case.
52476  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52477  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52478
52479  # Setup target CPU
52480  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52481      $OPENJDK_BUILD_ADD_LP64 \
52482      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52483
52484  # Setup debug/release defines
52485  if test "x$DEBUG_LEVEL" = xrelease; then
52486    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52487    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52488      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52489    fi
52490  else
52491    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52492  fi
52493
52494  # Optional POSIX functionality needed by the VM
52495
52496  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52497    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52498    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52499      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52500    fi
52501  fi
52502
52503
52504  # Set some additional per-OS defines.
52505  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52506    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52507    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52508        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52509  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52510    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52511    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52512        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52513  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52514    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52515    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52516    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52517    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52518        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52519        -fno-omit-frame-pointer"
52520  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52521    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52522    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52523        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52524        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52525    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52526    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52527    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52528    if test "x$DEBUG_LEVEL" = xslowdebug; then
52529      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52530    fi
52531  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52532    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52533  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52534    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52535    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52536  fi
52537
52538  # Set some additional per-CPU defines.
52539  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52540    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52541  elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
52542    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52543  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52544    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52545      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52546      # fixes `relocation truncated to fit' error for gcc 4.1.
52547      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52548      # Use ppc64 instructions, but schedule for power5
52549      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52550    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52551      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52552    fi
52553  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52554    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52555      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52556      # Little endian machine uses ELFv2 ABI.
52557      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52558      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52559      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52560    fi
52561  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52562    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52563      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52564    fi
52565  fi
52566
52567  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52568    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52569  fi
52570
52571  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52572    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52573      # Solaris does not have _LP64=1 in the old build.
52574      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52575      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52576    fi
52577  fi
52578
52579  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52580  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52581    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52582        -Wunused-value -Woverloaded-virtual"
52583
52584    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639    # Execute function body
52640
52641  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52642  REFERENCE_VERSION=4.8
52643
52644  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52645    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52646  fi
52647
52648  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52649    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52650  fi
52651
52652  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52653  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52654
52655  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52656    :
52657
52658            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52659            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52660
52661
52662  else
52663    :
52664
52665  fi
52666
52667
52668
52669
52670
52671
52672
52673
52674
52675
52676
52677
52678
52679
52680    fi
52681    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52682      # Non-zero builds have stricter warnings
52683      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52684    else
52685      if test "x$TOOLCHAIN_TYPE" = xclang; then
52686        # Some versions of llvm do not like -Wundef
52687        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52688      fi
52689    fi
52690  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52691    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52692        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52693  fi
52694
52695  # Additional macosx handling
52696  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52697    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52698    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52699    # JDK can be built and makes the linked binaries compatible even if built on
52700    # a newer version of the OS.
52701    MACOSX_VERSION_MIN=10.7.0
52702
52703
52704    # Setting --with-macosx-version-max=<version> makes it an error to build or
52705    # link to macosx APIs that are newer than the given OS version. The expected
52706    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52707
52708# Check whether --with-macosx-version-max was given.
52709if test "${with_macosx_version_max+set}" = set; then :
52710  withval=$with_macosx_version_max;
52711          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52712              MACOSX_VERSION_MAX=$with_macosx_version_max
52713          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52714              MACOSX_VERSION_MAX=$with_macosx_version_max
52715          elif test "x$with_macosx_version_max" = "xno"; then
52716              # Use build system default
52717              MACOSX_VERSION_MAX=
52718          else
52719              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52720          fi
52721
52722else
52723  MACOSX_VERSION_MAX=
52724
52725fi
52726
52727
52728
52729    # Let the flags variables get resolved in make for easier override on make
52730    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52731    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52732        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52733        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52734    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52735    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52736        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52737        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52738
52739    if test -n "$MACOSX_VERSION_MAX"; then
52740        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52741            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52742        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52743            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52744    fi
52745  fi
52746
52747  # Setup some hard coded includes
52748  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52749      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52750      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52751      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52752      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52753      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52754      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52755
52756  # The shared libraries are compiled using the picflag.
52757  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52758      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52759  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52760      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52761
52762  # Executable flags
52763  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52764  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52765
52766
52767
52768
52769
52770
52771  # Setup LDFLAGS et al.
52772  #
52773
52774  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52775    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52776    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52777    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52778    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52779      LDFLAGS_SAFESH="-safeseh"
52780      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52781      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52782      # NOTE: Old build added -machine. Probably not needed.
52783      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52784    else
52785      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52786    fi
52787  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52788      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52789      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52790        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52791        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52792    fi
52793  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52794    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52795    # We have previously set HAS_GNU_HASH if this is the case
52796    if test -n "$HAS_GNU_HASH"; then
52797      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52798      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52799      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52800    fi
52801      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52802        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52803    fi
52804    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52805      # And since we now know that the linker is gnu, then add -z defs, to forbid
52806      # undefined symbols in object files.
52807      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52808      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52809      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52810      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52811      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52812      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52813        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52814      fi
52815      case $DEBUG_LEVEL in
52816        release )
52817          # tell linker to optimize libraries.
52818          # Should this be supplied to the OSS linker as well?
52819          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52820          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52821          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52822          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52823            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52824          fi
52825          ;;
52826        slowdebug )
52827          # Hotspot always let the linker optimize
52828          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52829          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52830            # do relocations at load
52831            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52832            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52833            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52834          fi
52835          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52836            # mark relocations read only
52837            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52838            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52839            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52840          fi
52841          ;;
52842        fastdebug )
52843          # Hotspot always let the linker optimize
52844          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52845          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52846            # mark relocations read only
52847            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52848            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52849            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52850          fi
52851          ;;
52852        * )
52853          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52854          ;;
52855        esac
52856    fi
52857  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52858    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52859    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52860    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52861    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52862    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52863    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52864      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52865    fi
52866  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52867    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52868    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52869    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52870    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52871    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52872    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52873    if test "x$DEBUG_LEVEL" = xslowdebug; then
52874      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52875    fi
52876  fi
52877
52878  # Customize LDFLAGS for executables
52879
52880  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52881
52882  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52883    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52884      LDFLAGS_STACK_SIZE=1048576
52885    else
52886      LDFLAGS_STACK_SIZE=327680
52887    fi
52888    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52889  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52890    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52891  fi
52892
52893  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52894
52895  # Customize LDFLAGS for libs
52896  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52897
52898  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52899  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52900    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52901        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52902    OPENJDK_BUILD_JDKLIB_LIBS=""
52903  else
52904    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52905        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52906
52907    if test "xBUILD" = "xTARGET"; then
52908      # On some platforms (mac) the linker warns about non existing -L dirs.
52909      # For any of the variants server, client or minimal, the dir matches the
52910      # variant name. The "main" variant should be used for linking. For the
52911      # rest, the dir is just server.
52912      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52913          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52914        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52915            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52916      else
52917        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52918            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52919      fi
52920    elif test "xBUILD" = "xBUILD"; then
52921      # When building a buildjdk, it's always only the server variant
52922      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52923          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52924    fi
52925
52926    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52927    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52928      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52929    fi
52930
52931  fi
52932
52933OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52934
52935  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52936  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52937    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52938  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52939    # FIXME: This hard-coded path is not really proper.
52940    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52941      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52942    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52943      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52944    fi
52945    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52946        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52947  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52948    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52949  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52950    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52951  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52952    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52953  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52954    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52955        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52956        wsock32.lib winmm.lib version.lib psapi.lib"
52957    fi
52958
52959  # Set OPENJDK_BUILD_JVM_ASFLAGS
52960  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52961    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52962      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52963    fi
52964  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52965    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52966  fi
52967
52968  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984  # Tests are only ever compiled for TARGET
52985  # Flags for compiling test libraries
52986  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52987  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52988
52989  # Flags for compiling test executables
52990  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52991  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52992
52993
52994
52995
52996
52997
52998  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52999  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
53000
53001
53002
53003
53004
53005
53006  # Check that the compiler supports -mX (or -qX on AIX) flags
53007  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055    # Execute function body
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104    # Execute function body
53105
53106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53107$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53108  supports=yes
53109
53110  saved_cflags="$CFLAGS"
53111  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53112  ac_ext=c
53113ac_cpp='$CPP $CPPFLAGS'
53114ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53115ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53116ac_compiler_gnu=$ac_cv_c_compiler_gnu
53117
53118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53119/* end confdefs.h.  */
53120int i;
53121_ACEOF
53122if ac_fn_c_try_compile "$LINENO"; then :
53123
53124else
53125  supports=no
53126fi
53127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53128  ac_ext=cpp
53129ac_cpp='$CXXCPP $CPPFLAGS'
53130ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53131ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53132ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53133
53134  CFLAGS="$saved_cflags"
53135
53136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53137$as_echo "$supports" >&6; }
53138  if test "x$supports" = "xyes" ; then
53139    :
53140    C_COMP_SUPPORTS="yes"
53141  else
53142    :
53143    C_COMP_SUPPORTS="no"
53144  fi
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204    # Execute function body
53205
53206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53207$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53208  supports=yes
53209
53210  saved_cxxflags="$CXXFLAGS"
53211  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53212  ac_ext=cpp
53213ac_cpp='$CXXCPP $CPPFLAGS'
53214ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53215ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53216ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53217
53218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53219/* end confdefs.h.  */
53220int i;
53221_ACEOF
53222if ac_fn_cxx_try_compile "$LINENO"; then :
53223
53224else
53225  supports=no
53226fi
53227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53228  ac_ext=cpp
53229ac_cpp='$CXXCPP $CPPFLAGS'
53230ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53231ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53232ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53233
53234  CXXFLAGS="$saved_cxxflags"
53235
53236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53237$as_echo "$supports" >&6; }
53238  if test "x$supports" = "xyes" ; then
53239    :
53240    CXX_COMP_SUPPORTS="yes"
53241  else
53242    :
53243    CXX_COMP_SUPPORTS="no"
53244  fi
53245
53246
53247
53248
53249
53250
53251
53252
53253
53254
53255
53256
53257
53258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53259$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53260  supports=no
53261  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53262
53263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53264$as_echo "$supports" >&6; }
53265  if test "x$supports" = "xyes" ; then
53266    :
53267    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53268  else
53269    :
53270    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53271  fi
53272
53273
53274
53275
53276
53277
53278
53279
53280  # Check whether --enable-warnings-as-errors was given.
53281if test "${enable_warnings_as_errors+set}" = set; then :
53282  enableval=$enable_warnings_as_errors;
53283fi
53284
53285
53286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53287$as_echo_n "checking if native warnings are errors... " >&6; }
53288  if test "x$enable_warnings_as_errors" = "xyes"; then
53289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53290$as_echo "yes (explicitly set)" >&6; }
53291    WARNINGS_AS_ERRORS=true
53292  elif test "x$enable_warnings_as_errors" = "xno"; then
53293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53294$as_echo "no" >&6; }
53295    WARNINGS_AS_ERRORS=false
53296  elif test "x$enable_warnings_as_errors" = "x"; then
53297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53298$as_echo "yes (default)" >&6; }
53299    WARNINGS_AS_ERRORS=true
53300  else
53301    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53302  fi
53303
53304
53305
53306  case "${TOOLCHAIN_TYPE}" in
53307    microsoft)
53308      DISABLE_WARNING_PREFIX="-wd"
53309      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53310      ;;
53311    solstudio)
53312      DISABLE_WARNING_PREFIX="-erroff="
53313      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53314      ;;
53315    gcc)
53316      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53317
53318
53319
53320
53321
53322
53323
53324
53325
53326
53327
53328
53329
53330
53331
53332
53333
53334
53335
53336
53337
53338
53339
53340
53341
53342
53343
53344
53345
53346
53347
53348
53349
53350
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361
53362
53363
53364    # Execute function body
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412
53413    # Execute function body
53414
53415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53416$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53417  supports=yes
53418
53419  saved_cflags="$CFLAGS"
53420  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53421  ac_ext=c
53422ac_cpp='$CPP $CPPFLAGS'
53423ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53424ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53425ac_compiler_gnu=$ac_cv_c_compiler_gnu
53426
53427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53428/* end confdefs.h.  */
53429int i;
53430_ACEOF
53431if ac_fn_c_try_compile "$LINENO"; then :
53432
53433else
53434  supports=no
53435fi
53436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53437  ac_ext=cpp
53438ac_cpp='$CXXCPP $CPPFLAGS'
53439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53442
53443  CFLAGS="$saved_cflags"
53444
53445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53446$as_echo "$supports" >&6; }
53447  if test "x$supports" = "xyes" ; then
53448    :
53449    C_COMP_SUPPORTS="yes"
53450  else
53451    :
53452    C_COMP_SUPPORTS="no"
53453  fi
53454
53455
53456
53457
53458
53459
53460
53461
53462
53463
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510
53511
53512
53513    # Execute function body
53514
53515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53516$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53517  supports=yes
53518
53519  saved_cxxflags="$CXXFLAGS"
53520  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53521  ac_ext=cpp
53522ac_cpp='$CXXCPP $CPPFLAGS'
53523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53526
53527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53528/* end confdefs.h.  */
53529int i;
53530_ACEOF
53531if ac_fn_cxx_try_compile "$LINENO"; then :
53532
53533else
53534  supports=no
53535fi
53536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53537  ac_ext=cpp
53538ac_cpp='$CXXCPP $CPPFLAGS'
53539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53542
53543  CXXFLAGS="$saved_cxxflags"
53544
53545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53546$as_echo "$supports" >&6; }
53547  if test "x$supports" = "xyes" ; then
53548    :
53549    CXX_COMP_SUPPORTS="yes"
53550  else
53551    :
53552    CXX_COMP_SUPPORTS="no"
53553  fi
53554
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564
53565
53566
53567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53568$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53569  supports=no
53570  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53571
53572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53573$as_echo "$supports" >&6; }
53574  if test "x$supports" = "xyes" ; then
53575    :
53576    GCC_CAN_DISABLE_WARNINGS=true
53577  else
53578    :
53579    GCC_CAN_DISABLE_WARNINGS=false
53580
53581  fi
53582
53583
53584
53585
53586
53587
53588      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53589        DISABLE_WARNING_PREFIX="-Wno-"
53590      else
53591        DISABLE_WARNING_PREFIX=
53592      fi
53593      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53594      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53595      # CFLAGS since any target specific flags will likely not work with the
53596      # build compiler
53597      CC_OLD="$CC"
53598      CXX_OLD="$CXX"
53599      CC="$BUILD_CC"
53600      CXX="$BUILD_CXX"
53601      CFLAGS_OLD="$CFLAGS"
53602      CFLAGS=""
53603
53604
53605
53606
53607
53608
53609
53610
53611
53612
53613
53614
53615
53616
53617
53618
53619
53620
53621
53622
53623
53624
53625
53626
53627
53628
53629
53630
53631
53632
53633
53634
53635
53636
53637
53638
53639
53640
53641
53642
53643
53644
53645
53646
53647
53648
53649
53650    # Execute function body
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665
53666
53667
53668
53669
53670
53671
53672
53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
53684
53685
53686
53687
53688
53689
53690
53691
53692
53693
53694
53695
53696
53697
53698
53699    # Execute function body
53700
53701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53702$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53703  supports=yes
53704
53705  saved_cflags="$CFLAGS"
53706  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53707  ac_ext=c
53708ac_cpp='$CPP $CPPFLAGS'
53709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53711ac_compiler_gnu=$ac_cv_c_compiler_gnu
53712
53713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53714/* end confdefs.h.  */
53715int i;
53716_ACEOF
53717if ac_fn_c_try_compile "$LINENO"; then :
53718
53719else
53720  supports=no
53721fi
53722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53723  ac_ext=cpp
53724ac_cpp='$CXXCPP $CPPFLAGS'
53725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53728
53729  CFLAGS="$saved_cflags"
53730
53731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53732$as_echo "$supports" >&6; }
53733  if test "x$supports" = "xyes" ; then
53734    :
53735    C_COMP_SUPPORTS="yes"
53736  else
53737    :
53738    C_COMP_SUPPORTS="no"
53739  fi
53740
53741
53742
53743
53744
53745
53746
53747
53748
53749
53750
53751
53752
53753
53754
53755
53756
53757
53758
53759
53760
53761
53762
53763
53764
53765
53766
53767
53768
53769
53770
53771
53772
53773
53774
53775
53776
53777
53778
53779
53780
53781
53782
53783
53784
53785
53786
53787
53788
53789
53790
53791
53792
53793
53794
53795
53796
53797
53798
53799    # Execute function body
53800
53801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53802$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53803  supports=yes
53804
53805  saved_cxxflags="$CXXFLAGS"
53806  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53807  ac_ext=cpp
53808ac_cpp='$CXXCPP $CPPFLAGS'
53809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53812
53813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53814/* end confdefs.h.  */
53815int i;
53816_ACEOF
53817if ac_fn_cxx_try_compile "$LINENO"; then :
53818
53819else
53820  supports=no
53821fi
53822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53823  ac_ext=cpp
53824ac_cpp='$CXXCPP $CPPFLAGS'
53825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53828
53829  CXXFLAGS="$saved_cxxflags"
53830
53831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53832$as_echo "$supports" >&6; }
53833  if test "x$supports" = "xyes" ; then
53834    :
53835    CXX_COMP_SUPPORTS="yes"
53836  else
53837    :
53838    CXX_COMP_SUPPORTS="no"
53839  fi
53840
53841
53842
53843
53844
53845
53846
53847
53848
53849
53850
53851
53852
53853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53854$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53855  supports=no
53856  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53857
53858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53859$as_echo "$supports" >&6; }
53860  if test "x$supports" = "xyes" ; then
53861    :
53862    BUILD_CC_CAN_DISABLE_WARNINGS=true
53863  else
53864    :
53865    BUILD_CC_CAN_DISABLE_WARNINGS=false
53866
53867  fi
53868
53869
53870
53871
53872
53873
53874      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53875        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53876      else
53877        BUILD_CC_DISABLE_WARNING_PREFIX=
53878      fi
53879      CC="$CC_OLD"
53880      CXX="$CXX_OLD"
53881      CFLAGS="$CFLAGS_OLD"
53882      ;;
53883    clang)
53884      DISABLE_WARNING_PREFIX="-Wno-"
53885      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53886      ;;
53887    xlc)
53888      DISABLE_WARNING_PREFIX="-qsuppress="
53889      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53890      ;;
53891  esac
53892
53893
53894
53895
53896
53897# Setup debug symbols (need objcopy from the toolchain for that)
53898
53899  #
53900  # NATIVE_DEBUG_SYMBOLS
53901  # This must be done after the toolchain is setup, since we're looking at objcopy.
53902  #
53903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53904$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53905
53906# Check whether --with-native-debug-symbols was given.
53907if test "${with_native_debug_symbols+set}" = set; then :
53908  withval=$with_native_debug_symbols;
53909        if test "x$OPENJDK_TARGET_OS" = xaix; then
53910          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53911            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53912          fi
53913        fi
53914
53915else
53916
53917        if test "x$OPENJDK_TARGET_OS" = xaix; then
53918          # AIX doesn't support 'zipped' so use 'internal' as default
53919          with_native_debug_symbols="internal"
53920        else
53921          if test "x$STATIC_BUILD" = xtrue; then
53922            with_native_debug_symbols="none"
53923          else
53924            with_native_debug_symbols="zipped"
53925          fi
53926        fi
53927
53928fi
53929
53930  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53932$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53933
53934  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53935
53936    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53937      if test "x$OBJCOPY" = x; then
53938        # enabling of enable-debug-symbols and can't find objcopy
53939        # this is an error
53940        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53941      fi
53942    fi
53943
53944    COMPILE_WITH_DEBUG_SYMBOLS=true
53945    COPY_DEBUG_SYMBOLS=true
53946    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53947  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53948    COMPILE_WITH_DEBUG_SYMBOLS=false
53949    COPY_DEBUG_SYMBOLS=false
53950    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53951  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53952    COMPILE_WITH_DEBUG_SYMBOLS=true
53953    COPY_DEBUG_SYMBOLS=false
53954    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53955  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53956
53957    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53958      if test "x$OBJCOPY" = x; then
53959        # enabling of enable-debug-symbols and can't find objcopy
53960        # this is an error
53961        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53962      fi
53963    fi
53964
53965    COMPILE_WITH_DEBUG_SYMBOLS=true
53966    COPY_DEBUG_SYMBOLS=true
53967    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53968  else
53969    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53970  fi
53971
53972  # --enable-debug-symbols is deprecated.
53973  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53974
53975  # Check whether --enable-debug-symbols was given.
53976if test "${enable_debug_symbols+set}" = set; then :
53977  enableval=$enable_debug_symbols;
53978fi
53979
53980  if test "x$enable_debug_symbols" != x; then
53981    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53982$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53983
53984    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53985      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53986$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53987    fi
53988
53989  fi
53990
53991
53992  # --enable-zip-debug-info is deprecated.
53993  # Please use --with-native-debug-symbols=zipped .
53994
53995  # Check whether --enable-zip-debug-info was given.
53996if test "${enable_zip_debug_info+set}" = set; then :
53997  enableval=$enable_zip_debug_info;
53998fi
53999
54000  if test "x$enable_zip_debug_info" != x; then
54001    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54002$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54003
54004    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54005      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54006$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54007    fi
54008
54009  fi
54010
54011
54012
54013
54014
54015
54016
54017  # Check whether --enable-native-coverage was given.
54018if test "${enable_native_coverage+set}" = set; then :
54019  enableval=$enable_native_coverage;
54020fi
54021
54022  GCOV_ENABLED="false"
54023  if test "x$enable_native_coverage" = "xyes"; then
54024    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54026$as_echo_n "checking if native coverage is enabled... " >&6; }
54027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54028$as_echo "yes" >&6; }
54029      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54030      GCOV_LDFLAGS="-fprofile-arcs"
54031      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54032      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54033      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54034      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54035      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54036      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54037      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54038      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54039      GCOV_ENABLED="true"
54040    else
54041      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54042    fi
54043  elif test "x$enable_native_coverage" = "xno"; then
54044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54045$as_echo_n "checking if native coverage is enabled... " >&6; }
54046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54047$as_echo "no" >&6; }
54048  elif test "x$enable_native_coverage" != "x"; then
54049    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54050  fi
54051
54052
54053
54054
54055# Need toolchain to setup dtrace
54056
54057  # Test for dtrace dependencies
54058  # Check whether --enable-dtrace was given.
54059if test "${enable_dtrace+set}" = set; then :
54060  enableval=$enable_dtrace;
54061fi
54062
54063
54064  DTRACE_DEP_MISSING=false
54065
54066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
54067$as_echo_n "checking for dtrace tool... " >&6; }
54068  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
54069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
54070$as_echo "$DTRACE" >&6; }
54071  else
54072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
54073$as_echo "not found, cannot build dtrace" >&6; }
54074    DTRACE_DEP_MISSING=true
54075  fi
54076
54077  for ac_header in sys/sdt.h
54078do :
54079  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
54080if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
54081  cat >>confdefs.h <<_ACEOF
54082#define HAVE_SYS_SDT_H 1
54083_ACEOF
54084 DTRACE_HEADERS_OK=yes
54085else
54086  DTRACE_HEADERS_OK=no
54087fi
54088
54089done
54090
54091  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54092    DTRACE_DEP_MISSING=true
54093  fi
54094
54095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54096$as_echo_n "checking if dtrace should be built... " >&6; }
54097  if test "x$enable_dtrace" = "xyes"; then
54098    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54100$as_echo "no, missing dependencies" >&6; }
54101
54102  # Print a helpful message on how to acquire the necessary build dependency.
54103  # dtrace is the help tag: freetype, cups, alsa etc
54104  MISSING_DEPENDENCY=dtrace
54105
54106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54107    cygwin_help $MISSING_DEPENDENCY
54108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54109    msys_help $MISSING_DEPENDENCY
54110  else
54111    PKGHANDLER_COMMAND=
54112
54113    case $PKGHANDLER in
54114      apt-get)
54115        apt_help     $MISSING_DEPENDENCY ;;
54116      yum)
54117        yum_help     $MISSING_DEPENDENCY ;;
54118      brew)
54119        brew_help    $MISSING_DEPENDENCY ;;
54120      port)
54121        port_help    $MISSING_DEPENDENCY ;;
54122      pkgutil)
54123        pkgutil_help $MISSING_DEPENDENCY ;;
54124      pkgadd)
54125        pkgadd_help  $MISSING_DEPENDENCY ;;
54126    esac
54127
54128    if test "x$PKGHANDLER_COMMAND" != x; then
54129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54130    fi
54131  fi
54132
54133      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54134    else
54135      INCLUDE_DTRACE=true
54136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54137$as_echo "yes, forced" >&6; }
54138    fi
54139  elif test "x$enable_dtrace" = "xno"; then
54140    INCLUDE_DTRACE=false
54141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54142$as_echo "no, forced" >&6; }
54143  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54144    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54145      INCLUDE_DTRACE=false
54146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54147$as_echo "no, missing dependencies" >&6; }
54148    else
54149      INCLUDE_DTRACE=true
54150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54151$as_echo "yes, dependencies present" >&6; }
54152    fi
54153  else
54154    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54155  fi
54156
54157
54158  # Check whether --enable-aot was given.
54159if test "${enable_aot+set}" = set; then :
54160  enableval=$enable_aot;
54161fi
54162
54163
54164  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54165    ENABLE_AOT="true"
54166  elif test "x$enable_aot" = "xyes"; then
54167    ENABLE_AOT="true"
54168  elif test "x$enable_aot" = "xno"; then
54169    ENABLE_AOT="false"
54170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54171$as_echo_n "checking if aot should be enabled... " >&6; }
54172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54173$as_echo "no, forced" >&6; }
54174  else
54175    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54176  fi
54177
54178  if test "x$ENABLE_AOT" = "xtrue"; then
54179    # Only enable AOT on X64 platforms.
54180    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54181      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
54182        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
54183          ENABLE_AOT="true"
54184        else
54185          ENABLE_AOT="false"
54186          if test "x$enable_aot" = "xyes"; then
54187            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54188          fi
54189        fi
54190      else
54191        ENABLE_AOT="false"
54192        if test "x$enable_aot" = "xyes"; then
54193          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54194        fi
54195      fi
54196    else
54197      ENABLE_AOT="false"
54198      if test "x$enable_aot" = "xyes"; then
54199        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54200      fi
54201    fi
54202  fi
54203
54204
54205
54206
54207  # Check whether --enable-hotspot-gtest was given.
54208if test "${enable_hotspot_gtest+set}" = set; then :
54209  enableval=$enable_hotspot_gtest;
54210fi
54211
54212
54213  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54214    GTEST_DIR_EXISTS="true"
54215  else
54216    GTEST_DIR_EXISTS="false"
54217  fi
54218
54219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54220$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54221  if test "x$enable_hotspot_gtest" = "xyes"; then
54222    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54224$as_echo "yes, forced" >&6; }
54225      BUILD_GTEST="true"
54226    else
54227      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54228    fi
54229  elif test "x$enable_hotspot_gtest" = "xno"; then
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54231$as_echo "no, forced" >&6; }
54232    BUILD_GTEST="false"
54233  elif test "x$enable_hotspot_gtest" = "x"; then
54234    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54236$as_echo "yes" >&6; }
54237      BUILD_GTEST="true"
54238    else
54239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54240$as_echo "no" >&6; }
54241      BUILD_GTEST="false"
54242    fi
54243  else
54244    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54245  fi
54246
54247
54248
54249
54250###############################################################################
54251#
54252# Check dependencies for external and internal libraries.
54253#
54254###############################################################################
54255
54256# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54257
54258  # When using cygwin or msys, we need a wrapper binary that renames
54259  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54260  # @files and rewrites these too! This wrapper binary is
54261  # called fixpath.
54262  FIXPATH=
54263  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54265$as_echo_n "checking if fixpath can be created... " >&6; }
54266    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54267    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54268    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54269    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54270      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54271      FIXPATH="$FIXPATH_BIN -c"
54272    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54273      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54274      # @ was chosen as separator to minimize risk of other tools messing around with it
54275      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54276          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54277      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54278      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54279    fi
54280    FIXPATH_SRC_W="$FIXPATH_SRC"
54281    FIXPATH_BIN_W="$FIXPATH_BIN"
54282
54283  unix_path="$FIXPATH_SRC_W"
54284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54285    windows_path=`$CYGPATH -m "$unix_path"`
54286    FIXPATH_SRC_W="$windows_path"
54287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54288    windows_path=`cmd //c echo $unix_path`
54289    FIXPATH_SRC_W="$windows_path"
54290  fi
54291
54292
54293  unix_path="$FIXPATH_BIN_W"
54294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54295    windows_path=`$CYGPATH -m "$unix_path"`
54296    FIXPATH_BIN_W="$windows_path"
54297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54298    windows_path=`cmd //c echo $unix_path`
54299    FIXPATH_BIN_W="$windows_path"
54300  fi
54301
54302    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54303    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54304    cd $FIXPATH_DIR
54305    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54306    cd $CURDIR
54307
54308    if test ! -x $FIXPATH_BIN; then
54309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54310$as_echo "no" >&6; }
54311      cat $FIXPATH_DIR/fixpath1.log
54312      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54313    fi
54314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54315$as_echo "yes" >&6; }
54316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54317$as_echo_n "checking if fixpath.exe works... " >&6; }
54318    cd $FIXPATH_DIR
54319    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54320        > $FIXPATH_DIR/fixpath2.log 2>&1
54321    cd $CURDIR
54322    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54324$as_echo "no" >&6; }
54325      cat $FIXPATH_DIR/fixpath2.log
54326      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54327    fi
54328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54329$as_echo "yes" >&6; }
54330
54331    FIXPATH_DETACH_FLAG="--detach"
54332  fi
54333
54334
54335
54336
54337
54338
54339  # Check if X11 is needed
54340  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54341    # No X11 support on windows or macosx
54342    NEEDS_LIB_X11=false
54343  else
54344    # All other instances need X11, even if building headless only, libawt still
54345    # needs X11 headers.
54346    NEEDS_LIB_X11=true
54347  fi
54348
54349  # Check if cups is needed
54350  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54351    # Windows have a separate print system
54352    NEEDS_LIB_CUPS=false
54353  else
54354    NEEDS_LIB_CUPS=true
54355  fi
54356
54357  # A custom hook may have set this already
54358  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54359    NEEDS_LIB_FREETYPE=true
54360  fi
54361
54362  # Check if alsa is needed
54363  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54364    NEEDS_LIB_ALSA=true
54365  else
54366    NEEDS_LIB_ALSA=false
54367  fi
54368
54369  # Check if ffi is needed
54370  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54371    NEEDS_LIB_FFI=true
54372  else
54373    NEEDS_LIB_FFI=false
54374  fi
54375
54376
54377  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54378  # dynamic build is configured on command line.
54379
54380# Check whether --with-stdc++lib was given.
54381if test "${with_stdc__lib+set}" = set; then :
54382  withval=$with_stdc__lib;
54383        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54384                && test "x$with_stdc__lib" != xdefault; then
54385          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54386        fi
54387
54388else
54389  with_stdc__lib=default
54390
54391fi
54392
54393
54394  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54395    # Test if stdc++ can be linked statically.
54396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54397$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54398    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54399    ac_ext=cpp
54400ac_cpp='$CXXCPP $CPPFLAGS'
54401ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54402ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54403ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54404
54405    OLD_LIBS="$LIBS"
54406    LIBS="$STATIC_STDCXX_FLAGS"
54407    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54408/* end confdefs.h.  */
54409
54410int
54411main ()
54412{
54413return 0;
54414  ;
54415  return 0;
54416}
54417_ACEOF
54418if ac_fn_cxx_try_link "$LINENO"; then :
54419  has_static_libstdcxx=yes
54420else
54421  has_static_libstdcxx=no
54422fi
54423rm -f core conftest.err conftest.$ac_objext \
54424    conftest$ac_exeext conftest.$ac_ext
54425    LIBS="$OLD_LIBS"
54426    ac_ext=cpp
54427ac_cpp='$CXXCPP $CPPFLAGS'
54428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54431
54432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54433$as_echo "$has_static_libstdcxx" >&6; }
54434
54435    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54436      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54437    fi
54438
54439    # If dynamic was requested, it's available since it would fail above otherwise.
54440    # If dynamic wasn't requested, go with static unless it isn't available.
54441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54442$as_echo_n "checking how to link with libstdc++... " >&6; }
54443    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54444        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54446$as_echo "dynamic" >&6; }
54447    else
54448      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54449      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54450      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54451      # just use the same setting as for the TARGET toolchain.
54452      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54454$as_echo "static" >&6; }
54455    fi
54456  fi
54457
54458  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54459  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54460    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54461  fi
54462
54463
54464
54465  # Setup Windows runtime dlls
54466  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54467
54468
54469# Check whether --with-msvcr-dll was given.
54470if test "${with_msvcr_dll+set}" = set; then :
54471  withval=$with_msvcr_dll;
54472fi
54473
54474
54475  if test "x$with_msvcr_dll" != x; then
54476    # If given explicitly by user, do not probe. If not present, fail directly.
54477
54478  DLL_NAME="$MSVCR_NAME"
54479  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54480  METHOD="--with-msvcr-dll"
54481  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54483$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54484
54485    # Need to check if the found msvcr is correct architecture
54486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54487$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54488    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54490      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54491      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54492      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54493        CORRECT_MSVCR_ARCH="PE32 executable"
54494      else
54495        CORRECT_MSVCR_ARCH="PE32+ executable"
54496      fi
54497    else
54498      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54499        CORRECT_MSVCR_ARCH=386
54500      else
54501        CORRECT_MSVCR_ARCH=x86-64
54502      fi
54503    fi
54504    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54506$as_echo "ok" >&6; }
54507      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54508
54509  # Only process if variable expands to non-empty
54510
54511  if test "x$MSVC_DLL" != x; then
54512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54513
54514  # Input might be given as Windows format, start by converting to
54515  # unix format.
54516  path="$MSVC_DLL"
54517  new_path=`$CYGPATH -u "$path"`
54518
54519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54522  # "foo.exe" is OK but "foo" is an error.
54523  #
54524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54525  # It is also a way to make sure we got the proper file name for the real test later on.
54526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54527  if test "x$test_shortpath" = x; then
54528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54529$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54530    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54531  fi
54532
54533  # Call helper function which possibly converts this using DOS-style short mode.
54534  # If so, the updated path is stored in $new_path.
54535
54536  input_path="$new_path"
54537  # Check if we need to convert this using DOS-style short mode. If the path
54538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54539  # take no chances and rewrite it.
54540  # Note: m4 eats our [], so we need to use [ and ] instead.
54541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54542  if test "x$has_forbidden_chars" != x; then
54543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54547      # Going to short mode and back again did indeed matter. Since short mode is
54548      # case insensitive, let's make it lowercase to improve readability.
54549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54550      # Now convert it back to Unix-style (cygpath)
54551      input_path=`$CYGPATH -u "$shortmode_path"`
54552      new_path="$input_path"
54553    fi
54554  fi
54555
54556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54557  if test "x$test_cygdrive_prefix" = x; then
54558    # As a simple fix, exclude /usr/bin since it's not a real path.
54559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54561      # a path prefixed by /cygdrive for fixpath to work.
54562      new_path="$CYGWIN_ROOT_PATH$input_path"
54563    fi
54564  fi
54565
54566
54567  if test "x$path" != "x$new_path"; then
54568    MSVC_DLL="$new_path"
54569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54571  fi
54572
54573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54574
54575  path="$MSVC_DLL"
54576  has_colon=`$ECHO $path | $GREP ^.:`
54577  new_path="$path"
54578  if test "x$has_colon" = x; then
54579    # Not in mixed or Windows style, start by that.
54580    new_path=`cmd //c echo $path`
54581  fi
54582
54583
54584  input_path="$new_path"
54585  # Check if we need to convert this using DOS-style short mode. If the path
54586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54587  # take no chances and rewrite it.
54588  # Note: m4 eats our [], so we need to use [ and ] instead.
54589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54590  if test "x$has_forbidden_chars" != x; then
54591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54593  fi
54594
54595
54596  windows_path="$new_path"
54597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54598    unix_path=`$CYGPATH -u "$windows_path"`
54599    new_path="$unix_path"
54600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54602    new_path="$unix_path"
54603  fi
54604
54605  if test "x$path" != "x$new_path"; then
54606    MSVC_DLL="$new_path"
54607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54608$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54609  fi
54610
54611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54613
54614    else
54615      # We're on a unix platform. Hooray! :)
54616      path="$MSVC_DLL"
54617      has_space=`$ECHO "$path" | $GREP " "`
54618      if test "x$has_space" != x; then
54619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54620$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54622      fi
54623
54624      # Use eval to expand a potential ~
54625      eval path="$path"
54626      if test ! -f "$path" && test ! -d "$path"; then
54627        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54628      fi
54629
54630      if test -d "$path"; then
54631        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54632      else
54633        dir="`$DIRNAME "$path"`"
54634        base="`$BASENAME "$path"`"
54635        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54636      fi
54637    fi
54638  fi
54639
54640      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54641$as_echo_n "checking for $DLL_NAME... " >&6; }
54642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54643$as_echo "$MSVC_DLL" >&6; }
54644    else
54645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54646$as_echo "incorrect, ignoring" >&6; }
54647      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54648$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54649    fi
54650  fi
54651
54652    if test "x$MSVC_DLL" = x; then
54653      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54654    fi
54655    MSVCR_DLL="$MSVC_DLL"
54656  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54657
54658  DLL_NAME="$MSVCR_NAME"
54659  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54660  METHOD="devkit"
54661  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54662    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54663$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54664
54665    # Need to check if the found msvcr is correct architecture
54666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54667$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54668    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54670      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54671      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54672      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54673        CORRECT_MSVCR_ARCH="PE32 executable"
54674      else
54675        CORRECT_MSVCR_ARCH="PE32+ executable"
54676      fi
54677    else
54678      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54679        CORRECT_MSVCR_ARCH=386
54680      else
54681        CORRECT_MSVCR_ARCH=x86-64
54682      fi
54683    fi
54684    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54686$as_echo "ok" >&6; }
54687      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54688
54689  # Only process if variable expands to non-empty
54690
54691  if test "x$MSVC_DLL" != x; then
54692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54693
54694  # Input might be given as Windows format, start by converting to
54695  # unix format.
54696  path="$MSVC_DLL"
54697  new_path=`$CYGPATH -u "$path"`
54698
54699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54702  # "foo.exe" is OK but "foo" is an error.
54703  #
54704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54705  # It is also a way to make sure we got the proper file name for the real test later on.
54706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54707  if test "x$test_shortpath" = x; then
54708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54709$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54710    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54711  fi
54712
54713  # Call helper function which possibly converts this using DOS-style short mode.
54714  # If so, the updated path is stored in $new_path.
54715
54716  input_path="$new_path"
54717  # Check if we need to convert this using DOS-style short mode. If the path
54718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54719  # take no chances and rewrite it.
54720  # Note: m4 eats our [], so we need to use [ and ] instead.
54721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54722  if test "x$has_forbidden_chars" != x; then
54723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54727      # Going to short mode and back again did indeed matter. Since short mode is
54728      # case insensitive, let's make it lowercase to improve readability.
54729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54730      # Now convert it back to Unix-style (cygpath)
54731      input_path=`$CYGPATH -u "$shortmode_path"`
54732      new_path="$input_path"
54733    fi
54734  fi
54735
54736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54737  if test "x$test_cygdrive_prefix" = x; then
54738    # As a simple fix, exclude /usr/bin since it's not a real path.
54739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54741      # a path prefixed by /cygdrive for fixpath to work.
54742      new_path="$CYGWIN_ROOT_PATH$input_path"
54743    fi
54744  fi
54745
54746
54747  if test "x$path" != "x$new_path"; then
54748    MSVC_DLL="$new_path"
54749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54750$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54751  fi
54752
54753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54754
54755  path="$MSVC_DLL"
54756  has_colon=`$ECHO $path | $GREP ^.:`
54757  new_path="$path"
54758  if test "x$has_colon" = x; then
54759    # Not in mixed or Windows style, start by that.
54760    new_path=`cmd //c echo $path`
54761  fi
54762
54763
54764  input_path="$new_path"
54765  # Check if we need to convert this using DOS-style short mode. If the path
54766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54767  # take no chances and rewrite it.
54768  # Note: m4 eats our [], so we need to use [ and ] instead.
54769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54770  if test "x$has_forbidden_chars" != x; then
54771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54773  fi
54774
54775
54776  windows_path="$new_path"
54777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54778    unix_path=`$CYGPATH -u "$windows_path"`
54779    new_path="$unix_path"
54780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54782    new_path="$unix_path"
54783  fi
54784
54785  if test "x$path" != "x$new_path"; then
54786    MSVC_DLL="$new_path"
54787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54788$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54789  fi
54790
54791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54793
54794    else
54795      # We're on a unix platform. Hooray! :)
54796      path="$MSVC_DLL"
54797      has_space=`$ECHO "$path" | $GREP " "`
54798      if test "x$has_space" != x; then
54799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54800$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54802      fi
54803
54804      # Use eval to expand a potential ~
54805      eval path="$path"
54806      if test ! -f "$path" && test ! -d "$path"; then
54807        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54808      fi
54809
54810      if test -d "$path"; then
54811        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54812      else
54813        dir="`$DIRNAME "$path"`"
54814        base="`$BASENAME "$path"`"
54815        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54816      fi
54817    fi
54818  fi
54819
54820      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54821$as_echo_n "checking for $DLL_NAME... " >&6; }
54822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54823$as_echo "$MSVC_DLL" >&6; }
54824    else
54825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54826$as_echo "incorrect, ignoring" >&6; }
54827      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54828$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54829    fi
54830  fi
54831
54832    if test "x$MSVC_DLL" = x; then
54833      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54834    fi
54835    MSVCR_DLL="$MSVC_DLL"
54836  else
54837
54838  DLL_NAME="${MSVCR_NAME}"
54839  MSVC_DLL=
54840
54841  if test "x$MSVC_DLL" = x; then
54842    # Probe: Using well-known location from Visual Studio 10.0
54843    if test "x$VCINSTALLDIR" != x; then
54844      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54845
54846  windows_path="$CYGWIN_VC_INSTALL_DIR"
54847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54848    unix_path=`$CYGPATH -u "$windows_path"`
54849    CYGWIN_VC_INSTALL_DIR="$unix_path"
54850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54852    CYGWIN_VC_INSTALL_DIR="$unix_path"
54853  fi
54854
54855      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54856        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54857      else
54858        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54859      fi
54860      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54861
54862  DLL_NAME="$DLL_NAME"
54863  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54864  METHOD="well-known location in VCINSTALLDIR"
54865  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54867$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54868
54869    # Need to check if the found msvcr is correct architecture
54870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54871$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54872    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54874      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54875      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54877        CORRECT_MSVCR_ARCH="PE32 executable"
54878      else
54879        CORRECT_MSVCR_ARCH="PE32+ executable"
54880      fi
54881    else
54882      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54883        CORRECT_MSVCR_ARCH=386
54884      else
54885        CORRECT_MSVCR_ARCH=x86-64
54886      fi
54887    fi
54888    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54890$as_echo "ok" >&6; }
54891      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54892
54893  # Only process if variable expands to non-empty
54894
54895  if test "x$MSVC_DLL" != x; then
54896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54897
54898  # Input might be given as Windows format, start by converting to
54899  # unix format.
54900  path="$MSVC_DLL"
54901  new_path=`$CYGPATH -u "$path"`
54902
54903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54906  # "foo.exe" is OK but "foo" is an error.
54907  #
54908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54909  # It is also a way to make sure we got the proper file name for the real test later on.
54910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54911  if test "x$test_shortpath" = x; then
54912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54913$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54914    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54915  fi
54916
54917  # Call helper function which possibly converts this using DOS-style short mode.
54918  # If so, the updated path is stored in $new_path.
54919
54920  input_path="$new_path"
54921  # Check if we need to convert this using DOS-style short mode. If the path
54922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54923  # take no chances and rewrite it.
54924  # Note: m4 eats our [], so we need to use [ and ] instead.
54925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54926  if test "x$has_forbidden_chars" != x; then
54927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54931      # Going to short mode and back again did indeed matter. Since short mode is
54932      # case insensitive, let's make it lowercase to improve readability.
54933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54934      # Now convert it back to Unix-style (cygpath)
54935      input_path=`$CYGPATH -u "$shortmode_path"`
54936      new_path="$input_path"
54937    fi
54938  fi
54939
54940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54941  if test "x$test_cygdrive_prefix" = x; then
54942    # As a simple fix, exclude /usr/bin since it's not a real path.
54943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54945      # a path prefixed by /cygdrive for fixpath to work.
54946      new_path="$CYGWIN_ROOT_PATH$input_path"
54947    fi
54948  fi
54949
54950
54951  if test "x$path" != "x$new_path"; then
54952    MSVC_DLL="$new_path"
54953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54954$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54955  fi
54956
54957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54958
54959  path="$MSVC_DLL"
54960  has_colon=`$ECHO $path | $GREP ^.:`
54961  new_path="$path"
54962  if test "x$has_colon" = x; then
54963    # Not in mixed or Windows style, start by that.
54964    new_path=`cmd //c echo $path`
54965  fi
54966
54967
54968  input_path="$new_path"
54969  # Check if we need to convert this using DOS-style short mode. If the path
54970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54971  # take no chances and rewrite it.
54972  # Note: m4 eats our [], so we need to use [ and ] instead.
54973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54974  if test "x$has_forbidden_chars" != x; then
54975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54977  fi
54978
54979
54980  windows_path="$new_path"
54981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54982    unix_path=`$CYGPATH -u "$windows_path"`
54983    new_path="$unix_path"
54984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54986    new_path="$unix_path"
54987  fi
54988
54989  if test "x$path" != "x$new_path"; then
54990    MSVC_DLL="$new_path"
54991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54992$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54993  fi
54994
54995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54997
54998    else
54999      # We're on a unix platform. Hooray! :)
55000      path="$MSVC_DLL"
55001      has_space=`$ECHO "$path" | $GREP " "`
55002      if test "x$has_space" != x; then
55003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55004$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55006      fi
55007
55008      # Use eval to expand a potential ~
55009      eval path="$path"
55010      if test ! -f "$path" && test ! -d "$path"; then
55011        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55012      fi
55013
55014      if test -d "$path"; then
55015        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55016      else
55017        dir="`$DIRNAME "$path"`"
55018        base="`$BASENAME "$path"`"
55019        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55020      fi
55021    fi
55022  fi
55023
55024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55025$as_echo_n "checking for $DLL_NAME... " >&6; }
55026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55027$as_echo "$MSVC_DLL" >&6; }
55028    else
55029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55030$as_echo "incorrect, ignoring" >&6; }
55031      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55032$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55033    fi
55034  fi
55035
55036    fi
55037  fi
55038
55039  if test "x$MSVC_DLL" = x; then
55040    # Probe: Check in the Boot JDK directory.
55041    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55042
55043  DLL_NAME="$DLL_NAME"
55044  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55045  METHOD="well-known location in Boot JDK"
55046  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55047    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55048$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55049
55050    # Need to check if the found msvcr is correct architecture
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55052$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55053    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55055      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55056      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55057      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55058        CORRECT_MSVCR_ARCH="PE32 executable"
55059      else
55060        CORRECT_MSVCR_ARCH="PE32+ executable"
55061      fi
55062    else
55063      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55064        CORRECT_MSVCR_ARCH=386
55065      else
55066        CORRECT_MSVCR_ARCH=x86-64
55067      fi
55068    fi
55069    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55071$as_echo "ok" >&6; }
55072      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55073
55074  # Only process if variable expands to non-empty
55075
55076  if test "x$MSVC_DLL" != x; then
55077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55078
55079  # Input might be given as Windows format, start by converting to
55080  # unix format.
55081  path="$MSVC_DLL"
55082  new_path=`$CYGPATH -u "$path"`
55083
55084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55087  # "foo.exe" is OK but "foo" is an error.
55088  #
55089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55090  # It is also a way to make sure we got the proper file name for the real test later on.
55091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55092  if test "x$test_shortpath" = x; then
55093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55094$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55095    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55096  fi
55097
55098  # Call helper function which possibly converts this using DOS-style short mode.
55099  # If so, the updated path is stored in $new_path.
55100
55101  input_path="$new_path"
55102  # Check if we need to convert this using DOS-style short mode. If the path
55103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55104  # take no chances and rewrite it.
55105  # Note: m4 eats our [], so we need to use [ and ] instead.
55106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55107  if test "x$has_forbidden_chars" != x; then
55108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55112      # Going to short mode and back again did indeed matter. Since short mode is
55113      # case insensitive, let's make it lowercase to improve readability.
55114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55115      # Now convert it back to Unix-style (cygpath)
55116      input_path=`$CYGPATH -u "$shortmode_path"`
55117      new_path="$input_path"
55118    fi
55119  fi
55120
55121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55122  if test "x$test_cygdrive_prefix" = x; then
55123    # As a simple fix, exclude /usr/bin since it's not a real path.
55124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55126      # a path prefixed by /cygdrive for fixpath to work.
55127      new_path="$CYGWIN_ROOT_PATH$input_path"
55128    fi
55129  fi
55130
55131
55132  if test "x$path" != "x$new_path"; then
55133    MSVC_DLL="$new_path"
55134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55135$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55136  fi
55137
55138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55139
55140  path="$MSVC_DLL"
55141  has_colon=`$ECHO $path | $GREP ^.:`
55142  new_path="$path"
55143  if test "x$has_colon" = x; then
55144    # Not in mixed or Windows style, start by that.
55145    new_path=`cmd //c echo $path`
55146  fi
55147
55148
55149  input_path="$new_path"
55150  # Check if we need to convert this using DOS-style short mode. If the path
55151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55152  # take no chances and rewrite it.
55153  # Note: m4 eats our [], so we need to use [ and ] instead.
55154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55155  if test "x$has_forbidden_chars" != x; then
55156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55158  fi
55159
55160
55161  windows_path="$new_path"
55162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55163    unix_path=`$CYGPATH -u "$windows_path"`
55164    new_path="$unix_path"
55165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55167    new_path="$unix_path"
55168  fi
55169
55170  if test "x$path" != "x$new_path"; then
55171    MSVC_DLL="$new_path"
55172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55173$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55174  fi
55175
55176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55178
55179    else
55180      # We're on a unix platform. Hooray! :)
55181      path="$MSVC_DLL"
55182      has_space=`$ECHO "$path" | $GREP " "`
55183      if test "x$has_space" != x; then
55184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55185$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55187      fi
55188
55189      # Use eval to expand a potential ~
55190      eval path="$path"
55191      if test ! -f "$path" && test ! -d "$path"; then
55192        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55193      fi
55194
55195      if test -d "$path"; then
55196        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55197      else
55198        dir="`$DIRNAME "$path"`"
55199        base="`$BASENAME "$path"`"
55200        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55201      fi
55202    fi
55203  fi
55204
55205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55206$as_echo_n "checking for $DLL_NAME... " >&6; }
55207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55208$as_echo "$MSVC_DLL" >&6; }
55209    else
55210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55211$as_echo "incorrect, ignoring" >&6; }
55212      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55213$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55214    fi
55215  fi
55216
55217  fi
55218
55219  if test "x$MSVC_DLL" = x; then
55220    # Probe: Look in the Windows system32 directory
55221    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55222
55223  windows_path="$CYGWIN_SYSTEMROOT"
55224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55225    unix_path=`$CYGPATH -u "$windows_path"`
55226    CYGWIN_SYSTEMROOT="$unix_path"
55227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55229    CYGWIN_SYSTEMROOT="$unix_path"
55230  fi
55231
55232    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55233
55234  DLL_NAME="$DLL_NAME"
55235  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55236  METHOD="well-known location in SYSTEMROOT"
55237  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55238    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55239$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55240
55241    # Need to check if the found msvcr is correct architecture
55242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55243$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55244    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55246      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55247      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55248      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55249        CORRECT_MSVCR_ARCH="PE32 executable"
55250      else
55251        CORRECT_MSVCR_ARCH="PE32+ executable"
55252      fi
55253    else
55254      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55255        CORRECT_MSVCR_ARCH=386
55256      else
55257        CORRECT_MSVCR_ARCH=x86-64
55258      fi
55259    fi
55260    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55262$as_echo "ok" >&6; }
55263      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55264
55265  # Only process if variable expands to non-empty
55266
55267  if test "x$MSVC_DLL" != x; then
55268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55269
55270  # Input might be given as Windows format, start by converting to
55271  # unix format.
55272  path="$MSVC_DLL"
55273  new_path=`$CYGPATH -u "$path"`
55274
55275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55278  # "foo.exe" is OK but "foo" is an error.
55279  #
55280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55281  # It is also a way to make sure we got the proper file name for the real test later on.
55282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55283  if test "x$test_shortpath" = x; then
55284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55286    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55287  fi
55288
55289  # Call helper function which possibly converts this using DOS-style short mode.
55290  # If so, the updated path is stored in $new_path.
55291
55292  input_path="$new_path"
55293  # Check if we need to convert this using DOS-style short mode. If the path
55294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55295  # take no chances and rewrite it.
55296  # Note: m4 eats our [], so we need to use [ and ] instead.
55297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55298  if test "x$has_forbidden_chars" != x; then
55299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55303      # Going to short mode and back again did indeed matter. Since short mode is
55304      # case insensitive, let's make it lowercase to improve readability.
55305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55306      # Now convert it back to Unix-style (cygpath)
55307      input_path=`$CYGPATH -u "$shortmode_path"`
55308      new_path="$input_path"
55309    fi
55310  fi
55311
55312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55313  if test "x$test_cygdrive_prefix" = x; then
55314    # As a simple fix, exclude /usr/bin since it's not a real path.
55315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55317      # a path prefixed by /cygdrive for fixpath to work.
55318      new_path="$CYGWIN_ROOT_PATH$input_path"
55319    fi
55320  fi
55321
55322
55323  if test "x$path" != "x$new_path"; then
55324    MSVC_DLL="$new_path"
55325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55326$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55327  fi
55328
55329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55330
55331  path="$MSVC_DLL"
55332  has_colon=`$ECHO $path | $GREP ^.:`
55333  new_path="$path"
55334  if test "x$has_colon" = x; then
55335    # Not in mixed or Windows style, start by that.
55336    new_path=`cmd //c echo $path`
55337  fi
55338
55339
55340  input_path="$new_path"
55341  # Check if we need to convert this using DOS-style short mode. If the path
55342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55343  # take no chances and rewrite it.
55344  # Note: m4 eats our [], so we need to use [ and ] instead.
55345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55346  if test "x$has_forbidden_chars" != x; then
55347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55349  fi
55350
55351
55352  windows_path="$new_path"
55353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55354    unix_path=`$CYGPATH -u "$windows_path"`
55355    new_path="$unix_path"
55356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55358    new_path="$unix_path"
55359  fi
55360
55361  if test "x$path" != "x$new_path"; then
55362    MSVC_DLL="$new_path"
55363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55364$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55365  fi
55366
55367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55369
55370    else
55371      # We're on a unix platform. Hooray! :)
55372      path="$MSVC_DLL"
55373      has_space=`$ECHO "$path" | $GREP " "`
55374      if test "x$has_space" != x; then
55375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55376$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55378      fi
55379
55380      # Use eval to expand a potential ~
55381      eval path="$path"
55382      if test ! -f "$path" && test ! -d "$path"; then
55383        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55384      fi
55385
55386      if test -d "$path"; then
55387        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55388      else
55389        dir="`$DIRNAME "$path"`"
55390        base="`$BASENAME "$path"`"
55391        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55392      fi
55393    fi
55394  fi
55395
55396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55397$as_echo_n "checking for $DLL_NAME... " >&6; }
55398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55399$as_echo "$MSVC_DLL" >&6; }
55400    else
55401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55402$as_echo "incorrect, ignoring" >&6; }
55403      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55404$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55405    fi
55406  fi
55407
55408  fi
55409
55410  if test "x$MSVC_DLL" = x; then
55411    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55412    if test "x$VS100COMNTOOLS" != x; then
55413      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55414
55415  windows_path="$CYGWIN_VS_TOOLS_DIR"
55416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55417    unix_path=`$CYGPATH -u "$windows_path"`
55418    CYGWIN_VS_TOOLS_DIR="$unix_path"
55419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55421    CYGWIN_VS_TOOLS_DIR="$unix_path"
55422  fi
55423
55424      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55425        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55426	    | $GREP -i /x64/ | $HEAD --lines 1`
55427      else
55428        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55429	    | $GREP -i /x86/ | $HEAD --lines 1`
55430      fi
55431
55432  DLL_NAME="$DLL_NAME"
55433  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55434  METHOD="search of VS100COMNTOOLS"
55435  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55437$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55438
55439    # Need to check if the found msvcr is correct architecture
55440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55441$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55442    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55444      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55445      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55447        CORRECT_MSVCR_ARCH="PE32 executable"
55448      else
55449        CORRECT_MSVCR_ARCH="PE32+ executable"
55450      fi
55451    else
55452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55453        CORRECT_MSVCR_ARCH=386
55454      else
55455        CORRECT_MSVCR_ARCH=x86-64
55456      fi
55457    fi
55458    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55460$as_echo "ok" >&6; }
55461      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55462
55463  # Only process if variable expands to non-empty
55464
55465  if test "x$MSVC_DLL" != x; then
55466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55467
55468  # Input might be given as Windows format, start by converting to
55469  # unix format.
55470  path="$MSVC_DLL"
55471  new_path=`$CYGPATH -u "$path"`
55472
55473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55476  # "foo.exe" is OK but "foo" is an error.
55477  #
55478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55479  # It is also a way to make sure we got the proper file name for the real test later on.
55480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55481  if test "x$test_shortpath" = x; then
55482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55484    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55485  fi
55486
55487  # Call helper function which possibly converts this using DOS-style short mode.
55488  # If so, the updated path is stored in $new_path.
55489
55490  input_path="$new_path"
55491  # Check if we need to convert this using DOS-style short mode. If the path
55492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55493  # take no chances and rewrite it.
55494  # Note: m4 eats our [], so we need to use [ and ] instead.
55495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55496  if test "x$has_forbidden_chars" != x; then
55497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55501      # Going to short mode and back again did indeed matter. Since short mode is
55502      # case insensitive, let's make it lowercase to improve readability.
55503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55504      # Now convert it back to Unix-style (cygpath)
55505      input_path=`$CYGPATH -u "$shortmode_path"`
55506      new_path="$input_path"
55507    fi
55508  fi
55509
55510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55511  if test "x$test_cygdrive_prefix" = x; then
55512    # As a simple fix, exclude /usr/bin since it's not a real path.
55513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55515      # a path prefixed by /cygdrive for fixpath to work.
55516      new_path="$CYGWIN_ROOT_PATH$input_path"
55517    fi
55518  fi
55519
55520
55521  if test "x$path" != "x$new_path"; then
55522    MSVC_DLL="$new_path"
55523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55524$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55525  fi
55526
55527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55528
55529  path="$MSVC_DLL"
55530  has_colon=`$ECHO $path | $GREP ^.:`
55531  new_path="$path"
55532  if test "x$has_colon" = x; then
55533    # Not in mixed or Windows style, start by that.
55534    new_path=`cmd //c echo $path`
55535  fi
55536
55537
55538  input_path="$new_path"
55539  # Check if we need to convert this using DOS-style short mode. If the path
55540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55541  # take no chances and rewrite it.
55542  # Note: m4 eats our [], so we need to use [ and ] instead.
55543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55544  if test "x$has_forbidden_chars" != x; then
55545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55547  fi
55548
55549
55550  windows_path="$new_path"
55551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55552    unix_path=`$CYGPATH -u "$windows_path"`
55553    new_path="$unix_path"
55554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55556    new_path="$unix_path"
55557  fi
55558
55559  if test "x$path" != "x$new_path"; then
55560    MSVC_DLL="$new_path"
55561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55562$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55563  fi
55564
55565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55567
55568    else
55569      # We're on a unix platform. Hooray! :)
55570      path="$MSVC_DLL"
55571      has_space=`$ECHO "$path" | $GREP " "`
55572      if test "x$has_space" != x; then
55573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55574$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55576      fi
55577
55578      # Use eval to expand a potential ~
55579      eval path="$path"
55580      if test ! -f "$path" && test ! -d "$path"; then
55581        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55582      fi
55583
55584      if test -d "$path"; then
55585        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55586      else
55587        dir="`$DIRNAME "$path"`"
55588        base="`$BASENAME "$path"`"
55589        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55590      fi
55591    fi
55592  fi
55593
55594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55595$as_echo_n "checking for $DLL_NAME... " >&6; }
55596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55597$as_echo "$MSVC_DLL" >&6; }
55598    else
55599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55600$as_echo "incorrect, ignoring" >&6; }
55601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55602$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55603    fi
55604  fi
55605
55606    fi
55607  fi
55608
55609  if test "x$MSVC_DLL" = x; then
55610    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55611    # (This was the original behaviour; kept since it might turn something up)
55612    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55613      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55614        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55615	    | $GREP x64 | $HEAD --lines 1`
55616      else
55617        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55618	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55619        if test "x$POSSIBLE_MSVC_DLL" = x; then
55620          # We're grasping at straws now...
55621          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55622	      | $HEAD --lines 1`
55623        fi
55624      fi
55625
55626
55627  DLL_NAME="$DLL_NAME"
55628  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55629  METHOD="search of VCINSTALLDIR"
55630  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55632$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55633
55634    # Need to check if the found msvcr is correct architecture
55635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55636$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55637    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55639      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55640      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55642        CORRECT_MSVCR_ARCH="PE32 executable"
55643      else
55644        CORRECT_MSVCR_ARCH="PE32+ executable"
55645      fi
55646    else
55647      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55648        CORRECT_MSVCR_ARCH=386
55649      else
55650        CORRECT_MSVCR_ARCH=x86-64
55651      fi
55652    fi
55653    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55655$as_echo "ok" >&6; }
55656      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55657
55658  # Only process if variable expands to non-empty
55659
55660  if test "x$MSVC_DLL" != x; then
55661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55662
55663  # Input might be given as Windows format, start by converting to
55664  # unix format.
55665  path="$MSVC_DLL"
55666  new_path=`$CYGPATH -u "$path"`
55667
55668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55671  # "foo.exe" is OK but "foo" is an error.
55672  #
55673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55674  # It is also a way to make sure we got the proper file name for the real test later on.
55675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55676  if test "x$test_shortpath" = x; then
55677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55678$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55679    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55680  fi
55681
55682  # Call helper function which possibly converts this using DOS-style short mode.
55683  # If so, the updated path is stored in $new_path.
55684
55685  input_path="$new_path"
55686  # Check if we need to convert this using DOS-style short mode. If the path
55687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55688  # take no chances and rewrite it.
55689  # Note: m4 eats our [], so we need to use [ and ] instead.
55690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55691  if test "x$has_forbidden_chars" != x; then
55692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55696      # Going to short mode and back again did indeed matter. Since short mode is
55697      # case insensitive, let's make it lowercase to improve readability.
55698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55699      # Now convert it back to Unix-style (cygpath)
55700      input_path=`$CYGPATH -u "$shortmode_path"`
55701      new_path="$input_path"
55702    fi
55703  fi
55704
55705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55706  if test "x$test_cygdrive_prefix" = x; then
55707    # As a simple fix, exclude /usr/bin since it's not a real path.
55708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55710      # a path prefixed by /cygdrive for fixpath to work.
55711      new_path="$CYGWIN_ROOT_PATH$input_path"
55712    fi
55713  fi
55714
55715
55716  if test "x$path" != "x$new_path"; then
55717    MSVC_DLL="$new_path"
55718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55719$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55720  fi
55721
55722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55723
55724  path="$MSVC_DLL"
55725  has_colon=`$ECHO $path | $GREP ^.:`
55726  new_path="$path"
55727  if test "x$has_colon" = x; then
55728    # Not in mixed or Windows style, start by that.
55729    new_path=`cmd //c echo $path`
55730  fi
55731
55732
55733  input_path="$new_path"
55734  # Check if we need to convert this using DOS-style short mode. If the path
55735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55736  # take no chances and rewrite it.
55737  # Note: m4 eats our [], so we need to use [ and ] instead.
55738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55739  if test "x$has_forbidden_chars" != x; then
55740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55742  fi
55743
55744
55745  windows_path="$new_path"
55746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55747    unix_path=`$CYGPATH -u "$windows_path"`
55748    new_path="$unix_path"
55749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55751    new_path="$unix_path"
55752  fi
55753
55754  if test "x$path" != "x$new_path"; then
55755    MSVC_DLL="$new_path"
55756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55757$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55758  fi
55759
55760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55762
55763    else
55764      # We're on a unix platform. Hooray! :)
55765      path="$MSVC_DLL"
55766      has_space=`$ECHO "$path" | $GREP " "`
55767      if test "x$has_space" != x; then
55768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55769$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55771      fi
55772
55773      # Use eval to expand a potential ~
55774      eval path="$path"
55775      if test ! -f "$path" && test ! -d "$path"; then
55776        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55777      fi
55778
55779      if test -d "$path"; then
55780        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55781      else
55782        dir="`$DIRNAME "$path"`"
55783        base="`$BASENAME "$path"`"
55784        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55785      fi
55786    fi
55787  fi
55788
55789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55790$as_echo_n "checking for $DLL_NAME... " >&6; }
55791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55792$as_echo "$MSVC_DLL" >&6; }
55793    else
55794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55795$as_echo "incorrect, ignoring" >&6; }
55796      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55797$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55798    fi
55799  fi
55800
55801    fi
55802  fi
55803
55804  if test "x$MSVC_DLL" = x; then
55805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55806$as_echo_n "checking for $DLL_NAME... " >&6; }
55807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55808$as_echo "no" >&6; }
55809    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55810  fi
55811
55812    MSVCR_DLL="$MSVC_DLL"
55813  fi
55814
55815
55816
55817# Check whether --with-msvcp-dll was given.
55818if test "${with_msvcp_dll+set}" = set; then :
55819  withval=$with_msvcp_dll;
55820fi
55821
55822
55823  if test "x$MSVCP_NAME" != "x"; then
55824    if test "x$with_msvcp_dll" != x; then
55825      # If given explicitly by user, do not probe. If not present, fail directly.
55826
55827  DLL_NAME="$MSVCP_NAME"
55828  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55829  METHOD="--with-msvcp-dll"
55830  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55831    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55832$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55833
55834    # Need to check if the found msvcr is correct architecture
55835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55836$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55837    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55839      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55840      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55841      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55842        CORRECT_MSVCR_ARCH="PE32 executable"
55843      else
55844        CORRECT_MSVCR_ARCH="PE32+ executable"
55845      fi
55846    else
55847      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55848        CORRECT_MSVCR_ARCH=386
55849      else
55850        CORRECT_MSVCR_ARCH=x86-64
55851      fi
55852    fi
55853    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55855$as_echo "ok" >&6; }
55856      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55857
55858  # Only process if variable expands to non-empty
55859
55860  if test "x$MSVC_DLL" != x; then
55861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55862
55863  # Input might be given as Windows format, start by converting to
55864  # unix format.
55865  path="$MSVC_DLL"
55866  new_path=`$CYGPATH -u "$path"`
55867
55868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55871  # "foo.exe" is OK but "foo" is an error.
55872  #
55873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55874  # It is also a way to make sure we got the proper file name for the real test later on.
55875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55876  if test "x$test_shortpath" = x; then
55877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55878$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55879    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55880  fi
55881
55882  # Call helper function which possibly converts this using DOS-style short mode.
55883  # If so, the updated path is stored in $new_path.
55884
55885  input_path="$new_path"
55886  # Check if we need to convert this using DOS-style short mode. If the path
55887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55888  # take no chances and rewrite it.
55889  # Note: m4 eats our [], so we need to use [ and ] instead.
55890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55891  if test "x$has_forbidden_chars" != x; then
55892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55896      # Going to short mode and back again did indeed matter. Since short mode is
55897      # case insensitive, let's make it lowercase to improve readability.
55898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55899      # Now convert it back to Unix-style (cygpath)
55900      input_path=`$CYGPATH -u "$shortmode_path"`
55901      new_path="$input_path"
55902    fi
55903  fi
55904
55905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55906  if test "x$test_cygdrive_prefix" = x; then
55907    # As a simple fix, exclude /usr/bin since it's not a real path.
55908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55910      # a path prefixed by /cygdrive for fixpath to work.
55911      new_path="$CYGWIN_ROOT_PATH$input_path"
55912    fi
55913  fi
55914
55915
55916  if test "x$path" != "x$new_path"; then
55917    MSVC_DLL="$new_path"
55918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55919$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55920  fi
55921
55922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55923
55924  path="$MSVC_DLL"
55925  has_colon=`$ECHO $path | $GREP ^.:`
55926  new_path="$path"
55927  if test "x$has_colon" = x; then
55928    # Not in mixed or Windows style, start by that.
55929    new_path=`cmd //c echo $path`
55930  fi
55931
55932
55933  input_path="$new_path"
55934  # Check if we need to convert this using DOS-style short mode. If the path
55935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55936  # take no chances and rewrite it.
55937  # Note: m4 eats our [], so we need to use [ and ] instead.
55938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55939  if test "x$has_forbidden_chars" != x; then
55940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55942  fi
55943
55944
55945  windows_path="$new_path"
55946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55947    unix_path=`$CYGPATH -u "$windows_path"`
55948    new_path="$unix_path"
55949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55951    new_path="$unix_path"
55952  fi
55953
55954  if test "x$path" != "x$new_path"; then
55955    MSVC_DLL="$new_path"
55956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55957$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55958  fi
55959
55960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55962
55963    else
55964      # We're on a unix platform. Hooray! :)
55965      path="$MSVC_DLL"
55966      has_space=`$ECHO "$path" | $GREP " "`
55967      if test "x$has_space" != x; then
55968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55969$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55971      fi
55972
55973      # Use eval to expand a potential ~
55974      eval path="$path"
55975      if test ! -f "$path" && test ! -d "$path"; then
55976        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55977      fi
55978
55979      if test -d "$path"; then
55980        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55981      else
55982        dir="`$DIRNAME "$path"`"
55983        base="`$BASENAME "$path"`"
55984        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55985      fi
55986    fi
55987  fi
55988
55989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55990$as_echo_n "checking for $DLL_NAME... " >&6; }
55991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55992$as_echo "$MSVC_DLL" >&6; }
55993    else
55994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55995$as_echo "incorrect, ignoring" >&6; }
55996      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55997$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55998    fi
55999  fi
56000
56001      if test "x$MSVC_DLL" = x; then
56002        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56003      fi
56004      MSVCP_DLL="$MSVC_DLL"
56005    elif test "x$DEVKIT_MSVCP_DLL" != x; then
56006
56007  DLL_NAME="$MSVCP_NAME"
56008  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56009  METHOD="devkit"
56010  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56011    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56012$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56013
56014    # Need to check if the found msvcr is correct architecture
56015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56016$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56017    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56019      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56020      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56021      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56022        CORRECT_MSVCR_ARCH="PE32 executable"
56023      else
56024        CORRECT_MSVCR_ARCH="PE32+ executable"
56025      fi
56026    else
56027      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56028        CORRECT_MSVCR_ARCH=386
56029      else
56030        CORRECT_MSVCR_ARCH=x86-64
56031      fi
56032    fi
56033    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56035$as_echo "ok" >&6; }
56036      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56037
56038  # Only process if variable expands to non-empty
56039
56040  if test "x$MSVC_DLL" != x; then
56041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56042
56043  # Input might be given as Windows format, start by converting to
56044  # unix format.
56045  path="$MSVC_DLL"
56046  new_path=`$CYGPATH -u "$path"`
56047
56048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56051  # "foo.exe" is OK but "foo" is an error.
56052  #
56053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56054  # It is also a way to make sure we got the proper file name for the real test later on.
56055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56056  if test "x$test_shortpath" = x; then
56057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56058$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56059    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56060  fi
56061
56062  # Call helper function which possibly converts this using DOS-style short mode.
56063  # If so, the updated path is stored in $new_path.
56064
56065  input_path="$new_path"
56066  # Check if we need to convert this using DOS-style short mode. If the path
56067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56068  # take no chances and rewrite it.
56069  # Note: m4 eats our [], so we need to use [ and ] instead.
56070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56071  if test "x$has_forbidden_chars" != x; then
56072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56076      # Going to short mode and back again did indeed matter. Since short mode is
56077      # case insensitive, let's make it lowercase to improve readability.
56078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56079      # Now convert it back to Unix-style (cygpath)
56080      input_path=`$CYGPATH -u "$shortmode_path"`
56081      new_path="$input_path"
56082    fi
56083  fi
56084
56085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56086  if test "x$test_cygdrive_prefix" = x; then
56087    # As a simple fix, exclude /usr/bin since it's not a real path.
56088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56090      # a path prefixed by /cygdrive for fixpath to work.
56091      new_path="$CYGWIN_ROOT_PATH$input_path"
56092    fi
56093  fi
56094
56095
56096  if test "x$path" != "x$new_path"; then
56097    MSVC_DLL="$new_path"
56098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56099$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56100  fi
56101
56102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56103
56104  path="$MSVC_DLL"
56105  has_colon=`$ECHO $path | $GREP ^.:`
56106  new_path="$path"
56107  if test "x$has_colon" = x; then
56108    # Not in mixed or Windows style, start by that.
56109    new_path=`cmd //c echo $path`
56110  fi
56111
56112
56113  input_path="$new_path"
56114  # Check if we need to convert this using DOS-style short mode. If the path
56115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56116  # take no chances and rewrite it.
56117  # Note: m4 eats our [], so we need to use [ and ] instead.
56118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56119  if test "x$has_forbidden_chars" != x; then
56120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56122  fi
56123
56124
56125  windows_path="$new_path"
56126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56127    unix_path=`$CYGPATH -u "$windows_path"`
56128    new_path="$unix_path"
56129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56131    new_path="$unix_path"
56132  fi
56133
56134  if test "x$path" != "x$new_path"; then
56135    MSVC_DLL="$new_path"
56136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56137$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56138  fi
56139
56140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56142
56143    else
56144      # We're on a unix platform. Hooray! :)
56145      path="$MSVC_DLL"
56146      has_space=`$ECHO "$path" | $GREP " "`
56147      if test "x$has_space" != x; then
56148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56149$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56151      fi
56152
56153      # Use eval to expand a potential ~
56154      eval path="$path"
56155      if test ! -f "$path" && test ! -d "$path"; then
56156        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56157      fi
56158
56159      if test -d "$path"; then
56160        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56161      else
56162        dir="`$DIRNAME "$path"`"
56163        base="`$BASENAME "$path"`"
56164        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56165      fi
56166    fi
56167  fi
56168
56169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56170$as_echo_n "checking for $DLL_NAME... " >&6; }
56171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56172$as_echo "$MSVC_DLL" >&6; }
56173    else
56174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56175$as_echo "incorrect, ignoring" >&6; }
56176      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56177$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56178    fi
56179  fi
56180
56181      if test "x$MSVC_DLL" = x; then
56182        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56183      fi
56184      MSVCP_DLL="$MSVC_DLL"
56185    else
56186
56187  DLL_NAME="${MSVCP_NAME}"
56188  MSVC_DLL=
56189
56190  if test "x$MSVC_DLL" = x; then
56191    # Probe: Using well-known location from Visual Studio 10.0
56192    if test "x$VCINSTALLDIR" != x; then
56193      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56194
56195  windows_path="$CYGWIN_VC_INSTALL_DIR"
56196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56197    unix_path=`$CYGPATH -u "$windows_path"`
56198    CYGWIN_VC_INSTALL_DIR="$unix_path"
56199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56201    CYGWIN_VC_INSTALL_DIR="$unix_path"
56202  fi
56203
56204      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56205        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56206      else
56207        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56208      fi
56209      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56210
56211  DLL_NAME="$DLL_NAME"
56212  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56213  METHOD="well-known location in VCINSTALLDIR"
56214  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56215    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56216$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56217
56218    # Need to check if the found msvcr is correct architecture
56219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56220$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56221    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56223      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56224      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56225      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56226        CORRECT_MSVCR_ARCH="PE32 executable"
56227      else
56228        CORRECT_MSVCR_ARCH="PE32+ executable"
56229      fi
56230    else
56231      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56232        CORRECT_MSVCR_ARCH=386
56233      else
56234        CORRECT_MSVCR_ARCH=x86-64
56235      fi
56236    fi
56237    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56239$as_echo "ok" >&6; }
56240      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56241
56242  # Only process if variable expands to non-empty
56243
56244  if test "x$MSVC_DLL" != x; then
56245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56246
56247  # Input might be given as Windows format, start by converting to
56248  # unix format.
56249  path="$MSVC_DLL"
56250  new_path=`$CYGPATH -u "$path"`
56251
56252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56255  # "foo.exe" is OK but "foo" is an error.
56256  #
56257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56258  # It is also a way to make sure we got the proper file name for the real test later on.
56259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56260  if test "x$test_shortpath" = x; then
56261    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56262$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56263    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56264  fi
56265
56266  # Call helper function which possibly converts this using DOS-style short mode.
56267  # If so, the updated path is stored in $new_path.
56268
56269  input_path="$new_path"
56270  # Check if we need to convert this using DOS-style short mode. If the path
56271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56272  # take no chances and rewrite it.
56273  # Note: m4 eats our [], so we need to use [ and ] instead.
56274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56275  if test "x$has_forbidden_chars" != x; then
56276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56280      # Going to short mode and back again did indeed matter. Since short mode is
56281      # case insensitive, let's make it lowercase to improve readability.
56282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56283      # Now convert it back to Unix-style (cygpath)
56284      input_path=`$CYGPATH -u "$shortmode_path"`
56285      new_path="$input_path"
56286    fi
56287  fi
56288
56289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56290  if test "x$test_cygdrive_prefix" = x; then
56291    # As a simple fix, exclude /usr/bin since it's not a real path.
56292    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56294      # a path prefixed by /cygdrive for fixpath to work.
56295      new_path="$CYGWIN_ROOT_PATH$input_path"
56296    fi
56297  fi
56298
56299
56300  if test "x$path" != "x$new_path"; then
56301    MSVC_DLL="$new_path"
56302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56303$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56304  fi
56305
56306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56307
56308  path="$MSVC_DLL"
56309  has_colon=`$ECHO $path | $GREP ^.:`
56310  new_path="$path"
56311  if test "x$has_colon" = x; then
56312    # Not in mixed or Windows style, start by that.
56313    new_path=`cmd //c echo $path`
56314  fi
56315
56316
56317  input_path="$new_path"
56318  # Check if we need to convert this using DOS-style short mode. If the path
56319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56320  # take no chances and rewrite it.
56321  # Note: m4 eats our [], so we need to use [ and ] instead.
56322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56323  if test "x$has_forbidden_chars" != x; then
56324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56326  fi
56327
56328
56329  windows_path="$new_path"
56330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56331    unix_path=`$CYGPATH -u "$windows_path"`
56332    new_path="$unix_path"
56333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56335    new_path="$unix_path"
56336  fi
56337
56338  if test "x$path" != "x$new_path"; then
56339    MSVC_DLL="$new_path"
56340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56341$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56342  fi
56343
56344  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56345  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56346
56347    else
56348      # We're on a unix platform. Hooray! :)
56349      path="$MSVC_DLL"
56350      has_space=`$ECHO "$path" | $GREP " "`
56351      if test "x$has_space" != x; then
56352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56353$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56354        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56355      fi
56356
56357      # Use eval to expand a potential ~
56358      eval path="$path"
56359      if test ! -f "$path" && test ! -d "$path"; then
56360        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56361      fi
56362
56363      if test -d "$path"; then
56364        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56365      else
56366        dir="`$DIRNAME "$path"`"
56367        base="`$BASENAME "$path"`"
56368        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56369      fi
56370    fi
56371  fi
56372
56373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56374$as_echo_n "checking for $DLL_NAME... " >&6; }
56375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56376$as_echo "$MSVC_DLL" >&6; }
56377    else
56378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56379$as_echo "incorrect, ignoring" >&6; }
56380      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56381$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56382    fi
56383  fi
56384
56385    fi
56386  fi
56387
56388  if test "x$MSVC_DLL" = x; then
56389    # Probe: Check in the Boot JDK directory.
56390    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56391
56392  DLL_NAME="$DLL_NAME"
56393  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56394  METHOD="well-known location in Boot JDK"
56395  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56396    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56397$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56398
56399    # Need to check if the found msvcr is correct architecture
56400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56401$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56402    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56404      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56405      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56406      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56407        CORRECT_MSVCR_ARCH="PE32 executable"
56408      else
56409        CORRECT_MSVCR_ARCH="PE32+ executable"
56410      fi
56411    else
56412      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56413        CORRECT_MSVCR_ARCH=386
56414      else
56415        CORRECT_MSVCR_ARCH=x86-64
56416      fi
56417    fi
56418    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56420$as_echo "ok" >&6; }
56421      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56422
56423  # Only process if variable expands to non-empty
56424
56425  if test "x$MSVC_DLL" != x; then
56426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56427
56428  # Input might be given as Windows format, start by converting to
56429  # unix format.
56430  path="$MSVC_DLL"
56431  new_path=`$CYGPATH -u "$path"`
56432
56433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56436  # "foo.exe" is OK but "foo" is an error.
56437  #
56438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56439  # It is also a way to make sure we got the proper file name for the real test later on.
56440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56441  if test "x$test_shortpath" = x; then
56442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56443$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56444    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56445  fi
56446
56447  # Call helper function which possibly converts this using DOS-style short mode.
56448  # If so, the updated path is stored in $new_path.
56449
56450  input_path="$new_path"
56451  # Check if we need to convert this using DOS-style short mode. If the path
56452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56453  # take no chances and rewrite it.
56454  # Note: m4 eats our [], so we need to use [ and ] instead.
56455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56456  if test "x$has_forbidden_chars" != x; then
56457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56461      # Going to short mode and back again did indeed matter. Since short mode is
56462      # case insensitive, let's make it lowercase to improve readability.
56463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56464      # Now convert it back to Unix-style (cygpath)
56465      input_path=`$CYGPATH -u "$shortmode_path"`
56466      new_path="$input_path"
56467    fi
56468  fi
56469
56470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56471  if test "x$test_cygdrive_prefix" = x; then
56472    # As a simple fix, exclude /usr/bin since it's not a real path.
56473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56475      # a path prefixed by /cygdrive for fixpath to work.
56476      new_path="$CYGWIN_ROOT_PATH$input_path"
56477    fi
56478  fi
56479
56480
56481  if test "x$path" != "x$new_path"; then
56482    MSVC_DLL="$new_path"
56483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56484$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56485  fi
56486
56487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56488
56489  path="$MSVC_DLL"
56490  has_colon=`$ECHO $path | $GREP ^.:`
56491  new_path="$path"
56492  if test "x$has_colon" = x; then
56493    # Not in mixed or Windows style, start by that.
56494    new_path=`cmd //c echo $path`
56495  fi
56496
56497
56498  input_path="$new_path"
56499  # Check if we need to convert this using DOS-style short mode. If the path
56500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56501  # take no chances and rewrite it.
56502  # Note: m4 eats our [], so we need to use [ and ] instead.
56503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56504  if test "x$has_forbidden_chars" != x; then
56505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56507  fi
56508
56509
56510  windows_path="$new_path"
56511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56512    unix_path=`$CYGPATH -u "$windows_path"`
56513    new_path="$unix_path"
56514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56516    new_path="$unix_path"
56517  fi
56518
56519  if test "x$path" != "x$new_path"; then
56520    MSVC_DLL="$new_path"
56521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56522$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56523  fi
56524
56525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56527
56528    else
56529      # We're on a unix platform. Hooray! :)
56530      path="$MSVC_DLL"
56531      has_space=`$ECHO "$path" | $GREP " "`
56532      if test "x$has_space" != x; then
56533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56534$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56536      fi
56537
56538      # Use eval to expand a potential ~
56539      eval path="$path"
56540      if test ! -f "$path" && test ! -d "$path"; then
56541        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56542      fi
56543
56544      if test -d "$path"; then
56545        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56546      else
56547        dir="`$DIRNAME "$path"`"
56548        base="`$BASENAME "$path"`"
56549        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56550      fi
56551    fi
56552  fi
56553
56554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56555$as_echo_n "checking for $DLL_NAME... " >&6; }
56556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56557$as_echo "$MSVC_DLL" >&6; }
56558    else
56559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56560$as_echo "incorrect, ignoring" >&6; }
56561      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56562$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56563    fi
56564  fi
56565
56566  fi
56567
56568  if test "x$MSVC_DLL" = x; then
56569    # Probe: Look in the Windows system32 directory
56570    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56571
56572  windows_path="$CYGWIN_SYSTEMROOT"
56573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56574    unix_path=`$CYGPATH -u "$windows_path"`
56575    CYGWIN_SYSTEMROOT="$unix_path"
56576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56578    CYGWIN_SYSTEMROOT="$unix_path"
56579  fi
56580
56581    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56582
56583  DLL_NAME="$DLL_NAME"
56584  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56585  METHOD="well-known location in SYSTEMROOT"
56586  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56587    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56588$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56589
56590    # Need to check if the found msvcr is correct architecture
56591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56592$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56593    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56595      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56596      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56597      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56598        CORRECT_MSVCR_ARCH="PE32 executable"
56599      else
56600        CORRECT_MSVCR_ARCH="PE32+ executable"
56601      fi
56602    else
56603      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56604        CORRECT_MSVCR_ARCH=386
56605      else
56606        CORRECT_MSVCR_ARCH=x86-64
56607      fi
56608    fi
56609    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56611$as_echo "ok" >&6; }
56612      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56613
56614  # Only process if variable expands to non-empty
56615
56616  if test "x$MSVC_DLL" != x; then
56617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56618
56619  # Input might be given as Windows format, start by converting to
56620  # unix format.
56621  path="$MSVC_DLL"
56622  new_path=`$CYGPATH -u "$path"`
56623
56624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56627  # "foo.exe" is OK but "foo" is an error.
56628  #
56629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56630  # It is also a way to make sure we got the proper file name for the real test later on.
56631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56632  if test "x$test_shortpath" = x; then
56633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56634$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56635    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56636  fi
56637
56638  # Call helper function which possibly converts this using DOS-style short mode.
56639  # If so, the updated path is stored in $new_path.
56640
56641  input_path="$new_path"
56642  # Check if we need to convert this using DOS-style short mode. If the path
56643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56644  # take no chances and rewrite it.
56645  # Note: m4 eats our [], so we need to use [ and ] instead.
56646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56647  if test "x$has_forbidden_chars" != x; then
56648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56652      # Going to short mode and back again did indeed matter. Since short mode is
56653      # case insensitive, let's make it lowercase to improve readability.
56654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56655      # Now convert it back to Unix-style (cygpath)
56656      input_path=`$CYGPATH -u "$shortmode_path"`
56657      new_path="$input_path"
56658    fi
56659  fi
56660
56661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56662  if test "x$test_cygdrive_prefix" = x; then
56663    # As a simple fix, exclude /usr/bin since it's not a real path.
56664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56666      # a path prefixed by /cygdrive for fixpath to work.
56667      new_path="$CYGWIN_ROOT_PATH$input_path"
56668    fi
56669  fi
56670
56671
56672  if test "x$path" != "x$new_path"; then
56673    MSVC_DLL="$new_path"
56674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56675$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56676  fi
56677
56678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56679
56680  path="$MSVC_DLL"
56681  has_colon=`$ECHO $path | $GREP ^.:`
56682  new_path="$path"
56683  if test "x$has_colon" = x; then
56684    # Not in mixed or Windows style, start by that.
56685    new_path=`cmd //c echo $path`
56686  fi
56687
56688
56689  input_path="$new_path"
56690  # Check if we need to convert this using DOS-style short mode. If the path
56691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56692  # take no chances and rewrite it.
56693  # Note: m4 eats our [], so we need to use [ and ] instead.
56694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56695  if test "x$has_forbidden_chars" != x; then
56696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56698  fi
56699
56700
56701  windows_path="$new_path"
56702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56703    unix_path=`$CYGPATH -u "$windows_path"`
56704    new_path="$unix_path"
56705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56707    new_path="$unix_path"
56708  fi
56709
56710  if test "x$path" != "x$new_path"; then
56711    MSVC_DLL="$new_path"
56712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56713$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56714  fi
56715
56716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56718
56719    else
56720      # We're on a unix platform. Hooray! :)
56721      path="$MSVC_DLL"
56722      has_space=`$ECHO "$path" | $GREP " "`
56723      if test "x$has_space" != x; then
56724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56725$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56727      fi
56728
56729      # Use eval to expand a potential ~
56730      eval path="$path"
56731      if test ! -f "$path" && test ! -d "$path"; then
56732        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56733      fi
56734
56735      if test -d "$path"; then
56736        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56737      else
56738        dir="`$DIRNAME "$path"`"
56739        base="`$BASENAME "$path"`"
56740        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56741      fi
56742    fi
56743  fi
56744
56745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56746$as_echo_n "checking for $DLL_NAME... " >&6; }
56747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56748$as_echo "$MSVC_DLL" >&6; }
56749    else
56750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56751$as_echo "incorrect, ignoring" >&6; }
56752      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56753$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56754    fi
56755  fi
56756
56757  fi
56758
56759  if test "x$MSVC_DLL" = x; then
56760    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56761    if test "x$VS100COMNTOOLS" != x; then
56762      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56763
56764  windows_path="$CYGWIN_VS_TOOLS_DIR"
56765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56766    unix_path=`$CYGPATH -u "$windows_path"`
56767    CYGWIN_VS_TOOLS_DIR="$unix_path"
56768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56770    CYGWIN_VS_TOOLS_DIR="$unix_path"
56771  fi
56772
56773      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56774        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56775	    | $GREP -i /x64/ | $HEAD --lines 1`
56776      else
56777        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56778	    | $GREP -i /x86/ | $HEAD --lines 1`
56779      fi
56780
56781  DLL_NAME="$DLL_NAME"
56782  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56783  METHOD="search of VS100COMNTOOLS"
56784  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56786$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56787
56788    # Need to check if the found msvcr is correct architecture
56789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56790$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56791    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56793      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56794      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56795      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56796        CORRECT_MSVCR_ARCH="PE32 executable"
56797      else
56798        CORRECT_MSVCR_ARCH="PE32+ executable"
56799      fi
56800    else
56801      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56802        CORRECT_MSVCR_ARCH=386
56803      else
56804        CORRECT_MSVCR_ARCH=x86-64
56805      fi
56806    fi
56807    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56809$as_echo "ok" >&6; }
56810      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56811
56812  # Only process if variable expands to non-empty
56813
56814  if test "x$MSVC_DLL" != x; then
56815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56816
56817  # Input might be given as Windows format, start by converting to
56818  # unix format.
56819  path="$MSVC_DLL"
56820  new_path=`$CYGPATH -u "$path"`
56821
56822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56825  # "foo.exe" is OK but "foo" is an error.
56826  #
56827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56828  # It is also a way to make sure we got the proper file name for the real test later on.
56829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56830  if test "x$test_shortpath" = x; then
56831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56832$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56833    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56834  fi
56835
56836  # Call helper function which possibly converts this using DOS-style short mode.
56837  # If so, the updated path is stored in $new_path.
56838
56839  input_path="$new_path"
56840  # Check if we need to convert this using DOS-style short mode. If the path
56841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56842  # take no chances and rewrite it.
56843  # Note: m4 eats our [], so we need to use [ and ] instead.
56844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56845  if test "x$has_forbidden_chars" != x; then
56846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56850      # Going to short mode and back again did indeed matter. Since short mode is
56851      # case insensitive, let's make it lowercase to improve readability.
56852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56853      # Now convert it back to Unix-style (cygpath)
56854      input_path=`$CYGPATH -u "$shortmode_path"`
56855      new_path="$input_path"
56856    fi
56857  fi
56858
56859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56860  if test "x$test_cygdrive_prefix" = x; then
56861    # As a simple fix, exclude /usr/bin since it's not a real path.
56862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56864      # a path prefixed by /cygdrive for fixpath to work.
56865      new_path="$CYGWIN_ROOT_PATH$input_path"
56866    fi
56867  fi
56868
56869
56870  if test "x$path" != "x$new_path"; then
56871    MSVC_DLL="$new_path"
56872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56873$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56874  fi
56875
56876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56877
56878  path="$MSVC_DLL"
56879  has_colon=`$ECHO $path | $GREP ^.:`
56880  new_path="$path"
56881  if test "x$has_colon" = x; then
56882    # Not in mixed or Windows style, start by that.
56883    new_path=`cmd //c echo $path`
56884  fi
56885
56886
56887  input_path="$new_path"
56888  # Check if we need to convert this using DOS-style short mode. If the path
56889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56890  # take no chances and rewrite it.
56891  # Note: m4 eats our [], so we need to use [ and ] instead.
56892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56893  if test "x$has_forbidden_chars" != x; then
56894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56896  fi
56897
56898
56899  windows_path="$new_path"
56900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56901    unix_path=`$CYGPATH -u "$windows_path"`
56902    new_path="$unix_path"
56903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56905    new_path="$unix_path"
56906  fi
56907
56908  if test "x$path" != "x$new_path"; then
56909    MSVC_DLL="$new_path"
56910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56911$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56912  fi
56913
56914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56916
56917    else
56918      # We're on a unix platform. Hooray! :)
56919      path="$MSVC_DLL"
56920      has_space=`$ECHO "$path" | $GREP " "`
56921      if test "x$has_space" != x; then
56922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56923$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56925      fi
56926
56927      # Use eval to expand a potential ~
56928      eval path="$path"
56929      if test ! -f "$path" && test ! -d "$path"; then
56930        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56931      fi
56932
56933      if test -d "$path"; then
56934        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56935      else
56936        dir="`$DIRNAME "$path"`"
56937        base="`$BASENAME "$path"`"
56938        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56939      fi
56940    fi
56941  fi
56942
56943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56944$as_echo_n "checking for $DLL_NAME... " >&6; }
56945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56946$as_echo "$MSVC_DLL" >&6; }
56947    else
56948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56949$as_echo "incorrect, ignoring" >&6; }
56950      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56951$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56952    fi
56953  fi
56954
56955    fi
56956  fi
56957
56958  if test "x$MSVC_DLL" = x; then
56959    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56960    # (This was the original behaviour; kept since it might turn something up)
56961    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56962      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56963        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56964	    | $GREP x64 | $HEAD --lines 1`
56965      else
56966        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56967	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56968        if test "x$POSSIBLE_MSVC_DLL" = x; then
56969          # We're grasping at straws now...
56970          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56971	      | $HEAD --lines 1`
56972        fi
56973      fi
56974
56975
56976  DLL_NAME="$DLL_NAME"
56977  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56978  METHOD="search of VCINSTALLDIR"
56979  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56981$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56982
56983    # Need to check if the found msvcr is correct architecture
56984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56985$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56986    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56988      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56989      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56990      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56991        CORRECT_MSVCR_ARCH="PE32 executable"
56992      else
56993        CORRECT_MSVCR_ARCH="PE32+ executable"
56994      fi
56995    else
56996      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56997        CORRECT_MSVCR_ARCH=386
56998      else
56999        CORRECT_MSVCR_ARCH=x86-64
57000      fi
57001    fi
57002    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57004$as_echo "ok" >&6; }
57005      MSVC_DLL="$POSSIBLE_MSVC_DLL"
57006
57007  # Only process if variable expands to non-empty
57008
57009  if test "x$MSVC_DLL" != x; then
57010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57011
57012  # Input might be given as Windows format, start by converting to
57013  # unix format.
57014  path="$MSVC_DLL"
57015  new_path=`$CYGPATH -u "$path"`
57016
57017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57020  # "foo.exe" is OK but "foo" is an error.
57021  #
57022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57023  # It is also a way to make sure we got the proper file name for the real test later on.
57024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57025  if test "x$test_shortpath" = x; then
57026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57027$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57028    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57029  fi
57030
57031  # Call helper function which possibly converts this using DOS-style short mode.
57032  # If so, the updated path is stored in $new_path.
57033
57034  input_path="$new_path"
57035  # Check if we need to convert this using DOS-style short mode. If the path
57036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57037  # take no chances and rewrite it.
57038  # Note: m4 eats our [], so we need to use [ and ] instead.
57039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57040  if test "x$has_forbidden_chars" != x; then
57041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57045      # Going to short mode and back again did indeed matter. Since short mode is
57046      # case insensitive, let's make it lowercase to improve readability.
57047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57048      # Now convert it back to Unix-style (cygpath)
57049      input_path=`$CYGPATH -u "$shortmode_path"`
57050      new_path="$input_path"
57051    fi
57052  fi
57053
57054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57055  if test "x$test_cygdrive_prefix" = x; then
57056    # As a simple fix, exclude /usr/bin since it's not a real path.
57057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57059      # a path prefixed by /cygdrive for fixpath to work.
57060      new_path="$CYGWIN_ROOT_PATH$input_path"
57061    fi
57062  fi
57063
57064
57065  if test "x$path" != "x$new_path"; then
57066    MSVC_DLL="$new_path"
57067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57068$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57069  fi
57070
57071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57072
57073  path="$MSVC_DLL"
57074  has_colon=`$ECHO $path | $GREP ^.:`
57075  new_path="$path"
57076  if test "x$has_colon" = x; then
57077    # Not in mixed or Windows style, start by that.
57078    new_path=`cmd //c echo $path`
57079  fi
57080
57081
57082  input_path="$new_path"
57083  # Check if we need to convert this using DOS-style short mode. If the path
57084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57085  # take no chances and rewrite it.
57086  # Note: m4 eats our [], so we need to use [ and ] instead.
57087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57088  if test "x$has_forbidden_chars" != x; then
57089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57091  fi
57092
57093
57094  windows_path="$new_path"
57095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57096    unix_path=`$CYGPATH -u "$windows_path"`
57097    new_path="$unix_path"
57098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57100    new_path="$unix_path"
57101  fi
57102
57103  if test "x$path" != "x$new_path"; then
57104    MSVC_DLL="$new_path"
57105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57106$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57107  fi
57108
57109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57111
57112    else
57113      # We're on a unix platform. Hooray! :)
57114      path="$MSVC_DLL"
57115      has_space=`$ECHO "$path" | $GREP " "`
57116      if test "x$has_space" != x; then
57117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57118$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57120      fi
57121
57122      # Use eval to expand a potential ~
57123      eval path="$path"
57124      if test ! -f "$path" && test ! -d "$path"; then
57125        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57126      fi
57127
57128      if test -d "$path"; then
57129        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57130      else
57131        dir="`$DIRNAME "$path"`"
57132        base="`$BASENAME "$path"`"
57133        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57134      fi
57135    fi
57136  fi
57137
57138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57139$as_echo_n "checking for $DLL_NAME... " >&6; }
57140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57141$as_echo "$MSVC_DLL" >&6; }
57142    else
57143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57144$as_echo "incorrect, ignoring" >&6; }
57145      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57146$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57147    fi
57148  fi
57149
57150    fi
57151  fi
57152
57153  if test "x$MSVC_DLL" = x; then
57154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57155$as_echo_n "checking for $DLL_NAME... " >&6; }
57156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57157$as_echo "no" >&6; }
57158    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57159  fi
57160
57161      MSVCP_DLL="$MSVC_DLL"
57162    fi
57163
57164  fi
57165
57166  fi
57167
57168
57169  if test "x$NEEDS_LIB_X11" = xfalse; then
57170    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57171      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57172$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57173    fi
57174    X_CFLAGS=
57175    X_LIBS=
57176  else
57177
57178    if test "x${with_x}" = xno; then
57179      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57180    fi
57181
57182    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57183      # The user has specified a X11 base directory. Use it for includes and
57184      # libraries, unless explicitly overridden.
57185      if test "x$x_includes" = xNONE; then
57186        x_includes="${with_x}/include"
57187      fi
57188      if test "x$x_libraries" = xNONE; then
57189        x_libraries="${with_x}/lib"
57190      fi
57191    else
57192      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57193      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57194      # --x-libraries for the sysroot, if that seems to be correct.
57195      if test "x$SYSROOT" != "x"; then
57196        if test "x$x_includes" = xNONE; then
57197          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57198            x_includes="$SYSROOT/usr/X11R6/include"
57199          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57200            x_includes="$SYSROOT/usr/include"
57201          fi
57202        fi
57203        if test "x$x_libraries" = xNONE; then
57204          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57205            x_libraries="$SYSROOT/usr/X11R6/lib"
57206          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57207            x_libraries="$SYSROOT/usr/lib64"
57208          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57209            x_libraries="$SYSROOT/usr/lib"
57210          fi
57211        fi
57212      fi
57213    fi
57214
57215    # Now let autoconf do it's magic
57216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57217$as_echo_n "checking for X... " >&6; }
57218
57219
57220# Check whether --with-x was given.
57221if test "${with_x+set}" = set; then :
57222  withval=$with_x;
57223fi
57224
57225# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57226if test "x$with_x" = xno; then
57227  # The user explicitly disabled X.
57228  have_x=disabled
57229else
57230  case $x_includes,$x_libraries in #(
57231    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57232    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57233  $as_echo_n "(cached) " >&6
57234else
57235  # One or both of the vars are not set, and there is no cached value.
57236ac_x_includes=no ac_x_libraries=no
57237rm -f -r conftest.dir
57238if mkdir conftest.dir; then
57239  cd conftest.dir
57240  cat >Imakefile <<'_ACEOF'
57241incroot:
57242	@echo incroot='${INCROOT}'
57243usrlibdir:
57244	@echo usrlibdir='${USRLIBDIR}'
57245libdir:
57246	@echo libdir='${LIBDIR}'
57247_ACEOF
57248  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57249    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57250    for ac_var in incroot usrlibdir libdir; do
57251      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57252    done
57253    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57254    for ac_extension in a so sl dylib la dll; do
57255      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57256	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57257	ac_im_usrlibdir=$ac_im_libdir; break
57258      fi
57259    done
57260    # Screen out bogus values from the imake configuration.  They are
57261    # bogus both because they are the default anyway, and because
57262    # using them would break gcc on systems where it needs fixed includes.
57263    case $ac_im_incroot in
57264	/usr/include) ac_x_includes= ;;
57265	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57266    esac
57267    case $ac_im_usrlibdir in
57268	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57269	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57270    esac
57271  fi
57272  cd ..
57273  rm -f -r conftest.dir
57274fi
57275
57276# Standard set of common directories for X headers.
57277# Check X11 before X11Rn because it is often a symlink to the current release.
57278ac_x_header_dirs='
57279/usr/X11/include
57280/usr/X11R7/include
57281/usr/X11R6/include
57282/usr/X11R5/include
57283/usr/X11R4/include
57284
57285/usr/include/X11
57286/usr/include/X11R7
57287/usr/include/X11R6
57288/usr/include/X11R5
57289/usr/include/X11R4
57290
57291/usr/local/X11/include
57292/usr/local/X11R7/include
57293/usr/local/X11R6/include
57294/usr/local/X11R5/include
57295/usr/local/X11R4/include
57296
57297/usr/local/include/X11
57298/usr/local/include/X11R7
57299/usr/local/include/X11R6
57300/usr/local/include/X11R5
57301/usr/local/include/X11R4
57302
57303/usr/X386/include
57304/usr/x386/include
57305/usr/XFree86/include/X11
57306
57307/usr/include
57308/usr/local/include
57309/usr/unsupported/include
57310/usr/athena/include
57311/usr/local/x11r5/include
57312/usr/lpp/Xamples/include
57313
57314/usr/openwin/include
57315/usr/openwin/share/include'
57316
57317if test "$ac_x_includes" = no; then
57318  # Guess where to find include files, by looking for Xlib.h.
57319  # First, try using that file with no special directory specified.
57320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57321/* end confdefs.h.  */
57322#include <X11/Xlib.h>
57323_ACEOF
57324if ac_fn_cxx_try_cpp "$LINENO"; then :
57325  # We can compile using X headers with no special include directory.
57326ac_x_includes=
57327else
57328  for ac_dir in $ac_x_header_dirs; do
57329  if test -r "$ac_dir/X11/Xlib.h"; then
57330    ac_x_includes=$ac_dir
57331    break
57332  fi
57333done
57334fi
57335rm -f conftest.err conftest.i conftest.$ac_ext
57336fi # $ac_x_includes = no
57337
57338if test "$ac_x_libraries" = no; then
57339  # Check for the libraries.
57340  # See if we find them without any special options.
57341  # Don't add to $LIBS permanently.
57342  ac_save_LIBS=$LIBS
57343  LIBS="-lX11 $LIBS"
57344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57345/* end confdefs.h.  */
57346#include <X11/Xlib.h>
57347int
57348main ()
57349{
57350XrmInitialize ()
57351  ;
57352  return 0;
57353}
57354_ACEOF
57355if ac_fn_cxx_try_link "$LINENO"; then :
57356  LIBS=$ac_save_LIBS
57357# We can link X programs with no special library path.
57358ac_x_libraries=
57359else
57360  LIBS=$ac_save_LIBS
57361for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57362do
57363  # Don't even attempt the hair of trying to link an X program!
57364  for ac_extension in a so sl dylib la dll; do
57365    if test -r "$ac_dir/libX11.$ac_extension"; then
57366      ac_x_libraries=$ac_dir
57367      break 2
57368    fi
57369  done
57370done
57371fi
57372rm -f core conftest.err conftest.$ac_objext \
57373    conftest$ac_exeext conftest.$ac_ext
57374fi # $ac_x_libraries = no
57375
57376case $ac_x_includes,$ac_x_libraries in #(
57377  no,* | *,no | *\'*)
57378    # Didn't find X, or a directory has "'" in its name.
57379    ac_cv_have_x="have_x=no";; #(
57380  *)
57381    # Record where we found X for the cache.
57382    ac_cv_have_x="have_x=yes\
57383	ac_x_includes='$ac_x_includes'\
57384	ac_x_libraries='$ac_x_libraries'"
57385esac
57386fi
57387;; #(
57388    *) have_x=yes;;
57389  esac
57390  eval "$ac_cv_have_x"
57391fi # $with_x != no
57392
57393if test "$have_x" != yes; then
57394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57395$as_echo "$have_x" >&6; }
57396  no_x=yes
57397else
57398  # If each of the values was on the command line, it overrides each guess.
57399  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57400  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57401  # Update the cache value to reflect the command line values.
57402  ac_cv_have_x="have_x=yes\
57403	ac_x_includes='$x_includes'\
57404	ac_x_libraries='$x_libraries'"
57405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57406$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57407fi
57408
57409    if test "$no_x" = yes; then
57410  # Not all programs may use this symbol, but it does not hurt to define it.
57411
57412$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57413
57414  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57415else
57416  if test -n "$x_includes"; then
57417    X_CFLAGS="$X_CFLAGS -I$x_includes"
57418  fi
57419
57420  # It would also be nice to do this for all -L options, not just this one.
57421  if test -n "$x_libraries"; then
57422    X_LIBS="$X_LIBS -L$x_libraries"
57423    # For Solaris; some versions of Sun CC require a space after -R and
57424    # others require no space.  Words are not sufficient . . . .
57425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57426$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57427    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57428    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57429    ac_cxx_werror_flag=yes
57430    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57431/* end confdefs.h.  */
57432
57433int
57434main ()
57435{
57436
57437  ;
57438  return 0;
57439}
57440_ACEOF
57441if ac_fn_cxx_try_link "$LINENO"; then :
57442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57443$as_echo "no" >&6; }
57444       X_LIBS="$X_LIBS -R$x_libraries"
57445else
57446  LIBS="$ac_xsave_LIBS -R $x_libraries"
57447       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57448/* end confdefs.h.  */
57449
57450int
57451main ()
57452{
57453
57454  ;
57455  return 0;
57456}
57457_ACEOF
57458if ac_fn_cxx_try_link "$LINENO"; then :
57459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57460$as_echo "yes" >&6; }
57461	  X_LIBS="$X_LIBS -R $x_libraries"
57462else
57463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57464$as_echo "neither works" >&6; }
57465fi
57466rm -f core conftest.err conftest.$ac_objext \
57467    conftest$ac_exeext conftest.$ac_ext
57468fi
57469rm -f core conftest.err conftest.$ac_objext \
57470    conftest$ac_exeext conftest.$ac_ext
57471    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57472    LIBS=$ac_xsave_LIBS
57473  fi
57474
57475  # Check for system-dependent libraries X programs must link with.
57476  # Do this before checking for the system-independent R6 libraries
57477  # (-lICE), since we may need -lsocket or whatever for X linking.
57478
57479  if test "$ISC" = yes; then
57480    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57481  else
57482    # Martyn Johnson says this is needed for Ultrix, if the X
57483    # libraries were built with DECnet support.  And Karl Berry says
57484    # the Alpha needs dnet_stub (dnet does not exist).
57485    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57486    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57487/* end confdefs.h.  */
57488
57489/* Override any GCC internal prototype to avoid an error.
57490   Use char because int might match the return type of a GCC
57491   builtin and then its argument prototype would still apply.  */
57492#ifdef __cplusplus
57493extern "C"
57494#endif
57495char XOpenDisplay ();
57496int
57497main ()
57498{
57499return XOpenDisplay ();
57500  ;
57501  return 0;
57502}
57503_ACEOF
57504if ac_fn_cxx_try_link "$LINENO"; then :
57505
57506else
57507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57508$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57509if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57510  $as_echo_n "(cached) " >&6
57511else
57512  ac_check_lib_save_LIBS=$LIBS
57513LIBS="-ldnet  $LIBS"
57514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57515/* end confdefs.h.  */
57516
57517/* Override any GCC internal prototype to avoid an error.
57518   Use char because int might match the return type of a GCC
57519   builtin and then its argument prototype would still apply.  */
57520#ifdef __cplusplus
57521extern "C"
57522#endif
57523char dnet_ntoa ();
57524int
57525main ()
57526{
57527return dnet_ntoa ();
57528  ;
57529  return 0;
57530}
57531_ACEOF
57532if ac_fn_cxx_try_link "$LINENO"; then :
57533  ac_cv_lib_dnet_dnet_ntoa=yes
57534else
57535  ac_cv_lib_dnet_dnet_ntoa=no
57536fi
57537rm -f core conftest.err conftest.$ac_objext \
57538    conftest$ac_exeext conftest.$ac_ext
57539LIBS=$ac_check_lib_save_LIBS
57540fi
57541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57542$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57543if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57544  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57545fi
57546
57547    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57549$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57550if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57551  $as_echo_n "(cached) " >&6
57552else
57553  ac_check_lib_save_LIBS=$LIBS
57554LIBS="-ldnet_stub  $LIBS"
57555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57556/* end confdefs.h.  */
57557
57558/* Override any GCC internal prototype to avoid an error.
57559   Use char because int might match the return type of a GCC
57560   builtin and then its argument prototype would still apply.  */
57561#ifdef __cplusplus
57562extern "C"
57563#endif
57564char dnet_ntoa ();
57565int
57566main ()
57567{
57568return dnet_ntoa ();
57569  ;
57570  return 0;
57571}
57572_ACEOF
57573if ac_fn_cxx_try_link "$LINENO"; then :
57574  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57575else
57576  ac_cv_lib_dnet_stub_dnet_ntoa=no
57577fi
57578rm -f core conftest.err conftest.$ac_objext \
57579    conftest$ac_exeext conftest.$ac_ext
57580LIBS=$ac_check_lib_save_LIBS
57581fi
57582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57583$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57584if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57585  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57586fi
57587
57588    fi
57589fi
57590rm -f core conftest.err conftest.$ac_objext \
57591    conftest$ac_exeext conftest.$ac_ext
57592    LIBS="$ac_xsave_LIBS"
57593
57594    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57595    # to get the SysV transport functions.
57596    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57597    # needs -lnsl.
57598    # The nsl library prevents programs from opening the X display
57599    # on Irix 5.2, according to T.E. Dickey.
57600    # The functions gethostbyname, getservbyname, and inet_addr are
57601    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57602    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57603if test "x$ac_cv_func_gethostbyname" = xyes; then :
57604
57605fi
57606
57607    if test $ac_cv_func_gethostbyname = no; then
57608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57609$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57610if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57611  $as_echo_n "(cached) " >&6
57612else
57613  ac_check_lib_save_LIBS=$LIBS
57614LIBS="-lnsl  $LIBS"
57615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57616/* end confdefs.h.  */
57617
57618/* Override any GCC internal prototype to avoid an error.
57619   Use char because int might match the return type of a GCC
57620   builtin and then its argument prototype would still apply.  */
57621#ifdef __cplusplus
57622extern "C"
57623#endif
57624char gethostbyname ();
57625int
57626main ()
57627{
57628return gethostbyname ();
57629  ;
57630  return 0;
57631}
57632_ACEOF
57633if ac_fn_cxx_try_link "$LINENO"; then :
57634  ac_cv_lib_nsl_gethostbyname=yes
57635else
57636  ac_cv_lib_nsl_gethostbyname=no
57637fi
57638rm -f core conftest.err conftest.$ac_objext \
57639    conftest$ac_exeext conftest.$ac_ext
57640LIBS=$ac_check_lib_save_LIBS
57641fi
57642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57643$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57644if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57645  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57646fi
57647
57648      if test $ac_cv_lib_nsl_gethostbyname = no; then
57649	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57650$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57651if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57652  $as_echo_n "(cached) " >&6
57653else
57654  ac_check_lib_save_LIBS=$LIBS
57655LIBS="-lbsd  $LIBS"
57656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57657/* end confdefs.h.  */
57658
57659/* Override any GCC internal prototype to avoid an error.
57660   Use char because int might match the return type of a GCC
57661   builtin and then its argument prototype would still apply.  */
57662#ifdef __cplusplus
57663extern "C"
57664#endif
57665char gethostbyname ();
57666int
57667main ()
57668{
57669return gethostbyname ();
57670  ;
57671  return 0;
57672}
57673_ACEOF
57674if ac_fn_cxx_try_link "$LINENO"; then :
57675  ac_cv_lib_bsd_gethostbyname=yes
57676else
57677  ac_cv_lib_bsd_gethostbyname=no
57678fi
57679rm -f core conftest.err conftest.$ac_objext \
57680    conftest$ac_exeext conftest.$ac_ext
57681LIBS=$ac_check_lib_save_LIBS
57682fi
57683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57684$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57685if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57686  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57687fi
57688
57689      fi
57690    fi
57691
57692    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57693    # socket/setsockopt and other routines are undefined under SCO ODT
57694    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57695    # on later versions), says Simon Leinen: it contains gethostby*
57696    # variants that don't use the name server (or something).  -lsocket
57697    # must be given before -lnsl if both are needed.  We assume that
57698    # if connect needs -lnsl, so does gethostbyname.
57699    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57700if test "x$ac_cv_func_connect" = xyes; then :
57701
57702fi
57703
57704    if test $ac_cv_func_connect = no; then
57705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57706$as_echo_n "checking for connect in -lsocket... " >&6; }
57707if ${ac_cv_lib_socket_connect+:} false; then :
57708  $as_echo_n "(cached) " >&6
57709else
57710  ac_check_lib_save_LIBS=$LIBS
57711LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57713/* end confdefs.h.  */
57714
57715/* Override any GCC internal prototype to avoid an error.
57716   Use char because int might match the return type of a GCC
57717   builtin and then its argument prototype would still apply.  */
57718#ifdef __cplusplus
57719extern "C"
57720#endif
57721char connect ();
57722int
57723main ()
57724{
57725return connect ();
57726  ;
57727  return 0;
57728}
57729_ACEOF
57730if ac_fn_cxx_try_link "$LINENO"; then :
57731  ac_cv_lib_socket_connect=yes
57732else
57733  ac_cv_lib_socket_connect=no
57734fi
57735rm -f core conftest.err conftest.$ac_objext \
57736    conftest$ac_exeext conftest.$ac_ext
57737LIBS=$ac_check_lib_save_LIBS
57738fi
57739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57740$as_echo "$ac_cv_lib_socket_connect" >&6; }
57741if test "x$ac_cv_lib_socket_connect" = xyes; then :
57742  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57743fi
57744
57745    fi
57746
57747    # Guillermo Gomez says -lposix is necessary on A/UX.
57748    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57749if test "x$ac_cv_func_remove" = xyes; then :
57750
57751fi
57752
57753    if test $ac_cv_func_remove = no; then
57754      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57755$as_echo_n "checking for remove in -lposix... " >&6; }
57756if ${ac_cv_lib_posix_remove+:} false; then :
57757  $as_echo_n "(cached) " >&6
57758else
57759  ac_check_lib_save_LIBS=$LIBS
57760LIBS="-lposix  $LIBS"
57761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57762/* end confdefs.h.  */
57763
57764/* Override any GCC internal prototype to avoid an error.
57765   Use char because int might match the return type of a GCC
57766   builtin and then its argument prototype would still apply.  */
57767#ifdef __cplusplus
57768extern "C"
57769#endif
57770char remove ();
57771int
57772main ()
57773{
57774return remove ();
57775  ;
57776  return 0;
57777}
57778_ACEOF
57779if ac_fn_cxx_try_link "$LINENO"; then :
57780  ac_cv_lib_posix_remove=yes
57781else
57782  ac_cv_lib_posix_remove=no
57783fi
57784rm -f core conftest.err conftest.$ac_objext \
57785    conftest$ac_exeext conftest.$ac_ext
57786LIBS=$ac_check_lib_save_LIBS
57787fi
57788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57789$as_echo "$ac_cv_lib_posix_remove" >&6; }
57790if test "x$ac_cv_lib_posix_remove" = xyes; then :
57791  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57792fi
57793
57794    fi
57795
57796    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57797    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57798if test "x$ac_cv_func_shmat" = xyes; then :
57799
57800fi
57801
57802    if test $ac_cv_func_shmat = no; then
57803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57804$as_echo_n "checking for shmat in -lipc... " >&6; }
57805if ${ac_cv_lib_ipc_shmat+:} false; then :
57806  $as_echo_n "(cached) " >&6
57807else
57808  ac_check_lib_save_LIBS=$LIBS
57809LIBS="-lipc  $LIBS"
57810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57811/* end confdefs.h.  */
57812
57813/* Override any GCC internal prototype to avoid an error.
57814   Use char because int might match the return type of a GCC
57815   builtin and then its argument prototype would still apply.  */
57816#ifdef __cplusplus
57817extern "C"
57818#endif
57819char shmat ();
57820int
57821main ()
57822{
57823return shmat ();
57824  ;
57825  return 0;
57826}
57827_ACEOF
57828if ac_fn_cxx_try_link "$LINENO"; then :
57829  ac_cv_lib_ipc_shmat=yes
57830else
57831  ac_cv_lib_ipc_shmat=no
57832fi
57833rm -f core conftest.err conftest.$ac_objext \
57834    conftest$ac_exeext conftest.$ac_ext
57835LIBS=$ac_check_lib_save_LIBS
57836fi
57837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57838$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57839if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57840  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57841fi
57842
57843    fi
57844  fi
57845
57846  # Check for libraries that X11R6 Xt/Xaw programs need.
57847  ac_save_LDFLAGS=$LDFLAGS
57848  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57849  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57850  # check for ICE first), but we must link in the order -lSM -lICE or
57851  # we get undefined symbols.  So assume we have SM if we have ICE.
57852  # These have to be linked with before -lX11, unlike the other
57853  # libraries we check for below, so use a different variable.
57854  # John Interrante, Karl Berry
57855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57856$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57857if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57858  $as_echo_n "(cached) " >&6
57859else
57860  ac_check_lib_save_LIBS=$LIBS
57861LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57863/* end confdefs.h.  */
57864
57865/* Override any GCC internal prototype to avoid an error.
57866   Use char because int might match the return type of a GCC
57867   builtin and then its argument prototype would still apply.  */
57868#ifdef __cplusplus
57869extern "C"
57870#endif
57871char IceConnectionNumber ();
57872int
57873main ()
57874{
57875return IceConnectionNumber ();
57876  ;
57877  return 0;
57878}
57879_ACEOF
57880if ac_fn_cxx_try_link "$LINENO"; then :
57881  ac_cv_lib_ICE_IceConnectionNumber=yes
57882else
57883  ac_cv_lib_ICE_IceConnectionNumber=no
57884fi
57885rm -f core conftest.err conftest.$ac_objext \
57886    conftest$ac_exeext conftest.$ac_ext
57887LIBS=$ac_check_lib_save_LIBS
57888fi
57889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57890$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57891if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57892  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57893fi
57894
57895  LDFLAGS=$ac_save_LDFLAGS
57896
57897fi
57898
57899
57900    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57901    # this doesn't make sense so we remove it.
57902    if test "x$COMPILE_TYPE" = xcross; then
57903      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57904    fi
57905
57906    if test "x$no_x" = xyes; then
57907
57908  # Print a helpful message on how to acquire the necessary build dependency.
57909  # x11 is the help tag: freetype, cups, alsa etc
57910  MISSING_DEPENDENCY=x11
57911
57912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57913    cygwin_help $MISSING_DEPENDENCY
57914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57915    msys_help $MISSING_DEPENDENCY
57916  else
57917    PKGHANDLER_COMMAND=
57918
57919    case $PKGHANDLER in
57920      apt-get)
57921        apt_help     $MISSING_DEPENDENCY ;;
57922      yum)
57923        yum_help     $MISSING_DEPENDENCY ;;
57924      brew)
57925        brew_help    $MISSING_DEPENDENCY ;;
57926      port)
57927        port_help    $MISSING_DEPENDENCY ;;
57928      pkgutil)
57929        pkgutil_help $MISSING_DEPENDENCY ;;
57930      pkgadd)
57931        pkgadd_help  $MISSING_DEPENDENCY ;;
57932    esac
57933
57934    if test "x$PKGHANDLER_COMMAND" != x; then
57935      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57936    fi
57937  fi
57938
57939      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57940    fi
57941
57942    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57943      OPENWIN_HOME="/usr/openwin"
57944      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57945      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57946          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57947    fi
57948
57949    ac_ext=c
57950ac_cpp='$CPP $CPPFLAGS'
57951ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57952ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57953ac_compiler_gnu=$ac_cv_c_compiler_gnu
57954
57955    OLD_CFLAGS="$CFLAGS"
57956    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57957
57958    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57959    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57960do :
57961  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57962ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57963          # include <X11/Xlib.h>
57964          # include <X11/Xutil.h>
57965
57966
57967"
57968if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57969  cat >>confdefs.h <<_ACEOF
57970#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57971_ACEOF
57972 X11_HEADERS_OK=yes
57973else
57974  X11_HEADERS_OK=no; break
57975fi
57976
57977done
57978
57979
57980    if test "x$X11_HEADERS_OK" = xno; then
57981
57982  # Print a helpful message on how to acquire the necessary build dependency.
57983  # x11 is the help tag: freetype, cups, alsa etc
57984  MISSING_DEPENDENCY=x11
57985
57986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57987    cygwin_help $MISSING_DEPENDENCY
57988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57989    msys_help $MISSING_DEPENDENCY
57990  else
57991    PKGHANDLER_COMMAND=
57992
57993    case $PKGHANDLER in
57994      apt-get)
57995        apt_help     $MISSING_DEPENDENCY ;;
57996      yum)
57997        yum_help     $MISSING_DEPENDENCY ;;
57998      brew)
57999        brew_help    $MISSING_DEPENDENCY ;;
58000      port)
58001        port_help    $MISSING_DEPENDENCY ;;
58002      pkgutil)
58003        pkgutil_help $MISSING_DEPENDENCY ;;
58004      pkgadd)
58005        pkgadd_help  $MISSING_DEPENDENCY ;;
58006    esac
58007
58008    if test "x$PKGHANDLER_COMMAND" != x; then
58009      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58010    fi
58011  fi
58012
58013      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58014    fi
58015
58016    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
58017    # defined in libawt_xawt.
58018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
58019$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
58020    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58021/* end confdefs.h.  */
58022#include <X11/extensions/Xrender.h>
58023int
58024main ()
58025{
58026XLinearGradient x;
58027  ;
58028  return 0;
58029}
58030_ACEOF
58031if ac_fn_c_try_compile "$LINENO"; then :
58032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58033$as_echo "yes" >&6; }
58034else
58035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58036$as_echo "no" >&6; }
58037         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
58038fi
58039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58040
58041    CFLAGS="$OLD_CFLAGS"
58042    ac_ext=cpp
58043ac_cpp='$CXXCPP $CPPFLAGS'
58044ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58045ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58046ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58047
58048  fi # NEEDS_LIB_X11
58049
58050
58051
58052
58053
58054
58055# Check whether --with-cups was given.
58056if test "${with_cups+set}" = set; then :
58057  withval=$with_cups;
58058fi
58059
58060
58061# Check whether --with-cups-include was given.
58062if test "${with_cups_include+set}" = set; then :
58063  withval=$with_cups_include;
58064fi
58065
58066
58067  if test "x$NEEDS_LIB_CUPS" = xfalse; then
58068    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
58069        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
58070      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
58071$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
58072    fi
58073    CUPS_CFLAGS=
58074  else
58075    CUPS_FOUND=no
58076
58077    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
58078      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
58079    fi
58080
58081    if test "x${with_cups}" != x; then
58082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58083$as_echo_n "checking for cups headers... " >&6; }
58084      if test -s "${with_cups}/include/cups/cups.h"; then
58085        CUPS_CFLAGS="-I${with_cups}/include"
58086        CUPS_FOUND=yes
58087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58088$as_echo "$CUPS_FOUND" >&6; }
58089      else
58090        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
58091      fi
58092    fi
58093    if test "x${with_cups_include}" != x; then
58094      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58095$as_echo_n "checking for cups headers... " >&6; }
58096      if test -s "${with_cups_include}/cups/cups.h"; then
58097        CUPS_CFLAGS="-I${with_cups_include}"
58098        CUPS_FOUND=yes
58099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58100$as_echo "$CUPS_FOUND" >&6; }
58101      else
58102        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58103      fi
58104    fi
58105    if test "x$CUPS_FOUND" = xno; then
58106      # Are the cups headers installed in the default /usr/include location?
58107      for ac_header in cups/cups.h cups/ppd.h
58108do :
58109  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58110ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58111if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58112  cat >>confdefs.h <<_ACEOF
58113#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58114_ACEOF
58115
58116          CUPS_FOUND=yes
58117          CUPS_CFLAGS=
58118          DEFAULT_CUPS=yes
58119
58120fi
58121
58122done
58123
58124    fi
58125    if test "x$CUPS_FOUND" = xno; then
58126
58127  # Print a helpful message on how to acquire the necessary build dependency.
58128  # cups is the help tag: freetype, cups, alsa etc
58129  MISSING_DEPENDENCY=cups
58130
58131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58132    cygwin_help $MISSING_DEPENDENCY
58133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58134    msys_help $MISSING_DEPENDENCY
58135  else
58136    PKGHANDLER_COMMAND=
58137
58138    case $PKGHANDLER in
58139      apt-get)
58140        apt_help     $MISSING_DEPENDENCY ;;
58141      yum)
58142        yum_help     $MISSING_DEPENDENCY ;;
58143      brew)
58144        brew_help    $MISSING_DEPENDENCY ;;
58145      port)
58146        port_help    $MISSING_DEPENDENCY ;;
58147      pkgutil)
58148        pkgutil_help $MISSING_DEPENDENCY ;;
58149      pkgadd)
58150        pkgadd_help  $MISSING_DEPENDENCY ;;
58151    esac
58152
58153    if test "x$PKGHANDLER_COMMAND" != x; then
58154      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58155    fi
58156  fi
58157
58158      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58159    fi
58160  fi
58161
58162
58163
58164
58165
58166# Check whether --with-freetype was given.
58167if test "${with_freetype+set}" = set; then :
58168  withval=$with_freetype;
58169fi
58170
58171
58172# Check whether --with-freetype-include was given.
58173if test "${with_freetype_include+set}" = set; then :
58174  withval=$with_freetype_include;
58175fi
58176
58177
58178# Check whether --with-freetype-lib was given.
58179if test "${with_freetype_lib+set}" = set; then :
58180  withval=$with_freetype_lib;
58181fi
58182
58183
58184# Check whether --with-freetype-src was given.
58185if test "${with_freetype_src+set}" = set; then :
58186  withval=$with_freetype_src;
58187fi
58188
58189  # Check whether --enable-freetype-bundling was given.
58190if test "${enable_freetype_bundling+set}" = set; then :
58191  enableval=$enable_freetype_bundling;
58192fi
58193
58194
58195# Check whether --with-freetype-license was given.
58196if test "${with_freetype_license+set}" = set; then :
58197  withval=$with_freetype_license;
58198fi
58199
58200
58201  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58202  FREETYPE_BASE_NAME=freetype
58203  FREETYPE_CFLAGS=
58204  FREETYPE_LIBS=
58205  FREETYPE_BUNDLE_LIB_PATH=
58206
58207  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58208    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58209        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58210        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58211        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58212      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58213$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58214    fi
58215    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58216      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58217$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58218    fi
58219  else
58220    # freetype is needed to build; go get it!
58221
58222    BUNDLE_FREETYPE="$enable_freetype_bundling"
58223
58224    if  test "x$with_freetype_src" != x; then
58225      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58226        # Try to build freetype if --with-freetype-src was given on Windows
58227
58228  FREETYPE_SRC_PATH="$with_freetype_src"
58229  BUILD_FREETYPE=yes
58230
58231  # Check if the freetype sources are acessible..
58232  if ! test -d $FREETYPE_SRC_PATH; then
58233    { $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
58234$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58235    BUILD_FREETYPE=no
58236  fi
58237  # ..and contain a vc2010 project file
58238  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58239  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58240    { $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
58241$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58242    BUILD_FREETYPE=no
58243  fi
58244  # Now check if configure found a version of 'msbuild.exe'
58245  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58246    { $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
58247$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;}
58248    BUILD_FREETYPE=no
58249  fi
58250
58251  # Ready to go..
58252  if test "x$BUILD_FREETYPE" = xyes; then
58253    # msbuild requires trailing slashes for output directories
58254    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58255    freetype_lib_path_unix="$freetype_lib_path"
58256    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58257
58258  unix_path="$vcxproj_path"
58259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58260    windows_path=`$CYGPATH -m "$unix_path"`
58261    vcxproj_path="$windows_path"
58262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58263    windows_path=`cmd //c echo $unix_path`
58264    vcxproj_path="$windows_path"
58265  fi
58266
58267
58268  unix_path="$freetype_lib_path"
58269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58270    windows_path=`$CYGPATH -m "$unix_path"`
58271    freetype_lib_path="$windows_path"
58272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58273    windows_path=`cmd //c echo $unix_path`
58274    freetype_lib_path="$windows_path"
58275  fi
58276
58277
58278  unix_path="$freetype_obj_path"
58279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58280    windows_path=`$CYGPATH -m "$unix_path"`
58281    freetype_obj_path="$windows_path"
58282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58283    windows_path=`cmd //c echo $unix_path`
58284    freetype_obj_path="$windows_path"
58285  fi
58286
58287    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58288      freetype_platform=x64
58289    else
58290      freetype_platform=win32
58291    fi
58292
58293    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58294    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58295    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58296    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58297    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58298$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58299
58300    # First we try to build the freetype.dll
58301    $ECHO -e "@echo off\n"\
58302        "$MSBUILD $vcxproj_path "\
58303        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58304        "/p:Configuration=\"Release Multithreaded\" "\
58305        "/p:Platform=$freetype_platform "\
58306        "/p:ConfigurationType=DynamicLibrary "\
58307        "/p:TargetName=freetype "\
58308        "/p:OutDir=\"$freetype_lib_path\" "\
58309        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58310    cmd /c freetype.bat
58311
58312    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58313      # If that succeeds we also build freetype.lib
58314      $ECHO -e "@echo off\n"\
58315          "$MSBUILD $vcxproj_path "\
58316          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58317          "/p:Configuration=\"Release Multithreaded\" "\
58318          "/p:Platform=$freetype_platform "\
58319          "/p:ConfigurationType=StaticLibrary "\
58320          "/p:TargetName=freetype "\
58321          "/p:OutDir=\"$freetype_lib_path\" "\
58322          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58323      cmd /c freetype.bat
58324
58325      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58326        # Once we build both, lib and dll, set freetype lib and include path appropriately
58327        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58328        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58329        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58330$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58331      else
58332        BUILD_FREETYPE=no
58333      fi
58334    else
58335      BUILD_FREETYPE=no
58336    fi
58337  fi
58338
58339        if test "x$BUILD_FREETYPE" = xyes; then
58340          # Okay, we built it. Check that it works.
58341
58342  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58343  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58344  METHOD="--with-freetype-src"
58345
58346  # Let's start with an optimistic view of the world :-)
58347  FOUND_FREETYPE=yes
58348
58349  # First look for the canonical freetype main include file ft2build.h.
58350  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58351    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58352    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58353    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58354      # Fail.
58355      FOUND_FREETYPE=no
58356    fi
58357  fi
58358
58359  if test "x$FOUND_FREETYPE" = xyes; then
58360    # Include file found, let's continue the sanity check.
58361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58362$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58363
58364    # Reset to default value
58365    FREETYPE_BASE_NAME=freetype
58366    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58367    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58368      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58369          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58370        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58371        # for the .6 version explicitly.
58372        FREETYPE_BASE_NAME=freetype.6
58373        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58374        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58375$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58376      else
58377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58378$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58379        FOUND_FREETYPE=no
58380      fi
58381    else
58382      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58383        # On Windows, we will need both .lib and .dll file.
58384        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58385          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58386$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58387          FOUND_FREETYPE=no
58388        fi
58389      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58390          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58391        # Found lib in isa dir, use that instead.
58392        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58393        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58394$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58395      fi
58396    fi
58397  fi
58398
58399  if test "x$FOUND_FREETYPE" = xyes; then
58400
58401  # Only process if variable expands to non-empty
58402
58403  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58405
58406  # Input might be given as Windows format, start by converting to
58407  # unix format.
58408  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58409  new_path=`$CYGPATH -u "$path"`
58410
58411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58414  # "foo.exe" is OK but "foo" is an error.
58415  #
58416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58417  # It is also a way to make sure we got the proper file name for the real test later on.
58418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58419  if test "x$test_shortpath" = x; then
58420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58422    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58423  fi
58424
58425  # Call helper function which possibly converts this using DOS-style short mode.
58426  # If so, the updated path is stored in $new_path.
58427
58428  input_path="$new_path"
58429  # Check if we need to convert this using DOS-style short mode. If the path
58430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58431  # take no chances and rewrite it.
58432  # Note: m4 eats our [], so we need to use [ and ] instead.
58433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58434  if test "x$has_forbidden_chars" != x; then
58435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58439      # Going to short mode and back again did indeed matter. Since short mode is
58440      # case insensitive, let's make it lowercase to improve readability.
58441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58442      # Now convert it back to Unix-style (cygpath)
58443      input_path=`$CYGPATH -u "$shortmode_path"`
58444      new_path="$input_path"
58445    fi
58446  fi
58447
58448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58449  if test "x$test_cygdrive_prefix" = x; then
58450    # As a simple fix, exclude /usr/bin since it's not a real path.
58451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58453      # a path prefixed by /cygdrive for fixpath to work.
58454      new_path="$CYGWIN_ROOT_PATH$input_path"
58455    fi
58456  fi
58457
58458
58459  if test "x$path" != "x$new_path"; then
58460    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58463  fi
58464
58465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58466
58467  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58468  has_colon=`$ECHO $path | $GREP ^.:`
58469  new_path="$path"
58470  if test "x$has_colon" = x; then
58471    # Not in mixed or Windows style, start by that.
58472    new_path=`cmd //c echo $path`
58473  fi
58474
58475
58476  input_path="$new_path"
58477  # Check if we need to convert this using DOS-style short mode. If the path
58478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58479  # take no chances and rewrite it.
58480  # Note: m4 eats our [], so we need to use [ and ] instead.
58481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58482  if test "x$has_forbidden_chars" != x; then
58483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58485  fi
58486
58487
58488  windows_path="$new_path"
58489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58490    unix_path=`$CYGPATH -u "$windows_path"`
58491    new_path="$unix_path"
58492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58494    new_path="$unix_path"
58495  fi
58496
58497  if test "x$path" != "x$new_path"; then
58498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58501  fi
58502
58503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58505
58506    else
58507      # We're on a unix platform. Hooray! :)
58508      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58509      has_space=`$ECHO "$path" | $GREP " "`
58510      if test "x$has_space" != x; then
58511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58514      fi
58515
58516      # Use eval to expand a potential ~
58517      eval path="$path"
58518      if test ! -f "$path" && test ! -d "$path"; then
58519        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58520      fi
58521
58522      if test -d "$path"; then
58523        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58524      else
58525        dir="`$DIRNAME "$path"`"
58526        base="`$BASENAME "$path"`"
58527        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58528      fi
58529    fi
58530  fi
58531
58532
58533  # Only process if variable expands to non-empty
58534
58535  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58537
58538  # Input might be given as Windows format, start by converting to
58539  # unix format.
58540  path="$POTENTIAL_FREETYPE_LIB_PATH"
58541  new_path=`$CYGPATH -u "$path"`
58542
58543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58546  # "foo.exe" is OK but "foo" is an error.
58547  #
58548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58549  # It is also a way to make sure we got the proper file name for the real test later on.
58550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58551  if test "x$test_shortpath" = x; then
58552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58554    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58555  fi
58556
58557  # Call helper function which possibly converts this using DOS-style short mode.
58558  # If so, the updated path is stored in $new_path.
58559
58560  input_path="$new_path"
58561  # Check if we need to convert this using DOS-style short mode. If the path
58562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58563  # take no chances and rewrite it.
58564  # Note: m4 eats our [], so we need to use [ and ] instead.
58565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58566  if test "x$has_forbidden_chars" != x; then
58567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58571      # Going to short mode and back again did indeed matter. Since short mode is
58572      # case insensitive, let's make it lowercase to improve readability.
58573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58574      # Now convert it back to Unix-style (cygpath)
58575      input_path=`$CYGPATH -u "$shortmode_path"`
58576      new_path="$input_path"
58577    fi
58578  fi
58579
58580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58581  if test "x$test_cygdrive_prefix" = x; then
58582    # As a simple fix, exclude /usr/bin since it's not a real path.
58583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58585      # a path prefixed by /cygdrive for fixpath to work.
58586      new_path="$CYGWIN_ROOT_PATH$input_path"
58587    fi
58588  fi
58589
58590
58591  if test "x$path" != "x$new_path"; then
58592    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58595  fi
58596
58597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58598
58599  path="$POTENTIAL_FREETYPE_LIB_PATH"
58600  has_colon=`$ECHO $path | $GREP ^.:`
58601  new_path="$path"
58602  if test "x$has_colon" = x; then
58603    # Not in mixed or Windows style, start by that.
58604    new_path=`cmd //c echo $path`
58605  fi
58606
58607
58608  input_path="$new_path"
58609  # Check if we need to convert this using DOS-style short mode. If the path
58610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58611  # take no chances and rewrite it.
58612  # Note: m4 eats our [], so we need to use [ and ] instead.
58613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58614  if test "x$has_forbidden_chars" != x; then
58615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58617  fi
58618
58619
58620  windows_path="$new_path"
58621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58622    unix_path=`$CYGPATH -u "$windows_path"`
58623    new_path="$unix_path"
58624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58626    new_path="$unix_path"
58627  fi
58628
58629  if test "x$path" != "x$new_path"; then
58630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58633  fi
58634
58635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58637
58638    else
58639      # We're on a unix platform. Hooray! :)
58640      path="$POTENTIAL_FREETYPE_LIB_PATH"
58641      has_space=`$ECHO "$path" | $GREP " "`
58642      if test "x$has_space" != x; then
58643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58646      fi
58647
58648      # Use eval to expand a potential ~
58649      eval path="$path"
58650      if test ! -f "$path" && test ! -d "$path"; then
58651        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58652      fi
58653
58654      if test -d "$path"; then
58655        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58656      else
58657        dir="`$DIRNAME "$path"`"
58658        base="`$BASENAME "$path"`"
58659        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58660      fi
58661    fi
58662  fi
58663
58664
58665    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58667$as_echo_n "checking for freetype includes... " >&6; }
58668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58669$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58670    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58672$as_echo_n "checking for freetype libraries... " >&6; }
58673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58674$as_echo "$FREETYPE_LIB_PATH" >&6; }
58675  fi
58676
58677          if test "x$FOUND_FREETYPE" != xyes; then
58678            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58679          fi
58680        else
58681          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58682$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58683          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58684        fi
58685      else
58686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58687$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58688      fi
58689    fi
58690
58691    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58692      # User has specified settings
58693
58694      if test "x$BUNDLE_FREETYPE" = x; then
58695        # If not specified, default is to bundle freetype
58696        BUNDLE_FREETYPE=yes
58697      fi
58698
58699      if test "x$with_freetype" != x; then
58700        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58701        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58702      fi
58703
58704      # Allow --with-freetype-lib and --with-freetype-include to override
58705      if test "x$with_freetype_include" != x; then
58706        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58707      fi
58708      if test "x$with_freetype_lib" != x; then
58709        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58710      fi
58711
58712      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58713        # Okay, we got it. Check that it works.
58714
58715  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58716  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58717  METHOD="--with-freetype"
58718
58719  # Let's start with an optimistic view of the world :-)
58720  FOUND_FREETYPE=yes
58721
58722  # First look for the canonical freetype main include file ft2build.h.
58723  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58724    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58725    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58726    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58727      # Fail.
58728      FOUND_FREETYPE=no
58729    fi
58730  fi
58731
58732  if test "x$FOUND_FREETYPE" = xyes; then
58733    # Include file found, let's continue the sanity check.
58734    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58735$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58736
58737    # Reset to default value
58738    FREETYPE_BASE_NAME=freetype
58739    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58740    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58741      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58742          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58743        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58744        # for the .6 version explicitly.
58745        FREETYPE_BASE_NAME=freetype.6
58746        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58747        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58748$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58749      else
58750        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58751$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58752        FOUND_FREETYPE=no
58753      fi
58754    else
58755      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58756        # On Windows, we will need both .lib and .dll file.
58757        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58758          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58759$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58760          FOUND_FREETYPE=no
58761        fi
58762      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58763          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58764        # Found lib in isa dir, use that instead.
58765        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58766        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58767$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58768      fi
58769    fi
58770  fi
58771
58772  if test "x$FOUND_FREETYPE" = xyes; then
58773
58774  # Only process if variable expands to non-empty
58775
58776  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58778
58779  # Input might be given as Windows format, start by converting to
58780  # unix format.
58781  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58782  new_path=`$CYGPATH -u "$path"`
58783
58784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58787  # "foo.exe" is OK but "foo" is an error.
58788  #
58789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58790  # It is also a way to make sure we got the proper file name for the real test later on.
58791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58792  if test "x$test_shortpath" = x; then
58793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58795    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58796  fi
58797
58798  # Call helper function which possibly converts this using DOS-style short mode.
58799  # If so, the updated path is stored in $new_path.
58800
58801  input_path="$new_path"
58802  # Check if we need to convert this using DOS-style short mode. If the path
58803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58804  # take no chances and rewrite it.
58805  # Note: m4 eats our [], so we need to use [ and ] instead.
58806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58807  if test "x$has_forbidden_chars" != x; then
58808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58812      # Going to short mode and back again did indeed matter. Since short mode is
58813      # case insensitive, let's make it lowercase to improve readability.
58814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58815      # Now convert it back to Unix-style (cygpath)
58816      input_path=`$CYGPATH -u "$shortmode_path"`
58817      new_path="$input_path"
58818    fi
58819  fi
58820
58821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58822  if test "x$test_cygdrive_prefix" = x; then
58823    # As a simple fix, exclude /usr/bin since it's not a real path.
58824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58826      # a path prefixed by /cygdrive for fixpath to work.
58827      new_path="$CYGWIN_ROOT_PATH$input_path"
58828    fi
58829  fi
58830
58831
58832  if test "x$path" != "x$new_path"; then
58833    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58835$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58836  fi
58837
58838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58839
58840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58841  has_colon=`$ECHO $path | $GREP ^.:`
58842  new_path="$path"
58843  if test "x$has_colon" = x; then
58844    # Not in mixed or Windows style, start by that.
58845    new_path=`cmd //c echo $path`
58846  fi
58847
58848
58849  input_path="$new_path"
58850  # Check if we need to convert this using DOS-style short mode. If the path
58851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58852  # take no chances and rewrite it.
58853  # Note: m4 eats our [], so we need to use [ and ] instead.
58854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58855  if test "x$has_forbidden_chars" != x; then
58856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58858  fi
58859
58860
58861  windows_path="$new_path"
58862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58863    unix_path=`$CYGPATH -u "$windows_path"`
58864    new_path="$unix_path"
58865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58867    new_path="$unix_path"
58868  fi
58869
58870  if test "x$path" != "x$new_path"; then
58871    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58873$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58874  fi
58875
58876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58878
58879    else
58880      # We're on a unix platform. Hooray! :)
58881      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58882      has_space=`$ECHO "$path" | $GREP " "`
58883      if test "x$has_space" != x; then
58884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58885$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58887      fi
58888
58889      # Use eval to expand a potential ~
58890      eval path="$path"
58891      if test ! -f "$path" && test ! -d "$path"; then
58892        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58893      fi
58894
58895      if test -d "$path"; then
58896        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58897      else
58898        dir="`$DIRNAME "$path"`"
58899        base="`$BASENAME "$path"`"
58900        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58901      fi
58902    fi
58903  fi
58904
58905
58906  # Only process if variable expands to non-empty
58907
58908  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58910
58911  # Input might be given as Windows format, start by converting to
58912  # unix format.
58913  path="$POTENTIAL_FREETYPE_LIB_PATH"
58914  new_path=`$CYGPATH -u "$path"`
58915
58916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58919  # "foo.exe" is OK but "foo" is an error.
58920  #
58921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58922  # It is also a way to make sure we got the proper file name for the real test later on.
58923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58924  if test "x$test_shortpath" = x; then
58925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58927    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58928  fi
58929
58930  # Call helper function which possibly converts this using DOS-style short mode.
58931  # If so, the updated path is stored in $new_path.
58932
58933  input_path="$new_path"
58934  # Check if we need to convert this using DOS-style short mode. If the path
58935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58936  # take no chances and rewrite it.
58937  # Note: m4 eats our [], so we need to use [ and ] instead.
58938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58939  if test "x$has_forbidden_chars" != x; then
58940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58944      # Going to short mode and back again did indeed matter. Since short mode is
58945      # case insensitive, let's make it lowercase to improve readability.
58946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58947      # Now convert it back to Unix-style (cygpath)
58948      input_path=`$CYGPATH -u "$shortmode_path"`
58949      new_path="$input_path"
58950    fi
58951  fi
58952
58953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58954  if test "x$test_cygdrive_prefix" = x; then
58955    # As a simple fix, exclude /usr/bin since it's not a real path.
58956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58958      # a path prefixed by /cygdrive for fixpath to work.
58959      new_path="$CYGWIN_ROOT_PATH$input_path"
58960    fi
58961  fi
58962
58963
58964  if test "x$path" != "x$new_path"; then
58965    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58968  fi
58969
58970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58971
58972  path="$POTENTIAL_FREETYPE_LIB_PATH"
58973  has_colon=`$ECHO $path | $GREP ^.:`
58974  new_path="$path"
58975  if test "x$has_colon" = x; then
58976    # Not in mixed or Windows style, start by that.
58977    new_path=`cmd //c echo $path`
58978  fi
58979
58980
58981  input_path="$new_path"
58982  # Check if we need to convert this using DOS-style short mode. If the path
58983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58984  # take no chances and rewrite it.
58985  # Note: m4 eats our [], so we need to use [ and ] instead.
58986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58987  if test "x$has_forbidden_chars" != x; then
58988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58990  fi
58991
58992
58993  windows_path="$new_path"
58994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58995    unix_path=`$CYGPATH -u "$windows_path"`
58996    new_path="$unix_path"
58997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58999    new_path="$unix_path"
59000  fi
59001
59002  if test "x$path" != "x$new_path"; then
59003    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59006  fi
59007
59008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59010
59011    else
59012      # We're on a unix platform. Hooray! :)
59013      path="$POTENTIAL_FREETYPE_LIB_PATH"
59014      has_space=`$ECHO "$path" | $GREP " "`
59015      if test "x$has_space" != x; then
59016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59018        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59019      fi
59020
59021      # Use eval to expand a potential ~
59022      eval path="$path"
59023      if test ! -f "$path" && test ! -d "$path"; then
59024        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59025      fi
59026
59027      if test -d "$path"; then
59028        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59029      else
59030        dir="`$DIRNAME "$path"`"
59031        base="`$BASENAME "$path"`"
59032        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59033      fi
59034    fi
59035  fi
59036
59037
59038    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59040$as_echo_n "checking for freetype includes... " >&6; }
59041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59042$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59043    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59045$as_echo_n "checking for freetype libraries... " >&6; }
59046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59047$as_echo "$FREETYPE_LIB_PATH" >&6; }
59048  fi
59049
59050        if test "x$FOUND_FREETYPE" != xyes; then
59051          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
59052        fi
59053      else
59054        # User specified only one of lib or include. This is an error.
59055        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
59056          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
59057$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
59058          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59059        else
59060          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
59061$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
59062          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59063        fi
59064      fi
59065    else
59066      # User did not specify settings, but we need freetype. Try to locate it.
59067
59068      if test "x$BUNDLE_FREETYPE" = x; then
59069        # If not specified, default is to bundle freetype only on windows
59070        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59071          BUNDLE_FREETYPE=yes
59072        else
59073          BUNDLE_FREETYPE=no
59074        fi
59075      fi
59076
59077      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
59078      if test "x$SYSROOT" = x; then
59079        if test "x$FOUND_FREETYPE" != xyes; then
59080          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
59081          if test "x$PKG_CONFIG" != x; then
59082
59083pkg_failed=no
59084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
59085$as_echo_n "checking for FREETYPE... " >&6; }
59086
59087if test -n "$FREETYPE_CFLAGS"; then
59088    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
59089 elif test -n "$PKG_CONFIG"; then
59090    if test -n "$PKG_CONFIG" && \
59091    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59092  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59093  ac_status=$?
59094  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59095  test $ac_status = 0; }; then
59096  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59097else
59098  pkg_failed=yes
59099fi
59100 else
59101    pkg_failed=untried
59102fi
59103if test -n "$FREETYPE_LIBS"; then
59104    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59105 elif test -n "$PKG_CONFIG"; then
59106    if test -n "$PKG_CONFIG" && \
59107    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59108  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59109  ac_status=$?
59110  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59111  test $ac_status = 0; }; then
59112  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59113else
59114  pkg_failed=yes
59115fi
59116 else
59117    pkg_failed=untried
59118fi
59119
59120
59121
59122if test $pkg_failed = yes; then
59123
59124if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59125        _pkg_short_errors_supported=yes
59126else
59127        _pkg_short_errors_supported=no
59128fi
59129        if test $_pkg_short_errors_supported = yes; then
59130	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59131        else
59132	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59133        fi
59134	# Put the nasty error message in config.log where it belongs
59135	echo "$FREETYPE_PKG_ERRORS" >&5
59136
59137	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59138$as_echo "no" >&6; }
59139                FOUND_FREETYPE=no
59140elif test $pkg_failed = untried; then
59141	FOUND_FREETYPE=no
59142else
59143	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59144	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59146$as_echo "yes" >&6; }
59147	FOUND_FREETYPE=yes
59148fi
59149            if test "x$FOUND_FREETYPE" = xyes; then
59150              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59151              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59152              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59153              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59154                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59155              fi
59156              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59157              if test "x$BUNDLE_FREETYPE" = xyes; then
59158                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59159$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59160                FOUND_FREETYPE=no
59161              else
59162                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59163$as_echo_n "checking for freetype... " >&6; }
59164                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59165$as_echo "yes (using pkg-config)" >&6; }
59166              fi
59167            fi
59168          fi
59169        fi
59170      fi
59171
59172      if test "x$FOUND_FREETYPE" != xyes; then
59173        # Check in well-known locations
59174        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59175          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59176
59177  windows_path="$FREETYPE_BASE_DIR"
59178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59179    unix_path=`$CYGPATH -u "$windows_path"`
59180    FREETYPE_BASE_DIR="$unix_path"
59181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59183    FREETYPE_BASE_DIR="$unix_path"
59184  fi
59185
59186
59187  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59188  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59189  METHOD="well-known location"
59190
59191  # Let's start with an optimistic view of the world :-)
59192  FOUND_FREETYPE=yes
59193
59194  # First look for the canonical freetype main include file ft2build.h.
59195  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59196    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59197    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59198    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59199      # Fail.
59200      FOUND_FREETYPE=no
59201    fi
59202  fi
59203
59204  if test "x$FOUND_FREETYPE" = xyes; then
59205    # Include file found, let's continue the sanity check.
59206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59207$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59208
59209    # Reset to default value
59210    FREETYPE_BASE_NAME=freetype
59211    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59212    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59213      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59214          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59215        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59216        # for the .6 version explicitly.
59217        FREETYPE_BASE_NAME=freetype.6
59218        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59219        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59220$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59221      else
59222        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59223$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59224        FOUND_FREETYPE=no
59225      fi
59226    else
59227      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59228        # On Windows, we will need both .lib and .dll file.
59229        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59230          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59232          FOUND_FREETYPE=no
59233        fi
59234      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59235          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59236        # Found lib in isa dir, use that instead.
59237        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59238        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59239$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59240      fi
59241    fi
59242  fi
59243
59244  if test "x$FOUND_FREETYPE" = xyes; then
59245
59246  # Only process if variable expands to non-empty
59247
59248  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59250
59251  # Input might be given as Windows format, start by converting to
59252  # unix format.
59253  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59254  new_path=`$CYGPATH -u "$path"`
59255
59256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59259  # "foo.exe" is OK but "foo" is an error.
59260  #
59261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59262  # It is also a way to make sure we got the proper file name for the real test later on.
59263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59264  if test "x$test_shortpath" = x; then
59265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59267    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59268  fi
59269
59270  # Call helper function which possibly converts this using DOS-style short mode.
59271  # If so, the updated path is stored in $new_path.
59272
59273  input_path="$new_path"
59274  # Check if we need to convert this using DOS-style short mode. If the path
59275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59276  # take no chances and rewrite it.
59277  # Note: m4 eats our [], so we need to use [ and ] instead.
59278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59279  if test "x$has_forbidden_chars" != x; then
59280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59284      # Going to short mode and back again did indeed matter. Since short mode is
59285      # case insensitive, let's make it lowercase to improve readability.
59286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59287      # Now convert it back to Unix-style (cygpath)
59288      input_path=`$CYGPATH -u "$shortmode_path"`
59289      new_path="$input_path"
59290    fi
59291  fi
59292
59293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59294  if test "x$test_cygdrive_prefix" = x; then
59295    # As a simple fix, exclude /usr/bin since it's not a real path.
59296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59298      # a path prefixed by /cygdrive for fixpath to work.
59299      new_path="$CYGWIN_ROOT_PATH$input_path"
59300    fi
59301  fi
59302
59303
59304  if test "x$path" != "x$new_path"; then
59305    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59308  fi
59309
59310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59311
59312  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59313  has_colon=`$ECHO $path | $GREP ^.:`
59314  new_path="$path"
59315  if test "x$has_colon" = x; then
59316    # Not in mixed or Windows style, start by that.
59317    new_path=`cmd //c echo $path`
59318  fi
59319
59320
59321  input_path="$new_path"
59322  # Check if we need to convert this using DOS-style short mode. If the path
59323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59324  # take no chances and rewrite it.
59325  # Note: m4 eats our [], so we need to use [ and ] instead.
59326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59327  if test "x$has_forbidden_chars" != x; then
59328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59330  fi
59331
59332
59333  windows_path="$new_path"
59334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59335    unix_path=`$CYGPATH -u "$windows_path"`
59336    new_path="$unix_path"
59337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59339    new_path="$unix_path"
59340  fi
59341
59342  if test "x$path" != "x$new_path"; then
59343    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59345$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59346  fi
59347
59348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59350
59351    else
59352      # We're on a unix platform. Hooray! :)
59353      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59354      has_space=`$ECHO "$path" | $GREP " "`
59355      if test "x$has_space" != x; then
59356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59358        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59359      fi
59360
59361      # Use eval to expand a potential ~
59362      eval path="$path"
59363      if test ! -f "$path" && test ! -d "$path"; then
59364        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59365      fi
59366
59367      if test -d "$path"; then
59368        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59369      else
59370        dir="`$DIRNAME "$path"`"
59371        base="`$BASENAME "$path"`"
59372        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59373      fi
59374    fi
59375  fi
59376
59377
59378  # Only process if variable expands to non-empty
59379
59380  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59382
59383  # Input might be given as Windows format, start by converting to
59384  # unix format.
59385  path="$POTENTIAL_FREETYPE_LIB_PATH"
59386  new_path=`$CYGPATH -u "$path"`
59387
59388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59391  # "foo.exe" is OK but "foo" is an error.
59392  #
59393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59394  # It is also a way to make sure we got the proper file name for the real test later on.
59395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59396  if test "x$test_shortpath" = x; then
59397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59399    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59400  fi
59401
59402  # Call helper function which possibly converts this using DOS-style short mode.
59403  # If so, the updated path is stored in $new_path.
59404
59405  input_path="$new_path"
59406  # Check if we need to convert this using DOS-style short mode. If the path
59407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59408  # take no chances and rewrite it.
59409  # Note: m4 eats our [], so we need to use [ and ] instead.
59410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59411  if test "x$has_forbidden_chars" != x; then
59412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59416      # Going to short mode and back again did indeed matter. Since short mode is
59417      # case insensitive, let's make it lowercase to improve readability.
59418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59419      # Now convert it back to Unix-style (cygpath)
59420      input_path=`$CYGPATH -u "$shortmode_path"`
59421      new_path="$input_path"
59422    fi
59423  fi
59424
59425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59426  if test "x$test_cygdrive_prefix" = x; then
59427    # As a simple fix, exclude /usr/bin since it's not a real path.
59428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59430      # a path prefixed by /cygdrive for fixpath to work.
59431      new_path="$CYGWIN_ROOT_PATH$input_path"
59432    fi
59433  fi
59434
59435
59436  if test "x$path" != "x$new_path"; then
59437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59440  fi
59441
59442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59443
59444  path="$POTENTIAL_FREETYPE_LIB_PATH"
59445  has_colon=`$ECHO $path | $GREP ^.:`
59446  new_path="$path"
59447  if test "x$has_colon" = x; then
59448    # Not in mixed or Windows style, start by that.
59449    new_path=`cmd //c echo $path`
59450  fi
59451
59452
59453  input_path="$new_path"
59454  # Check if we need to convert this using DOS-style short mode. If the path
59455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59456  # take no chances and rewrite it.
59457  # Note: m4 eats our [], so we need to use [ and ] instead.
59458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59459  if test "x$has_forbidden_chars" != x; then
59460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59462  fi
59463
59464
59465  windows_path="$new_path"
59466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59467    unix_path=`$CYGPATH -u "$windows_path"`
59468    new_path="$unix_path"
59469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59471    new_path="$unix_path"
59472  fi
59473
59474  if test "x$path" != "x$new_path"; then
59475    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59478  fi
59479
59480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59482
59483    else
59484      # We're on a unix platform. Hooray! :)
59485      path="$POTENTIAL_FREETYPE_LIB_PATH"
59486      has_space=`$ECHO "$path" | $GREP " "`
59487      if test "x$has_space" != x; then
59488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59490        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59491      fi
59492
59493      # Use eval to expand a potential ~
59494      eval path="$path"
59495      if test ! -f "$path" && test ! -d "$path"; then
59496        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59497      fi
59498
59499      if test -d "$path"; then
59500        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59501      else
59502        dir="`$DIRNAME "$path"`"
59503        base="`$BASENAME "$path"`"
59504        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59505      fi
59506    fi
59507  fi
59508
59509
59510    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59512$as_echo_n "checking for freetype includes... " >&6; }
59513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59514$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59515    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59517$as_echo_n "checking for freetype libraries... " >&6; }
59518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59519$as_echo "$FREETYPE_LIB_PATH" >&6; }
59520  fi
59521
59522          if test "x$FOUND_FREETYPE" != xyes; then
59523            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59524
59525  windows_path="$FREETYPE_BASE_DIR"
59526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59527    unix_path=`$CYGPATH -u "$windows_path"`
59528    FREETYPE_BASE_DIR="$unix_path"
59529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59531    FREETYPE_BASE_DIR="$unix_path"
59532  fi
59533
59534
59535  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59536  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59537  METHOD="well-known location"
59538
59539  # Let's start with an optimistic view of the world :-)
59540  FOUND_FREETYPE=yes
59541
59542  # First look for the canonical freetype main include file ft2build.h.
59543  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59544    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59545    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59546    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59547      # Fail.
59548      FOUND_FREETYPE=no
59549    fi
59550  fi
59551
59552  if test "x$FOUND_FREETYPE" = xyes; then
59553    # Include file found, let's continue the sanity check.
59554    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59555$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59556
59557    # Reset to default value
59558    FREETYPE_BASE_NAME=freetype
59559    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59560    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59561      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59562          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59563        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59564        # for the .6 version explicitly.
59565        FREETYPE_BASE_NAME=freetype.6
59566        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59567        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59568$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59569      else
59570        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59571$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59572        FOUND_FREETYPE=no
59573      fi
59574    else
59575      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59576        # On Windows, we will need both .lib and .dll file.
59577        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59578          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59579$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59580          FOUND_FREETYPE=no
59581        fi
59582      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59583          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59584        # Found lib in isa dir, use that instead.
59585        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59586        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59587$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59588      fi
59589    fi
59590  fi
59591
59592  if test "x$FOUND_FREETYPE" = xyes; then
59593
59594  # Only process if variable expands to non-empty
59595
59596  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59598
59599  # Input might be given as Windows format, start by converting to
59600  # unix format.
59601  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59602  new_path=`$CYGPATH -u "$path"`
59603
59604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59607  # "foo.exe" is OK but "foo" is an error.
59608  #
59609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59610  # It is also a way to make sure we got the proper file name for the real test later on.
59611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59612  if test "x$test_shortpath" = x; then
59613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59615    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59616  fi
59617
59618  # Call helper function which possibly converts this using DOS-style short mode.
59619  # If so, the updated path is stored in $new_path.
59620
59621  input_path="$new_path"
59622  # Check if we need to convert this using DOS-style short mode. If the path
59623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59624  # take no chances and rewrite it.
59625  # Note: m4 eats our [], so we need to use [ and ] instead.
59626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59627  if test "x$has_forbidden_chars" != x; then
59628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59632      # Going to short mode and back again did indeed matter. Since short mode is
59633      # case insensitive, let's make it lowercase to improve readability.
59634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59635      # Now convert it back to Unix-style (cygpath)
59636      input_path=`$CYGPATH -u "$shortmode_path"`
59637      new_path="$input_path"
59638    fi
59639  fi
59640
59641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59642  if test "x$test_cygdrive_prefix" = x; then
59643    # As a simple fix, exclude /usr/bin since it's not a real path.
59644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59646      # a path prefixed by /cygdrive for fixpath to work.
59647      new_path="$CYGWIN_ROOT_PATH$input_path"
59648    fi
59649  fi
59650
59651
59652  if test "x$path" != "x$new_path"; then
59653    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59655$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59656  fi
59657
59658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59659
59660  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59661  has_colon=`$ECHO $path | $GREP ^.:`
59662  new_path="$path"
59663  if test "x$has_colon" = x; then
59664    # Not in mixed or Windows style, start by that.
59665    new_path=`cmd //c echo $path`
59666  fi
59667
59668
59669  input_path="$new_path"
59670  # Check if we need to convert this using DOS-style short mode. If the path
59671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59672  # take no chances and rewrite it.
59673  # Note: m4 eats our [], so we need to use [ and ] instead.
59674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59675  if test "x$has_forbidden_chars" != x; then
59676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59678  fi
59679
59680
59681  windows_path="$new_path"
59682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59683    unix_path=`$CYGPATH -u "$windows_path"`
59684    new_path="$unix_path"
59685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59687    new_path="$unix_path"
59688  fi
59689
59690  if test "x$path" != "x$new_path"; then
59691    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59694  fi
59695
59696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59698
59699    else
59700      # We're on a unix platform. Hooray! :)
59701      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59702      has_space=`$ECHO "$path" | $GREP " "`
59703      if test "x$has_space" != x; then
59704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59706        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59707      fi
59708
59709      # Use eval to expand a potential ~
59710      eval path="$path"
59711      if test ! -f "$path" && test ! -d "$path"; then
59712        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59713      fi
59714
59715      if test -d "$path"; then
59716        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59717      else
59718        dir="`$DIRNAME "$path"`"
59719        base="`$BASENAME "$path"`"
59720        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59721      fi
59722    fi
59723  fi
59724
59725
59726  # Only process if variable expands to non-empty
59727
59728  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59730
59731  # Input might be given as Windows format, start by converting to
59732  # unix format.
59733  path="$POTENTIAL_FREETYPE_LIB_PATH"
59734  new_path=`$CYGPATH -u "$path"`
59735
59736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59739  # "foo.exe" is OK but "foo" is an error.
59740  #
59741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59742  # It is also a way to make sure we got the proper file name for the real test later on.
59743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59744  if test "x$test_shortpath" = x; then
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59747    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59748  fi
59749
59750  # Call helper function which possibly converts this using DOS-style short mode.
59751  # If so, the updated path is stored in $new_path.
59752
59753  input_path="$new_path"
59754  # Check if we need to convert this using DOS-style short mode. If the path
59755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59756  # take no chances and rewrite it.
59757  # Note: m4 eats our [], so we need to use [ and ] instead.
59758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59759  if test "x$has_forbidden_chars" != x; then
59760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59764      # Going to short mode and back again did indeed matter. Since short mode is
59765      # case insensitive, let's make it lowercase to improve readability.
59766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59767      # Now convert it back to Unix-style (cygpath)
59768      input_path=`$CYGPATH -u "$shortmode_path"`
59769      new_path="$input_path"
59770    fi
59771  fi
59772
59773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59774  if test "x$test_cygdrive_prefix" = x; then
59775    # As a simple fix, exclude /usr/bin since it's not a real path.
59776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59778      # a path prefixed by /cygdrive for fixpath to work.
59779      new_path="$CYGWIN_ROOT_PATH$input_path"
59780    fi
59781  fi
59782
59783
59784  if test "x$path" != "x$new_path"; then
59785    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59788  fi
59789
59790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59791
59792  path="$POTENTIAL_FREETYPE_LIB_PATH"
59793  has_colon=`$ECHO $path | $GREP ^.:`
59794  new_path="$path"
59795  if test "x$has_colon" = x; then
59796    # Not in mixed or Windows style, start by that.
59797    new_path=`cmd //c echo $path`
59798  fi
59799
59800
59801  input_path="$new_path"
59802  # Check if we need to convert this using DOS-style short mode. If the path
59803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59804  # take no chances and rewrite it.
59805  # Note: m4 eats our [], so we need to use [ and ] instead.
59806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59807  if test "x$has_forbidden_chars" != x; then
59808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59810  fi
59811
59812
59813  windows_path="$new_path"
59814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59815    unix_path=`$CYGPATH -u "$windows_path"`
59816    new_path="$unix_path"
59817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59819    new_path="$unix_path"
59820  fi
59821
59822  if test "x$path" != "x$new_path"; then
59823    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59826  fi
59827
59828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59830
59831    else
59832      # We're on a unix platform. Hooray! :)
59833      path="$POTENTIAL_FREETYPE_LIB_PATH"
59834      has_space=`$ECHO "$path" | $GREP " "`
59835      if test "x$has_space" != x; then
59836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59839      fi
59840
59841      # Use eval to expand a potential ~
59842      eval path="$path"
59843      if test ! -f "$path" && test ! -d "$path"; then
59844        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59845      fi
59846
59847      if test -d "$path"; then
59848        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59849      else
59850        dir="`$DIRNAME "$path"`"
59851        base="`$BASENAME "$path"`"
59852        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59853      fi
59854    fi
59855  fi
59856
59857
59858    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59860$as_echo_n "checking for freetype includes... " >&6; }
59861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59862$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59863    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59865$as_echo_n "checking for freetype libraries... " >&6; }
59866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59867$as_echo "$FREETYPE_LIB_PATH" >&6; }
59868  fi
59869
59870          fi
59871          if test "x$FOUND_FREETYPE" != xyes; then
59872            FREETYPE_BASE_DIR="$HOME/freetype"
59873
59874  windows_path="$FREETYPE_BASE_DIR"
59875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59876    unix_path=`$CYGPATH -u "$windows_path"`
59877    FREETYPE_BASE_DIR="$unix_path"
59878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59880    FREETYPE_BASE_DIR="$unix_path"
59881  fi
59882
59883            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59884
59885  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59886  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59887  METHOD="well-known location"
59888
59889  # Let's start with an optimistic view of the world :-)
59890  FOUND_FREETYPE=yes
59891
59892  # First look for the canonical freetype main include file ft2build.h.
59893  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59894    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59895    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59896    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59897      # Fail.
59898      FOUND_FREETYPE=no
59899    fi
59900  fi
59901
59902  if test "x$FOUND_FREETYPE" = xyes; then
59903    # Include file found, let's continue the sanity check.
59904    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59905$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59906
59907    # Reset to default value
59908    FREETYPE_BASE_NAME=freetype
59909    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59910    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59911      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59912          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59913        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59914        # for the .6 version explicitly.
59915        FREETYPE_BASE_NAME=freetype.6
59916        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59917        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59918$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59919      else
59920        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59921$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59922        FOUND_FREETYPE=no
59923      fi
59924    else
59925      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59926        # On Windows, we will need both .lib and .dll file.
59927        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59928          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59929$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59930          FOUND_FREETYPE=no
59931        fi
59932      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59933          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59934        # Found lib in isa dir, use that instead.
59935        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59936        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59937$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59938      fi
59939    fi
59940  fi
59941
59942  if test "x$FOUND_FREETYPE" = xyes; then
59943
59944  # Only process if variable expands to non-empty
59945
59946  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59948
59949  # Input might be given as Windows format, start by converting to
59950  # unix format.
59951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59952  new_path=`$CYGPATH -u "$path"`
59953
59954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59957  # "foo.exe" is OK but "foo" is an error.
59958  #
59959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59960  # It is also a way to make sure we got the proper file name for the real test later on.
59961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59962  if test "x$test_shortpath" = x; then
59963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59965    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59966  fi
59967
59968  # Call helper function which possibly converts this using DOS-style short mode.
59969  # If so, the updated path is stored in $new_path.
59970
59971  input_path="$new_path"
59972  # Check if we need to convert this using DOS-style short mode. If the path
59973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59974  # take no chances and rewrite it.
59975  # Note: m4 eats our [], so we need to use [ and ] instead.
59976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59977  if test "x$has_forbidden_chars" != x; then
59978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59982      # Going to short mode and back again did indeed matter. Since short mode is
59983      # case insensitive, let's make it lowercase to improve readability.
59984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59985      # Now convert it back to Unix-style (cygpath)
59986      input_path=`$CYGPATH -u "$shortmode_path"`
59987      new_path="$input_path"
59988    fi
59989  fi
59990
59991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59992  if test "x$test_cygdrive_prefix" = x; then
59993    # As a simple fix, exclude /usr/bin since it's not a real path.
59994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59996      # a path prefixed by /cygdrive for fixpath to work.
59997      new_path="$CYGWIN_ROOT_PATH$input_path"
59998    fi
59999  fi
60000
60001
60002  if test "x$path" != "x$new_path"; then
60003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60006  fi
60007
60008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60009
60010  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60011  has_colon=`$ECHO $path | $GREP ^.:`
60012  new_path="$path"
60013  if test "x$has_colon" = x; then
60014    # Not in mixed or Windows style, start by that.
60015    new_path=`cmd //c echo $path`
60016  fi
60017
60018
60019  input_path="$new_path"
60020  # Check if we need to convert this using DOS-style short mode. If the path
60021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60022  # take no chances and rewrite it.
60023  # Note: m4 eats our [], so we need to use [ and ] instead.
60024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60025  if test "x$has_forbidden_chars" != x; then
60026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60028  fi
60029
60030
60031  windows_path="$new_path"
60032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60033    unix_path=`$CYGPATH -u "$windows_path"`
60034    new_path="$unix_path"
60035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60037    new_path="$unix_path"
60038  fi
60039
60040  if test "x$path" != "x$new_path"; then
60041    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60044  fi
60045
60046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60048
60049    else
60050      # We're on a unix platform. Hooray! :)
60051      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60052      has_space=`$ECHO "$path" | $GREP " "`
60053      if test "x$has_space" != x; then
60054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60056        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60057      fi
60058
60059      # Use eval to expand a potential ~
60060      eval path="$path"
60061      if test ! -f "$path" && test ! -d "$path"; then
60062        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60063      fi
60064
60065      if test -d "$path"; then
60066        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60067      else
60068        dir="`$DIRNAME "$path"`"
60069        base="`$BASENAME "$path"`"
60070        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60071      fi
60072    fi
60073  fi
60074
60075
60076  # Only process if variable expands to non-empty
60077
60078  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60080
60081  # Input might be given as Windows format, start by converting to
60082  # unix format.
60083  path="$POTENTIAL_FREETYPE_LIB_PATH"
60084  new_path=`$CYGPATH -u "$path"`
60085
60086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60089  # "foo.exe" is OK but "foo" is an error.
60090  #
60091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60092  # It is also a way to make sure we got the proper file name for the real test later on.
60093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60094  if test "x$test_shortpath" = x; then
60095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60098  fi
60099
60100  # Call helper function which possibly converts this using DOS-style short mode.
60101  # If so, the updated path is stored in $new_path.
60102
60103  input_path="$new_path"
60104  # Check if we need to convert this using DOS-style short mode. If the path
60105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60106  # take no chances and rewrite it.
60107  # Note: m4 eats our [], so we need to use [ and ] instead.
60108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60109  if test "x$has_forbidden_chars" != x; then
60110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60114      # Going to short mode and back again did indeed matter. Since short mode is
60115      # case insensitive, let's make it lowercase to improve readability.
60116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60117      # Now convert it back to Unix-style (cygpath)
60118      input_path=`$CYGPATH -u "$shortmode_path"`
60119      new_path="$input_path"
60120    fi
60121  fi
60122
60123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60124  if test "x$test_cygdrive_prefix" = x; then
60125    # As a simple fix, exclude /usr/bin since it's not a real path.
60126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60128      # a path prefixed by /cygdrive for fixpath to work.
60129      new_path="$CYGWIN_ROOT_PATH$input_path"
60130    fi
60131  fi
60132
60133
60134  if test "x$path" != "x$new_path"; then
60135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60138  fi
60139
60140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60141
60142  path="$POTENTIAL_FREETYPE_LIB_PATH"
60143  has_colon=`$ECHO $path | $GREP ^.:`
60144  new_path="$path"
60145  if test "x$has_colon" = x; then
60146    # Not in mixed or Windows style, start by that.
60147    new_path=`cmd //c echo $path`
60148  fi
60149
60150
60151  input_path="$new_path"
60152  # Check if we need to convert this using DOS-style short mode. If the path
60153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60154  # take no chances and rewrite it.
60155  # Note: m4 eats our [], so we need to use [ and ] instead.
60156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60157  if test "x$has_forbidden_chars" != x; then
60158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60160  fi
60161
60162
60163  windows_path="$new_path"
60164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60165    unix_path=`$CYGPATH -u "$windows_path"`
60166    new_path="$unix_path"
60167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60169    new_path="$unix_path"
60170  fi
60171
60172  if test "x$path" != "x$new_path"; then
60173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60176  fi
60177
60178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60180
60181    else
60182      # We're on a unix platform. Hooray! :)
60183      path="$POTENTIAL_FREETYPE_LIB_PATH"
60184      has_space=`$ECHO "$path" | $GREP " "`
60185      if test "x$has_space" != x; then
60186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60189      fi
60190
60191      # Use eval to expand a potential ~
60192      eval path="$path"
60193      if test ! -f "$path" && test ! -d "$path"; then
60194        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60195      fi
60196
60197      if test -d "$path"; then
60198        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60199      else
60200        dir="`$DIRNAME "$path"`"
60201        base="`$BASENAME "$path"`"
60202        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60203      fi
60204    fi
60205  fi
60206
60207
60208    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60210$as_echo_n "checking for freetype includes... " >&6; }
60211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60212$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60213    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60215$as_echo_n "checking for freetype libraries... " >&6; }
60216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60217$as_echo "$FREETYPE_LIB_PATH" >&6; }
60218  fi
60219
60220            else
60221
60222  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60223  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60224  METHOD="well-known location"
60225
60226  # Let's start with an optimistic view of the world :-)
60227  FOUND_FREETYPE=yes
60228
60229  # First look for the canonical freetype main include file ft2build.h.
60230  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60231    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60232    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60233    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60234      # Fail.
60235      FOUND_FREETYPE=no
60236    fi
60237  fi
60238
60239  if test "x$FOUND_FREETYPE" = xyes; then
60240    # Include file found, let's continue the sanity check.
60241    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60242$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60243
60244    # Reset to default value
60245    FREETYPE_BASE_NAME=freetype
60246    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60247    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60248      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60249          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60250        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60251        # for the .6 version explicitly.
60252        FREETYPE_BASE_NAME=freetype.6
60253        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60254        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60255$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60256      else
60257        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60258$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60259        FOUND_FREETYPE=no
60260      fi
60261    else
60262      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60263        # On Windows, we will need both .lib and .dll file.
60264        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60265          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60266$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60267          FOUND_FREETYPE=no
60268        fi
60269      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60270          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60271        # Found lib in isa dir, use that instead.
60272        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60273        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60274$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60275      fi
60276    fi
60277  fi
60278
60279  if test "x$FOUND_FREETYPE" = xyes; then
60280
60281  # Only process if variable expands to non-empty
60282
60283  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60285
60286  # Input might be given as Windows format, start by converting to
60287  # unix format.
60288  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60289  new_path=`$CYGPATH -u "$path"`
60290
60291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60294  # "foo.exe" is OK but "foo" is an error.
60295  #
60296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60297  # It is also a way to make sure we got the proper file name for the real test later on.
60298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60299  if test "x$test_shortpath" = x; then
60300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60301$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60302    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60303  fi
60304
60305  # Call helper function which possibly converts this using DOS-style short mode.
60306  # If so, the updated path is stored in $new_path.
60307
60308  input_path="$new_path"
60309  # Check if we need to convert this using DOS-style short mode. If the path
60310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60311  # take no chances and rewrite it.
60312  # Note: m4 eats our [], so we need to use [ and ] instead.
60313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60314  if test "x$has_forbidden_chars" != x; then
60315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60319      # Going to short mode and back again did indeed matter. Since short mode is
60320      # case insensitive, let's make it lowercase to improve readability.
60321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60322      # Now convert it back to Unix-style (cygpath)
60323      input_path=`$CYGPATH -u "$shortmode_path"`
60324      new_path="$input_path"
60325    fi
60326  fi
60327
60328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60329  if test "x$test_cygdrive_prefix" = x; then
60330    # As a simple fix, exclude /usr/bin since it's not a real path.
60331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60333      # a path prefixed by /cygdrive for fixpath to work.
60334      new_path="$CYGWIN_ROOT_PATH$input_path"
60335    fi
60336  fi
60337
60338
60339  if test "x$path" != "x$new_path"; then
60340    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60343  fi
60344
60345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60346
60347  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60348  has_colon=`$ECHO $path | $GREP ^.:`
60349  new_path="$path"
60350  if test "x$has_colon" = x; then
60351    # Not in mixed or Windows style, start by that.
60352    new_path=`cmd //c echo $path`
60353  fi
60354
60355
60356  input_path="$new_path"
60357  # Check if we need to convert this using DOS-style short mode. If the path
60358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60359  # take no chances and rewrite it.
60360  # Note: m4 eats our [], so we need to use [ and ] instead.
60361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60362  if test "x$has_forbidden_chars" != x; then
60363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60365  fi
60366
60367
60368  windows_path="$new_path"
60369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60370    unix_path=`$CYGPATH -u "$windows_path"`
60371    new_path="$unix_path"
60372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60374    new_path="$unix_path"
60375  fi
60376
60377  if test "x$path" != "x$new_path"; then
60378    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60380$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60381  fi
60382
60383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60385
60386    else
60387      # We're on a unix platform. Hooray! :)
60388      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60389      has_space=`$ECHO "$path" | $GREP " "`
60390      if test "x$has_space" != x; then
60391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60392$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60394      fi
60395
60396      # Use eval to expand a potential ~
60397      eval path="$path"
60398      if test ! -f "$path" && test ! -d "$path"; then
60399        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60400      fi
60401
60402      if test -d "$path"; then
60403        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60404      else
60405        dir="`$DIRNAME "$path"`"
60406        base="`$BASENAME "$path"`"
60407        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60408      fi
60409    fi
60410  fi
60411
60412
60413  # Only process if variable expands to non-empty
60414
60415  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60417
60418  # Input might be given as Windows format, start by converting to
60419  # unix format.
60420  path="$POTENTIAL_FREETYPE_LIB_PATH"
60421  new_path=`$CYGPATH -u "$path"`
60422
60423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60426  # "foo.exe" is OK but "foo" is an error.
60427  #
60428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60429  # It is also a way to make sure we got the proper file name for the real test later on.
60430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60431  if test "x$test_shortpath" = x; then
60432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60434    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60435  fi
60436
60437  # Call helper function which possibly converts this using DOS-style short mode.
60438  # If so, the updated path is stored in $new_path.
60439
60440  input_path="$new_path"
60441  # Check if we need to convert this using DOS-style short mode. If the path
60442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60443  # take no chances and rewrite it.
60444  # Note: m4 eats our [], so we need to use [ and ] instead.
60445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60446  if test "x$has_forbidden_chars" != x; then
60447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60451      # Going to short mode and back again did indeed matter. Since short mode is
60452      # case insensitive, let's make it lowercase to improve readability.
60453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60454      # Now convert it back to Unix-style (cygpath)
60455      input_path=`$CYGPATH -u "$shortmode_path"`
60456      new_path="$input_path"
60457    fi
60458  fi
60459
60460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60461  if test "x$test_cygdrive_prefix" = x; then
60462    # As a simple fix, exclude /usr/bin since it's not a real path.
60463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60465      # a path prefixed by /cygdrive for fixpath to work.
60466      new_path="$CYGWIN_ROOT_PATH$input_path"
60467    fi
60468  fi
60469
60470
60471  if test "x$path" != "x$new_path"; then
60472    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60475  fi
60476
60477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60478
60479  path="$POTENTIAL_FREETYPE_LIB_PATH"
60480  has_colon=`$ECHO $path | $GREP ^.:`
60481  new_path="$path"
60482  if test "x$has_colon" = x; then
60483    # Not in mixed or Windows style, start by that.
60484    new_path=`cmd //c echo $path`
60485  fi
60486
60487
60488  input_path="$new_path"
60489  # Check if we need to convert this using DOS-style short mode. If the path
60490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60491  # take no chances and rewrite it.
60492  # Note: m4 eats our [], so we need to use [ and ] instead.
60493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60494  if test "x$has_forbidden_chars" != x; then
60495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60497  fi
60498
60499
60500  windows_path="$new_path"
60501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60502    unix_path=`$CYGPATH -u "$windows_path"`
60503    new_path="$unix_path"
60504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60506    new_path="$unix_path"
60507  fi
60508
60509  if test "x$path" != "x$new_path"; then
60510    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60513  fi
60514
60515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60517
60518    else
60519      # We're on a unix platform. Hooray! :)
60520      path="$POTENTIAL_FREETYPE_LIB_PATH"
60521      has_space=`$ECHO "$path" | $GREP " "`
60522      if test "x$has_space" != x; then
60523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60526      fi
60527
60528      # Use eval to expand a potential ~
60529      eval path="$path"
60530      if test ! -f "$path" && test ! -d "$path"; then
60531        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60532      fi
60533
60534      if test -d "$path"; then
60535        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60536      else
60537        dir="`$DIRNAME "$path"`"
60538        base="`$BASENAME "$path"`"
60539        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60540      fi
60541    fi
60542  fi
60543
60544
60545    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60547$as_echo_n "checking for freetype includes... " >&6; }
60548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60549$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60550    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60552$as_echo_n "checking for freetype libraries... " >&6; }
60553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60554$as_echo "$FREETYPE_LIB_PATH" >&6; }
60555  fi
60556
60557            fi
60558            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60559                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60560              # Source is available, as a last resort try to build freetype in default location
60561
60562  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60563  BUILD_FREETYPE=yes
60564
60565  # Check if the freetype sources are acessible..
60566  if ! test -d $FREETYPE_SRC_PATH; then
60567    { $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
60568$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60569    BUILD_FREETYPE=no
60570  fi
60571  # ..and contain a vc2010 project file
60572  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60573  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60574    { $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
60575$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60576    BUILD_FREETYPE=no
60577  fi
60578  # Now check if configure found a version of 'msbuild.exe'
60579  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60580    { $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
60581$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;}
60582    BUILD_FREETYPE=no
60583  fi
60584
60585  # Ready to go..
60586  if test "x$BUILD_FREETYPE" = xyes; then
60587    # msbuild requires trailing slashes for output directories
60588    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60589    freetype_lib_path_unix="$freetype_lib_path"
60590    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60591
60592  unix_path="$vcxproj_path"
60593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60594    windows_path=`$CYGPATH -m "$unix_path"`
60595    vcxproj_path="$windows_path"
60596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60597    windows_path=`cmd //c echo $unix_path`
60598    vcxproj_path="$windows_path"
60599  fi
60600
60601
60602  unix_path="$freetype_lib_path"
60603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60604    windows_path=`$CYGPATH -m "$unix_path"`
60605    freetype_lib_path="$windows_path"
60606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60607    windows_path=`cmd //c echo $unix_path`
60608    freetype_lib_path="$windows_path"
60609  fi
60610
60611
60612  unix_path="$freetype_obj_path"
60613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60614    windows_path=`$CYGPATH -m "$unix_path"`
60615    freetype_obj_path="$windows_path"
60616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60617    windows_path=`cmd //c echo $unix_path`
60618    freetype_obj_path="$windows_path"
60619  fi
60620
60621    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60622      freetype_platform=x64
60623    else
60624      freetype_platform=win32
60625    fi
60626
60627    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60628    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60629    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60630    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60631    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60632$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60633
60634    # First we try to build the freetype.dll
60635    $ECHO -e "@echo off\n"\
60636        "$MSBUILD $vcxproj_path "\
60637        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60638        "/p:Configuration=\"Release Multithreaded\" "\
60639        "/p:Platform=$freetype_platform "\
60640        "/p:ConfigurationType=DynamicLibrary "\
60641        "/p:TargetName=freetype "\
60642        "/p:OutDir=\"$freetype_lib_path\" "\
60643        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60644    cmd /c freetype.bat
60645
60646    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60647      # If that succeeds we also build freetype.lib
60648      $ECHO -e "@echo off\n"\
60649          "$MSBUILD $vcxproj_path "\
60650          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60651          "/p:Configuration=\"Release Multithreaded\" "\
60652          "/p:Platform=$freetype_platform "\
60653          "/p:ConfigurationType=StaticLibrary "\
60654          "/p:TargetName=freetype "\
60655          "/p:OutDir=\"$freetype_lib_path\" "\
60656          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60657      cmd /c freetype.bat
60658
60659      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60660        # Once we build both, lib and dll, set freetype lib and include path appropriately
60661        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60662        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60663        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60664$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60665      else
60666        BUILD_FREETYPE=no
60667      fi
60668    else
60669      BUILD_FREETYPE=no
60670    fi
60671  fi
60672
60673              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60674
60675  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60676  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60677  METHOD="well-known location"
60678
60679  # Let's start with an optimistic view of the world :-)
60680  FOUND_FREETYPE=yes
60681
60682  # First look for the canonical freetype main include file ft2build.h.
60683  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60684    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60685    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60686    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60687      # Fail.
60688      FOUND_FREETYPE=no
60689    fi
60690  fi
60691
60692  if test "x$FOUND_FREETYPE" = xyes; then
60693    # Include file found, let's continue the sanity check.
60694    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60695$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60696
60697    # Reset to default value
60698    FREETYPE_BASE_NAME=freetype
60699    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60700    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60701      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60702          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60703        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60704        # for the .6 version explicitly.
60705        FREETYPE_BASE_NAME=freetype.6
60706        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60707        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60708$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60709      else
60710        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60711$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60712        FOUND_FREETYPE=no
60713      fi
60714    else
60715      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60716        # On Windows, we will need both .lib and .dll file.
60717        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60718          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60719$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60720          FOUND_FREETYPE=no
60721        fi
60722      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60723          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60724        # Found lib in isa dir, use that instead.
60725        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60726        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60727$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60728      fi
60729    fi
60730  fi
60731
60732  if test "x$FOUND_FREETYPE" = xyes; then
60733
60734  # Only process if variable expands to non-empty
60735
60736  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60738
60739  # Input might be given as Windows format, start by converting to
60740  # unix format.
60741  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60742  new_path=`$CYGPATH -u "$path"`
60743
60744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60747  # "foo.exe" is OK but "foo" is an error.
60748  #
60749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60750  # It is also a way to make sure we got the proper file name for the real test later on.
60751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60752  if test "x$test_shortpath" = x; then
60753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60755    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60756  fi
60757
60758  # Call helper function which possibly converts this using DOS-style short mode.
60759  # If so, the updated path is stored in $new_path.
60760
60761  input_path="$new_path"
60762  # Check if we need to convert this using DOS-style short mode. If the path
60763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60764  # take no chances and rewrite it.
60765  # Note: m4 eats our [], so we need to use [ and ] instead.
60766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60767  if test "x$has_forbidden_chars" != x; then
60768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60772      # Going to short mode and back again did indeed matter. Since short mode is
60773      # case insensitive, let's make it lowercase to improve readability.
60774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60775      # Now convert it back to Unix-style (cygpath)
60776      input_path=`$CYGPATH -u "$shortmode_path"`
60777      new_path="$input_path"
60778    fi
60779  fi
60780
60781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60782  if test "x$test_cygdrive_prefix" = x; then
60783    # As a simple fix, exclude /usr/bin since it's not a real path.
60784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60786      # a path prefixed by /cygdrive for fixpath to work.
60787      new_path="$CYGWIN_ROOT_PATH$input_path"
60788    fi
60789  fi
60790
60791
60792  if test "x$path" != "x$new_path"; then
60793    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60796  fi
60797
60798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60799
60800  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60801  has_colon=`$ECHO $path | $GREP ^.:`
60802  new_path="$path"
60803  if test "x$has_colon" = x; then
60804    # Not in mixed or Windows style, start by that.
60805    new_path=`cmd //c echo $path`
60806  fi
60807
60808
60809  input_path="$new_path"
60810  # Check if we need to convert this using DOS-style short mode. If the path
60811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60812  # take no chances and rewrite it.
60813  # Note: m4 eats our [], so we need to use [ and ] instead.
60814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60815  if test "x$has_forbidden_chars" != x; then
60816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60818  fi
60819
60820
60821  windows_path="$new_path"
60822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60823    unix_path=`$CYGPATH -u "$windows_path"`
60824    new_path="$unix_path"
60825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60827    new_path="$unix_path"
60828  fi
60829
60830  if test "x$path" != "x$new_path"; then
60831    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60833$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60834  fi
60835
60836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60838
60839    else
60840      # We're on a unix platform. Hooray! :)
60841      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60842      has_space=`$ECHO "$path" | $GREP " "`
60843      if test "x$has_space" != x; then
60844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60846        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60847      fi
60848
60849      # Use eval to expand a potential ~
60850      eval path="$path"
60851      if test ! -f "$path" && test ! -d "$path"; then
60852        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60853      fi
60854
60855      if test -d "$path"; then
60856        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60857      else
60858        dir="`$DIRNAME "$path"`"
60859        base="`$BASENAME "$path"`"
60860        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60861      fi
60862    fi
60863  fi
60864
60865
60866  # Only process if variable expands to non-empty
60867
60868  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60870
60871  # Input might be given as Windows format, start by converting to
60872  # unix format.
60873  path="$POTENTIAL_FREETYPE_LIB_PATH"
60874  new_path=`$CYGPATH -u "$path"`
60875
60876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60879  # "foo.exe" is OK but "foo" is an error.
60880  #
60881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60882  # It is also a way to make sure we got the proper file name for the real test later on.
60883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60884  if test "x$test_shortpath" = x; then
60885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60887    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60888  fi
60889
60890  # Call helper function which possibly converts this using DOS-style short mode.
60891  # If so, the updated path is stored in $new_path.
60892
60893  input_path="$new_path"
60894  # Check if we need to convert this using DOS-style short mode. If the path
60895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60896  # take no chances and rewrite it.
60897  # Note: m4 eats our [], so we need to use [ and ] instead.
60898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60899  if test "x$has_forbidden_chars" != x; then
60900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60904      # Going to short mode and back again did indeed matter. Since short mode is
60905      # case insensitive, let's make it lowercase to improve readability.
60906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60907      # Now convert it back to Unix-style (cygpath)
60908      input_path=`$CYGPATH -u "$shortmode_path"`
60909      new_path="$input_path"
60910    fi
60911  fi
60912
60913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60914  if test "x$test_cygdrive_prefix" = x; then
60915    # As a simple fix, exclude /usr/bin since it's not a real path.
60916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60918      # a path prefixed by /cygdrive for fixpath to work.
60919      new_path="$CYGWIN_ROOT_PATH$input_path"
60920    fi
60921  fi
60922
60923
60924  if test "x$path" != "x$new_path"; then
60925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60928  fi
60929
60930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60931
60932  path="$POTENTIAL_FREETYPE_LIB_PATH"
60933  has_colon=`$ECHO $path | $GREP ^.:`
60934  new_path="$path"
60935  if test "x$has_colon" = x; then
60936    # Not in mixed or Windows style, start by that.
60937    new_path=`cmd //c echo $path`
60938  fi
60939
60940
60941  input_path="$new_path"
60942  # Check if we need to convert this using DOS-style short mode. If the path
60943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60944  # take no chances and rewrite it.
60945  # Note: m4 eats our [], so we need to use [ and ] instead.
60946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60947  if test "x$has_forbidden_chars" != x; then
60948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60950  fi
60951
60952
60953  windows_path="$new_path"
60954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60955    unix_path=`$CYGPATH -u "$windows_path"`
60956    new_path="$unix_path"
60957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60959    new_path="$unix_path"
60960  fi
60961
60962  if test "x$path" != "x$new_path"; then
60963    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60966  fi
60967
60968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60970
60971    else
60972      # We're on a unix platform. Hooray! :)
60973      path="$POTENTIAL_FREETYPE_LIB_PATH"
60974      has_space=`$ECHO "$path" | $GREP " "`
60975      if test "x$has_space" != x; then
60976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60979      fi
60980
60981      # Use eval to expand a potential ~
60982      eval path="$path"
60983      if test ! -f "$path" && test ! -d "$path"; then
60984        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60985      fi
60986
60987      if test -d "$path"; then
60988        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60989      else
60990        dir="`$DIRNAME "$path"`"
60991        base="`$BASENAME "$path"`"
60992        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60993      fi
60994    fi
60995  fi
60996
60997
60998    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61000$as_echo_n "checking for freetype includes... " >&6; }
61001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61002$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61003    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61005$as_echo_n "checking for freetype libraries... " >&6; }
61006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61007$as_echo "$FREETYPE_LIB_PATH" >&6; }
61008  fi
61009
61010              else
61011
61012  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61013  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61014  METHOD="well-known location"
61015
61016  # Let's start with an optimistic view of the world :-)
61017  FOUND_FREETYPE=yes
61018
61019  # First look for the canonical freetype main include file ft2build.h.
61020  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61021    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61022    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61023    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61024      # Fail.
61025      FOUND_FREETYPE=no
61026    fi
61027  fi
61028
61029  if test "x$FOUND_FREETYPE" = xyes; then
61030    # Include file found, let's continue the sanity check.
61031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61032$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61033
61034    # Reset to default value
61035    FREETYPE_BASE_NAME=freetype
61036    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61037    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61038      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61039          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61040        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61041        # for the .6 version explicitly.
61042        FREETYPE_BASE_NAME=freetype.6
61043        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61044        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61045$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61046      else
61047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61048$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61049        FOUND_FREETYPE=no
61050      fi
61051    else
61052      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61053        # On Windows, we will need both .lib and .dll file.
61054        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61055          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61056$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61057          FOUND_FREETYPE=no
61058        fi
61059      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61060          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61061        # Found lib in isa dir, use that instead.
61062        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61063        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61064$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61065      fi
61066    fi
61067  fi
61068
61069  if test "x$FOUND_FREETYPE" = xyes; then
61070
61071  # Only process if variable expands to non-empty
61072
61073  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61075
61076  # Input might be given as Windows format, start by converting to
61077  # unix format.
61078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61079  new_path=`$CYGPATH -u "$path"`
61080
61081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61084  # "foo.exe" is OK but "foo" is an error.
61085  #
61086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61087  # It is also a way to make sure we got the proper file name for the real test later on.
61088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61089  if test "x$test_shortpath" = x; then
61090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61093  fi
61094
61095  # Call helper function which possibly converts this using DOS-style short mode.
61096  # If so, the updated path is stored in $new_path.
61097
61098  input_path="$new_path"
61099  # Check if we need to convert this using DOS-style short mode. If the path
61100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61101  # take no chances and rewrite it.
61102  # Note: m4 eats our [], so we need to use [ and ] instead.
61103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61104  if test "x$has_forbidden_chars" != x; then
61105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61109      # Going to short mode and back again did indeed matter. Since short mode is
61110      # case insensitive, let's make it lowercase to improve readability.
61111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61112      # Now convert it back to Unix-style (cygpath)
61113      input_path=`$CYGPATH -u "$shortmode_path"`
61114      new_path="$input_path"
61115    fi
61116  fi
61117
61118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61119  if test "x$test_cygdrive_prefix" = x; then
61120    # As a simple fix, exclude /usr/bin since it's not a real path.
61121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61123      # a path prefixed by /cygdrive for fixpath to work.
61124      new_path="$CYGWIN_ROOT_PATH$input_path"
61125    fi
61126  fi
61127
61128
61129  if test "x$path" != "x$new_path"; then
61130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61133  fi
61134
61135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61136
61137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61138  has_colon=`$ECHO $path | $GREP ^.:`
61139  new_path="$path"
61140  if test "x$has_colon" = x; then
61141    # Not in mixed or Windows style, start by that.
61142    new_path=`cmd //c echo $path`
61143  fi
61144
61145
61146  input_path="$new_path"
61147  # Check if we need to convert this using DOS-style short mode. If the path
61148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61149  # take no chances and rewrite it.
61150  # Note: m4 eats our [], so we need to use [ and ] instead.
61151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61152  if test "x$has_forbidden_chars" != x; then
61153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61155  fi
61156
61157
61158  windows_path="$new_path"
61159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61160    unix_path=`$CYGPATH -u "$windows_path"`
61161    new_path="$unix_path"
61162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61164    new_path="$unix_path"
61165  fi
61166
61167  if test "x$path" != "x$new_path"; then
61168    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61171  fi
61172
61173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61175
61176    else
61177      # We're on a unix platform. Hooray! :)
61178      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61179      has_space=`$ECHO "$path" | $GREP " "`
61180      if test "x$has_space" != x; then
61181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61184      fi
61185
61186      # Use eval to expand a potential ~
61187      eval path="$path"
61188      if test ! -f "$path" && test ! -d "$path"; then
61189        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61190      fi
61191
61192      if test -d "$path"; then
61193        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61194      else
61195        dir="`$DIRNAME "$path"`"
61196        base="`$BASENAME "$path"`"
61197        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61198      fi
61199    fi
61200  fi
61201
61202
61203  # Only process if variable expands to non-empty
61204
61205  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61207
61208  # Input might be given as Windows format, start by converting to
61209  # unix format.
61210  path="$POTENTIAL_FREETYPE_LIB_PATH"
61211  new_path=`$CYGPATH -u "$path"`
61212
61213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61216  # "foo.exe" is OK but "foo" is an error.
61217  #
61218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61219  # It is also a way to make sure we got the proper file name for the real test later on.
61220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61221  if test "x$test_shortpath" = x; then
61222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61225  fi
61226
61227  # Call helper function which possibly converts this using DOS-style short mode.
61228  # If so, the updated path is stored in $new_path.
61229
61230  input_path="$new_path"
61231  # Check if we need to convert this using DOS-style short mode. If the path
61232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61233  # take no chances and rewrite it.
61234  # Note: m4 eats our [], so we need to use [ and ] instead.
61235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61236  if test "x$has_forbidden_chars" != x; then
61237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61241      # Going to short mode and back again did indeed matter. Since short mode is
61242      # case insensitive, let's make it lowercase to improve readability.
61243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61244      # Now convert it back to Unix-style (cygpath)
61245      input_path=`$CYGPATH -u "$shortmode_path"`
61246      new_path="$input_path"
61247    fi
61248  fi
61249
61250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61251  if test "x$test_cygdrive_prefix" = x; then
61252    # As a simple fix, exclude /usr/bin since it's not a real path.
61253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61255      # a path prefixed by /cygdrive for fixpath to work.
61256      new_path="$CYGWIN_ROOT_PATH$input_path"
61257    fi
61258  fi
61259
61260
61261  if test "x$path" != "x$new_path"; then
61262    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61265  fi
61266
61267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61268
61269  path="$POTENTIAL_FREETYPE_LIB_PATH"
61270  has_colon=`$ECHO $path | $GREP ^.:`
61271  new_path="$path"
61272  if test "x$has_colon" = x; then
61273    # Not in mixed or Windows style, start by that.
61274    new_path=`cmd //c echo $path`
61275  fi
61276
61277
61278  input_path="$new_path"
61279  # Check if we need to convert this using DOS-style short mode. If the path
61280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61281  # take no chances and rewrite it.
61282  # Note: m4 eats our [], so we need to use [ and ] instead.
61283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61284  if test "x$has_forbidden_chars" != x; then
61285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61287  fi
61288
61289
61290  windows_path="$new_path"
61291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61292    unix_path=`$CYGPATH -u "$windows_path"`
61293    new_path="$unix_path"
61294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61296    new_path="$unix_path"
61297  fi
61298
61299  if test "x$path" != "x$new_path"; then
61300    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61303  fi
61304
61305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61307
61308    else
61309      # We're on a unix platform. Hooray! :)
61310      path="$POTENTIAL_FREETYPE_LIB_PATH"
61311      has_space=`$ECHO "$path" | $GREP " "`
61312      if test "x$has_space" != x; then
61313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61316      fi
61317
61318      # Use eval to expand a potential ~
61319      eval path="$path"
61320      if test ! -f "$path" && test ! -d "$path"; then
61321        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61322      fi
61323
61324      if test -d "$path"; then
61325        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61326      else
61327        dir="`$DIRNAME "$path"`"
61328        base="`$BASENAME "$path"`"
61329        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61330      fi
61331    fi
61332  fi
61333
61334
61335    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61337$as_echo_n "checking for freetype includes... " >&6; }
61338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61339$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61340    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61342$as_echo_n "checking for freetype libraries... " >&6; }
61343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61344$as_echo "$FREETYPE_LIB_PATH" >&6; }
61345  fi
61346
61347              fi
61348            fi
61349          fi
61350        else
61351          FREETYPE_BASE_DIR="$SYSROOT/usr"
61352
61353  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61354  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61355  METHOD="well-known location"
61356
61357  # Let's start with an optimistic view of the world :-)
61358  FOUND_FREETYPE=yes
61359
61360  # First look for the canonical freetype main include file ft2build.h.
61361  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61362    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61363    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61364    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61365      # Fail.
61366      FOUND_FREETYPE=no
61367    fi
61368  fi
61369
61370  if test "x$FOUND_FREETYPE" = xyes; then
61371    # Include file found, let's continue the sanity check.
61372    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61373$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61374
61375    # Reset to default value
61376    FREETYPE_BASE_NAME=freetype
61377    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61378    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61379      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61380          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61381        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61382        # for the .6 version explicitly.
61383        FREETYPE_BASE_NAME=freetype.6
61384        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61385        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61386$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61387      else
61388        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61389$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61390        FOUND_FREETYPE=no
61391      fi
61392    else
61393      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61394        # On Windows, we will need both .lib and .dll file.
61395        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61396          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61397$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61398          FOUND_FREETYPE=no
61399        fi
61400      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61401          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61402        # Found lib in isa dir, use that instead.
61403        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61404        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61405$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61406      fi
61407    fi
61408  fi
61409
61410  if test "x$FOUND_FREETYPE" = xyes; then
61411
61412  # Only process if variable expands to non-empty
61413
61414  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61416
61417  # Input might be given as Windows format, start by converting to
61418  # unix format.
61419  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61420  new_path=`$CYGPATH -u "$path"`
61421
61422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61425  # "foo.exe" is OK but "foo" is an error.
61426  #
61427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61428  # It is also a way to make sure we got the proper file name for the real test later on.
61429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61430  if test "x$test_shortpath" = x; then
61431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61433    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61434  fi
61435
61436  # Call helper function which possibly converts this using DOS-style short mode.
61437  # If so, the updated path is stored in $new_path.
61438
61439  input_path="$new_path"
61440  # Check if we need to convert this using DOS-style short mode. If the path
61441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61442  # take no chances and rewrite it.
61443  # Note: m4 eats our [], so we need to use [ and ] instead.
61444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61445  if test "x$has_forbidden_chars" != x; then
61446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61450      # Going to short mode and back again did indeed matter. Since short mode is
61451      # case insensitive, let's make it lowercase to improve readability.
61452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61453      # Now convert it back to Unix-style (cygpath)
61454      input_path=`$CYGPATH -u "$shortmode_path"`
61455      new_path="$input_path"
61456    fi
61457  fi
61458
61459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61460  if test "x$test_cygdrive_prefix" = x; then
61461    # As a simple fix, exclude /usr/bin since it's not a real path.
61462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61464      # a path prefixed by /cygdrive for fixpath to work.
61465      new_path="$CYGWIN_ROOT_PATH$input_path"
61466    fi
61467  fi
61468
61469
61470  if test "x$path" != "x$new_path"; then
61471    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61474  fi
61475
61476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61477
61478  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61479  has_colon=`$ECHO $path | $GREP ^.:`
61480  new_path="$path"
61481  if test "x$has_colon" = x; then
61482    # Not in mixed or Windows style, start by that.
61483    new_path=`cmd //c echo $path`
61484  fi
61485
61486
61487  input_path="$new_path"
61488  # Check if we need to convert this using DOS-style short mode. If the path
61489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61490  # take no chances and rewrite it.
61491  # Note: m4 eats our [], so we need to use [ and ] instead.
61492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61493  if test "x$has_forbidden_chars" != x; then
61494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61496  fi
61497
61498
61499  windows_path="$new_path"
61500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61501    unix_path=`$CYGPATH -u "$windows_path"`
61502    new_path="$unix_path"
61503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61505    new_path="$unix_path"
61506  fi
61507
61508  if test "x$path" != "x$new_path"; then
61509    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61512  fi
61513
61514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61516
61517    else
61518      # We're on a unix platform. Hooray! :)
61519      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61520      has_space=`$ECHO "$path" | $GREP " "`
61521      if test "x$has_space" != x; then
61522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61525      fi
61526
61527      # Use eval to expand a potential ~
61528      eval path="$path"
61529      if test ! -f "$path" && test ! -d "$path"; then
61530        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61531      fi
61532
61533      if test -d "$path"; then
61534        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61535      else
61536        dir="`$DIRNAME "$path"`"
61537        base="`$BASENAME "$path"`"
61538        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61539      fi
61540    fi
61541  fi
61542
61543
61544  # Only process if variable expands to non-empty
61545
61546  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61548
61549  # Input might be given as Windows format, start by converting to
61550  # unix format.
61551  path="$POTENTIAL_FREETYPE_LIB_PATH"
61552  new_path=`$CYGPATH -u "$path"`
61553
61554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61557  # "foo.exe" is OK but "foo" is an error.
61558  #
61559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61560  # It is also a way to make sure we got the proper file name for the real test later on.
61561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61562  if test "x$test_shortpath" = x; then
61563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61565    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61566  fi
61567
61568  # Call helper function which possibly converts this using DOS-style short mode.
61569  # If so, the updated path is stored in $new_path.
61570
61571  input_path="$new_path"
61572  # Check if we need to convert this using DOS-style short mode. If the path
61573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61574  # take no chances and rewrite it.
61575  # Note: m4 eats our [], so we need to use [ and ] instead.
61576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61577  if test "x$has_forbidden_chars" != x; then
61578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61582      # Going to short mode and back again did indeed matter. Since short mode is
61583      # case insensitive, let's make it lowercase to improve readability.
61584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61585      # Now convert it back to Unix-style (cygpath)
61586      input_path=`$CYGPATH -u "$shortmode_path"`
61587      new_path="$input_path"
61588    fi
61589  fi
61590
61591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61592  if test "x$test_cygdrive_prefix" = x; then
61593    # As a simple fix, exclude /usr/bin since it's not a real path.
61594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61596      # a path prefixed by /cygdrive for fixpath to work.
61597      new_path="$CYGWIN_ROOT_PATH$input_path"
61598    fi
61599  fi
61600
61601
61602  if test "x$path" != "x$new_path"; then
61603    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61606  fi
61607
61608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61609
61610  path="$POTENTIAL_FREETYPE_LIB_PATH"
61611  has_colon=`$ECHO $path | $GREP ^.:`
61612  new_path="$path"
61613  if test "x$has_colon" = x; then
61614    # Not in mixed or Windows style, start by that.
61615    new_path=`cmd //c echo $path`
61616  fi
61617
61618
61619  input_path="$new_path"
61620  # Check if we need to convert this using DOS-style short mode. If the path
61621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61622  # take no chances and rewrite it.
61623  # Note: m4 eats our [], so we need to use [ and ] instead.
61624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61625  if test "x$has_forbidden_chars" != x; then
61626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61628  fi
61629
61630
61631  windows_path="$new_path"
61632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61633    unix_path=`$CYGPATH -u "$windows_path"`
61634    new_path="$unix_path"
61635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61637    new_path="$unix_path"
61638  fi
61639
61640  if test "x$path" != "x$new_path"; then
61641    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61644  fi
61645
61646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61648
61649    else
61650      # We're on a unix platform. Hooray! :)
61651      path="$POTENTIAL_FREETYPE_LIB_PATH"
61652      has_space=`$ECHO "$path" | $GREP " "`
61653      if test "x$has_space" != x; then
61654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61657      fi
61658
61659      # Use eval to expand a potential ~
61660      eval path="$path"
61661      if test ! -f "$path" && test ! -d "$path"; then
61662        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61663      fi
61664
61665      if test -d "$path"; then
61666        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61667      else
61668        dir="`$DIRNAME "$path"`"
61669        base="`$BASENAME "$path"`"
61670        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61671      fi
61672    fi
61673  fi
61674
61675
61676    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61678$as_echo_n "checking for freetype includes... " >&6; }
61679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61680$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61681    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61683$as_echo_n "checking for freetype libraries... " >&6; }
61684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61685$as_echo "$FREETYPE_LIB_PATH" >&6; }
61686  fi
61687
61688
61689          if test "x$FOUND_FREETYPE" != xyes; then
61690            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61691
61692  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61693  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61694  METHOD="well-known location"
61695
61696  # Let's start with an optimistic view of the world :-)
61697  FOUND_FREETYPE=yes
61698
61699  # First look for the canonical freetype main include file ft2build.h.
61700  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61701    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61702    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61703    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61704      # Fail.
61705      FOUND_FREETYPE=no
61706    fi
61707  fi
61708
61709  if test "x$FOUND_FREETYPE" = xyes; then
61710    # Include file found, let's continue the sanity check.
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61712$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61713
61714    # Reset to default value
61715    FREETYPE_BASE_NAME=freetype
61716    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61717    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61718      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61720        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61721        # for the .6 version explicitly.
61722        FREETYPE_BASE_NAME=freetype.6
61723        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61724        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61725$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61726      else
61727        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61728$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61729        FOUND_FREETYPE=no
61730      fi
61731    else
61732      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61733        # On Windows, we will need both .lib and .dll file.
61734        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61735          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61736$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61737          FOUND_FREETYPE=no
61738        fi
61739      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61740          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61741        # Found lib in isa dir, use that instead.
61742        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61743        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61744$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61745      fi
61746    fi
61747  fi
61748
61749  if test "x$FOUND_FREETYPE" = xyes; then
61750
61751  # Only process if variable expands to non-empty
61752
61753  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61755
61756  # Input might be given as Windows format, start by converting to
61757  # unix format.
61758  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61759  new_path=`$CYGPATH -u "$path"`
61760
61761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61764  # "foo.exe" is OK but "foo" is an error.
61765  #
61766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61767  # It is also a way to make sure we got the proper file name for the real test later on.
61768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61769  if test "x$test_shortpath" = x; then
61770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61772    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61773  fi
61774
61775  # Call helper function which possibly converts this using DOS-style short mode.
61776  # If so, the updated path is stored in $new_path.
61777
61778  input_path="$new_path"
61779  # Check if we need to convert this using DOS-style short mode. If the path
61780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61781  # take no chances and rewrite it.
61782  # Note: m4 eats our [], so we need to use [ and ] instead.
61783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61784  if test "x$has_forbidden_chars" != x; then
61785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61789      # Going to short mode and back again did indeed matter. Since short mode is
61790      # case insensitive, let's make it lowercase to improve readability.
61791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61792      # Now convert it back to Unix-style (cygpath)
61793      input_path=`$CYGPATH -u "$shortmode_path"`
61794      new_path="$input_path"
61795    fi
61796  fi
61797
61798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61799  if test "x$test_cygdrive_prefix" = x; then
61800    # As a simple fix, exclude /usr/bin since it's not a real path.
61801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61803      # a path prefixed by /cygdrive for fixpath to work.
61804      new_path="$CYGWIN_ROOT_PATH$input_path"
61805    fi
61806  fi
61807
61808
61809  if test "x$path" != "x$new_path"; then
61810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61813  fi
61814
61815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61816
61817  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61818  has_colon=`$ECHO $path | $GREP ^.:`
61819  new_path="$path"
61820  if test "x$has_colon" = x; then
61821    # Not in mixed or Windows style, start by that.
61822    new_path=`cmd //c echo $path`
61823  fi
61824
61825
61826  input_path="$new_path"
61827  # Check if we need to convert this using DOS-style short mode. If the path
61828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61829  # take no chances and rewrite it.
61830  # Note: m4 eats our [], so we need to use [ and ] instead.
61831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61832  if test "x$has_forbidden_chars" != x; then
61833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61835  fi
61836
61837
61838  windows_path="$new_path"
61839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61840    unix_path=`$CYGPATH -u "$windows_path"`
61841    new_path="$unix_path"
61842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61844    new_path="$unix_path"
61845  fi
61846
61847  if test "x$path" != "x$new_path"; then
61848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61851  fi
61852
61853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61855
61856    else
61857      # We're on a unix platform. Hooray! :)
61858      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61859      has_space=`$ECHO "$path" | $GREP " "`
61860      if test "x$has_space" != x; then
61861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61863        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61864      fi
61865
61866      # Use eval to expand a potential ~
61867      eval path="$path"
61868      if test ! -f "$path" && test ! -d "$path"; then
61869        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61870      fi
61871
61872      if test -d "$path"; then
61873        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61874      else
61875        dir="`$DIRNAME "$path"`"
61876        base="`$BASENAME "$path"`"
61877        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61878      fi
61879    fi
61880  fi
61881
61882
61883  # Only process if variable expands to non-empty
61884
61885  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61887
61888  # Input might be given as Windows format, start by converting to
61889  # unix format.
61890  path="$POTENTIAL_FREETYPE_LIB_PATH"
61891  new_path=`$CYGPATH -u "$path"`
61892
61893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61896  # "foo.exe" is OK but "foo" is an error.
61897  #
61898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61899  # It is also a way to make sure we got the proper file name for the real test later on.
61900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61901  if test "x$test_shortpath" = x; then
61902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61904    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61905  fi
61906
61907  # Call helper function which possibly converts this using DOS-style short mode.
61908  # If so, the updated path is stored in $new_path.
61909
61910  input_path="$new_path"
61911  # Check if we need to convert this using DOS-style short mode. If the path
61912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61913  # take no chances and rewrite it.
61914  # Note: m4 eats our [], so we need to use [ and ] instead.
61915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61916  if test "x$has_forbidden_chars" != x; then
61917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61921      # Going to short mode and back again did indeed matter. Since short mode is
61922      # case insensitive, let's make it lowercase to improve readability.
61923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61924      # Now convert it back to Unix-style (cygpath)
61925      input_path=`$CYGPATH -u "$shortmode_path"`
61926      new_path="$input_path"
61927    fi
61928  fi
61929
61930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61931  if test "x$test_cygdrive_prefix" = x; then
61932    # As a simple fix, exclude /usr/bin since it's not a real path.
61933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61935      # a path prefixed by /cygdrive for fixpath to work.
61936      new_path="$CYGWIN_ROOT_PATH$input_path"
61937    fi
61938  fi
61939
61940
61941  if test "x$path" != "x$new_path"; then
61942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61945  fi
61946
61947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61948
61949  path="$POTENTIAL_FREETYPE_LIB_PATH"
61950  has_colon=`$ECHO $path | $GREP ^.:`
61951  new_path="$path"
61952  if test "x$has_colon" = x; then
61953    # Not in mixed or Windows style, start by that.
61954    new_path=`cmd //c echo $path`
61955  fi
61956
61957
61958  input_path="$new_path"
61959  # Check if we need to convert this using DOS-style short mode. If the path
61960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61961  # take no chances and rewrite it.
61962  # Note: m4 eats our [], so we need to use [ and ] instead.
61963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61964  if test "x$has_forbidden_chars" != x; then
61965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61967  fi
61968
61969
61970  windows_path="$new_path"
61971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61972    unix_path=`$CYGPATH -u "$windows_path"`
61973    new_path="$unix_path"
61974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61976    new_path="$unix_path"
61977  fi
61978
61979  if test "x$path" != "x$new_path"; then
61980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61983  fi
61984
61985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61987
61988    else
61989      # We're on a unix platform. Hooray! :)
61990      path="$POTENTIAL_FREETYPE_LIB_PATH"
61991      has_space=`$ECHO "$path" | $GREP " "`
61992      if test "x$has_space" != x; then
61993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61994$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61996      fi
61997
61998      # Use eval to expand a potential ~
61999      eval path="$path"
62000      if test ! -f "$path" && test ! -d "$path"; then
62001        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62002      fi
62003
62004      if test -d "$path"; then
62005        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62006      else
62007        dir="`$DIRNAME "$path"`"
62008        base="`$BASENAME "$path"`"
62009        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62010      fi
62011    fi
62012  fi
62013
62014
62015    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62017$as_echo_n "checking for freetype includes... " >&6; }
62018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62019$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62020    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62022$as_echo_n "checking for freetype libraries... " >&6; }
62023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62024$as_echo "$FREETYPE_LIB_PATH" >&6; }
62025  fi
62026
62027          fi
62028          if test "x$FOUND_FREETYPE" != xyes; then
62029            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
62030
62031  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62032  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62033  METHOD="well-known location"
62034
62035  # Let's start with an optimistic view of the world :-)
62036  FOUND_FREETYPE=yes
62037
62038  # First look for the canonical freetype main include file ft2build.h.
62039  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62040    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62041    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62042    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62043      # Fail.
62044      FOUND_FREETYPE=no
62045    fi
62046  fi
62047
62048  if test "x$FOUND_FREETYPE" = xyes; then
62049    # Include file found, let's continue the sanity check.
62050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62051$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62052
62053    # Reset to default value
62054    FREETYPE_BASE_NAME=freetype
62055    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62056    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62057      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62059        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62060        # for the .6 version explicitly.
62061        FREETYPE_BASE_NAME=freetype.6
62062        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62063        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62064$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62065      else
62066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62067$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62068        FOUND_FREETYPE=no
62069      fi
62070    else
62071      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62072        # On Windows, we will need both .lib and .dll file.
62073        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62074          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62075$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62076          FOUND_FREETYPE=no
62077        fi
62078      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62080        # Found lib in isa dir, use that instead.
62081        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62082        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62083$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62084      fi
62085    fi
62086  fi
62087
62088  if test "x$FOUND_FREETYPE" = xyes; then
62089
62090  # Only process if variable expands to non-empty
62091
62092  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62094
62095  # Input might be given as Windows format, start by converting to
62096  # unix format.
62097  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62098  new_path=`$CYGPATH -u "$path"`
62099
62100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62103  # "foo.exe" is OK but "foo" is an error.
62104  #
62105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62106  # It is also a way to make sure we got the proper file name for the real test later on.
62107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62108  if test "x$test_shortpath" = x; then
62109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62111    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62112  fi
62113
62114  # Call helper function which possibly converts this using DOS-style short mode.
62115  # If so, the updated path is stored in $new_path.
62116
62117  input_path="$new_path"
62118  # Check if we need to convert this using DOS-style short mode. If the path
62119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62120  # take no chances and rewrite it.
62121  # Note: m4 eats our [], so we need to use [ and ] instead.
62122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62123  if test "x$has_forbidden_chars" != x; then
62124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62128      # Going to short mode and back again did indeed matter. Since short mode is
62129      # case insensitive, let's make it lowercase to improve readability.
62130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62131      # Now convert it back to Unix-style (cygpath)
62132      input_path=`$CYGPATH -u "$shortmode_path"`
62133      new_path="$input_path"
62134    fi
62135  fi
62136
62137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62138  if test "x$test_cygdrive_prefix" = x; then
62139    # As a simple fix, exclude /usr/bin since it's not a real path.
62140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62142      # a path prefixed by /cygdrive for fixpath to work.
62143      new_path="$CYGWIN_ROOT_PATH$input_path"
62144    fi
62145  fi
62146
62147
62148  if test "x$path" != "x$new_path"; then
62149    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62152  fi
62153
62154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62155
62156  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62157  has_colon=`$ECHO $path | $GREP ^.:`
62158  new_path="$path"
62159  if test "x$has_colon" = x; then
62160    # Not in mixed or Windows style, start by that.
62161    new_path=`cmd //c echo $path`
62162  fi
62163
62164
62165  input_path="$new_path"
62166  # Check if we need to convert this using DOS-style short mode. If the path
62167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62168  # take no chances and rewrite it.
62169  # Note: m4 eats our [], so we need to use [ and ] instead.
62170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62171  if test "x$has_forbidden_chars" != x; then
62172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62174  fi
62175
62176
62177  windows_path="$new_path"
62178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62179    unix_path=`$CYGPATH -u "$windows_path"`
62180    new_path="$unix_path"
62181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62183    new_path="$unix_path"
62184  fi
62185
62186  if test "x$path" != "x$new_path"; then
62187    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62190  fi
62191
62192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62194
62195    else
62196      # We're on a unix platform. Hooray! :)
62197      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62198      has_space=`$ECHO "$path" | $GREP " "`
62199      if test "x$has_space" != x; then
62200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62203      fi
62204
62205      # Use eval to expand a potential ~
62206      eval path="$path"
62207      if test ! -f "$path" && test ! -d "$path"; then
62208        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62209      fi
62210
62211      if test -d "$path"; then
62212        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62213      else
62214        dir="`$DIRNAME "$path"`"
62215        base="`$BASENAME "$path"`"
62216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62217      fi
62218    fi
62219  fi
62220
62221
62222  # Only process if variable expands to non-empty
62223
62224  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62226
62227  # Input might be given as Windows format, start by converting to
62228  # unix format.
62229  path="$POTENTIAL_FREETYPE_LIB_PATH"
62230  new_path=`$CYGPATH -u "$path"`
62231
62232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62235  # "foo.exe" is OK but "foo" is an error.
62236  #
62237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62238  # It is also a way to make sure we got the proper file name for the real test later on.
62239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62240  if test "x$test_shortpath" = x; then
62241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62243    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62244  fi
62245
62246  # Call helper function which possibly converts this using DOS-style short mode.
62247  # If so, the updated path is stored in $new_path.
62248
62249  input_path="$new_path"
62250  # Check if we need to convert this using DOS-style short mode. If the path
62251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62252  # take no chances and rewrite it.
62253  # Note: m4 eats our [], so we need to use [ and ] instead.
62254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62255  if test "x$has_forbidden_chars" != x; then
62256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62260      # Going to short mode and back again did indeed matter. Since short mode is
62261      # case insensitive, let's make it lowercase to improve readability.
62262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62263      # Now convert it back to Unix-style (cygpath)
62264      input_path=`$CYGPATH -u "$shortmode_path"`
62265      new_path="$input_path"
62266    fi
62267  fi
62268
62269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62270  if test "x$test_cygdrive_prefix" = x; then
62271    # As a simple fix, exclude /usr/bin since it's not a real path.
62272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62274      # a path prefixed by /cygdrive for fixpath to work.
62275      new_path="$CYGWIN_ROOT_PATH$input_path"
62276    fi
62277  fi
62278
62279
62280  if test "x$path" != "x$new_path"; then
62281    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62284  fi
62285
62286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62287
62288  path="$POTENTIAL_FREETYPE_LIB_PATH"
62289  has_colon=`$ECHO $path | $GREP ^.:`
62290  new_path="$path"
62291  if test "x$has_colon" = x; then
62292    # Not in mixed or Windows style, start by that.
62293    new_path=`cmd //c echo $path`
62294  fi
62295
62296
62297  input_path="$new_path"
62298  # Check if we need to convert this using DOS-style short mode. If the path
62299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62300  # take no chances and rewrite it.
62301  # Note: m4 eats our [], so we need to use [ and ] instead.
62302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62303  if test "x$has_forbidden_chars" != x; then
62304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62306  fi
62307
62308
62309  windows_path="$new_path"
62310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62311    unix_path=`$CYGPATH -u "$windows_path"`
62312    new_path="$unix_path"
62313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62315    new_path="$unix_path"
62316  fi
62317
62318  if test "x$path" != "x$new_path"; then
62319    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62322  fi
62323
62324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62326
62327    else
62328      # We're on a unix platform. Hooray! :)
62329      path="$POTENTIAL_FREETYPE_LIB_PATH"
62330      has_space=`$ECHO "$path" | $GREP " "`
62331      if test "x$has_space" != x; then
62332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62335      fi
62336
62337      # Use eval to expand a potential ~
62338      eval path="$path"
62339      if test ! -f "$path" && test ! -d "$path"; then
62340        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62341      fi
62342
62343      if test -d "$path"; then
62344        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62345      else
62346        dir="`$DIRNAME "$path"`"
62347        base="`$BASENAME "$path"`"
62348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62349      fi
62350    fi
62351  fi
62352
62353
62354    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62356$as_echo_n "checking for freetype includes... " >&6; }
62357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62358$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62359    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62361$as_echo_n "checking for freetype libraries... " >&6; }
62362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62363$as_echo "$FREETYPE_LIB_PATH" >&6; }
62364  fi
62365
62366          fi
62367
62368          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62369            if test "x$FOUND_FREETYPE" != xyes; then
62370              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62371              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62372
62373  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62374  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62375  METHOD="well-known location"
62376
62377  # Let's start with an optimistic view of the world :-)
62378  FOUND_FREETYPE=yes
62379
62380  # First look for the canonical freetype main include file ft2build.h.
62381  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62382    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62383    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62384    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62385      # Fail.
62386      FOUND_FREETYPE=no
62387    fi
62388  fi
62389
62390  if test "x$FOUND_FREETYPE" = xyes; then
62391    # Include file found, let's continue the sanity check.
62392    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62393$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62394
62395    # Reset to default value
62396    FREETYPE_BASE_NAME=freetype
62397    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62398    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62399      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62400          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62401        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62402        # for the .6 version explicitly.
62403        FREETYPE_BASE_NAME=freetype.6
62404        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62405        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62406$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62407      else
62408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62409$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62410        FOUND_FREETYPE=no
62411      fi
62412    else
62413      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62414        # On Windows, we will need both .lib and .dll file.
62415        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62416          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62417$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62418          FOUND_FREETYPE=no
62419        fi
62420      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62421          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62422        # Found lib in isa dir, use that instead.
62423        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62424        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62425$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62426      fi
62427    fi
62428  fi
62429
62430  if test "x$FOUND_FREETYPE" = xyes; then
62431
62432  # Only process if variable expands to non-empty
62433
62434  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62436
62437  # Input might be given as Windows format, start by converting to
62438  # unix format.
62439  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62440  new_path=`$CYGPATH -u "$path"`
62441
62442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62445  # "foo.exe" is OK but "foo" is an error.
62446  #
62447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62448  # It is also a way to make sure we got the proper file name for the real test later on.
62449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62450  if test "x$test_shortpath" = x; then
62451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62454  fi
62455
62456  # Call helper function which possibly converts this using DOS-style short mode.
62457  # If so, the updated path is stored in $new_path.
62458
62459  input_path="$new_path"
62460  # Check if we need to convert this using DOS-style short mode. If the path
62461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62462  # take no chances and rewrite it.
62463  # Note: m4 eats our [], so we need to use [ and ] instead.
62464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62465  if test "x$has_forbidden_chars" != x; then
62466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62470      # Going to short mode and back again did indeed matter. Since short mode is
62471      # case insensitive, let's make it lowercase to improve readability.
62472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62473      # Now convert it back to Unix-style (cygpath)
62474      input_path=`$CYGPATH -u "$shortmode_path"`
62475      new_path="$input_path"
62476    fi
62477  fi
62478
62479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62480  if test "x$test_cygdrive_prefix" = x; then
62481    # As a simple fix, exclude /usr/bin since it's not a real path.
62482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62484      # a path prefixed by /cygdrive for fixpath to work.
62485      new_path="$CYGWIN_ROOT_PATH$input_path"
62486    fi
62487  fi
62488
62489
62490  if test "x$path" != "x$new_path"; then
62491    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62494  fi
62495
62496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62497
62498  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62499  has_colon=`$ECHO $path | $GREP ^.:`
62500  new_path="$path"
62501  if test "x$has_colon" = x; then
62502    # Not in mixed or Windows style, start by that.
62503    new_path=`cmd //c echo $path`
62504  fi
62505
62506
62507  input_path="$new_path"
62508  # Check if we need to convert this using DOS-style short mode. If the path
62509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62510  # take no chances and rewrite it.
62511  # Note: m4 eats our [], so we need to use [ and ] instead.
62512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62513  if test "x$has_forbidden_chars" != x; then
62514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62516  fi
62517
62518
62519  windows_path="$new_path"
62520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62521    unix_path=`$CYGPATH -u "$windows_path"`
62522    new_path="$unix_path"
62523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62525    new_path="$unix_path"
62526  fi
62527
62528  if test "x$path" != "x$new_path"; then
62529    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62532  fi
62533
62534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62536
62537    else
62538      # We're on a unix platform. Hooray! :)
62539      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62540      has_space=`$ECHO "$path" | $GREP " "`
62541      if test "x$has_space" != x; then
62542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62545      fi
62546
62547      # Use eval to expand a potential ~
62548      eval path="$path"
62549      if test ! -f "$path" && test ! -d "$path"; then
62550        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62551      fi
62552
62553      if test -d "$path"; then
62554        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62555      else
62556        dir="`$DIRNAME "$path"`"
62557        base="`$BASENAME "$path"`"
62558        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62559      fi
62560    fi
62561  fi
62562
62563
62564  # Only process if variable expands to non-empty
62565
62566  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62568
62569  # Input might be given as Windows format, start by converting to
62570  # unix format.
62571  path="$POTENTIAL_FREETYPE_LIB_PATH"
62572  new_path=`$CYGPATH -u "$path"`
62573
62574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62577  # "foo.exe" is OK but "foo" is an error.
62578  #
62579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62580  # It is also a way to make sure we got the proper file name for the real test later on.
62581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62582  if test "x$test_shortpath" = x; then
62583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62584$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62585    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62586  fi
62587
62588  # Call helper function which possibly converts this using DOS-style short mode.
62589  # If so, the updated path is stored in $new_path.
62590
62591  input_path="$new_path"
62592  # Check if we need to convert this using DOS-style short mode. If the path
62593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62594  # take no chances and rewrite it.
62595  # Note: m4 eats our [], so we need to use [ and ] instead.
62596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62597  if test "x$has_forbidden_chars" != x; then
62598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62602      # Going to short mode and back again did indeed matter. Since short mode is
62603      # case insensitive, let's make it lowercase to improve readability.
62604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62605      # Now convert it back to Unix-style (cygpath)
62606      input_path=`$CYGPATH -u "$shortmode_path"`
62607      new_path="$input_path"
62608    fi
62609  fi
62610
62611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62612  if test "x$test_cygdrive_prefix" = x; then
62613    # As a simple fix, exclude /usr/bin since it's not a real path.
62614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62616      # a path prefixed by /cygdrive for fixpath to work.
62617      new_path="$CYGWIN_ROOT_PATH$input_path"
62618    fi
62619  fi
62620
62621
62622  if test "x$path" != "x$new_path"; then
62623    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62625$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62626  fi
62627
62628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62629
62630  path="$POTENTIAL_FREETYPE_LIB_PATH"
62631  has_colon=`$ECHO $path | $GREP ^.:`
62632  new_path="$path"
62633  if test "x$has_colon" = x; then
62634    # Not in mixed or Windows style, start by that.
62635    new_path=`cmd //c echo $path`
62636  fi
62637
62638
62639  input_path="$new_path"
62640  # Check if we need to convert this using DOS-style short mode. If the path
62641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62642  # take no chances and rewrite it.
62643  # Note: m4 eats our [], so we need to use [ and ] instead.
62644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62645  if test "x$has_forbidden_chars" != x; then
62646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62648  fi
62649
62650
62651  windows_path="$new_path"
62652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62653    unix_path=`$CYGPATH -u "$windows_path"`
62654    new_path="$unix_path"
62655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62657    new_path="$unix_path"
62658  fi
62659
62660  if test "x$path" != "x$new_path"; then
62661    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62664  fi
62665
62666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62668
62669    else
62670      # We're on a unix platform. Hooray! :)
62671      path="$POTENTIAL_FREETYPE_LIB_PATH"
62672      has_space=`$ECHO "$path" | $GREP " "`
62673      if test "x$has_space" != x; then
62674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62677      fi
62678
62679      # Use eval to expand a potential ~
62680      eval path="$path"
62681      if test ! -f "$path" && test ! -d "$path"; then
62682        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62683      fi
62684
62685      if test -d "$path"; then
62686        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62687      else
62688        dir="`$DIRNAME "$path"`"
62689        base="`$BASENAME "$path"`"
62690        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62691      fi
62692    fi
62693  fi
62694
62695
62696    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62698$as_echo_n "checking for freetype includes... " >&6; }
62699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62700$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62701    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62703$as_echo_n "checking for freetype libraries... " >&6; }
62704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62705$as_echo "$FREETYPE_LIB_PATH" >&6; }
62706  fi
62707
62708            fi
62709          fi
62710
62711          if test "x$FOUND_FREETYPE" != xyes; then
62712            FREETYPE_BASE_DIR="$SYSROOT/usr"
62713            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62714
62715  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62716  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62717  METHOD="well-known location"
62718
62719  # Let's start with an optimistic view of the world :-)
62720  FOUND_FREETYPE=yes
62721
62722  # First look for the canonical freetype main include file ft2build.h.
62723  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62724    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62725    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62726    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62727      # Fail.
62728      FOUND_FREETYPE=no
62729    fi
62730  fi
62731
62732  if test "x$FOUND_FREETYPE" = xyes; then
62733    # Include file found, let's continue the sanity check.
62734    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62735$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62736
62737    # Reset to default value
62738    FREETYPE_BASE_NAME=freetype
62739    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62740    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62741      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62742          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62743        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62744        # for the .6 version explicitly.
62745        FREETYPE_BASE_NAME=freetype.6
62746        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62747        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62748$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62749      else
62750        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62751$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62752        FOUND_FREETYPE=no
62753      fi
62754    else
62755      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62756        # On Windows, we will need both .lib and .dll file.
62757        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62758          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62759$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62760          FOUND_FREETYPE=no
62761        fi
62762      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62763          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62764        # Found lib in isa dir, use that instead.
62765        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62766        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62767$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62768      fi
62769    fi
62770  fi
62771
62772  if test "x$FOUND_FREETYPE" = xyes; then
62773
62774  # Only process if variable expands to non-empty
62775
62776  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62778
62779  # Input might be given as Windows format, start by converting to
62780  # unix format.
62781  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62782  new_path=`$CYGPATH -u "$path"`
62783
62784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62787  # "foo.exe" is OK but "foo" is an error.
62788  #
62789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62790  # It is also a way to make sure we got the proper file name for the real test later on.
62791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62792  if test "x$test_shortpath" = x; then
62793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62795    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62796  fi
62797
62798  # Call helper function which possibly converts this using DOS-style short mode.
62799  # If so, the updated path is stored in $new_path.
62800
62801  input_path="$new_path"
62802  # Check if we need to convert this using DOS-style short mode. If the path
62803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62804  # take no chances and rewrite it.
62805  # Note: m4 eats our [], so we need to use [ and ] instead.
62806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62807  if test "x$has_forbidden_chars" != x; then
62808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62812      # Going to short mode and back again did indeed matter. Since short mode is
62813      # case insensitive, let's make it lowercase to improve readability.
62814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62815      # Now convert it back to Unix-style (cygpath)
62816      input_path=`$CYGPATH -u "$shortmode_path"`
62817      new_path="$input_path"
62818    fi
62819  fi
62820
62821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62822  if test "x$test_cygdrive_prefix" = x; then
62823    # As a simple fix, exclude /usr/bin since it's not a real path.
62824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62826      # a path prefixed by /cygdrive for fixpath to work.
62827      new_path="$CYGWIN_ROOT_PATH$input_path"
62828    fi
62829  fi
62830
62831
62832  if test "x$path" != "x$new_path"; then
62833    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62835$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62836  fi
62837
62838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62839
62840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62841  has_colon=`$ECHO $path | $GREP ^.:`
62842  new_path="$path"
62843  if test "x$has_colon" = x; then
62844    # Not in mixed or Windows style, start by that.
62845    new_path=`cmd //c echo $path`
62846  fi
62847
62848
62849  input_path="$new_path"
62850  # Check if we need to convert this using DOS-style short mode. If the path
62851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62852  # take no chances and rewrite it.
62853  # Note: m4 eats our [], so we need to use [ and ] instead.
62854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62855  if test "x$has_forbidden_chars" != x; then
62856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62858  fi
62859
62860
62861  windows_path="$new_path"
62862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62863    unix_path=`$CYGPATH -u "$windows_path"`
62864    new_path="$unix_path"
62865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62867    new_path="$unix_path"
62868  fi
62869
62870  if test "x$path" != "x$new_path"; then
62871    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62873$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62874  fi
62875
62876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62878
62879    else
62880      # We're on a unix platform. Hooray! :)
62881      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62882      has_space=`$ECHO "$path" | $GREP " "`
62883      if test "x$has_space" != x; then
62884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62885$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62887      fi
62888
62889      # Use eval to expand a potential ~
62890      eval path="$path"
62891      if test ! -f "$path" && test ! -d "$path"; then
62892        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62893      fi
62894
62895      if test -d "$path"; then
62896        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62897      else
62898        dir="`$DIRNAME "$path"`"
62899        base="`$BASENAME "$path"`"
62900        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62901      fi
62902    fi
62903  fi
62904
62905
62906  # Only process if variable expands to non-empty
62907
62908  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62910
62911  # Input might be given as Windows format, start by converting to
62912  # unix format.
62913  path="$POTENTIAL_FREETYPE_LIB_PATH"
62914  new_path=`$CYGPATH -u "$path"`
62915
62916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62919  # "foo.exe" is OK but "foo" is an error.
62920  #
62921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62922  # It is also a way to make sure we got the proper file name for the real test later on.
62923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62924  if test "x$test_shortpath" = x; then
62925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62927    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62928  fi
62929
62930  # Call helper function which possibly converts this using DOS-style short mode.
62931  # If so, the updated path is stored in $new_path.
62932
62933  input_path="$new_path"
62934  # Check if we need to convert this using DOS-style short mode. If the path
62935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62936  # take no chances and rewrite it.
62937  # Note: m4 eats our [], so we need to use [ and ] instead.
62938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62939  if test "x$has_forbidden_chars" != x; then
62940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62944      # Going to short mode and back again did indeed matter. Since short mode is
62945      # case insensitive, let's make it lowercase to improve readability.
62946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62947      # Now convert it back to Unix-style (cygpath)
62948      input_path=`$CYGPATH -u "$shortmode_path"`
62949      new_path="$input_path"
62950    fi
62951  fi
62952
62953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62954  if test "x$test_cygdrive_prefix" = x; then
62955    # As a simple fix, exclude /usr/bin since it's not a real path.
62956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62958      # a path prefixed by /cygdrive for fixpath to work.
62959      new_path="$CYGWIN_ROOT_PATH$input_path"
62960    fi
62961  fi
62962
62963
62964  if test "x$path" != "x$new_path"; then
62965    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62968  fi
62969
62970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62971
62972  path="$POTENTIAL_FREETYPE_LIB_PATH"
62973  has_colon=`$ECHO $path | $GREP ^.:`
62974  new_path="$path"
62975  if test "x$has_colon" = x; then
62976    # Not in mixed or Windows style, start by that.
62977    new_path=`cmd //c echo $path`
62978  fi
62979
62980
62981  input_path="$new_path"
62982  # Check if we need to convert this using DOS-style short mode. If the path
62983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62984  # take no chances and rewrite it.
62985  # Note: m4 eats our [], so we need to use [ and ] instead.
62986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62987  if test "x$has_forbidden_chars" != x; then
62988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62990  fi
62991
62992
62993  windows_path="$new_path"
62994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62995    unix_path=`$CYGPATH -u "$windows_path"`
62996    new_path="$unix_path"
62997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62999    new_path="$unix_path"
63000  fi
63001
63002  if test "x$path" != "x$new_path"; then
63003    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63006  fi
63007
63008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63010
63011    else
63012      # We're on a unix platform. Hooray! :)
63013      path="$POTENTIAL_FREETYPE_LIB_PATH"
63014      has_space=`$ECHO "$path" | $GREP " "`
63015      if test "x$has_space" != x; then
63016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63018        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63019      fi
63020
63021      # Use eval to expand a potential ~
63022      eval path="$path"
63023      if test ! -f "$path" && test ! -d "$path"; then
63024        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63025      fi
63026
63027      if test -d "$path"; then
63028        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63029      else
63030        dir="`$DIRNAME "$path"`"
63031        base="`$BASENAME "$path"`"
63032        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63033      fi
63034    fi
63035  fi
63036
63037
63038    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63040$as_echo_n "checking for freetype includes... " >&6; }
63041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63042$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63043    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63045$as_echo_n "checking for freetype libraries... " >&6; }
63046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63047$as_echo "$FREETYPE_LIB_PATH" >&6; }
63048  fi
63049
63050            else
63051
63052  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63053  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
63054  METHOD="well-known location"
63055
63056  # Let's start with an optimistic view of the world :-)
63057  FOUND_FREETYPE=yes
63058
63059  # First look for the canonical freetype main include file ft2build.h.
63060  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63061    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63062    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63063    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63064      # Fail.
63065      FOUND_FREETYPE=no
63066    fi
63067  fi
63068
63069  if test "x$FOUND_FREETYPE" = xyes; then
63070    # Include file found, let's continue the sanity check.
63071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63072$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63073
63074    # Reset to default value
63075    FREETYPE_BASE_NAME=freetype
63076    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63077    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63078      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63080        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63081        # for the .6 version explicitly.
63082        FREETYPE_BASE_NAME=freetype.6
63083        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63084        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63085$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63086      else
63087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63088$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63089        FOUND_FREETYPE=no
63090      fi
63091    else
63092      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63093        # On Windows, we will need both .lib and .dll file.
63094        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63095          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63097          FOUND_FREETYPE=no
63098        fi
63099      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63100          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63101        # Found lib in isa dir, use that instead.
63102        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63103        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63104$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63105      fi
63106    fi
63107  fi
63108
63109  if test "x$FOUND_FREETYPE" = xyes; then
63110
63111  # Only process if variable expands to non-empty
63112
63113  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63115
63116  # Input might be given as Windows format, start by converting to
63117  # unix format.
63118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63119  new_path=`$CYGPATH -u "$path"`
63120
63121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63124  # "foo.exe" is OK but "foo" is an error.
63125  #
63126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63127  # It is also a way to make sure we got the proper file name for the real test later on.
63128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63129  if test "x$test_shortpath" = x; then
63130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63133  fi
63134
63135  # Call helper function which possibly converts this using DOS-style short mode.
63136  # If so, the updated path is stored in $new_path.
63137
63138  input_path="$new_path"
63139  # Check if we need to convert this using DOS-style short mode. If the path
63140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63141  # take no chances and rewrite it.
63142  # Note: m4 eats our [], so we need to use [ and ] instead.
63143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63144  if test "x$has_forbidden_chars" != x; then
63145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63149      # Going to short mode and back again did indeed matter. Since short mode is
63150      # case insensitive, let's make it lowercase to improve readability.
63151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63152      # Now convert it back to Unix-style (cygpath)
63153      input_path=`$CYGPATH -u "$shortmode_path"`
63154      new_path="$input_path"
63155    fi
63156  fi
63157
63158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63159  if test "x$test_cygdrive_prefix" = x; then
63160    # As a simple fix, exclude /usr/bin since it's not a real path.
63161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63163      # a path prefixed by /cygdrive for fixpath to work.
63164      new_path="$CYGWIN_ROOT_PATH$input_path"
63165    fi
63166  fi
63167
63168
63169  if test "x$path" != "x$new_path"; then
63170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63173  fi
63174
63175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63176
63177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63178  has_colon=`$ECHO $path | $GREP ^.:`
63179  new_path="$path"
63180  if test "x$has_colon" = x; then
63181    # Not in mixed or Windows style, start by that.
63182    new_path=`cmd //c echo $path`
63183  fi
63184
63185
63186  input_path="$new_path"
63187  # Check if we need to convert this using DOS-style short mode. If the path
63188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63189  # take no chances and rewrite it.
63190  # Note: m4 eats our [], so we need to use [ and ] instead.
63191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63192  if test "x$has_forbidden_chars" != x; then
63193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63195  fi
63196
63197
63198  windows_path="$new_path"
63199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63200    unix_path=`$CYGPATH -u "$windows_path"`
63201    new_path="$unix_path"
63202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63204    new_path="$unix_path"
63205  fi
63206
63207  if test "x$path" != "x$new_path"; then
63208    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63211  fi
63212
63213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63215
63216    else
63217      # We're on a unix platform. Hooray! :)
63218      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63219      has_space=`$ECHO "$path" | $GREP " "`
63220      if test "x$has_space" != x; then
63221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63224      fi
63225
63226      # Use eval to expand a potential ~
63227      eval path="$path"
63228      if test ! -f "$path" && test ! -d "$path"; then
63229        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63230      fi
63231
63232      if test -d "$path"; then
63233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63234      else
63235        dir="`$DIRNAME "$path"`"
63236        base="`$BASENAME "$path"`"
63237        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63238      fi
63239    fi
63240  fi
63241
63242
63243  # Only process if variable expands to non-empty
63244
63245  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63247
63248  # Input might be given as Windows format, start by converting to
63249  # unix format.
63250  path="$POTENTIAL_FREETYPE_LIB_PATH"
63251  new_path=`$CYGPATH -u "$path"`
63252
63253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63256  # "foo.exe" is OK but "foo" is an error.
63257  #
63258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63259  # It is also a way to make sure we got the proper file name for the real test later on.
63260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63261  if test "x$test_shortpath" = x; then
63262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63265  fi
63266
63267  # Call helper function which possibly converts this using DOS-style short mode.
63268  # If so, the updated path is stored in $new_path.
63269
63270  input_path="$new_path"
63271  # Check if we need to convert this using DOS-style short mode. If the path
63272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63273  # take no chances and rewrite it.
63274  # Note: m4 eats our [], so we need to use [ and ] instead.
63275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63276  if test "x$has_forbidden_chars" != x; then
63277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63281      # Going to short mode and back again did indeed matter. Since short mode is
63282      # case insensitive, let's make it lowercase to improve readability.
63283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63284      # Now convert it back to Unix-style (cygpath)
63285      input_path=`$CYGPATH -u "$shortmode_path"`
63286      new_path="$input_path"
63287    fi
63288  fi
63289
63290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63291  if test "x$test_cygdrive_prefix" = x; then
63292    # As a simple fix, exclude /usr/bin since it's not a real path.
63293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63295      # a path prefixed by /cygdrive for fixpath to work.
63296      new_path="$CYGWIN_ROOT_PATH$input_path"
63297    fi
63298  fi
63299
63300
63301  if test "x$path" != "x$new_path"; then
63302    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63305  fi
63306
63307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63308
63309  path="$POTENTIAL_FREETYPE_LIB_PATH"
63310  has_colon=`$ECHO $path | $GREP ^.:`
63311  new_path="$path"
63312  if test "x$has_colon" = x; then
63313    # Not in mixed or Windows style, start by that.
63314    new_path=`cmd //c echo $path`
63315  fi
63316
63317
63318  input_path="$new_path"
63319  # Check if we need to convert this using DOS-style short mode. If the path
63320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63321  # take no chances and rewrite it.
63322  # Note: m4 eats our [], so we need to use [ and ] instead.
63323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63324  if test "x$has_forbidden_chars" != x; then
63325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63327  fi
63328
63329
63330  windows_path="$new_path"
63331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63332    unix_path=`$CYGPATH -u "$windows_path"`
63333    new_path="$unix_path"
63334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63336    new_path="$unix_path"
63337  fi
63338
63339  if test "x$path" != "x$new_path"; then
63340    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63343  fi
63344
63345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63347
63348    else
63349      # We're on a unix platform. Hooray! :)
63350      path="$POTENTIAL_FREETYPE_LIB_PATH"
63351      has_space=`$ECHO "$path" | $GREP " "`
63352      if test "x$has_space" != x; then
63353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63356      fi
63357
63358      # Use eval to expand a potential ~
63359      eval path="$path"
63360      if test ! -f "$path" && test ! -d "$path"; then
63361        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63362      fi
63363
63364      if test -d "$path"; then
63365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63366      else
63367        dir="`$DIRNAME "$path"`"
63368        base="`$BASENAME "$path"`"
63369        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63370      fi
63371    fi
63372  fi
63373
63374
63375    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63377$as_echo_n "checking for freetype includes... " >&6; }
63378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63379$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63380    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63382$as_echo_n "checking for freetype libraries... " >&6; }
63383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63384$as_echo "$FREETYPE_LIB_PATH" >&6; }
63385  fi
63386
63387              if test "x$FOUND_FREETYPE" != xyes; then
63388
63389  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63390  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63391  METHOD="well-known location"
63392
63393  # Let's start with an optimistic view of the world :-)
63394  FOUND_FREETYPE=yes
63395
63396  # First look for the canonical freetype main include file ft2build.h.
63397  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63398    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63399    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63400    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63401      # Fail.
63402      FOUND_FREETYPE=no
63403    fi
63404  fi
63405
63406  if test "x$FOUND_FREETYPE" = xyes; then
63407    # Include file found, let's continue the sanity check.
63408    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63409$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63410
63411    # Reset to default value
63412    FREETYPE_BASE_NAME=freetype
63413    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63414    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63415      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63416          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63417        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63418        # for the .6 version explicitly.
63419        FREETYPE_BASE_NAME=freetype.6
63420        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63421        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63422$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63423      else
63424        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63425$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63426        FOUND_FREETYPE=no
63427      fi
63428    else
63429      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63430        # On Windows, we will need both .lib and .dll file.
63431        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63432          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63433$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63434          FOUND_FREETYPE=no
63435        fi
63436      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63437          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63438        # Found lib in isa dir, use that instead.
63439        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63440        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63441$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63442      fi
63443    fi
63444  fi
63445
63446  if test "x$FOUND_FREETYPE" = xyes; then
63447
63448  # Only process if variable expands to non-empty
63449
63450  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63452
63453  # Input might be given as Windows format, start by converting to
63454  # unix format.
63455  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63456  new_path=`$CYGPATH -u "$path"`
63457
63458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63461  # "foo.exe" is OK but "foo" is an error.
63462  #
63463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63464  # It is also a way to make sure we got the proper file name for the real test later on.
63465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63466  if test "x$test_shortpath" = x; then
63467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63469    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63470  fi
63471
63472  # Call helper function which possibly converts this using DOS-style short mode.
63473  # If so, the updated path is stored in $new_path.
63474
63475  input_path="$new_path"
63476  # Check if we need to convert this using DOS-style short mode. If the path
63477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63478  # take no chances and rewrite it.
63479  # Note: m4 eats our [], so we need to use [ and ] instead.
63480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63481  if test "x$has_forbidden_chars" != x; then
63482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63486      # Going to short mode and back again did indeed matter. Since short mode is
63487      # case insensitive, let's make it lowercase to improve readability.
63488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63489      # Now convert it back to Unix-style (cygpath)
63490      input_path=`$CYGPATH -u "$shortmode_path"`
63491      new_path="$input_path"
63492    fi
63493  fi
63494
63495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63496  if test "x$test_cygdrive_prefix" = x; then
63497    # As a simple fix, exclude /usr/bin since it's not a real path.
63498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63500      # a path prefixed by /cygdrive for fixpath to work.
63501      new_path="$CYGWIN_ROOT_PATH$input_path"
63502    fi
63503  fi
63504
63505
63506  if test "x$path" != "x$new_path"; then
63507    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63510  fi
63511
63512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63513
63514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63515  has_colon=`$ECHO $path | $GREP ^.:`
63516  new_path="$path"
63517  if test "x$has_colon" = x; then
63518    # Not in mixed or Windows style, start by that.
63519    new_path=`cmd //c echo $path`
63520  fi
63521
63522
63523  input_path="$new_path"
63524  # Check if we need to convert this using DOS-style short mode. If the path
63525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63526  # take no chances and rewrite it.
63527  # Note: m4 eats our [], so we need to use [ and ] instead.
63528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63529  if test "x$has_forbidden_chars" != x; then
63530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63532  fi
63533
63534
63535  windows_path="$new_path"
63536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63537    unix_path=`$CYGPATH -u "$windows_path"`
63538    new_path="$unix_path"
63539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63541    new_path="$unix_path"
63542  fi
63543
63544  if test "x$path" != "x$new_path"; then
63545    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63548  fi
63549
63550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63552
63553    else
63554      # We're on a unix platform. Hooray! :)
63555      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63556      has_space=`$ECHO "$path" | $GREP " "`
63557      if test "x$has_space" != x; then
63558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63561      fi
63562
63563      # Use eval to expand a potential ~
63564      eval path="$path"
63565      if test ! -f "$path" && test ! -d "$path"; then
63566        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63567      fi
63568
63569      if test -d "$path"; then
63570        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63571      else
63572        dir="`$DIRNAME "$path"`"
63573        base="`$BASENAME "$path"`"
63574        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63575      fi
63576    fi
63577  fi
63578
63579
63580  # Only process if variable expands to non-empty
63581
63582  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63584
63585  # Input might be given as Windows format, start by converting to
63586  # unix format.
63587  path="$POTENTIAL_FREETYPE_LIB_PATH"
63588  new_path=`$CYGPATH -u "$path"`
63589
63590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63593  # "foo.exe" is OK but "foo" is an error.
63594  #
63595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63596  # It is also a way to make sure we got the proper file name for the real test later on.
63597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63598  if test "x$test_shortpath" = x; then
63599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63600$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63601    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63602  fi
63603
63604  # Call helper function which possibly converts this using DOS-style short mode.
63605  # If so, the updated path is stored in $new_path.
63606
63607  input_path="$new_path"
63608  # Check if we need to convert this using DOS-style short mode. If the path
63609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63610  # take no chances and rewrite it.
63611  # Note: m4 eats our [], so we need to use [ and ] instead.
63612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63613  if test "x$has_forbidden_chars" != x; then
63614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63618      # Going to short mode and back again did indeed matter. Since short mode is
63619      # case insensitive, let's make it lowercase to improve readability.
63620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63621      # Now convert it back to Unix-style (cygpath)
63622      input_path=`$CYGPATH -u "$shortmode_path"`
63623      new_path="$input_path"
63624    fi
63625  fi
63626
63627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63628  if test "x$test_cygdrive_prefix" = x; then
63629    # As a simple fix, exclude /usr/bin since it's not a real path.
63630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63632      # a path prefixed by /cygdrive for fixpath to work.
63633      new_path="$CYGWIN_ROOT_PATH$input_path"
63634    fi
63635  fi
63636
63637
63638  if test "x$path" != "x$new_path"; then
63639    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63642  fi
63643
63644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63645
63646  path="$POTENTIAL_FREETYPE_LIB_PATH"
63647  has_colon=`$ECHO $path | $GREP ^.:`
63648  new_path="$path"
63649  if test "x$has_colon" = x; then
63650    # Not in mixed or Windows style, start by that.
63651    new_path=`cmd //c echo $path`
63652  fi
63653
63654
63655  input_path="$new_path"
63656  # Check if we need to convert this using DOS-style short mode. If the path
63657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63658  # take no chances and rewrite it.
63659  # Note: m4 eats our [], so we need to use [ and ] instead.
63660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63661  if test "x$has_forbidden_chars" != x; then
63662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63664  fi
63665
63666
63667  windows_path="$new_path"
63668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63669    unix_path=`$CYGPATH -u "$windows_path"`
63670    new_path="$unix_path"
63671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63673    new_path="$unix_path"
63674  fi
63675
63676  if test "x$path" != "x$new_path"; then
63677    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63680  fi
63681
63682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63684
63685    else
63686      # We're on a unix platform. Hooray! :)
63687      path="$POTENTIAL_FREETYPE_LIB_PATH"
63688      has_space=`$ECHO "$path" | $GREP " "`
63689      if test "x$has_space" != x; then
63690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63691$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63693      fi
63694
63695      # Use eval to expand a potential ~
63696      eval path="$path"
63697      if test ! -f "$path" && test ! -d "$path"; then
63698        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63699      fi
63700
63701      if test -d "$path"; then
63702        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63703      else
63704        dir="`$DIRNAME "$path"`"
63705        base="`$BASENAME "$path"`"
63706        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63707      fi
63708    fi
63709  fi
63710
63711
63712    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63714$as_echo_n "checking for freetype includes... " >&6; }
63715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63716$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63717    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63719$as_echo_n "checking for freetype libraries... " >&6; }
63720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63721$as_echo "$FREETYPE_LIB_PATH" >&6; }
63722  fi
63723
63724              fi
63725            fi
63726          fi
63727        fi
63728      fi # end check in well-known locations
63729
63730      if test "x$FOUND_FREETYPE" != xyes; then
63731
63732  # Print a helpful message on how to acquire the necessary build dependency.
63733  # freetype is the help tag: freetype, cups, alsa etc
63734  MISSING_DEPENDENCY=freetype
63735
63736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63737    cygwin_help $MISSING_DEPENDENCY
63738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63739    msys_help $MISSING_DEPENDENCY
63740  else
63741    PKGHANDLER_COMMAND=
63742
63743    case $PKGHANDLER in
63744      apt-get)
63745        apt_help     $MISSING_DEPENDENCY ;;
63746      yum)
63747        yum_help     $MISSING_DEPENDENCY ;;
63748      brew)
63749        brew_help    $MISSING_DEPENDENCY ;;
63750      port)
63751        port_help    $MISSING_DEPENDENCY ;;
63752      pkgutil)
63753        pkgutil_help $MISSING_DEPENDENCY ;;
63754      pkgadd)
63755        pkgadd_help  $MISSING_DEPENDENCY ;;
63756    esac
63757
63758    if test "x$PKGHANDLER_COMMAND" != x; then
63759      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63760    fi
63761  fi
63762
63763        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63764      fi
63765    fi # end user specified settings
63766
63767    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63768    if test "x$FREETYPE_CFLAGS" = x; then
63769
63770  # Only process if variable expands to non-empty
63771
63772  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63774
63775  # Input might be given as Windows format, start by converting to
63776  # unix format.
63777  path="$FREETYPE_INCLUDE_PATH"
63778  new_path=`$CYGPATH -u "$path"`
63779
63780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63783  # "foo.exe" is OK but "foo" is an error.
63784  #
63785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63786  # It is also a way to make sure we got the proper file name for the real test later on.
63787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63788  if test "x$test_shortpath" = x; then
63789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63790$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63791    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63792  fi
63793
63794  # Call helper function which possibly converts this using DOS-style short mode.
63795  # If so, the updated path is stored in $new_path.
63796
63797  input_path="$new_path"
63798  # Check if we need to convert this using DOS-style short mode. If the path
63799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63800  # take no chances and rewrite it.
63801  # Note: m4 eats our [], so we need to use [ and ] instead.
63802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63803  if test "x$has_forbidden_chars" != x; then
63804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63808      # Going to short mode and back again did indeed matter. Since short mode is
63809      # case insensitive, let's make it lowercase to improve readability.
63810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63811      # Now convert it back to Unix-style (cygpath)
63812      input_path=`$CYGPATH -u "$shortmode_path"`
63813      new_path="$input_path"
63814    fi
63815  fi
63816
63817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63818  if test "x$test_cygdrive_prefix" = x; then
63819    # As a simple fix, exclude /usr/bin since it's not a real path.
63820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63822      # a path prefixed by /cygdrive for fixpath to work.
63823      new_path="$CYGWIN_ROOT_PATH$input_path"
63824    fi
63825  fi
63826
63827
63828  if test "x$path" != "x$new_path"; then
63829    FREETYPE_INCLUDE_PATH="$new_path"
63830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63831$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63832  fi
63833
63834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63835
63836  path="$FREETYPE_INCLUDE_PATH"
63837  has_colon=`$ECHO $path | $GREP ^.:`
63838  new_path="$path"
63839  if test "x$has_colon" = x; then
63840    # Not in mixed or Windows style, start by that.
63841    new_path=`cmd //c echo $path`
63842  fi
63843
63844
63845  input_path="$new_path"
63846  # Check if we need to convert this using DOS-style short mode. If the path
63847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63848  # take no chances and rewrite it.
63849  # Note: m4 eats our [], so we need to use [ and ] instead.
63850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63851  if test "x$has_forbidden_chars" != x; then
63852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63854  fi
63855
63856
63857  windows_path="$new_path"
63858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63859    unix_path=`$CYGPATH -u "$windows_path"`
63860    new_path="$unix_path"
63861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63863    new_path="$unix_path"
63864  fi
63865
63866  if test "x$path" != "x$new_path"; then
63867    FREETYPE_INCLUDE_PATH="$new_path"
63868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63869$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63870  fi
63871
63872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63874
63875    else
63876      # We're on a unix platform. Hooray! :)
63877      path="$FREETYPE_INCLUDE_PATH"
63878      has_space=`$ECHO "$path" | $GREP " "`
63879      if test "x$has_space" != x; then
63880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63881$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63883      fi
63884
63885      # Use eval to expand a potential ~
63886      eval path="$path"
63887      if test ! -f "$path" && test ! -d "$path"; then
63888        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63889      fi
63890
63891      if test -d "$path"; then
63892        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63893      else
63894        dir="`$DIRNAME "$path"`"
63895        base="`$BASENAME "$path"`"
63896        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63897      fi
63898    fi
63899  fi
63900
63901      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63902        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63903      else
63904        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63905      fi
63906    fi
63907
63908    if test "x$FREETYPE_LIBS" = x; then
63909
63910  # Only process if variable expands to non-empty
63911
63912  if test "x$FREETYPE_LIB_PATH" != x; then
63913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63914
63915  # Input might be given as Windows format, start by converting to
63916  # unix format.
63917  path="$FREETYPE_LIB_PATH"
63918  new_path=`$CYGPATH -u "$path"`
63919
63920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63923  # "foo.exe" is OK but "foo" is an error.
63924  #
63925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63926  # It is also a way to make sure we got the proper file name for the real test later on.
63927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63928  if test "x$test_shortpath" = x; then
63929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63930$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63931    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63932  fi
63933
63934  # Call helper function which possibly converts this using DOS-style short mode.
63935  # If so, the updated path is stored in $new_path.
63936
63937  input_path="$new_path"
63938  # Check if we need to convert this using DOS-style short mode. If the path
63939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63940  # take no chances and rewrite it.
63941  # Note: m4 eats our [], so we need to use [ and ] instead.
63942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63943  if test "x$has_forbidden_chars" != x; then
63944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63948      # Going to short mode and back again did indeed matter. Since short mode is
63949      # case insensitive, let's make it lowercase to improve readability.
63950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63951      # Now convert it back to Unix-style (cygpath)
63952      input_path=`$CYGPATH -u "$shortmode_path"`
63953      new_path="$input_path"
63954    fi
63955  fi
63956
63957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63958  if test "x$test_cygdrive_prefix" = x; then
63959    # As a simple fix, exclude /usr/bin since it's not a real path.
63960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63962      # a path prefixed by /cygdrive for fixpath to work.
63963      new_path="$CYGWIN_ROOT_PATH$input_path"
63964    fi
63965  fi
63966
63967
63968  if test "x$path" != "x$new_path"; then
63969    FREETYPE_LIB_PATH="$new_path"
63970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63971$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63972  fi
63973
63974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63975
63976  path="$FREETYPE_LIB_PATH"
63977  has_colon=`$ECHO $path | $GREP ^.:`
63978  new_path="$path"
63979  if test "x$has_colon" = x; then
63980    # Not in mixed or Windows style, start by that.
63981    new_path=`cmd //c echo $path`
63982  fi
63983
63984
63985  input_path="$new_path"
63986  # Check if we need to convert this using DOS-style short mode. If the path
63987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63988  # take no chances and rewrite it.
63989  # Note: m4 eats our [], so we need to use [ and ] instead.
63990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63991  if test "x$has_forbidden_chars" != x; then
63992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63994  fi
63995
63996
63997  windows_path="$new_path"
63998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63999    unix_path=`$CYGPATH -u "$windows_path"`
64000    new_path="$unix_path"
64001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64003    new_path="$unix_path"
64004  fi
64005
64006  if test "x$path" != "x$new_path"; then
64007    FREETYPE_LIB_PATH="$new_path"
64008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64009$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64010  fi
64011
64012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64014
64015    else
64016      # We're on a unix platform. Hooray! :)
64017      path="$FREETYPE_LIB_PATH"
64018      has_space=`$ECHO "$path" | $GREP " "`
64019      if test "x$has_space" != x; then
64020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64021$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64023      fi
64024
64025      # Use eval to expand a potential ~
64026      eval path="$path"
64027      if test ! -f "$path" && test ! -d "$path"; then
64028        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64029      fi
64030
64031      if test -d "$path"; then
64032        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64033      else
64034        dir="`$DIRNAME "$path"`"
64035        base="`$BASENAME "$path"`"
64036        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64037      fi
64038    fi
64039  fi
64040
64041      if test "x$OPENJDK_TARGET_OS" = xwindows; then
64042        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
64043      else
64044        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
64045      fi
64046    fi
64047
64048    # Try to compile it
64049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
64050$as_echo_n "checking if we can compile and link with freetype... " >&6; }
64051    ac_ext=cpp
64052ac_cpp='$CXXCPP $CPPFLAGS'
64053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64056
64057    PREV_CXXCFLAGS="$CXXFLAGS"
64058    PREV_LIBS="$LIBS"
64059    PREV_CXX="$CXX"
64060    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
64061    LIBS="$LIBS $FREETYPE_LIBS"
64062    CXX="$FIXPATH $CXX"
64063    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64064/* end confdefs.h.  */
64065
64066          #include<ft2build.h>
64067          #include FT_FREETYPE_H
64068          int main () {
64069            FT_Init_FreeType(NULL);
64070            return 0;
64071          }
64072
64073_ACEOF
64074if ac_fn_cxx_try_link "$LINENO"; then :
64075
64076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64077$as_echo "yes" >&6; }
64078
64079else
64080
64081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64082$as_echo "no" >&6; }
64083          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
64084$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
64085          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
64086$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
64087
64088
64089  # Print a helpful message on how to acquire the necessary build dependency.
64090  # freetype is the help tag: freetype, cups, alsa etc
64091  MISSING_DEPENDENCY=freetype
64092
64093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64094    cygwin_help $MISSING_DEPENDENCY
64095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64096    msys_help $MISSING_DEPENDENCY
64097  else
64098    PKGHANDLER_COMMAND=
64099
64100    case $PKGHANDLER in
64101      apt-get)
64102        apt_help     $MISSING_DEPENDENCY ;;
64103      yum)
64104        yum_help     $MISSING_DEPENDENCY ;;
64105      brew)
64106        brew_help    $MISSING_DEPENDENCY ;;
64107      port)
64108        port_help    $MISSING_DEPENDENCY ;;
64109      pkgutil)
64110        pkgutil_help $MISSING_DEPENDENCY ;;
64111      pkgadd)
64112        pkgadd_help  $MISSING_DEPENDENCY ;;
64113    esac
64114
64115    if test "x$PKGHANDLER_COMMAND" != x; then
64116      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64117    fi
64118  fi
64119
64120
64121          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64122
64123
64124fi
64125rm -f core conftest.err conftest.$ac_objext \
64126    conftest$ac_exeext conftest.$ac_ext
64127    CXXCFLAGS="$PREV_CXXFLAGS"
64128    LIBS="$PREV_LIBS"
64129    CXX="$PREV_CXX"
64130    ac_ext=cpp
64131ac_cpp='$CXXCPP $CPPFLAGS'
64132ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64133ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64134ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64135
64136
64137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64138$as_echo_n "checking if we should bundle freetype... " >&6; }
64139    if test "x$BUNDLE_FREETYPE" = xyes; then
64140      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64141    fi
64142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64143$as_echo "$BUNDLE_FREETYPE" >&6; }
64144
64145  fi # end freetype needed
64146
64147  FREETYPE_LICENSE=""
64148  if test "x$with_freetype_license" = "xyes"; then
64149    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64150  elif test "x$with_freetype_license" != "x"; then
64151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64152$as_echo_n "checking for freetype license... " >&6; }
64153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64154$as_echo "$with_freetype_license" >&6; }
64155    FREETYPE_LICENSE="$with_freetype_license"
64156
64157  # Only process if variable expands to non-empty
64158
64159  if test "x$FREETYPE_LICENSE" != x; then
64160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64161
64162  # Input might be given as Windows format, start by converting to
64163  # unix format.
64164  path="$FREETYPE_LICENSE"
64165  new_path=`$CYGPATH -u "$path"`
64166
64167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64170  # "foo.exe" is OK but "foo" is an error.
64171  #
64172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64173  # It is also a way to make sure we got the proper file name for the real test later on.
64174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64175  if test "x$test_shortpath" = x; then
64176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64177$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64178    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64179  fi
64180
64181  # Call helper function which possibly converts this using DOS-style short mode.
64182  # If so, the updated path is stored in $new_path.
64183
64184  input_path="$new_path"
64185  # Check if we need to convert this using DOS-style short mode. If the path
64186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64187  # take no chances and rewrite it.
64188  # Note: m4 eats our [], so we need to use [ and ] instead.
64189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64190  if test "x$has_forbidden_chars" != x; then
64191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64195      # Going to short mode and back again did indeed matter. Since short mode is
64196      # case insensitive, let's make it lowercase to improve readability.
64197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64198      # Now convert it back to Unix-style (cygpath)
64199      input_path=`$CYGPATH -u "$shortmode_path"`
64200      new_path="$input_path"
64201    fi
64202  fi
64203
64204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64205  if test "x$test_cygdrive_prefix" = x; then
64206    # As a simple fix, exclude /usr/bin since it's not a real path.
64207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64209      # a path prefixed by /cygdrive for fixpath to work.
64210      new_path="$CYGWIN_ROOT_PATH$input_path"
64211    fi
64212  fi
64213
64214
64215  if test "x$path" != "x$new_path"; then
64216    FREETYPE_LICENSE="$new_path"
64217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64218$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64219  fi
64220
64221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64222
64223  path="$FREETYPE_LICENSE"
64224  has_colon=`$ECHO $path | $GREP ^.:`
64225  new_path="$path"
64226  if test "x$has_colon" = x; then
64227    # Not in mixed or Windows style, start by that.
64228    new_path=`cmd //c echo $path`
64229  fi
64230
64231
64232  input_path="$new_path"
64233  # Check if we need to convert this using DOS-style short mode. If the path
64234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64235  # take no chances and rewrite it.
64236  # Note: m4 eats our [], so we need to use [ and ] instead.
64237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64238  if test "x$has_forbidden_chars" != x; then
64239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64241  fi
64242
64243
64244  windows_path="$new_path"
64245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64246    unix_path=`$CYGPATH -u "$windows_path"`
64247    new_path="$unix_path"
64248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64250    new_path="$unix_path"
64251  fi
64252
64253  if test "x$path" != "x$new_path"; then
64254    FREETYPE_LICENSE="$new_path"
64255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64256$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64257  fi
64258
64259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64261
64262    else
64263      # We're on a unix platform. Hooray! :)
64264      path="$FREETYPE_LICENSE"
64265      has_space=`$ECHO "$path" | $GREP " "`
64266      if test "x$has_space" != x; then
64267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64268$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64270      fi
64271
64272      # Use eval to expand a potential ~
64273      eval path="$path"
64274      if test ! -f "$path" && test ! -d "$path"; then
64275        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64276      fi
64277
64278      if test -d "$path"; then
64279        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64280      else
64281        dir="`$DIRNAME "$path"`"
64282        base="`$BASENAME "$path"`"
64283        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64284      fi
64285    fi
64286  fi
64287
64288    if test ! -f "$FREETYPE_LICENSE"; then
64289      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64290    fi
64291  fi
64292
64293
64294
64295
64296
64297
64298
64299
64300# Check whether --with-alsa was given.
64301if test "${with_alsa+set}" = set; then :
64302  withval=$with_alsa;
64303fi
64304
64305
64306# Check whether --with-alsa-include was given.
64307if test "${with_alsa_include+set}" = set; then :
64308  withval=$with_alsa_include;
64309fi
64310
64311
64312# Check whether --with-alsa-lib was given.
64313if test "${with_alsa_lib+set}" = set; then :
64314  withval=$with_alsa_lib;
64315fi
64316
64317
64318  if test "x$NEEDS_LIB_ALSA" = xfalse; then
64319    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64320        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64321        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64322      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64323$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64324    fi
64325    ALSA_CFLAGS=
64326    ALSA_LIBS=
64327  else
64328    ALSA_FOUND=no
64329
64330    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64331      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64332    fi
64333
64334    if test "x${with_alsa}" != x; then
64335      ALSA_LIBS="-L${with_alsa}/lib -lasound"
64336      ALSA_CFLAGS="-I${with_alsa}/include"
64337      ALSA_FOUND=yes
64338    fi
64339    if test "x${with_alsa_include}" != x; then
64340      ALSA_CFLAGS="-I${with_alsa_include}"
64341      ALSA_FOUND=yes
64342    fi
64343    if test "x${with_alsa_lib}" != x; then
64344      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64345      ALSA_FOUND=yes
64346    fi
64347    # Do not try pkg-config if we have a sysroot set.
64348    if test "x$SYSROOT" = x; then
64349      if test "x$ALSA_FOUND" = xno; then
64350
64351pkg_failed=no
64352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64353$as_echo_n "checking for ALSA... " >&6; }
64354
64355if test -n "$ALSA_CFLAGS"; then
64356    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64357 elif test -n "$PKG_CONFIG"; then
64358    if test -n "$PKG_CONFIG" && \
64359    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64360  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64361  ac_status=$?
64362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64363  test $ac_status = 0; }; then
64364  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64365else
64366  pkg_failed=yes
64367fi
64368 else
64369    pkg_failed=untried
64370fi
64371if test -n "$ALSA_LIBS"; then
64372    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64373 elif test -n "$PKG_CONFIG"; then
64374    if test -n "$PKG_CONFIG" && \
64375    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64376  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64377  ac_status=$?
64378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64379  test $ac_status = 0; }; then
64380  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64381else
64382  pkg_failed=yes
64383fi
64384 else
64385    pkg_failed=untried
64386fi
64387
64388
64389
64390if test $pkg_failed = yes; then
64391
64392if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64393        _pkg_short_errors_supported=yes
64394else
64395        _pkg_short_errors_supported=no
64396fi
64397        if test $_pkg_short_errors_supported = yes; then
64398	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64399        else
64400	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64401        fi
64402	# Put the nasty error message in config.log where it belongs
64403	echo "$ALSA_PKG_ERRORS" >&5
64404
64405	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64406$as_echo "no" >&6; }
64407                ALSA_FOUND=no
64408elif test $pkg_failed = untried; then
64409	ALSA_FOUND=no
64410else
64411	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64412	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64414$as_echo "yes" >&6; }
64415	ALSA_FOUND=yes
64416fi
64417      fi
64418    fi
64419    if test "x$ALSA_FOUND" = xno; then
64420      for ac_header in alsa/asoundlib.h
64421do :
64422  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64423if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64424  cat >>confdefs.h <<_ACEOF
64425#define HAVE_ALSA_ASOUNDLIB_H 1
64426_ACEOF
64427
64428            ALSA_FOUND=yes
64429            ALSA_CFLAGS=-Iignoreme
64430            ALSA_LIBS=-lasound
64431            DEFAULT_ALSA=yes
64432
64433else
64434  ALSA_FOUND=no
64435
64436fi
64437
64438done
64439
64440    fi
64441    if test "x$ALSA_FOUND" = xno; then
64442
64443  # Print a helpful message on how to acquire the necessary build dependency.
64444  # alsa is the help tag: freetype, cups, alsa etc
64445  MISSING_DEPENDENCY=alsa
64446
64447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64448    cygwin_help $MISSING_DEPENDENCY
64449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64450    msys_help $MISSING_DEPENDENCY
64451  else
64452    PKGHANDLER_COMMAND=
64453
64454    case $PKGHANDLER in
64455      apt-get)
64456        apt_help     $MISSING_DEPENDENCY ;;
64457      yum)
64458        yum_help     $MISSING_DEPENDENCY ;;
64459      brew)
64460        brew_help    $MISSING_DEPENDENCY ;;
64461      port)
64462        port_help    $MISSING_DEPENDENCY ;;
64463      pkgutil)
64464        pkgutil_help $MISSING_DEPENDENCY ;;
64465      pkgadd)
64466        pkgadd_help  $MISSING_DEPENDENCY ;;
64467    esac
64468
64469    if test "x$PKGHANDLER_COMMAND" != x; then
64470      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64471    fi
64472  fi
64473
64474      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64475    fi
64476  fi
64477
64478
64479
64480
64481
64482
64483# Check whether --with-libffi was given.
64484if test "${with_libffi+set}" = set; then :
64485  withval=$with_libffi;
64486fi
64487
64488
64489# Check whether --with-libffi-include was given.
64490if test "${with_libffi_include+set}" = set; then :
64491  withval=$with_libffi_include;
64492fi
64493
64494
64495# Check whether --with-libffi-lib was given.
64496if test "${with_libffi_lib+set}" = set; then :
64497  withval=$with_libffi_lib;
64498fi
64499
64500  # Check whether --enable-libffi-bundling was given.
64501if test "${enable_libffi_bundling+set}" = set; then :
64502  enableval=$enable_libffi_bundling;
64503fi
64504
64505
64506  if test "x$NEEDS_LIB_FFI" = xfalse; then
64507    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64508        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64509        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64510      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64511$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64512    fi
64513    LIBFFI_CFLAGS=
64514    LIBFFI_LIBS=
64515  else
64516    LIBFFI_FOUND=no
64517
64518    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64519      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64520    fi
64521
64522    if test "x${with_libffi}" != x; then
64523      LIBFFI_LIB_PATH="${with_libffi}/lib"
64524      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64525      LIBFFI_CFLAGS="-I${with_libffi}/include"
64526      LIBFFI_FOUND=yes
64527    fi
64528    if test "x${with_libffi_include}" != x; then
64529      LIBFFI_CFLAGS="-I${with_libffi_include}"
64530      LIBFFI_FOUND=yes
64531    fi
64532    if test "x${with_libffi_lib}" != x; then
64533      LIBFFI_LIB_PATH="${with_libffi_lib}"
64534      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64535      LIBFFI_FOUND=yes
64536    fi
64537    # Do not try pkg-config if we have a sysroot set.
64538    if test "x$SYSROOT" = x; then
64539      if test "x$LIBFFI_FOUND" = xno; then
64540        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64541
64542pkg_failed=no
64543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64544$as_echo_n "checking for LIBFFI... " >&6; }
64545
64546if test -n "$LIBFFI_CFLAGS"; then
64547    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64548 elif test -n "$PKG_CONFIG"; then
64549    if test -n "$PKG_CONFIG" && \
64550    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64551  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64552  ac_status=$?
64553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64554  test $ac_status = 0; }; then
64555  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64556else
64557  pkg_failed=yes
64558fi
64559 else
64560    pkg_failed=untried
64561fi
64562if test -n "$LIBFFI_LIBS"; then
64563    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64564 elif test -n "$PKG_CONFIG"; then
64565    if test -n "$PKG_CONFIG" && \
64566    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64567  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64568  ac_status=$?
64569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64570  test $ac_status = 0; }; then
64571  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64572else
64573  pkg_failed=yes
64574fi
64575 else
64576    pkg_failed=untried
64577fi
64578
64579
64580
64581if test $pkg_failed = yes; then
64582
64583if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64584        _pkg_short_errors_supported=yes
64585else
64586        _pkg_short_errors_supported=no
64587fi
64588        if test $_pkg_short_errors_supported = yes; then
64589	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64590        else
64591	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64592        fi
64593	# Put the nasty error message in config.log where it belongs
64594	echo "$LIBFFI_PKG_ERRORS" >&5
64595
64596	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64597$as_echo "no" >&6; }
64598                LIBFFI_FOUND=no
64599elif test $pkg_failed = untried; then
64600	LIBFFI_FOUND=no
64601else
64602	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64603	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64605$as_echo "yes" >&6; }
64606	LIBFFI_FOUND=yes
64607fi
64608      fi
64609    fi
64610    if test "x$LIBFFI_FOUND" = xno; then
64611      for ac_header in ffi.h
64612do :
64613  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64614if test "x$ac_cv_header_ffi_h" = xyes; then :
64615  cat >>confdefs.h <<_ACEOF
64616#define HAVE_FFI_H 1
64617_ACEOF
64618
64619            LIBFFI_FOUND=yes
64620            LIBFFI_CFLAGS=
64621            LIBFFI_LIBS=-lffi
64622
64623else
64624  LIBFFI_FOUND=no
64625
64626fi
64627
64628done
64629
64630    fi
64631    if test "x$LIBFFI_FOUND" = xno; then
64632
64633  # Print a helpful message on how to acquire the necessary build dependency.
64634  # ffi is the help tag: freetype, cups, alsa etc
64635  MISSING_DEPENDENCY=ffi
64636
64637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64638    cygwin_help $MISSING_DEPENDENCY
64639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64640    msys_help $MISSING_DEPENDENCY
64641  else
64642    PKGHANDLER_COMMAND=
64643
64644    case $PKGHANDLER in
64645      apt-get)
64646        apt_help     $MISSING_DEPENDENCY ;;
64647      yum)
64648        yum_help     $MISSING_DEPENDENCY ;;
64649      brew)
64650        brew_help    $MISSING_DEPENDENCY ;;
64651      port)
64652        port_help    $MISSING_DEPENDENCY ;;
64653      pkgutil)
64654        pkgutil_help $MISSING_DEPENDENCY ;;
64655      pkgadd)
64656        pkgadd_help  $MISSING_DEPENDENCY ;;
64657    esac
64658
64659    if test "x$PKGHANDLER_COMMAND" != x; then
64660      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64661    fi
64662  fi
64663
64664      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64665    fi
64666
64667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64668$as_echo_n "checking if libffi works... " >&6; }
64669    ac_ext=c
64670ac_cpp='$CPP $CPPFLAGS'
64671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64673ac_compiler_gnu=$ac_cv_c_compiler_gnu
64674
64675    OLD_CFLAGS="$CFLAGS"
64676    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64677    OLD_LIBS="$LIBS"
64678    LIBS="$LIBS $LIBFFI_LIBS"
64679    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64680/* end confdefs.h.  */
64681#include <ffi.h>
64682int
64683main ()
64684{
64685
64686          ffi_call(NULL, NULL, NULL, NULL);
64687          return 0;
64688
64689  ;
64690  return 0;
64691}
64692_ACEOF
64693if ac_fn_c_try_link "$LINENO"; then :
64694  LIBFFI_WORKS=yes
64695else
64696  LIBFFI_WORKS=no
64697
64698fi
64699rm -f core conftest.err conftest.$ac_objext \
64700    conftest$ac_exeext conftest.$ac_ext
64701    CFLAGS="$OLD_CFLAGS"
64702    LIBS="$OLD_LIBS"
64703    ac_ext=cpp
64704ac_cpp='$CXXCPP $CPPFLAGS'
64705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64708
64709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64710$as_echo "$LIBFFI_WORKS" >&6; }
64711
64712    if test "x$LIBFFI_WORKS" = xno; then
64713
64714  # Print a helpful message on how to acquire the necessary build dependency.
64715  # ffi is the help tag: freetype, cups, alsa etc
64716  MISSING_DEPENDENCY=ffi
64717
64718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64719    cygwin_help $MISSING_DEPENDENCY
64720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64721    msys_help $MISSING_DEPENDENCY
64722  else
64723    PKGHANDLER_COMMAND=
64724
64725    case $PKGHANDLER in
64726      apt-get)
64727        apt_help     $MISSING_DEPENDENCY ;;
64728      yum)
64729        yum_help     $MISSING_DEPENDENCY ;;
64730      brew)
64731        brew_help    $MISSING_DEPENDENCY ;;
64732      port)
64733        port_help    $MISSING_DEPENDENCY ;;
64734      pkgutil)
64735        pkgutil_help $MISSING_DEPENDENCY ;;
64736      pkgadd)
64737        pkgadd_help  $MISSING_DEPENDENCY ;;
64738    esac
64739
64740    if test "x$PKGHANDLER_COMMAND" != x; then
64741      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64742    fi
64743  fi
64744
64745      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64746    fi
64747
64748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64749$as_echo_n "checking if libffi should be bundled... " >&6; }
64750    if test "x$enable_libffi_bundling" = "x"; then
64751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64752$as_echo "no" >&6; }
64753      ENABLE_LIBFFI_BUNDLING=false
64754    elif  test "x$enable_libffi_bundling" = "xno"; then
64755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64756$as_echo "no, forced" >&6; }
64757      ENABLE_LIBFFI_BUNDLING=false
64758    elif  test "x$enable_libffi_bundling" = "xyes"; then
64759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64760$as_echo "yes, forced" >&6; }
64761      ENABLE_LIBFFI_BUNDLING=true
64762    else
64763      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64764    fi
64765
64766    # Find the libffi.so.X to bundle
64767    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64769$as_echo_n "checking for libffi lib file location... " >&6; }
64770      if test "x${LIBFFI_LIB_PATH}" != x; then
64771        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64772          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64773        else
64774          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64775        fi
64776      else
64777        # If we don't have an explicit path, look in a few obvious places
64778        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64779          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64780            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64781          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64782            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64783          else
64784            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64785          fi
64786        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64787          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64788            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64789          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64790            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64791          else
64792            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64793          fi
64794        else
64795          # Fallback on the default /usr/lib dir
64796          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64797            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64798          else
64799            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64800          fi
64801        fi
64802      fi
64803      # Make sure the wildcard is evaluated
64804      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64806$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64807    fi
64808  fi
64809
64810
64811
64812
64813
64814
64815
64816  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64817    # Extract the first word of "llvm-config", so it can be a program name with args.
64818set dummy llvm-config; ac_word=$2
64819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64820$as_echo_n "checking for $ac_word... " >&6; }
64821if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64822  $as_echo_n "(cached) " >&6
64823else
64824  if test -n "$LLVM_CONFIG"; then
64825  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64826else
64827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64828for as_dir in $PATH
64829do
64830  IFS=$as_save_IFS
64831  test -z "$as_dir" && as_dir=.
64832    for ac_exec_ext in '' $ac_executable_extensions; do
64833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64834    ac_cv_prog_LLVM_CONFIG="llvm-config"
64835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64836    break 2
64837  fi
64838done
64839  done
64840IFS=$as_save_IFS
64841
64842fi
64843fi
64844LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64845if test -n "$LLVM_CONFIG"; then
64846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64847$as_echo "$LLVM_CONFIG" >&6; }
64848else
64849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64850$as_echo "no" >&6; }
64851fi
64852
64853
64854
64855    if test "x$LLVM_CONFIG" != xllvm-config; then
64856      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64857    fi
64858
64859    llvm_components="jit mcjit engine nativecodegen native"
64860    unset LLVM_CFLAGS
64861    for flag in $("$LLVM_CONFIG" --cxxflags); do
64862      if echo "${flag}" | grep -q '^-[ID]'; then
64863        if test "${flag}" != "-D_DEBUG" ; then
64864          if test "${LLVM_CFLAGS}" != "" ; then
64865            LLVM_CFLAGS="${LLVM_CFLAGS} "
64866          fi
64867          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64868        fi
64869      fi
64870    done
64871    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64872    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64873
64874    unset LLVM_LDFLAGS
64875    for flag in $("${LLVM_CONFIG}" --ldflags); do
64876      if echo "${flag}" | grep -q '^-L'; then
64877        if test "${LLVM_LDFLAGS}" != ""; then
64878          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64879        fi
64880        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64881      fi
64882    done
64883
64884    unset LLVM_LIBS
64885    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64886      if echo "${flag}" | grep -q '^-l'; then
64887        if test "${LLVM_LIBS}" != ""; then
64888          LLVM_LIBS="${LLVM_LIBS} "
64889        fi
64890        LLVM_LIBS="${LLVM_LIBS}${flag}"
64891      fi
64892    done
64893
64894    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64895    # always properly detect -ltinfo
64896    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64897
64898
64899
64900
64901  fi
64902
64903
64904
64905# Check whether --with-libjpeg was given.
64906if test "${with_libjpeg+set}" = set; then :
64907  withval=$with_libjpeg;
64908fi
64909
64910
64911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64912$as_echo_n "checking for which libjpeg to use... " >&6; }
64913  # default is bundled
64914  DEFAULT_LIBJPEG=bundled
64915  # if user didn't specify, use DEFAULT_LIBJPEG
64916  if test "x${with_libjpeg}" = "x"; then
64917    with_libjpeg=${DEFAULT_LIBJPEG}
64918  fi
64919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64920$as_echo "${with_libjpeg}" >&6; }
64921
64922  if test "x${with_libjpeg}" = "xbundled"; then
64923    USE_EXTERNAL_LIBJPEG=false
64924  elif test "x${with_libjpeg}" = "xsystem"; then
64925    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64926if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64927
64928else
64929   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64930fi
64931
64932
64933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64934$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64935if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64936  $as_echo_n "(cached) " >&6
64937else
64938  ac_check_lib_save_LIBS=$LIBS
64939LIBS="-ljpeg  $LIBS"
64940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64941/* end confdefs.h.  */
64942
64943/* Override any GCC internal prototype to avoid an error.
64944   Use char because int might match the return type of a GCC
64945   builtin and then its argument prototype would still apply.  */
64946#ifdef __cplusplus
64947extern "C"
64948#endif
64949char jpeg_CreateDecompress ();
64950int
64951main ()
64952{
64953return jpeg_CreateDecompress ();
64954  ;
64955  return 0;
64956}
64957_ACEOF
64958if ac_fn_cxx_try_link "$LINENO"; then :
64959  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64960else
64961  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64962fi
64963rm -f core conftest.err conftest.$ac_objext \
64964    conftest$ac_exeext conftest.$ac_ext
64965LIBS=$ac_check_lib_save_LIBS
64966fi
64967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64968$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64969if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64970  cat >>confdefs.h <<_ACEOF
64971#define HAVE_LIBJPEG 1
64972_ACEOF
64973
64974  LIBS="-ljpeg $LIBS"
64975
64976else
64977   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64978fi
64979
64980
64981    USE_EXTERNAL_LIBJPEG=true
64982  else
64983    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64984  fi
64985
64986
64987
64988
64989
64990# Check whether --with-giflib was given.
64991if test "${with_giflib+set}" = set; then :
64992  withval=$with_giflib;
64993fi
64994
64995
64996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64997$as_echo_n "checking for which giflib to use... " >&6; }
64998  # default is bundled
64999  DEFAULT_GIFLIB=bundled
65000  # if user didn't specify, use DEFAULT_GIFLIB
65001  if test "x${with_giflib}" = "x"; then
65002    with_giflib=${DEFAULT_GIFLIB}
65003  fi
65004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
65005$as_echo "${with_giflib}" >&6; }
65006
65007  if test "x${with_giflib}" = "xbundled"; then
65008    USE_EXTERNAL_LIBGIF=false
65009  elif test "x${with_giflib}" = "xsystem"; then
65010    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
65011if test "x$ac_cv_header_gif_lib_h" = xyes; then :
65012
65013else
65014   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
65015fi
65016
65017
65018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
65019$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
65020if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
65021  $as_echo_n "(cached) " >&6
65022else
65023  ac_check_lib_save_LIBS=$LIBS
65024LIBS="-lgif  $LIBS"
65025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65026/* end confdefs.h.  */
65027
65028/* Override any GCC internal prototype to avoid an error.
65029   Use char because int might match the return type of a GCC
65030   builtin and then its argument prototype would still apply.  */
65031#ifdef __cplusplus
65032extern "C"
65033#endif
65034char DGifGetCode ();
65035int
65036main ()
65037{
65038return DGifGetCode ();
65039  ;
65040  return 0;
65041}
65042_ACEOF
65043if ac_fn_cxx_try_link "$LINENO"; then :
65044  ac_cv_lib_gif_DGifGetCode=yes
65045else
65046  ac_cv_lib_gif_DGifGetCode=no
65047fi
65048rm -f core conftest.err conftest.$ac_objext \
65049    conftest$ac_exeext conftest.$ac_ext
65050LIBS=$ac_check_lib_save_LIBS
65051fi
65052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
65053$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
65054if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
65055  cat >>confdefs.h <<_ACEOF
65056#define HAVE_LIBGIF 1
65057_ACEOF
65058
65059  LIBS="-lgif $LIBS"
65060
65061else
65062   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
65063fi
65064
65065
65066    USE_EXTERNAL_LIBGIF=true
65067  else
65068    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
65069  fi
65070
65071
65072
65073
65074
65075# Check whether --with-libpng was given.
65076if test "${with_libpng+set}" = set; then :
65077  withval=$with_libpng;
65078fi
65079
65080
65081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
65082$as_echo_n "checking for which libpng to use... " >&6; }
65083
65084  # default is bundled
65085  DEFAULT_LIBPNG=bundled
65086  # if user didn't specify, use DEFAULT_LIBPNG
65087  if test "x${with_libpng}" = "x"; then
65088    with_libpng=${DEFAULT_LIBPNG}
65089  fi
65090
65091  if test "x${with_libpng}" = "xbundled"; then
65092    USE_EXTERNAL_LIBPNG=false
65093    PNG_CFLAGS=""
65094    PNG_LIBS=""
65095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65096$as_echo "bundled" >&6; }
65097  elif test "x${with_libpng}" = "xsystem"; then
65098
65099pkg_failed=no
65100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65101$as_echo_n "checking for PNG... " >&6; }
65102
65103if test -n "$PNG_CFLAGS"; then
65104    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65105 elif test -n "$PKG_CONFIG"; then
65106    if test -n "$PKG_CONFIG" && \
65107    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65108  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65109  ac_status=$?
65110  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65111  test $ac_status = 0; }; then
65112  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65113else
65114  pkg_failed=yes
65115fi
65116 else
65117    pkg_failed=untried
65118fi
65119if test -n "$PNG_LIBS"; then
65120    pkg_cv_PNG_LIBS="$PNG_LIBS"
65121 elif test -n "$PKG_CONFIG"; then
65122    if test -n "$PKG_CONFIG" && \
65123    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65124  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65125  ac_status=$?
65126  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65127  test $ac_status = 0; }; then
65128  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65129else
65130  pkg_failed=yes
65131fi
65132 else
65133    pkg_failed=untried
65134fi
65135
65136
65137
65138if test $pkg_failed = yes; then
65139
65140if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65141        _pkg_short_errors_supported=yes
65142else
65143        _pkg_short_errors_supported=no
65144fi
65145        if test $_pkg_short_errors_supported = yes; then
65146	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65147        else
65148	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65149        fi
65150	# Put the nasty error message in config.log where it belongs
65151	echo "$PNG_PKG_ERRORS" >&5
65152
65153	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65154$as_echo "no" >&6; }
65155                LIBPNG_FOUND=no
65156elif test $pkg_failed = untried; then
65157	LIBPNG_FOUND=no
65158else
65159	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65160	PNG_LIBS=$pkg_cv_PNG_LIBS
65161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65162$as_echo "yes" >&6; }
65163	LIBPNG_FOUND=yes
65164fi
65165    if test "x${LIBPNG_FOUND}" = "xyes"; then
65166      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65167      USE_EXTERNAL_LIBPNG=true
65168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65169$as_echo "system" >&6; }
65170    else
65171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65172$as_echo "system not found" >&6; }
65173      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65174    fi
65175  else
65176    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65177  fi
65178
65179
65180
65181
65182
65183
65184
65185# Check whether --with-zlib was given.
65186if test "${with_zlib+set}" = set; then :
65187  withval=$with_zlib;
65188fi
65189
65190
65191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65192$as_echo_n "checking for compress in -lz... " >&6; }
65193if ${ac_cv_lib_z_compress+:} false; then :
65194  $as_echo_n "(cached) " >&6
65195else
65196  ac_check_lib_save_LIBS=$LIBS
65197LIBS="-lz  $LIBS"
65198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65199/* end confdefs.h.  */
65200
65201/* Override any GCC internal prototype to avoid an error.
65202   Use char because int might match the return type of a GCC
65203   builtin and then its argument prototype would still apply.  */
65204#ifdef __cplusplus
65205extern "C"
65206#endif
65207char compress ();
65208int
65209main ()
65210{
65211return compress ();
65212  ;
65213  return 0;
65214}
65215_ACEOF
65216if ac_fn_cxx_try_link "$LINENO"; then :
65217  ac_cv_lib_z_compress=yes
65218else
65219  ac_cv_lib_z_compress=no
65220fi
65221rm -f core conftest.err conftest.$ac_objext \
65222    conftest$ac_exeext conftest.$ac_ext
65223LIBS=$ac_check_lib_save_LIBS
65224fi
65225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65226$as_echo "$ac_cv_lib_z_compress" >&6; }
65227if test "x$ac_cv_lib_z_compress" = xyes; then :
65228   ZLIB_FOUND=yes
65229else
65230   ZLIB_FOUND=no
65231fi
65232
65233
65234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65235$as_echo_n "checking for which zlib to use... " >&6; }
65236
65237  DEFAULT_ZLIB=system
65238  if test "x$OPENJDK_TARGET_OS" = xwindows; then
65239    # On windows default is bundled...on others default is system
65240    DEFAULT_ZLIB=bundled
65241  fi
65242
65243  if test "x${ZLIB_FOUND}" != "xyes"; then
65244    # If we don't find any system...set default to bundled
65245    DEFAULT_ZLIB=bundled
65246  fi
65247
65248  # If user didn't specify, use DEFAULT_ZLIB
65249  if test "x${with_zlib}" = "x"; then
65250    with_zlib=${DEFAULT_ZLIB}
65251  fi
65252
65253  if test "x${with_zlib}" = "xbundled"; then
65254    USE_EXTERNAL_LIBZ=false
65255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65256$as_echo "bundled" >&6; }
65257  elif test "x${with_zlib}" = "xsystem"; then
65258    if test "x${ZLIB_FOUND}" = "xyes"; then
65259      USE_EXTERNAL_LIBZ=true
65260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65261$as_echo "system" >&6; }
65262    else
65263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65264$as_echo "system not found" >&6; }
65265      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65266    fi
65267  else
65268    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65269  fi
65270
65271
65272
65273
65274
65275# Check whether --with-lcms was given.
65276if test "${with_lcms+set}" = set; then :
65277  withval=$with_lcms;
65278fi
65279
65280
65281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65282$as_echo_n "checking for which lcms to use... " >&6; }
65283
65284  DEFAULT_LCMS=bundled
65285  # If user didn't specify, use DEFAULT_LCMS
65286  if test "x${with_lcms}" = "x"; then
65287    with_lcms=${DEFAULT_LCMS}
65288  fi
65289
65290  if test "x${with_lcms}" = "xbundled"; then
65291    USE_EXTERNAL_LCMS=false
65292    LCMS_CFLAGS=""
65293    LCMS_LIBS=""
65294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65295$as_echo "bundled" >&6; }
65296  elif test "x${with_lcms}" = "xsystem"; then
65297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65298$as_echo "system" >&6; }
65299
65300pkg_failed=no
65301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65302$as_echo_n "checking for LCMS... " >&6; }
65303
65304if test -n "$LCMS_CFLAGS"; then
65305    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65306 elif test -n "$PKG_CONFIG"; then
65307    if test -n "$PKG_CONFIG" && \
65308    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65309  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65310  ac_status=$?
65311  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65312  test $ac_status = 0; }; then
65313  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65314else
65315  pkg_failed=yes
65316fi
65317 else
65318    pkg_failed=untried
65319fi
65320if test -n "$LCMS_LIBS"; then
65321    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65322 elif test -n "$PKG_CONFIG"; then
65323    if test -n "$PKG_CONFIG" && \
65324    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65325  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65326  ac_status=$?
65327  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65328  test $ac_status = 0; }; then
65329  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65330else
65331  pkg_failed=yes
65332fi
65333 else
65334    pkg_failed=untried
65335fi
65336
65337
65338
65339if test $pkg_failed = yes; then
65340
65341if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65342        _pkg_short_errors_supported=yes
65343else
65344        _pkg_short_errors_supported=no
65345fi
65346        if test $_pkg_short_errors_supported = yes; then
65347	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65348        else
65349	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65350        fi
65351	# Put the nasty error message in config.log where it belongs
65352	echo "$LCMS_PKG_ERRORS" >&5
65353
65354	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65355$as_echo "no" >&6; }
65356                LCMS_FOUND=no
65357elif test $pkg_failed = untried; then
65358	LCMS_FOUND=no
65359else
65360	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65361	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65363$as_echo "yes" >&6; }
65364	LCMS_FOUND=yes
65365fi
65366    if test "x${LCMS_FOUND}" = "xyes"; then
65367      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65368      USE_EXTERNAL_LCMS=true
65369    else
65370      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65371    fi
65372  else
65373    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65374  fi
65375
65376
65377
65378
65379
65380
65381
65382
65383
65384
65385
65386
65387
65388  # Setup libm (the maths library)
65389  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65391$as_echo_n "checking for cos in -lm... " >&6; }
65392if ${ac_cv_lib_m_cos+:} false; then :
65393  $as_echo_n "(cached) " >&6
65394else
65395  ac_check_lib_save_LIBS=$LIBS
65396LIBS="-lm  $LIBS"
65397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65398/* end confdefs.h.  */
65399
65400/* Override any GCC internal prototype to avoid an error.
65401   Use char because int might match the return type of a GCC
65402   builtin and then its argument prototype would still apply.  */
65403#ifdef __cplusplus
65404extern "C"
65405#endif
65406char cos ();
65407int
65408main ()
65409{
65410return cos ();
65411  ;
65412  return 0;
65413}
65414_ACEOF
65415if ac_fn_cxx_try_link "$LINENO"; then :
65416  ac_cv_lib_m_cos=yes
65417else
65418  ac_cv_lib_m_cos=no
65419fi
65420rm -f core conftest.err conftest.$ac_objext \
65421    conftest$ac_exeext conftest.$ac_ext
65422LIBS=$ac_check_lib_save_LIBS
65423fi
65424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65425$as_echo "$ac_cv_lib_m_cos" >&6; }
65426if test "x$ac_cv_lib_m_cos" = xyes; then :
65427  cat >>confdefs.h <<_ACEOF
65428#define HAVE_LIBM 1
65429_ACEOF
65430
65431  LIBS="-lm $LIBS"
65432
65433else
65434
65435        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65436$as_echo "$as_me: Maths library was not found" >&6;}
65437
65438fi
65439
65440    LIBM="-lm"
65441  else
65442    LIBM=""
65443  fi
65444
65445
65446  # Setup libdl (for dynamic library loading)
65447  save_LIBS="$LIBS"
65448  LIBS=""
65449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65450$as_echo_n "checking for dlopen in -ldl... " >&6; }
65451if ${ac_cv_lib_dl_dlopen+:} false; then :
65452  $as_echo_n "(cached) " >&6
65453else
65454  ac_check_lib_save_LIBS=$LIBS
65455LIBS="-ldl  $LIBS"
65456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65457/* end confdefs.h.  */
65458
65459/* Override any GCC internal prototype to avoid an error.
65460   Use char because int might match the return type of a GCC
65461   builtin and then its argument prototype would still apply.  */
65462#ifdef __cplusplus
65463extern "C"
65464#endif
65465char dlopen ();
65466int
65467main ()
65468{
65469return dlopen ();
65470  ;
65471  return 0;
65472}
65473_ACEOF
65474if ac_fn_cxx_try_link "$LINENO"; then :
65475  ac_cv_lib_dl_dlopen=yes
65476else
65477  ac_cv_lib_dl_dlopen=no
65478fi
65479rm -f core conftest.err conftest.$ac_objext \
65480    conftest$ac_exeext conftest.$ac_ext
65481LIBS=$ac_check_lib_save_LIBS
65482fi
65483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65484$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65485if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65486  cat >>confdefs.h <<_ACEOF
65487#define HAVE_LIBDL 1
65488_ACEOF
65489
65490  LIBS="-ldl $LIBS"
65491
65492fi
65493
65494  LIBDL="$LIBS"
65495
65496  LIBS="$save_LIBS"
65497
65498  # Deprecated libraries, keep the flags for backwards compatibility
65499  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65500
65501
65502# Check whether --with-dxsdk was given.
65503if test "${with_dxsdk+set}" = set; then :
65504  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65505$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65506fi
65507
65508
65509
65510
65511# Check whether --with-dxsdk-lib was given.
65512if test "${with_dxsdk_lib+set}" = set; then :
65513  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65514$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65515fi
65516
65517
65518
65519
65520# Check whether --with-dxsdk-include was given.
65521if test "${with_dxsdk_include+set}" = set; then :
65522  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65523$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65524fi
65525
65526
65527  fi
65528
65529  # Control if libzip can use mmap. Available for purposes of overriding.
65530  LIBZIP_CAN_USE_MMAP=true
65531
65532
65533
65534  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65535    # Find the root of the Solaris Studio installation from the compiler path
65536    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65537    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65539$as_echo_n "checking for libstlport.so.1... " >&6; }
65540    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65541      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65542      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65543    fi
65544    if test -f "$STLPORT_LIB"; then
65545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65546$as_echo "yes, $STLPORT_LIB" >&6; }
65547
65548  # Only process if variable expands to non-empty
65549
65550  if test "x$STLPORT_LIB" != x; then
65551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65552
65553  # Input might be given as Windows format, start by converting to
65554  # unix format.
65555  path="$STLPORT_LIB"
65556  new_path=`$CYGPATH -u "$path"`
65557
65558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65561  # "foo.exe" is OK but "foo" is an error.
65562  #
65563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65564  # It is also a way to make sure we got the proper file name for the real test later on.
65565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65566  if test "x$test_shortpath" = x; then
65567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65568$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65569    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65570  fi
65571
65572  # Call helper function which possibly converts this using DOS-style short mode.
65573  # If so, the updated path is stored in $new_path.
65574
65575  input_path="$new_path"
65576  # Check if we need to convert this using DOS-style short mode. If the path
65577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65578  # take no chances and rewrite it.
65579  # Note: m4 eats our [], so we need to use [ and ] instead.
65580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65581  if test "x$has_forbidden_chars" != x; then
65582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65586      # Going to short mode and back again did indeed matter. Since short mode is
65587      # case insensitive, let's make it lowercase to improve readability.
65588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65589      # Now convert it back to Unix-style (cygpath)
65590      input_path=`$CYGPATH -u "$shortmode_path"`
65591      new_path="$input_path"
65592    fi
65593  fi
65594
65595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65596  if test "x$test_cygdrive_prefix" = x; then
65597    # As a simple fix, exclude /usr/bin since it's not a real path.
65598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65600      # a path prefixed by /cygdrive for fixpath to work.
65601      new_path="$CYGWIN_ROOT_PATH$input_path"
65602    fi
65603  fi
65604
65605
65606  if test "x$path" != "x$new_path"; then
65607    STLPORT_LIB="$new_path"
65608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65609$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65610  fi
65611
65612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65613
65614  path="$STLPORT_LIB"
65615  has_colon=`$ECHO $path | $GREP ^.:`
65616  new_path="$path"
65617  if test "x$has_colon" = x; then
65618    # Not in mixed or Windows style, start by that.
65619    new_path=`cmd //c echo $path`
65620  fi
65621
65622
65623  input_path="$new_path"
65624  # Check if we need to convert this using DOS-style short mode. If the path
65625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65626  # take no chances and rewrite it.
65627  # Note: m4 eats our [], so we need to use [ and ] instead.
65628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65629  if test "x$has_forbidden_chars" != x; then
65630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65632  fi
65633
65634
65635  windows_path="$new_path"
65636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65637    unix_path=`$CYGPATH -u "$windows_path"`
65638    new_path="$unix_path"
65639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65641    new_path="$unix_path"
65642  fi
65643
65644  if test "x$path" != "x$new_path"; then
65645    STLPORT_LIB="$new_path"
65646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65647$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65648  fi
65649
65650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65652
65653    else
65654      # We're on a unix platform. Hooray! :)
65655      path="$STLPORT_LIB"
65656      has_space=`$ECHO "$path" | $GREP " "`
65657      if test "x$has_space" != x; then
65658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65659$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65661      fi
65662
65663      # Use eval to expand a potential ~
65664      eval path="$path"
65665      if test ! -f "$path" && test ! -d "$path"; then
65666        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65667      fi
65668
65669      if test -d "$path"; then
65670        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65671      else
65672        dir="`$DIRNAME "$path"`"
65673        base="`$BASENAME "$path"`"
65674        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65675      fi
65676    fi
65677  fi
65678
65679    else
65680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65681$as_echo "no, not found at $STLPORT_LIB" >&6; }
65682      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65683    fi
65684
65685  fi
65686
65687
65688
65689
65690
65691
65692
65693
65694
65695
65696
65697
65698
65699
65700# Hotspot setup depends on lib checks.
65701
65702
65703  # The user can in some cases supply additional jvm features. For the custom
65704  # variant, this defines the entire variant.
65705
65706# Check whether --with-jvm-features was given.
65707if test "${with_jvm_features+set}" = set; then :
65708  withval=$with_jvm_features;
65709fi
65710
65711  if test "x$with_jvm_features" != x; then
65712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65713$as_echo_n "checking additional JVM features... " >&6; }
65714    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65716$as_echo "$JVM_FEATURES" >&6; }
65717  fi
65718
65719  # Override hotspot cpu definitions for ARM platforms
65720  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65721    HOTSPOT_TARGET_CPU=arm_32
65722    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65723    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65724    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65725  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65726    HOTSPOT_TARGET_CPU=arm_64
65727    HOTSPOT_TARGET_CPU_ARCH=arm
65728    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65729    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65730  fi
65731
65732  # Verify that dependencies are met for explicitly set features.
65733  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65734    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65735  fi
65736
65737  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65738    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65739  fi
65740
65741  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65742    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65743  fi
65744
65745  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65746    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65747  fi
65748
65749  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65750    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65751  fi
65752
65753  # Turn on additional features based on other parts of configure
65754  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65755    JVM_FEATURES="$JVM_FEATURES dtrace"
65756  else
65757    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65758      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65759    fi
65760  fi
65761
65762  if test "x$STATIC_BUILD" = "xtrue"; then
65763    JVM_FEATURES="$JVM_FEATURES static-build"
65764  else
65765    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65766      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65767    fi
65768  fi
65769
65770  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65771    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65772      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65773    fi
65774  fi
65775
65776  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65777    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65778      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65779    fi
65780  fi
65781
65782  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65783  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65784     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65785     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65786    JVM_FEATURES_jvmci="jvmci"
65787  else
65788    JVM_FEATURES_jvmci=""
65789  fi
65790
65791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65792$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65793  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65795$as_echo "yes, forced" >&6; }
65796    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65797      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65798    fi
65799    INCLUDE_GRAAL="true"
65800  else
65801    # By default enable graal build where AOT is available
65802    if test "x$ENABLE_AOT" = "xtrue"; then
65803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65804$as_echo "yes" >&6; }
65805      JVM_FEATURES_graal="graal"
65806      INCLUDE_GRAAL="true"
65807    else
65808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65809$as_echo "no" >&6; }
65810      JVM_FEATURES_graal=""
65811      INCLUDE_GRAAL="false"
65812    fi
65813  fi
65814
65815
65816
65817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65818$as_echo_n "checking if aot should be enabled... " >&6; }
65819  if test "x$ENABLE_AOT" = "xtrue"; then
65820    if test "x$enable_aot" = "xyes"; then
65821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65822$as_echo "yes, forced" >&6; }
65823    else
65824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65825$as_echo "yes" >&6; }
65826    fi
65827    JVM_FEATURES_aot="aot"
65828  else
65829    if test "x$enable_aot" = "xno"; then
65830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65831$as_echo "no, forced" >&6; }
65832    else
65833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65834$as_echo "no" >&6; }
65835    fi
65836    JVM_FEATURES_aot=""
65837  fi
65838
65839  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65840    # Default to use link time optimizations on minimal on arm
65841    JVM_FEATURES_link_time_opt="link-time-opt"
65842  else
65843    JVM_FEATURES_link_time_opt=""
65844  fi
65845
65846  # All variants but minimal (and custom) get these features
65847  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65848
65849  # Enable features depending on variant.
65850  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65851  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65852  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65853  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65854  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65855  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65856  JVM_FEATURES_custom="$JVM_FEATURES"
65857
65858
65859
65860
65861
65862
65863
65864
65865
65866  # Used for verification of Makefiles by check-jvm-feature
65867
65868
65869  # We don't support --with-jvm-interpreter anymore, use zero instead.
65870
65871
65872# Check whether --with-jvm-interpreter was given.
65873if test "${with_jvm_interpreter+set}" = set; then :
65874  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65875$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65876fi
65877
65878
65879
65880
65881###############################################################################
65882#
65883# We need to do some final tweaking, when everything else is done.
65884#
65885###############################################################################
65886
65887
65888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65889$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65890
65891  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65892    ENABLE_INTREE_EC=true
65893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65894$as_echo "yes" >&6; }
65895  else
65896    ENABLE_INTREE_EC=false
65897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65898$as_echo "no" >&6; }
65899  fi
65900
65901
65902
65903
65904  # Check whether --enable-jtreg-failure-handler was given.
65905if test "${enable_jtreg_failure_handler+set}" = set; then :
65906  enableval=$enable_jtreg_failure_handler;
65907fi
65908
65909
65910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65911$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65912
65913  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65914    if test "x$JT_HOME" = "x"; then
65915      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65916    else
65917      BUILD_FAILURE_HANDLER=true
65918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65919$as_echo "yes, forced" >&6; }
65920    fi
65921  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65922    BUILD_FAILURE_HANDLER=false
65923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65924$as_echo "no, forced" >&6; }
65925  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65926      || test "x$enable_jtreg_failure_handler" = "x"; then
65927    if test "x$JT_HOME" = "x"; then
65928      BUILD_FAILURE_HANDLER=false
65929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65930$as_echo "no, missing jtreg" >&6; }
65931    else
65932      BUILD_FAILURE_HANDLER=true
65933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65934$as_echo "yes, jtreg present" >&6; }
65935    fi
65936  else
65937    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65938  fi
65939
65940
65941
65942
65943  # Check whether --enable-generate-classlist was given.
65944if test "${enable_generate_classlist+set}" = set; then :
65945  enableval=$enable_generate_classlist;
65946fi
65947
65948
65949  # Check if it's likely that it's possible to generate the classlist. Depending
65950  # on exact jvm configuration it could be possible anyway.
65951  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65952    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65953  else
65954    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65955  fi
65956
65957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65958$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65959  if test "x$enable_generate_classlist" = "xyes"; then
65960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65961$as_echo "yes, forced" >&6; }
65962    ENABLE_GENERATE_CLASSLIST="true"
65963    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65964      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65965$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65966    fi
65967  elif test "x$enable_generate_classlist" = "xno"; then
65968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65969$as_echo "no, forced" >&6; }
65970    ENABLE_GENERATE_CLASSLIST="false"
65971  elif test "x$enable_generate_classlist" = "x"; then
65972    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65974$as_echo "yes" >&6; }
65975      ENABLE_GENERATE_CLASSLIST="true"
65976    else
65977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65978$as_echo "no" >&6; }
65979      ENABLE_GENERATE_CLASSLIST="false"
65980    fi
65981  else
65982    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65983  fi
65984
65985
65986
65987
65988###############################################################################
65989#
65990# Configure parts of the build that only affect the build performance,
65991# not the result.
65992#
65993###############################################################################
65994
65995
65996  # How many cores do we have on this build system?
65997
65998# Check whether --with-num-cores was given.
65999if test "${with_num_cores+set}" = set; then :
66000  withval=$with_num_cores;
66001fi
66002
66003  if test "x$with_num_cores" = x; then
66004    # The number of cores were not specified, try to probe them.
66005
66006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66007$as_echo_n "checking for number of cores... " >&6; }
66008  NUM_CORES=1
66009  FOUND_CORES=no
66010
66011  if test -f /proc/cpuinfo; then
66012    # Looks like a Linux (or cygwin) system
66013    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66014    FOUND_CORES=yes
66015  elif test -x /usr/sbin/psrinfo; then
66016    # Looks like a Solaris system
66017    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66018    FOUND_CORES=yes
66019  elif test -x /usr/sbin/sysctl; then
66020    # Looks like a MacOSX system
66021    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66022    FOUND_CORES=yes
66023  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66024    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66025    FOUND_CORES=yes
66026  elif test -n "$NUMBER_OF_PROCESSORS"; then
66027    # On windows, look in the env
66028    NUM_CORES=$NUMBER_OF_PROCESSORS
66029    FOUND_CORES=yes
66030  fi
66031
66032  if test "x$FOUND_CORES" = xyes; then
66033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66034$as_echo "$NUM_CORES" >&6; }
66035  else
66036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66037$as_echo "could not detect number of cores, defaulting to 1" >&6; }
66038    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66039$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66040  fi
66041
66042  else
66043    NUM_CORES=$with_num_cores
66044  fi
66045
66046
66047
66048  # How much memory do we have on this build system?
66049
66050# Check whether --with-memory-size was given.
66051if test "${with_memory_size+set}" = set; then :
66052  withval=$with_memory_size;
66053fi
66054
66055  if test "x$with_memory_size" = x; then
66056    # The memory size was not specified, try to probe it.
66057
66058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66059$as_echo_n "checking for memory size... " >&6; }
66060  # Default to 1024 MB
66061  MEMORY_SIZE=1024
66062  FOUND_MEM=no
66063
66064  if test -f /proc/meminfo; then
66065    # Looks like a Linux (or cygwin) system
66066    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66067    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66068    FOUND_MEM=yes
66069  elif test -x /usr/sbin/prtconf; then
66070    # Looks like a Solaris or AIX system
66071    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66072    FOUND_MEM=yes
66073  elif test -x /usr/sbin/sysctl; then
66074    # Looks like a MacOSX system
66075    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66076    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66077    FOUND_MEM=yes
66078  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66079    # Windows, but without cygwin
66080    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66081    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66082    FOUND_MEM=yes
66083  fi
66084
66085  if test "x$FOUND_MEM" = xyes; then
66086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66087$as_echo "$MEMORY_SIZE MB" >&6; }
66088  else
66089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66090$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66091    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66092$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66093  fi
66094
66095  else
66096    MEMORY_SIZE=$with_memory_size
66097  fi
66098
66099
66100
66101  # Provide a decent default number of parallel jobs for make depending on
66102  # number of cores, amount of memory and machine architecture.
66103
66104# Check whether --with-jobs was given.
66105if test "${with_jobs+set}" = set; then :
66106  withval=$with_jobs;
66107fi
66108
66109  if test "x$with_jobs" = x; then
66110    # Number of jobs was not specified, calculate.
66111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66112$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66113    # Approximate memory in GB.
66114    memory_gb=`expr $MEMORY_SIZE / 1024`
66115    # Pick the lowest of memory in gb and number of cores.
66116    if test "$memory_gb" -lt "$NUM_CORES"; then
66117      JOBS="$memory_gb"
66118    else
66119      JOBS="$NUM_CORES"
66120    fi
66121    if test "$JOBS" -eq "0"; then
66122      JOBS=1
66123    fi
66124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66125$as_echo "$JOBS" >&6; }
66126  else
66127    JOBS=$with_jobs
66128  fi
66129
66130
66131
66132  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66133
66134# Check whether --with-test-jobs was given.
66135if test "${with_test_jobs+set}" = set; then :
66136  withval=$with_test_jobs;
66137fi
66138
66139  if test "x$with_test_jobs" = x; then
66140      TEST_JOBS=0
66141  else
66142      TEST_JOBS=$with_test_jobs
66143  fi
66144
66145
66146
66147# Setup arguments for the boot jdk (after cores and memory have been setup)
66148
66149  ##############################################################################
66150  #
66151  # Specify jvm options for anything that is run with the Boot JDK.
66152  # Not all JVM:s accept the same arguments on the command line.
66153  #
66154
66155# Check whether --with-boot-jdk-jvmargs was given.
66156if test "${with_boot_jdk_jvmargs+set}" = set; then :
66157  withval=$with_boot_jdk_jvmargs;
66158fi
66159
66160
66161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66162$as_echo_n "checking flags for boot jdk java command ... " >&6; }
66163
66164  # Disable special log output when a debug build is used as Boot JDK...
66165
66166  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66167  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66168  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66169  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66170  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66171  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66172    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66173    JVM_ARG_OK=true
66174  else
66175    $ECHO "Arg failed:" >&5
66176    $ECHO "$OUTPUT" >&5
66177    JVM_ARG_OK=false
66178  fi
66179
66180
66181  # Force en-US environment
66182
66183  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66184  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66185  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66186  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66187  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66188  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66189    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66190    JVM_ARG_OK=true
66191  else
66192    $ECHO "Arg failed:" >&5
66193    $ECHO "$OUTPUT" >&5
66194    JVM_ARG_OK=false
66195  fi
66196
66197
66198  # Apply user provided options.
66199
66200  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66201  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66202  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66203  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66204  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66206    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66207    JVM_ARG_OK=true
66208  else
66209    $ECHO "Arg failed:" >&5
66210    $ECHO "$OUTPUT" >&5
66211    JVM_ARG_OK=false
66212  fi
66213
66214
66215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66216$as_echo "$boot_jdk_jvmargs" >&6; }
66217
66218  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66219  JAVA_FLAGS=$boot_jdk_jvmargs
66220
66221
66222
66223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66224$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66225
66226  # Starting amount of heap memory.
66227
66228  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66229  $ECHO "Command: $JAVA -Xms64M -version" >&5
66230  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66231  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66232  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66233  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66234    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66235    JVM_ARG_OK=true
66236  else
66237    $ECHO "Arg failed:" >&5
66238    $ECHO "$OUTPUT" >&5
66239    JVM_ARG_OK=false
66240  fi
66241
66242  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66243
66244  # Maximum amount of heap memory and stack size.
66245  JVM_HEAP_LIMIT_32="1024"
66246  # Running a 64 bit JVM allows for and requires a bigger heap
66247  JVM_HEAP_LIMIT_64="1600"
66248  STACK_SIZE_32=768
66249  STACK_SIZE_64=1536
66250  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66251  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66252    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66253  fi
66254  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66255    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66256  fi
66257  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66258    JVM_HEAP_LIMIT_32=512
66259    JVM_HEAP_LIMIT_64=512
66260  fi
66261
66262  if test "x$BOOT_JDK_BITS" = "x32"; then
66263    STACK_SIZE=$STACK_SIZE_32
66264    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66265  else
66266    STACK_SIZE=$STACK_SIZE_64
66267    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66268  fi
66269
66270  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66271  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66272  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66273  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66274  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66275  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66276    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66277    JVM_ARG_OK=true
66278  else
66279    $ECHO "Arg failed:" >&5
66280    $ECHO "$OUTPUT" >&5
66281    JVM_ARG_OK=false
66282  fi
66283
66284
66285  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66286  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66287  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66288  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66289  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66290  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66291    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66292    JVM_ARG_OK=true
66293  else
66294    $ECHO "Arg failed:" >&5
66295    $ECHO "$OUTPUT" >&5
66296    JVM_ARG_OK=false
66297  fi
66298
66299
66300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66301$as_echo "$boot_jdk_jvmargs_big" >&6; }
66302
66303  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66304
66305
66306  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66307    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66308    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66309  else
66310    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66311    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66312  fi
66313  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66314  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66316$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66318$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66319
66320
66321  # By default, the main javac compilations use big
66322  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66323
66324
66325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66326$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66327
66328  # Use serial gc for small short lived tools if possible
66329
66330  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66331  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66332  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66333  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66334  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66335  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66336    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66337    JVM_ARG_OK=true
66338  else
66339    $ECHO "Arg failed:" >&5
66340    $ECHO "$OUTPUT" >&5
66341    JVM_ARG_OK=false
66342  fi
66343
66344
66345  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66346  $ECHO "Command: $JAVA -Xms32M -version" >&5
66347  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66348  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66349  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66350  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66351    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66352    JVM_ARG_OK=true
66353  else
66354    $ECHO "Arg failed:" >&5
66355    $ECHO "$OUTPUT" >&5
66356    JVM_ARG_OK=false
66357  fi
66358
66359
66360  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66361  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66362  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66363  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66364  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66365  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66366    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66367    JVM_ARG_OK=true
66368  else
66369    $ECHO "Arg failed:" >&5
66370    $ECHO "$OUTPUT" >&5
66371    JVM_ARG_OK=false
66372  fi
66373
66374
66375  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66376  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66377  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66378  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66379  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66380  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66381    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66382    JVM_ARG_OK=true
66383  else
66384    $ECHO "Arg failed:" >&5
66385    $ECHO "$OUTPUT" >&5
66386    JVM_ARG_OK=false
66387  fi
66388
66389
66390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66391$as_echo "$boot_jdk_jvmargs_small" >&6; }
66392
66393  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66394
66395
66396  JAVA_TOOL_FLAGS_SMALL=""
66397  for f in $JAVA_FLAGS_SMALL; do
66398    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66399  done
66400
66401
66402
66403# Setup smart javac (after cores and memory have been setup)
66404
66405
66406# Check whether --with-sjavac-server-java was given.
66407if test "${with_sjavac_server_java+set}" = set; then :
66408  withval=$with_sjavac_server_java;
66409fi
66410
66411
66412  if test "x$with_sjavac_server_java" != x; then
66413    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66414    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66415    if test "x$FOUND_VERSION" = x; then
66416      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66417    fi
66418  else
66419    SJAVAC_SERVER_JAVA="$JAVA"
66420  fi
66421
66422
66423  if test "$MEMORY_SIZE" -gt "3000"; then
66424    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66425      JVM_64BIT=true
66426    fi
66427  fi
66428
66429  MX_VALUE=`expr $MEMORY_SIZE / 2`
66430  if test "$JVM_64BIT" = true; then
66431    # Set ms lower than mx since more than one instance of the server might
66432    # get launched at the same time before they figure out which instance won.
66433    MS_VALUE=512
66434    if test "$MX_VALUE" -gt "2048"; then
66435      MX_VALUE=2048
66436    fi
66437  else
66438    MS_VALUE=256
66439    if test "$MX_VALUE" -gt "1500"; then
66440      MX_VALUE=1500
66441    fi
66442  fi
66443  if test "$MX_VALUE" -lt "512"; then
66444    MX_VALUE=512
66445  fi
66446
66447  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66448  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66449  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66450  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66451  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66452  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66453    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66454    JVM_ARG_OK=true
66455  else
66456    $ECHO "Arg failed:" >&5
66457    $ECHO "$OUTPUT" >&5
66458    JVM_ARG_OK=false
66459  fi
66460
66461
66462
66463  # Check whether --enable-sjavac was given.
66464if test "${enable_sjavac+set}" = set; then :
66465  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66466else
66467  ENABLE_SJAVAC="no"
66468fi
66469
66470  if test "x$JVM_ARG_OK" = "xfalse"; then
66471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66472$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66473    ENABLE_SJAVAC="no"
66474  fi
66475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66476$as_echo_n "checking whether to use sjavac... " >&6; }
66477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66478$as_echo "$ENABLE_SJAVAC" >&6; }
66479
66480
66481  # Check whether --enable-javac-server was given.
66482if test "${enable_javac_server+set}" = set; then :
66483  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66484else
66485  ENABLE_JAVAC_SERVER="yes"
66486fi
66487
66488  if test "x$JVM_ARG_OK" = "xfalse"; then
66489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66490$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66491    ENABLE_JAVAC_SERVER="no"
66492  fi
66493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66494$as_echo_n "checking whether to use javac server... " >&6; }
66495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66496$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66497
66498
66499  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66500    # When using a server javac, the small client instances do not need much
66501    # resources.
66502    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66503  fi
66504
66505
66506# Setup use of icecc if requested
66507
66508  # Check whether --enable-icecc was given.
66509if test "${enable_icecc+set}" = set; then :
66510  enableval=$enable_icecc;
66511fi
66512
66513
66514  if test "x${enable_icecc}" = "xyes"; then
66515
66516
66517
66518  # Publish this variable in the help.
66519
66520
66521  if [ -z "${ICECC_CMD+x}" ]; then
66522    # The variable is not set by user, try to locate tool using the code snippet
66523    for ac_prog in icecc
66524do
66525  # Extract the first word of "$ac_prog", so it can be a program name with args.
66526set dummy $ac_prog; ac_word=$2
66527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66528$as_echo_n "checking for $ac_word... " >&6; }
66529if ${ac_cv_path_ICECC_CMD+:} false; then :
66530  $as_echo_n "(cached) " >&6
66531else
66532  case $ICECC_CMD in
66533  [\\/]* | ?:[\\/]*)
66534  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66535  ;;
66536  *)
66537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66538for as_dir in $PATH
66539do
66540  IFS=$as_save_IFS
66541  test -z "$as_dir" && as_dir=.
66542    for ac_exec_ext in '' $ac_executable_extensions; do
66543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66544    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66546    break 2
66547  fi
66548done
66549  done
66550IFS=$as_save_IFS
66551
66552  ;;
66553esac
66554fi
66555ICECC_CMD=$ac_cv_path_ICECC_CMD
66556if test -n "$ICECC_CMD"; then
66557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66558$as_echo "$ICECC_CMD" >&6; }
66559else
66560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66561$as_echo "no" >&6; }
66562fi
66563
66564
66565  test -n "$ICECC_CMD" && break
66566done
66567
66568  else
66569    # The variable is set, but is it from the command line or the environment?
66570
66571    # Try to remove the string !ICECC_CMD! from our list.
66572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66574      # If it failed, the variable was not from the command line. Ignore it,
66575      # but warn the user (except for BASH, which is always set by the calling BASH).
66576      if test "xICECC_CMD" != xBASH; then
66577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66578$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66579      fi
66580      # Try to locate tool using the code snippet
66581      for ac_prog in icecc
66582do
66583  # Extract the first word of "$ac_prog", so it can be a program name with args.
66584set dummy $ac_prog; ac_word=$2
66585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66586$as_echo_n "checking for $ac_word... " >&6; }
66587if ${ac_cv_path_ICECC_CMD+:} false; then :
66588  $as_echo_n "(cached) " >&6
66589else
66590  case $ICECC_CMD in
66591  [\\/]* | ?:[\\/]*)
66592  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66593  ;;
66594  *)
66595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66596for as_dir in $PATH
66597do
66598  IFS=$as_save_IFS
66599  test -z "$as_dir" && as_dir=.
66600    for ac_exec_ext in '' $ac_executable_extensions; do
66601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66602    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66604    break 2
66605  fi
66606done
66607  done
66608IFS=$as_save_IFS
66609
66610  ;;
66611esac
66612fi
66613ICECC_CMD=$ac_cv_path_ICECC_CMD
66614if test -n "$ICECC_CMD"; then
66615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66616$as_echo "$ICECC_CMD" >&6; }
66617else
66618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66619$as_echo "no" >&6; }
66620fi
66621
66622
66623  test -n "$ICECC_CMD" && break
66624done
66625
66626    else
66627      # If it succeeded, then it was overridden by the user. We will use it
66628      # for the tool.
66629
66630      # First remove it from the list of overridden variables, so we can test
66631      # for unknown variables in the end.
66632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66633
66634      # Check if we try to supply an empty value
66635      if test "x$ICECC_CMD" = x; then
66636        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66637$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66639$as_echo_n "checking for ICECC_CMD... " >&6; }
66640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66641$as_echo "disabled" >&6; }
66642      else
66643        # Check if the provided tool contains a complete path.
66644        tool_specified="$ICECC_CMD"
66645        tool_basename="${tool_specified##*/}"
66646        if test "x$tool_basename" = "x$tool_specified"; then
66647          # A command without a complete path is provided, search $PATH.
66648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66649$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66650          # Extract the first word of "$tool_basename", so it can be a program name with args.
66651set dummy $tool_basename; ac_word=$2
66652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66653$as_echo_n "checking for $ac_word... " >&6; }
66654if ${ac_cv_path_ICECC_CMD+:} false; then :
66655  $as_echo_n "(cached) " >&6
66656else
66657  case $ICECC_CMD in
66658  [\\/]* | ?:[\\/]*)
66659  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66660  ;;
66661  *)
66662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66663for as_dir in $PATH
66664do
66665  IFS=$as_save_IFS
66666  test -z "$as_dir" && as_dir=.
66667    for ac_exec_ext in '' $ac_executable_extensions; do
66668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66669    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66671    break 2
66672  fi
66673done
66674  done
66675IFS=$as_save_IFS
66676
66677  ;;
66678esac
66679fi
66680ICECC_CMD=$ac_cv_path_ICECC_CMD
66681if test -n "$ICECC_CMD"; then
66682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66683$as_echo "$ICECC_CMD" >&6; }
66684else
66685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66686$as_echo "no" >&6; }
66687fi
66688
66689
66690          if test "x$ICECC_CMD" = x; then
66691            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66692          fi
66693        else
66694          # Otherwise we believe it is a complete path. Use it as it is.
66695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66696$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66697          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66698$as_echo_n "checking for ICECC_CMD... " >&6; }
66699          if test ! -x "$tool_specified"; then
66700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66701$as_echo "not found" >&6; }
66702            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66703          fi
66704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66705$as_echo "$tool_specified" >&6; }
66706        fi
66707      fi
66708    fi
66709
66710  fi
66711
66712
66713
66714  if test "x$ICECC_CMD" = x; then
66715    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66716  fi
66717
66718
66719    old_path="$PATH"
66720
66721    # Look for icecc-create-env in some known places
66722    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66723
66724
66725
66726  # Publish this variable in the help.
66727
66728
66729  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66730    # The variable is not set by user, try to locate tool using the code snippet
66731    for ac_prog in icecc-create-env
66732do
66733  # Extract the first word of "$ac_prog", so it can be a program name with args.
66734set dummy $ac_prog; ac_word=$2
66735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66736$as_echo_n "checking for $ac_word... " >&6; }
66737if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66738  $as_echo_n "(cached) " >&6
66739else
66740  case $ICECC_CREATE_ENV in
66741  [\\/]* | ?:[\\/]*)
66742  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66743  ;;
66744  *)
66745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66746for as_dir in $PATH
66747do
66748  IFS=$as_save_IFS
66749  test -z "$as_dir" && as_dir=.
66750    for ac_exec_ext in '' $ac_executable_extensions; do
66751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66752    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66754    break 2
66755  fi
66756done
66757  done
66758IFS=$as_save_IFS
66759
66760  ;;
66761esac
66762fi
66763ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66764if test -n "$ICECC_CREATE_ENV"; then
66765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66766$as_echo "$ICECC_CREATE_ENV" >&6; }
66767else
66768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66769$as_echo "no" >&6; }
66770fi
66771
66772
66773  test -n "$ICECC_CREATE_ENV" && break
66774done
66775
66776  else
66777    # The variable is set, but is it from the command line or the environment?
66778
66779    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66782      # If it failed, the variable was not from the command line. Ignore it,
66783      # but warn the user (except for BASH, which is always set by the calling BASH).
66784      if test "xICECC_CREATE_ENV" != xBASH; then
66785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66786$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66787      fi
66788      # Try to locate tool using the code snippet
66789      for ac_prog in icecc-create-env
66790do
66791  # Extract the first word of "$ac_prog", so it can be a program name with args.
66792set dummy $ac_prog; ac_word=$2
66793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66794$as_echo_n "checking for $ac_word... " >&6; }
66795if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66796  $as_echo_n "(cached) " >&6
66797else
66798  case $ICECC_CREATE_ENV in
66799  [\\/]* | ?:[\\/]*)
66800  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66801  ;;
66802  *)
66803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66804for as_dir in $PATH
66805do
66806  IFS=$as_save_IFS
66807  test -z "$as_dir" && as_dir=.
66808    for ac_exec_ext in '' $ac_executable_extensions; do
66809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66810    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66812    break 2
66813  fi
66814done
66815  done
66816IFS=$as_save_IFS
66817
66818  ;;
66819esac
66820fi
66821ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66822if test -n "$ICECC_CREATE_ENV"; then
66823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66824$as_echo "$ICECC_CREATE_ENV" >&6; }
66825else
66826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66827$as_echo "no" >&6; }
66828fi
66829
66830
66831  test -n "$ICECC_CREATE_ENV" && break
66832done
66833
66834    else
66835      # If it succeeded, then it was overridden by the user. We will use it
66836      # for the tool.
66837
66838      # First remove it from the list of overridden variables, so we can test
66839      # for unknown variables in the end.
66840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66841
66842      # Check if we try to supply an empty value
66843      if test "x$ICECC_CREATE_ENV" = x; then
66844        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66845$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66846        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66847$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66849$as_echo "disabled" >&6; }
66850      else
66851        # Check if the provided tool contains a complete path.
66852        tool_specified="$ICECC_CREATE_ENV"
66853        tool_basename="${tool_specified##*/}"
66854        if test "x$tool_basename" = "x$tool_specified"; then
66855          # A command without a complete path is provided, search $PATH.
66856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66857$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66858          # Extract the first word of "$tool_basename", so it can be a program name with args.
66859set dummy $tool_basename; ac_word=$2
66860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66861$as_echo_n "checking for $ac_word... " >&6; }
66862if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66863  $as_echo_n "(cached) " >&6
66864else
66865  case $ICECC_CREATE_ENV in
66866  [\\/]* | ?:[\\/]*)
66867  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66868  ;;
66869  *)
66870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66871for as_dir in $PATH
66872do
66873  IFS=$as_save_IFS
66874  test -z "$as_dir" && as_dir=.
66875    for ac_exec_ext in '' $ac_executable_extensions; do
66876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66877    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66879    break 2
66880  fi
66881done
66882  done
66883IFS=$as_save_IFS
66884
66885  ;;
66886esac
66887fi
66888ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66889if test -n "$ICECC_CREATE_ENV"; then
66890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66891$as_echo "$ICECC_CREATE_ENV" >&6; }
66892else
66893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66894$as_echo "no" >&6; }
66895fi
66896
66897
66898          if test "x$ICECC_CREATE_ENV" = x; then
66899            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66900          fi
66901        else
66902          # Otherwise we believe it is a complete path. Use it as it is.
66903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66904$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66905          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66906$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66907          if test ! -x "$tool_specified"; then
66908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66909$as_echo "not found" >&6; }
66910            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66911          fi
66912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66913$as_echo "$tool_specified" >&6; }
66914        fi
66915      fi
66916    fi
66917
66918  fi
66919
66920
66921
66922  if test "x$ICECC_CREATE_ENV" = x; then
66923    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66924  fi
66925
66926
66927    # Use icecc-create-env to create a minimal compilation environment that can
66928    # be sent to the other hosts in the icecream cluster.
66929    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66930    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66931    # Older versions of icecc does not have the --gcc parameter
66932    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66933      icecc_gcc_arg="--gcc"
66934    fi
66935    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66936
66937  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66938      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66939          ${icecc_create_env_log} 2>&1 )
66940  if test "$?" != "0"; then
66941    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66942$as_echo "$as_me: icecc-create-env output:" >&6;}
66943    cat \
66944          ${icecc_create_env_log}
66945    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66946  fi
66947
66948    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66949      # For clang, the icecc compilerwrapper is needed. It usually resides next
66950      # to icecc-create-env.
66951
66952
66953
66954  # Publish this variable in the help.
66955
66956
66957  if [ -z "${ICECC_WRAPPER+x}" ]; then
66958    # The variable is not set by user, try to locate tool using the code snippet
66959    for ac_prog in compilerwrapper
66960do
66961  # Extract the first word of "$ac_prog", so it can be a program name with args.
66962set dummy $ac_prog; ac_word=$2
66963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66964$as_echo_n "checking for $ac_word... " >&6; }
66965if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66966  $as_echo_n "(cached) " >&6
66967else
66968  case $ICECC_WRAPPER in
66969  [\\/]* | ?:[\\/]*)
66970  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66971  ;;
66972  *)
66973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66974for as_dir in $PATH
66975do
66976  IFS=$as_save_IFS
66977  test -z "$as_dir" && as_dir=.
66978    for ac_exec_ext in '' $ac_executable_extensions; do
66979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66980    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66982    break 2
66983  fi
66984done
66985  done
66986IFS=$as_save_IFS
66987
66988  ;;
66989esac
66990fi
66991ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66992if test -n "$ICECC_WRAPPER"; then
66993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66994$as_echo "$ICECC_WRAPPER" >&6; }
66995else
66996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66997$as_echo "no" >&6; }
66998fi
66999
67000
67001  test -n "$ICECC_WRAPPER" && break
67002done
67003
67004  else
67005    # The variable is set, but is it from the command line or the environment?
67006
67007    # Try to remove the string !ICECC_WRAPPER! from our list.
67008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67010      # If it failed, the variable was not from the command line. Ignore it,
67011      # but warn the user (except for BASH, which is always set by the calling BASH).
67012      if test "xICECC_WRAPPER" != xBASH; then
67013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67014$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67015      fi
67016      # Try to locate tool using the code snippet
67017      for ac_prog in compilerwrapper
67018do
67019  # Extract the first word of "$ac_prog", so it can be a program name with args.
67020set dummy $ac_prog; ac_word=$2
67021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67022$as_echo_n "checking for $ac_word... " >&6; }
67023if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67024  $as_echo_n "(cached) " >&6
67025else
67026  case $ICECC_WRAPPER in
67027  [\\/]* | ?:[\\/]*)
67028  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67029  ;;
67030  *)
67031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67032for as_dir in $PATH
67033do
67034  IFS=$as_save_IFS
67035  test -z "$as_dir" && as_dir=.
67036    for ac_exec_ext in '' $ac_executable_extensions; do
67037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67038    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67040    break 2
67041  fi
67042done
67043  done
67044IFS=$as_save_IFS
67045
67046  ;;
67047esac
67048fi
67049ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67050if test -n "$ICECC_WRAPPER"; then
67051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67052$as_echo "$ICECC_WRAPPER" >&6; }
67053else
67054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67055$as_echo "no" >&6; }
67056fi
67057
67058
67059  test -n "$ICECC_WRAPPER" && break
67060done
67061
67062    else
67063      # If it succeeded, then it was overridden by the user. We will use it
67064      # for the tool.
67065
67066      # First remove it from the list of overridden variables, so we can test
67067      # for unknown variables in the end.
67068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67069
67070      # Check if we try to supply an empty value
67071      if test "x$ICECC_WRAPPER" = x; then
67072        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67073$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67075$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67077$as_echo "disabled" >&6; }
67078      else
67079        # Check if the provided tool contains a complete path.
67080        tool_specified="$ICECC_WRAPPER"
67081        tool_basename="${tool_specified##*/}"
67082        if test "x$tool_basename" = "x$tool_specified"; then
67083          # A command without a complete path is provided, search $PATH.
67084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67085$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67086          # Extract the first word of "$tool_basename", so it can be a program name with args.
67087set dummy $tool_basename; ac_word=$2
67088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67089$as_echo_n "checking for $ac_word... " >&6; }
67090if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67091  $as_echo_n "(cached) " >&6
67092else
67093  case $ICECC_WRAPPER in
67094  [\\/]* | ?:[\\/]*)
67095  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67096  ;;
67097  *)
67098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67099for as_dir in $PATH
67100do
67101  IFS=$as_save_IFS
67102  test -z "$as_dir" && as_dir=.
67103    for ac_exec_ext in '' $ac_executable_extensions; do
67104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67105    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67107    break 2
67108  fi
67109done
67110  done
67111IFS=$as_save_IFS
67112
67113  ;;
67114esac
67115fi
67116ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67117if test -n "$ICECC_WRAPPER"; then
67118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67119$as_echo "$ICECC_WRAPPER" >&6; }
67120else
67121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67122$as_echo "no" >&6; }
67123fi
67124
67125
67126          if test "x$ICECC_WRAPPER" = x; then
67127            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67128          fi
67129        else
67130          # Otherwise we believe it is a complete path. Use it as it is.
67131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67132$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67133          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67134$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67135          if test ! -x "$tool_specified"; then
67136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67137$as_echo "not found" >&6; }
67138            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67139          fi
67140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67141$as_echo "$tool_specified" >&6; }
67142        fi
67143      fi
67144    fi
67145
67146  fi
67147
67148
67149
67150  if test "x$ICECC_WRAPPER" = x; then
67151    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67152  fi
67153
67154
67155
67156  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67157      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67158  if test "$?" != "0"; then
67159    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67160$as_echo "$as_me: icecc-create-env output:" >&6;}
67161    cat ${icecc_create_env_log}
67162    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67163  fi
67164
67165    else
67166      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67167    fi
67168    PATH="$old_path"
67169    # The bundle with the compiler gets a name based on checksums. Parse log file
67170    # to find it.
67171    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67172    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67173    if test ! -f ${ICECC_ENV_BUNDLE}; then
67174      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67175    fi
67176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67177$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67179$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67180    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67181
67182    if test "x${COMPILE_TYPE}" = "xcross"; then
67183      # If cross compiling, create a separate env package for the build compiler
67184      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67185      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67186      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67187
67188  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67189      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67190            ${icecc_create_env_log_build} 2>&1 )
67191  if test "$?" != "0"; then
67192    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67193$as_echo "$as_me: icecc-create-env output:" >&6;}
67194    cat \
67195            ${icecc_create_env_log_build}
67196    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67197  fi
67198
67199      elif test "x${BUILD_CC##*/}" = "xclang"; then
67200
67201  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67202      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67203  if test "$?" != "0"; then
67204    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67205$as_echo "$as_me: icecc-create-env output:" >&6;}
67206    cat ${icecc_create_env_log_build}
67207    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67208  fi
67209
67210      else
67211        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67212      fi
67213      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67214      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67215      if test ! -f ${ICECC_ENV_BUNDLE}; then
67216        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67217      fi
67218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67219$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67221$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67222      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67223          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67224    else
67225      BUILD_ICECC="${ICECC}"
67226    fi
67227
67228
67229  fi
67230
67231
67232# Can the C/C++ compiler use precompiled headers?
67233
67234
67235  ###############################################################################
67236  #
67237  # Can the C/C++ compiler use precompiled headers?
67238  #
67239  # Check whether --enable-precompiled-headers was given.
67240if test "${enable_precompiled_headers+set}" = set; then :
67241  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67242else
67243  ENABLE_PRECOMPH=yes
67244fi
67245
67246
67247  USE_PRECOMPILED_HEADER=true
67248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67249$as_echo_n "checking If precompiled header is enabled... " >&6; }
67250  if test "x$ENABLE_PRECOMPH" = xno; then
67251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67252$as_echo "no, forced" >&6; }
67253    USE_PRECOMPILED_HEADER=false
67254  elif test "x$ICECC" != "x"; then
67255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67256$as_echo "no, does not work effectively with icecc" >&6; }
67257    USE_PRECOMPILED_HEADER=false
67258  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67260$as_echo "no, does not work with Solaris Studio" >&6; }
67261    USE_PRECOMPILED_HEADER=false
67262  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67264$as_echo "no, does not work with xlc" >&6; }
67265    USE_PRECOMPILED_HEADER=false
67266  else
67267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67268$as_echo "yes" >&6; }
67269  fi
67270
67271  if test "x$ENABLE_PRECOMPH" = xyes; then
67272    # Check that the compiler actually supports precomp headers.
67273    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67274      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67275$as_echo_n "checking that precompiled headers work... " >&6; }
67276      echo "int alfa();" > conftest.h
67277      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67278      if test ! -f conftest.hpp.gch; then
67279        USE_PRECOMPILED_HEADER=false
67280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67281$as_echo "no" >&6; }
67282      else
67283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67284$as_echo "yes" >&6; }
67285      fi
67286      $RM conftest.h conftest.hpp.gch
67287    fi
67288  fi
67289
67290
67291
67292
67293# Setup use of ccache, if available
67294
67295  # Check whether --enable-ccache was given.
67296if test "${enable_ccache+set}" = set; then :
67297  enableval=$enable_ccache;
67298fi
67299
67300
67301  CCACHE_STATUS=
67302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67303$as_echo_n "checking is ccache enabled... " >&6; }
67304  if test "x$enable_ccache" = xyes; then
67305    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67307$as_echo "yes" >&6; }
67308      OLD_PATH="$PATH"
67309      if test "x$TOOLCHAIN_PATH" != x; then
67310        PATH=$TOOLCHAIN_PATH:$PATH
67311      fi
67312
67313
67314
67315  # Publish this variable in the help.
67316
67317
67318  if [ -z "${CCACHE+x}" ]; then
67319    # The variable is not set by user, try to locate tool using the code snippet
67320    for ac_prog in ccache
67321do
67322  # Extract the first word of "$ac_prog", so it can be a program name with args.
67323set dummy $ac_prog; ac_word=$2
67324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67325$as_echo_n "checking for $ac_word... " >&6; }
67326if ${ac_cv_path_CCACHE+:} false; then :
67327  $as_echo_n "(cached) " >&6
67328else
67329  case $CCACHE in
67330  [\\/]* | ?:[\\/]*)
67331  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67332  ;;
67333  *)
67334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67335for as_dir in $PATH
67336do
67337  IFS=$as_save_IFS
67338  test -z "$as_dir" && as_dir=.
67339    for ac_exec_ext in '' $ac_executable_extensions; do
67340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67341    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67343    break 2
67344  fi
67345done
67346  done
67347IFS=$as_save_IFS
67348
67349  ;;
67350esac
67351fi
67352CCACHE=$ac_cv_path_CCACHE
67353if test -n "$CCACHE"; then
67354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67355$as_echo "$CCACHE" >&6; }
67356else
67357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67358$as_echo "no" >&6; }
67359fi
67360
67361
67362  test -n "$CCACHE" && break
67363done
67364
67365  else
67366    # The variable is set, but is it from the command line or the environment?
67367
67368    # Try to remove the string !CCACHE! from our list.
67369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67371      # If it failed, the variable was not from the command line. Ignore it,
67372      # but warn the user (except for BASH, which is always set by the calling BASH).
67373      if test "xCCACHE" != xBASH; then
67374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67375$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67376      fi
67377      # Try to locate tool using the code snippet
67378      for ac_prog in ccache
67379do
67380  # Extract the first word of "$ac_prog", so it can be a program name with args.
67381set dummy $ac_prog; ac_word=$2
67382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67383$as_echo_n "checking for $ac_word... " >&6; }
67384if ${ac_cv_path_CCACHE+:} false; then :
67385  $as_echo_n "(cached) " >&6
67386else
67387  case $CCACHE in
67388  [\\/]* | ?:[\\/]*)
67389  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67390  ;;
67391  *)
67392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67393for as_dir in $PATH
67394do
67395  IFS=$as_save_IFS
67396  test -z "$as_dir" && as_dir=.
67397    for ac_exec_ext in '' $ac_executable_extensions; do
67398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67399    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67401    break 2
67402  fi
67403done
67404  done
67405IFS=$as_save_IFS
67406
67407  ;;
67408esac
67409fi
67410CCACHE=$ac_cv_path_CCACHE
67411if test -n "$CCACHE"; then
67412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67413$as_echo "$CCACHE" >&6; }
67414else
67415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67416$as_echo "no" >&6; }
67417fi
67418
67419
67420  test -n "$CCACHE" && break
67421done
67422
67423    else
67424      # If it succeeded, then it was overridden by the user. We will use it
67425      # for the tool.
67426
67427      # First remove it from the list of overridden variables, so we can test
67428      # for unknown variables in the end.
67429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67430
67431      # Check if we try to supply an empty value
67432      if test "x$CCACHE" = x; then
67433        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67434$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67436$as_echo_n "checking for CCACHE... " >&6; }
67437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67438$as_echo "disabled" >&6; }
67439      else
67440        # Check if the provided tool contains a complete path.
67441        tool_specified="$CCACHE"
67442        tool_basename="${tool_specified##*/}"
67443        if test "x$tool_basename" = "x$tool_specified"; then
67444          # A command without a complete path is provided, search $PATH.
67445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67446$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67447          # Extract the first word of "$tool_basename", so it can be a program name with args.
67448set dummy $tool_basename; ac_word=$2
67449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67450$as_echo_n "checking for $ac_word... " >&6; }
67451if ${ac_cv_path_CCACHE+:} false; then :
67452  $as_echo_n "(cached) " >&6
67453else
67454  case $CCACHE in
67455  [\\/]* | ?:[\\/]*)
67456  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67457  ;;
67458  *)
67459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67460for as_dir in $PATH
67461do
67462  IFS=$as_save_IFS
67463  test -z "$as_dir" && as_dir=.
67464    for ac_exec_ext in '' $ac_executable_extensions; do
67465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67466    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67468    break 2
67469  fi
67470done
67471  done
67472IFS=$as_save_IFS
67473
67474  ;;
67475esac
67476fi
67477CCACHE=$ac_cv_path_CCACHE
67478if test -n "$CCACHE"; then
67479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67480$as_echo "$CCACHE" >&6; }
67481else
67482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67483$as_echo "no" >&6; }
67484fi
67485
67486
67487          if test "x$CCACHE" = x; then
67488            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67489          fi
67490        else
67491          # Otherwise we believe it is a complete path. Use it as it is.
67492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67493$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67494          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67495$as_echo_n "checking for CCACHE... " >&6; }
67496          if test ! -x "$tool_specified"; then
67497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67498$as_echo "not found" >&6; }
67499            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67500          fi
67501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67502$as_echo "$tool_specified" >&6; }
67503        fi
67504      fi
67505    fi
67506
67507  fi
67508
67509
67510
67511  if test "x$CCACHE" = x; then
67512    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67513  fi
67514
67515
67516      PATH="$OLD_PATH"
67517      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67518      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67519    else
67520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67521$as_echo "no" >&6; }
67522      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67523$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67524    fi
67525  elif test "x$enable_ccache" = xno; then
67526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67527$as_echo "no, explicitly disabled" >&6; }
67528    CCACHE_STATUS="Disabled"
67529  elif test "x$enable_ccache" = x; then
67530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67531$as_echo "no" >&6; }
67532  else
67533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67534$as_echo "unknown" >&6; }
67535    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67536  fi
67537
67538
67539
67540# Check whether --with-ccache-dir was given.
67541if test "${with_ccache_dir+set}" = set; then :
67542  withval=$with_ccache_dir;
67543fi
67544
67545
67546  if test "x$with_ccache_dir" != x; then
67547    # When using a non home ccache directory, assume the use is to share ccache files
67548    # with other users. Thus change the umask.
67549    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67550    if test "x$CCACHE" = x; then
67551      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67552$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67553    fi
67554  fi
67555
67556  if test "x$CCACHE" != x; then
67557
67558  if test "x$CCACHE" != x; then
67559    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67560      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67561          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67562      if test "x$HAS_BAD_CCACHE" != "x"; then
67563        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67564      fi
67565    fi
67566    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67567      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67568          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67569      if test "x$HAS_BAD_CCACHE" != "x"; then
67570        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67571      fi
67572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67573$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67574      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67575      PUSHED_FLAGS="$CXXFLAGS"
67576      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67577      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67578/* end confdefs.h.  */
67579
67580int
67581main ()
67582{
67583
67584  ;
67585  return 0;
67586}
67587_ACEOF
67588if ac_fn_cxx_try_compile "$LINENO"; then :
67589  CC_KNOWS_CCACHE_TRICK=yes
67590else
67591  CC_KNOWS_CCACHE_TRICK=no
67592fi
67593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67594      CXXFLAGS="$PUSHED_FLAGS"
67595      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67597$as_echo "yes" >&6; }
67598        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67599
67600        CCACHE_SLOPPINESS=pch_defines,time_macros
67601      else
67602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67603$as_echo "no" >&6; }
67604        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67605      fi
67606    fi
67607
67608    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67609        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67610
67611    if test "x$SET_CCACHE_DIR" != x; then
67612      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67613      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67614    fi
67615  fi
67616
67617  fi
67618
67619
67620###############################################################################
67621#
67622# And now the finish...
67623#
67624###############################################################################
67625
67626# Check for some common pitfalls
67627
67628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67629    file_to_test="$SRC_ROOT/LICENSE"
67630    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67631      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
67632    fi
67633  fi
67634
67635
67636  # Did user specify any unknown variables?
67637
67638  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67639    # Replace the separating ! with spaces before presenting for end user.
67640    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67642$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67643  fi
67644
67645
67646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67647$as_echo_n "checking if build directory is on local disk... " >&6; }
67648
67649  # df -l lists only local disks; if the given directory is not found then
67650  # a non-zero exit code is given
67651  if test "x$DF" = x; then
67652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67653      # msys does not have df; use Windows "net use" instead.
67654      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67655      if test "x$IS_NETWORK_DISK" = x; then
67656        OUTPUT_DIR_IS_LOCAL="yes"
67657      else
67658        OUTPUT_DIR_IS_LOCAL="no"
67659      fi
67660    else
67661      # No df here, say it's local
67662      OUTPUT_DIR_IS_LOCAL="yes"
67663    fi
67664  else
67665    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67666      OUTPUT_DIR_IS_LOCAL="yes"
67667    else
67668      OUTPUT_DIR_IS_LOCAL="no"
67669    fi
67670  fi
67671
67672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67673$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67674
67675
67676
67677  # Check if the user has any old-style ALT_ variables set.
67678  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67679
67680  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67681  # Since we can't properly handle the dependencies for this, warn the user about the situation
67682  if test -e $OUTPUT_ROOT/spec.gmk; then
67683    IS_RECONFIGURE=yes
67684  else
67685    IS_RECONFIGURE=no
67686  fi
67687
67688
67689# At the end, call the custom hook. (Dummy macro if no custom sources available)
67690
67691
67692# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67693
67694  # Keep feature lists sorted and free of duplicates
67695  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67696  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67697  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67698  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67699  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67700  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67701  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67702
67703  # Validate features
67704  for variant in $JVM_VARIANTS; do
67705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67706$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67707    features_var_name=JVM_FEATURES_$variant
67708    JVM_FEATURES_TO_TEST=${!features_var_name}
67709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67710$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67711    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67712    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67713    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67714    if test "x$INVALID_FEATURES" != x; then
67715      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67716    fi
67717  done
67718
67719
67720# We're messing a bit with internal autoconf variables to put the config.status
67721# in the output directory instead of the current directory.
67722CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67723
67724# Create the actual output files. Now the main work of configure is done.
67725cat >confcache <<\_ACEOF
67726# This file is a shell script that caches the results of configure
67727# tests run on this system so they can be shared between configure
67728# scripts and configure runs, see configure's option --config-cache.
67729# It is not useful on other systems.  If it contains results you don't
67730# want to keep, you may remove or edit it.
67731#
67732# config.status only pays attention to the cache file if you give it
67733# the --recheck option to rerun configure.
67734#
67735# `ac_cv_env_foo' variables (set or unset) will be overridden when
67736# loading this file, other *unset* `ac_cv_foo' will be assigned the
67737# following values.
67738
67739_ACEOF
67740
67741# The following way of writing the cache mishandles newlines in values,
67742# but we know of no workaround that is simple, portable, and efficient.
67743# So, we kill variables containing newlines.
67744# Ultrix sh set writes to stderr and can't be redirected directly,
67745# and sets the high bit in the cache file unless we assign to the vars.
67746(
67747  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67748    eval ac_val=\$$ac_var
67749    case $ac_val in #(
67750    *${as_nl}*)
67751      case $ac_var in #(
67752      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67753$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67754      esac
67755      case $ac_var in #(
67756      _ | IFS | as_nl) ;; #(
67757      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67758      *) { eval $ac_var=; unset $ac_var;} ;;
67759      esac ;;
67760    esac
67761  done
67762
67763  (set) 2>&1 |
67764    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67765    *${as_nl}ac_space=\ *)
67766      # `set' does not quote correctly, so add quotes: double-quote
67767      # substitution turns \\\\ into \\, and sed turns \\ into \.
67768      sed -n \
67769	"s/'/'\\\\''/g;
67770	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67771      ;; #(
67772    *)
67773      # `set' quotes correctly as required by POSIX, so do not add quotes.
67774      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67775      ;;
67776    esac |
67777    sort
67778) |
67779  sed '
67780     /^ac_cv_env_/b end
67781     t clear
67782     :clear
67783     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67784     t end
67785     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67786     :end' >>confcache
67787if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67788  if test -w "$cache_file"; then
67789    if test "x$cache_file" != "x/dev/null"; then
67790      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67791$as_echo "$as_me: updating cache $cache_file" >&6;}
67792      if test ! -f "$cache_file" || test -h "$cache_file"; then
67793	cat confcache >"$cache_file"
67794      else
67795        case $cache_file in #(
67796        */* | ?:*)
67797	  mv -f confcache "$cache_file"$$ &&
67798	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67799        *)
67800	  mv -f confcache "$cache_file" ;;
67801	esac
67802      fi
67803    fi
67804  else
67805    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67806$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67807  fi
67808fi
67809rm -f confcache
67810
67811test "x$prefix" = xNONE && prefix=$ac_default_prefix
67812# Let make expand exec_prefix.
67813test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67814
67815# Transform confdefs.h into DEFS.
67816# Protect against shell expansion while executing Makefile rules.
67817# Protect against Makefile macro expansion.
67818#
67819# If the first sed substitution is executed (which looks for macros that
67820# take arguments), then branch to the quote section.  Otherwise,
67821# look for a macro that doesn't take arguments.
67822ac_script='
67823:mline
67824/\\$/{
67825 N
67826 s,\\\n,,
67827 b mline
67828}
67829t clear
67830:clear
67831s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67832t quote
67833s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67834t quote
67835b any
67836:quote
67837s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67838s/\[/\\&/g
67839s/\]/\\&/g
67840s/\$/$$/g
67841H
67842:any
67843${
67844	g
67845	s/^\n//
67846	s/\n/ /g
67847	p
67848}
67849'
67850DEFS=`sed -n "$ac_script" confdefs.h`
67851
67852
67853ac_libobjs=
67854ac_ltlibobjs=
67855U=
67856for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67857  # 1. Remove the extension, and $U if already installed.
67858  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67859  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67860  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67861  #    will be set to the directory where LIBOBJS objects are built.
67862  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67863  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67864done
67865LIBOBJS=$ac_libobjs
67866
67867LTLIBOBJS=$ac_ltlibobjs
67868
67869
67870
67871: "${CONFIG_STATUS=./config.status}"
67872ac_write_fail=0
67873ac_clean_files_save=$ac_clean_files
67874ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67875{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67876$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67877as_write_fail=0
67878cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67879#! $SHELL
67880# Generated by $as_me.
67881# Run this file to recreate the current configuration.
67882# Compiler output produced by configure, useful for debugging
67883# configure, is in config.log if it exists.
67884
67885debug=false
67886ac_cs_recheck=false
67887ac_cs_silent=false
67888
67889SHELL=\${CONFIG_SHELL-$SHELL}
67890export SHELL
67891_ASEOF
67892cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67893## -------------------- ##
67894## M4sh Initialization. ##
67895## -------------------- ##
67896
67897# Be more Bourne compatible
67898DUALCASE=1; export DUALCASE # for MKS sh
67899if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67900  emulate sh
67901  NULLCMD=:
67902  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67903  # is contrary to our usage.  Disable this feature.
67904  alias -g '${1+"$@"}'='"$@"'
67905  setopt NO_GLOB_SUBST
67906else
67907  case `(set -o) 2>/dev/null` in #(
67908  *posix*) :
67909    set -o posix ;; #(
67910  *) :
67911     ;;
67912esac
67913fi
67914
67915
67916as_nl='
67917'
67918export as_nl
67919# Printing a long string crashes Solaris 7 /usr/bin/printf.
67920as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67921as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67922as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67923# Prefer a ksh shell builtin over an external printf program on Solaris,
67924# but without wasting forks for bash or zsh.
67925if test -z "$BASH_VERSION$ZSH_VERSION" \
67926    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67927  as_echo='print -r --'
67928  as_echo_n='print -rn --'
67929elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67930  as_echo='printf %s\n'
67931  as_echo_n='printf %s'
67932else
67933  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67934    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67935    as_echo_n='/usr/ucb/echo -n'
67936  else
67937    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67938    as_echo_n_body='eval
67939      arg=$1;
67940      case $arg in #(
67941      *"$as_nl"*)
67942	expr "X$arg" : "X\\(.*\\)$as_nl";
67943	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67944      esac;
67945      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67946    '
67947    export as_echo_n_body
67948    as_echo_n='sh -c $as_echo_n_body as_echo'
67949  fi
67950  export as_echo_body
67951  as_echo='sh -c $as_echo_body as_echo'
67952fi
67953
67954# The user is always right.
67955if test "${PATH_SEPARATOR+set}" != set; then
67956  PATH_SEPARATOR=:
67957  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67958    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67959      PATH_SEPARATOR=';'
67960  }
67961fi
67962
67963
67964# IFS
67965# We need space, tab and new line, in precisely that order.  Quoting is
67966# there to prevent editors from complaining about space-tab.
67967# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67968# splitting by setting IFS to empty value.)
67969IFS=" ""	$as_nl"
67970
67971# Find who we are.  Look in the path if we contain no directory separator.
67972as_myself=
67973case $0 in #((
67974  *[\\/]* ) as_myself=$0 ;;
67975  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67976for as_dir in $PATH
67977do
67978  IFS=$as_save_IFS
67979  test -z "$as_dir" && as_dir=.
67980    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67981  done
67982IFS=$as_save_IFS
67983
67984     ;;
67985esac
67986# We did not find ourselves, most probably we were run as `sh COMMAND'
67987# in which case we are not to be found in the path.
67988if test "x$as_myself" = x; then
67989  as_myself=$0
67990fi
67991if test ! -f "$as_myself"; then
67992  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67993  exit 1
67994fi
67995
67996# Unset variables that we do not need and which cause bugs (e.g. in
67997# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67998# suppresses any "Segmentation fault" message there.  '((' could
67999# trigger a bug in pdksh 5.2.14.
68000for as_var in BASH_ENV ENV MAIL MAILPATH
68001do eval test x\${$as_var+set} = xset \
68002  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68003done
68004PS1='$ '
68005PS2='> '
68006PS4='+ '
68007
68008# NLS nuisances.
68009LC_ALL=C
68010export LC_ALL
68011LANGUAGE=C
68012export LANGUAGE
68013
68014# CDPATH.
68015(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68016
68017
68018# as_fn_error STATUS ERROR [LINENO LOG_FD]
68019# ----------------------------------------
68020# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68021# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68022# script with STATUS, using 1 if that was 0.
68023as_fn_error ()
68024{
68025  as_status=$1; test $as_status -eq 0 && as_status=1
68026  if test "$4"; then
68027    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68028    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68029  fi
68030  $as_echo "$as_me: error: $2" >&2
68031  as_fn_exit $as_status
68032} # as_fn_error
68033
68034
68035# as_fn_set_status STATUS
68036# -----------------------
68037# Set $? to STATUS, without forking.
68038as_fn_set_status ()
68039{
68040  return $1
68041} # as_fn_set_status
68042
68043# as_fn_exit STATUS
68044# -----------------
68045# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68046as_fn_exit ()
68047{
68048  set +e
68049  as_fn_set_status $1
68050  exit $1
68051} # as_fn_exit
68052
68053# as_fn_unset VAR
68054# ---------------
68055# Portably unset VAR.
68056as_fn_unset ()
68057{
68058  { eval $1=; unset $1;}
68059}
68060as_unset=as_fn_unset
68061# as_fn_append VAR VALUE
68062# ----------------------
68063# Append the text in VALUE to the end of the definition contained in VAR. Take
68064# advantage of any shell optimizations that allow amortized linear growth over
68065# repeated appends, instead of the typical quadratic growth present in naive
68066# implementations.
68067if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68068  eval 'as_fn_append ()
68069  {
68070    eval $1+=\$2
68071  }'
68072else
68073  as_fn_append ()
68074  {
68075    eval $1=\$$1\$2
68076  }
68077fi # as_fn_append
68078
68079# as_fn_arith ARG...
68080# ------------------
68081# Perform arithmetic evaluation on the ARGs, and store the result in the
68082# global $as_val. Take advantage of shells that can avoid forks. The arguments
68083# must be portable across $(()) and expr.
68084if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68085  eval 'as_fn_arith ()
68086  {
68087    as_val=$(( $* ))
68088  }'
68089else
68090  as_fn_arith ()
68091  {
68092    as_val=`expr "$@" || test $? -eq 1`
68093  }
68094fi # as_fn_arith
68095
68096
68097if expr a : '\(a\)' >/dev/null 2>&1 &&
68098   test "X`expr 00001 : '.*\(...\)'`" = X001; then
68099  as_expr=expr
68100else
68101  as_expr=false
68102fi
68103
68104if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68105  as_basename=basename
68106else
68107  as_basename=false
68108fi
68109
68110if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68111  as_dirname=dirname
68112else
68113  as_dirname=false
68114fi
68115
68116as_me=`$as_basename -- "$0" ||
68117$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68118	 X"$0" : 'X\(//\)$' \| \
68119	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68120$as_echo X/"$0" |
68121    sed '/^.*\/\([^/][^/]*\)\/*$/{
68122	    s//\1/
68123	    q
68124	  }
68125	  /^X\/\(\/\/\)$/{
68126	    s//\1/
68127	    q
68128	  }
68129	  /^X\/\(\/\).*/{
68130	    s//\1/
68131	    q
68132	  }
68133	  s/.*/./; q'`
68134
68135# Avoid depending upon Character Ranges.
68136as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68137as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68138as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68139as_cr_digits='0123456789'
68140as_cr_alnum=$as_cr_Letters$as_cr_digits
68141
68142ECHO_C= ECHO_N= ECHO_T=
68143case `echo -n x` in #(((((
68144-n*)
68145  case `echo 'xy\c'` in
68146  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
68147  xy)  ECHO_C='\c';;
68148  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68149       ECHO_T='	';;
68150  esac;;
68151*)
68152  ECHO_N='-n';;
68153esac
68154
68155rm -f conf$$ conf$$.exe conf$$.file
68156if test -d conf$$.dir; then
68157  rm -f conf$$.dir/conf$$.file
68158else
68159  rm -f conf$$.dir
68160  mkdir conf$$.dir 2>/dev/null
68161fi
68162if (echo >conf$$.file) 2>/dev/null; then
68163  if ln -s conf$$.file conf$$ 2>/dev/null; then
68164    as_ln_s='ln -s'
68165    # ... but there are two gotchas:
68166    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68167    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68168    # In both cases, we have to default to `cp -pR'.
68169    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68170      as_ln_s='cp -pR'
68171  elif ln conf$$.file conf$$ 2>/dev/null; then
68172    as_ln_s=ln
68173  else
68174    as_ln_s='cp -pR'
68175  fi
68176else
68177  as_ln_s='cp -pR'
68178fi
68179rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68180rmdir conf$$.dir 2>/dev/null
68181
68182
68183# as_fn_mkdir_p
68184# -------------
68185# Create "$as_dir" as a directory, including parents if necessary.
68186as_fn_mkdir_p ()
68187{
68188
68189  case $as_dir in #(
68190  -*) as_dir=./$as_dir;;
68191  esac
68192  test -d "$as_dir" || eval $as_mkdir_p || {
68193    as_dirs=
68194    while :; do
68195      case $as_dir in #(
68196      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68197      *) as_qdir=$as_dir;;
68198      esac
68199      as_dirs="'$as_qdir' $as_dirs"
68200      as_dir=`$as_dirname -- "$as_dir" ||
68201$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68202	 X"$as_dir" : 'X\(//\)[^/]' \| \
68203	 X"$as_dir" : 'X\(//\)$' \| \
68204	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68205$as_echo X"$as_dir" |
68206    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68207	    s//\1/
68208	    q
68209	  }
68210	  /^X\(\/\/\)[^/].*/{
68211	    s//\1/
68212	    q
68213	  }
68214	  /^X\(\/\/\)$/{
68215	    s//\1/
68216	    q
68217	  }
68218	  /^X\(\/\).*/{
68219	    s//\1/
68220	    q
68221	  }
68222	  s/.*/./; q'`
68223      test -d "$as_dir" && break
68224    done
68225    test -z "$as_dirs" || eval "mkdir $as_dirs"
68226  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68227
68228
68229} # as_fn_mkdir_p
68230if mkdir -p . 2>/dev/null; then
68231  as_mkdir_p='mkdir -p "$as_dir"'
68232else
68233  test -d ./-p && rmdir ./-p
68234  as_mkdir_p=false
68235fi
68236
68237
68238# as_fn_executable_p FILE
68239# -----------------------
68240# Test if FILE is an executable regular file.
68241as_fn_executable_p ()
68242{
68243  test -f "$1" && test -x "$1"
68244} # as_fn_executable_p
68245as_test_x='test -x'
68246as_executable_p=as_fn_executable_p
68247
68248# Sed expression to map a string onto a valid CPP name.
68249as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68250
68251# Sed expression to map a string onto a valid variable name.
68252as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68253
68254
68255exec 6>&1
68256## ----------------------------------- ##
68257## Main body of $CONFIG_STATUS script. ##
68258## ----------------------------------- ##
68259_ASEOF
68260test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68261
68262cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68263# Save the log message, to keep $0 and so on meaningful, and to
68264# report actual input values of CONFIG_FILES etc. instead of their
68265# values after options handling.
68266ac_log="
68267This file was extended by OpenJDK $as_me jdk9, which was
68268generated by GNU Autoconf 2.69.  Invocation command line was
68269
68270  CONFIG_FILES    = $CONFIG_FILES
68271  CONFIG_HEADERS  = $CONFIG_HEADERS
68272  CONFIG_LINKS    = $CONFIG_LINKS
68273  CONFIG_COMMANDS = $CONFIG_COMMANDS
68274  $ $0 $@
68275
68276on `(hostname || uname -n) 2>/dev/null | sed 1q`
68277"
68278
68279_ACEOF
68280
68281case $ac_config_files in *"
68282"*) set x $ac_config_files; shift; ac_config_files=$*;;
68283esac
68284
68285
68286
68287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68288# Files that config.status was made for.
68289config_files="$ac_config_files"
68290
68291_ACEOF
68292
68293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68294ac_cs_usage="\
68295\`$as_me' instantiates files and other configuration actions
68296from templates according to the current configuration.  Unless the files
68297and actions are specified as TAGs, all are instantiated by default.
68298
68299Usage: $0 [OPTION]... [TAG]...
68300
68301  -h, --help       print this help, then exit
68302  -V, --version    print version number and configuration settings, then exit
68303      --config     print configuration, then exit
68304  -q, --quiet, --silent
68305                   do not print progress messages
68306  -d, --debug      don't remove temporary files
68307      --recheck    update $as_me by reconfiguring in the same conditions
68308      --file=FILE[:TEMPLATE]
68309                   instantiate the configuration file FILE
68310
68311Configuration files:
68312$config_files
68313
68314Report bugs to <build-dev@openjdk.java.net>.
68315OpenJDK home page: <http://openjdk.java.net>."
68316
68317_ACEOF
68318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68319ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68320ac_cs_version="\\
68321OpenJDK config.status jdk9
68322configured by $0, generated by GNU Autoconf 2.69,
68323  with options \\"\$ac_cs_config\\"
68324
68325Copyright (C) 2012 Free Software Foundation, Inc.
68326This config.status script is free software; the Free Software Foundation
68327gives unlimited permission to copy, distribute and modify it."
68328
68329ac_pwd='$ac_pwd'
68330srcdir='$srcdir'
68331AWK='$AWK'
68332test -n "\$AWK" || AWK=awk
68333_ACEOF
68334
68335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68336# The default lists apply if the user does not specify any file.
68337ac_need_defaults=:
68338while test $# != 0
68339do
68340  case $1 in
68341  --*=?*)
68342    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68343    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68344    ac_shift=:
68345    ;;
68346  --*=)
68347    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68348    ac_optarg=
68349    ac_shift=:
68350    ;;
68351  *)
68352    ac_option=$1
68353    ac_optarg=$2
68354    ac_shift=shift
68355    ;;
68356  esac
68357
68358  case $ac_option in
68359  # Handling of the options.
68360  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68361    ac_cs_recheck=: ;;
68362  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68363    $as_echo "$ac_cs_version"; exit ;;
68364  --config | --confi | --conf | --con | --co | --c )
68365    $as_echo "$ac_cs_config"; exit ;;
68366  --debug | --debu | --deb | --de | --d | -d )
68367    debug=: ;;
68368  --file | --fil | --fi | --f )
68369    $ac_shift
68370    case $ac_optarg in
68371    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68372    '') as_fn_error $? "missing file argument" ;;
68373    esac
68374    as_fn_append CONFIG_FILES " '$ac_optarg'"
68375    ac_need_defaults=false;;
68376  --he | --h |  --help | --hel | -h )
68377    $as_echo "$ac_cs_usage"; exit ;;
68378  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68379  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68380    ac_cs_silent=: ;;
68381
68382  # This is an error.
68383  -*) as_fn_error $? "unrecognized option: \`$1'
68384Try \`$0 --help' for more information." ;;
68385
68386  *) as_fn_append ac_config_targets " $1"
68387     ac_need_defaults=false ;;
68388
68389  esac
68390  shift
68391done
68392
68393ac_configure_extra_args=
68394
68395if $ac_cs_silent; then
68396  exec 6>/dev/null
68397  ac_configure_extra_args="$ac_configure_extra_args --silent"
68398fi
68399
68400_ACEOF
68401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68402if \$ac_cs_recheck; then
68403  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68404  shift
68405  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68406  CONFIG_SHELL='$SHELL'
68407  export CONFIG_SHELL
68408  exec "\$@"
68409fi
68410
68411_ACEOF
68412cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68413exec 5>>config.log
68414{
68415  echo
68416  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68417## Running $as_me. ##
68418_ASBOX
68419  $as_echo "$ac_log"
68420} >&5
68421
68422_ACEOF
68423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68424_ACEOF
68425
68426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68427
68428# Handling of arguments.
68429for ac_config_target in $ac_config_targets
68430do
68431  case $ac_config_target in
68432    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68433    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68434    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68435    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68436    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68437
68438  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68439  esac
68440done
68441
68442
68443# If the user did not use the arguments to specify the items to instantiate,
68444# then the envvar interface is used.  Set only those that are not.
68445# We use the long form for the default assignment because of an extremely
68446# bizarre bug on SunOS 4.1.3.
68447if $ac_need_defaults; then
68448  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68449fi
68450
68451# Have a temporary directory for convenience.  Make it in the build tree
68452# simply because there is no reason against having it here, and in addition,
68453# creating and moving files from /tmp can sometimes cause problems.
68454# Hook for its removal unless debugging.
68455# Note that there is a small window in which the directory will not be cleaned:
68456# after its creation but before its name has been assigned to `$tmp'.
68457$debug ||
68458{
68459  tmp= ac_tmp=
68460  trap 'exit_status=$?
68461  : "${ac_tmp:=$tmp}"
68462  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68463' 0
68464  trap 'as_fn_exit 1' 1 2 13 15
68465}
68466# Create a (secure) tmp directory for tmp files.
68467
68468{
68469  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68470  test -d "$tmp"
68471}  ||
68472{
68473  tmp=./conf$$-$RANDOM
68474  (umask 077 && mkdir "$tmp")
68475} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68476ac_tmp=$tmp
68477
68478# Set up the scripts for CONFIG_FILES section.
68479# No need to generate them if there are no CONFIG_FILES.
68480# This happens for instance with `./config.status config.h'.
68481if test -n "$CONFIG_FILES"; then
68482
68483
68484ac_cr=`echo X | tr X '\015'`
68485# On cygwin, bash can eat \r inside `` if the user requested igncr.
68486# But we know of no other shell where ac_cr would be empty at this
68487# point, so we can use a bashism as a fallback.
68488if test "x$ac_cr" = x; then
68489  eval ac_cr=\$\'\\r\'
68490fi
68491ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68492if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68493  ac_cs_awk_cr='\\r'
68494else
68495  ac_cs_awk_cr=$ac_cr
68496fi
68497
68498echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68499_ACEOF
68500
68501
68502{
68503  echo "cat >conf$$subs.awk <<_ACEOF" &&
68504  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68505  echo "_ACEOF"
68506} >conf$$subs.sh ||
68507  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68508ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68509ac_delim='%!_!# '
68510for ac_last_try in false false false false false :; do
68511  . ./conf$$subs.sh ||
68512    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68513
68514  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68515  if test $ac_delim_n = $ac_delim_num; then
68516    break
68517  elif $ac_last_try; then
68518    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68519  else
68520    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68521  fi
68522done
68523rm -f conf$$subs.sh
68524
68525cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68526cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68527_ACEOF
68528sed -n '
68529h
68530s/^/S["/; s/!.*/"]=/
68531p
68532g
68533s/^[^!]*!//
68534:repl
68535t repl
68536s/'"$ac_delim"'$//
68537t delim
68538:nl
68539h
68540s/\(.\{148\}\)..*/\1/
68541t more1
68542s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68543p
68544n
68545b repl
68546:more1
68547s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68548p
68549g
68550s/.\{148\}//
68551t nl
68552:delim
68553h
68554s/\(.\{148\}\)..*/\1/
68555t more2
68556s/["\\]/\\&/g; s/^/"/; s/$/"/
68557p
68558b
68559:more2
68560s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68561p
68562g
68563s/.\{148\}//
68564t delim
68565' <conf$$subs.awk | sed '
68566/^[^""]/{
68567  N
68568  s/\n//
68569}
68570' >>$CONFIG_STATUS || ac_write_fail=1
68571rm -f conf$$subs.awk
68572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68573_ACAWK
68574cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68575  for (key in S) S_is_set[key] = 1
68576  FS = ""
68577
68578}
68579{
68580  line = $ 0
68581  nfields = split(line, field, "@")
68582  substed = 0
68583  len = length(field[1])
68584  for (i = 2; i < nfields; i++) {
68585    key = field[i]
68586    keylen = length(key)
68587    if (S_is_set[key]) {
68588      value = S[key]
68589      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68590      len += length(value) + length(field[++i])
68591      substed = 1
68592    } else
68593      len += 1 + keylen
68594  }
68595
68596  print line
68597}
68598
68599_ACAWK
68600_ACEOF
68601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68602if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68603  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68604else
68605  cat
68606fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68607  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68608_ACEOF
68609
68610# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68611# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68612# trailing colons and then remove the whole line if VPATH becomes empty
68613# (actually we leave an empty line to preserve line numbers).
68614if test "x$srcdir" = x.; then
68615  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68616h
68617s///
68618s/^/:/
68619s/[	 ]*$/:/
68620s/:\$(srcdir):/:/g
68621s/:\${srcdir}:/:/g
68622s/:@srcdir@:/:/g
68623s/^:*//
68624s/:*$//
68625x
68626s/\(=[	 ]*\).*/\1/
68627G
68628s/\n//
68629s/^[^=]*=[	 ]*$//
68630}'
68631fi
68632
68633cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68634fi # test -n "$CONFIG_FILES"
68635
68636
68637eval set X "  :F $CONFIG_FILES      "
68638shift
68639for ac_tag
68640do
68641  case $ac_tag in
68642  :[FHLC]) ac_mode=$ac_tag; continue;;
68643  esac
68644  case $ac_mode$ac_tag in
68645  :[FHL]*:*);;
68646  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68647  :[FH]-) ac_tag=-:-;;
68648  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68649  esac
68650  ac_save_IFS=$IFS
68651  IFS=:
68652  set x $ac_tag
68653  IFS=$ac_save_IFS
68654  shift
68655  ac_file=$1
68656  shift
68657
68658  case $ac_mode in
68659  :L) ac_source=$1;;
68660  :[FH])
68661    ac_file_inputs=
68662    for ac_f
68663    do
68664      case $ac_f in
68665      -) ac_f="$ac_tmp/stdin";;
68666      *) # Look for the file first in the build tree, then in the source tree
68667	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68668	 # because $ac_f cannot contain `:'.
68669	 test -f "$ac_f" ||
68670	   case $ac_f in
68671	   [\\/$]*) false;;
68672	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68673	   esac ||
68674	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68675      esac
68676      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68677      as_fn_append ac_file_inputs " '$ac_f'"
68678    done
68679
68680    # Let's still pretend it is `configure' which instantiates (i.e., don't
68681    # use $as_me), people would be surprised to read:
68682    #    /* config.h.  Generated by config.status.  */
68683    configure_input='Generated from '`
68684	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68685	`' by configure.'
68686    if test x"$ac_file" != x-; then
68687      configure_input="$ac_file.  $configure_input"
68688      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68689$as_echo "$as_me: creating $ac_file" >&6;}
68690    fi
68691    # Neutralize special characters interpreted by sed in replacement strings.
68692    case $configure_input in #(
68693    *\&* | *\|* | *\\* )
68694       ac_sed_conf_input=`$as_echo "$configure_input" |
68695       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68696    *) ac_sed_conf_input=$configure_input;;
68697    esac
68698
68699    case $ac_tag in
68700    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68701      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68702    esac
68703    ;;
68704  esac
68705
68706  ac_dir=`$as_dirname -- "$ac_file" ||
68707$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68708	 X"$ac_file" : 'X\(//\)[^/]' \| \
68709	 X"$ac_file" : 'X\(//\)$' \| \
68710	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68711$as_echo X"$ac_file" |
68712    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68713	    s//\1/
68714	    q
68715	  }
68716	  /^X\(\/\/\)[^/].*/{
68717	    s//\1/
68718	    q
68719	  }
68720	  /^X\(\/\/\)$/{
68721	    s//\1/
68722	    q
68723	  }
68724	  /^X\(\/\).*/{
68725	    s//\1/
68726	    q
68727	  }
68728	  s/.*/./; q'`
68729  as_dir="$ac_dir"; as_fn_mkdir_p
68730  ac_builddir=.
68731
68732case "$ac_dir" in
68733.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68734*)
68735  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68736  # A ".." for each directory in $ac_dir_suffix.
68737  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68738  case $ac_top_builddir_sub in
68739  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68740  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68741  esac ;;
68742esac
68743ac_abs_top_builddir=$ac_pwd
68744ac_abs_builddir=$ac_pwd$ac_dir_suffix
68745# for backward compatibility:
68746ac_top_builddir=$ac_top_build_prefix
68747
68748case $srcdir in
68749  .)  # We are building in place.
68750    ac_srcdir=.
68751    ac_top_srcdir=$ac_top_builddir_sub
68752    ac_abs_top_srcdir=$ac_pwd ;;
68753  [\\/]* | ?:[\\/]* )  # Absolute name.
68754    ac_srcdir=$srcdir$ac_dir_suffix;
68755    ac_top_srcdir=$srcdir
68756    ac_abs_top_srcdir=$srcdir ;;
68757  *) # Relative name.
68758    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68759    ac_top_srcdir=$ac_top_build_prefix$srcdir
68760    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68761esac
68762ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68763
68764
68765  case $ac_mode in
68766  :F)
68767  #
68768  # CONFIG_FILE
68769  #
68770
68771_ACEOF
68772
68773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68774# If the template does not know about datarootdir, expand it.
68775# FIXME: This hack should be removed a few years after 2.60.
68776ac_datarootdir_hack=; ac_datarootdir_seen=
68777ac_sed_dataroot='
68778/datarootdir/ {
68779  p
68780  q
68781}
68782/@datadir@/p
68783/@docdir@/p
68784/@infodir@/p
68785/@localedir@/p
68786/@mandir@/p'
68787case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68788*datarootdir*) ac_datarootdir_seen=yes;;
68789*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68790  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68791$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68792_ACEOF
68793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68794  ac_datarootdir_hack='
68795  s&@datadir@&$datadir&g
68796  s&@docdir@&$docdir&g
68797  s&@infodir@&$infodir&g
68798  s&@localedir@&$localedir&g
68799  s&@mandir@&$mandir&g
68800  s&\\\${datarootdir}&$datarootdir&g' ;;
68801esac
68802_ACEOF
68803
68804# Neutralize VPATH when `$srcdir' = `.'.
68805# Shell code in configure.ac might set extrasub.
68806# FIXME: do we really want to maintain this feature?
68807cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68808ac_sed_extra="$ac_vpsub
68809$extrasub
68810_ACEOF
68811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68812:t
68813/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68814s|@configure_input@|$ac_sed_conf_input|;t t
68815s&@top_builddir@&$ac_top_builddir_sub&;t t
68816s&@top_build_prefix@&$ac_top_build_prefix&;t t
68817s&@srcdir@&$ac_srcdir&;t t
68818s&@abs_srcdir@&$ac_abs_srcdir&;t t
68819s&@top_srcdir@&$ac_top_srcdir&;t t
68820s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68821s&@builddir@&$ac_builddir&;t t
68822s&@abs_builddir@&$ac_abs_builddir&;t t
68823s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68824$ac_datarootdir_hack
68825"
68826eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68827  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68828
68829test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68830  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68831  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68832      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68833  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68834which seems to be undefined.  Please make sure it is defined" >&5
68835$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68836which seems to be undefined.  Please make sure it is defined" >&2;}
68837
68838  rm -f "$ac_tmp/stdin"
68839  case $ac_file in
68840  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68841  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68842  esac \
68843  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68844 ;;
68845
68846
68847
68848  esac
68849
68850done # for ac_tag
68851
68852
68853as_fn_exit 0
68854_ACEOF
68855ac_clean_files=$ac_clean_files_save
68856
68857test $ac_write_fail = 0 ||
68858  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68859
68860
68861# configure is writing to config.log, and then calls config.status.
68862# config.status does its own redirection, appending to config.log.
68863# Unfortunately, on DOS this fails, as config.log is still kept open
68864# by configure, so config.status won't be able to write to it; its
68865# output is simply discarded.  So we exec the FD to /dev/null,
68866# effectively closing config.log, so it can be properly (re)opened and
68867# appended to by config.status.  When coming back to configure, we
68868# need to make the FD available again.
68869if test "$no_create" != yes; then
68870  ac_cs_success=:
68871  ac_config_status_args=
68872  test "$silent" = yes &&
68873    ac_config_status_args="$ac_config_status_args --quiet"
68874  exec 5>/dev/null
68875  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68876  exec 5>>config.log
68877  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68878  # would make configure fail if this is the last instruction.
68879  $ac_cs_success || as_fn_exit 1
68880fi
68881if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68882  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68883$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68884fi
68885
68886
68887# After AC_OUTPUT, we need to do final work
68888
68889
68890  # Try to move config.log (generated by autoconf) to the configure-support directory.
68891  if test -e ./config.log; then
68892    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68893  fi
68894
68895  # Rotate our log file (configure.log)
68896  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68897    $RM -f "$OUTPUT_ROOT/configure.log.old"
68898  fi
68899  if test -e "$OUTPUT_ROOT/configure.log"; then
68900    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68901  fi
68902
68903  # Move configure.log from current directory to the build output root
68904  if test -e ./configure.log; then
68905    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68906  fi
68907
68908  # Make the compare script executable
68909  $CHMOD +x $OUTPUT_ROOT/compare.sh
68910
68911
68912# Finally output some useful information to the user
68913
68914  # Finally output some useful information to the user
68915
68916  printf "\n"
68917  printf "====================================================\n"
68918  if test "x$no_create" != "xyes"; then
68919    if test "x$IS_RECONFIGURE" != "xyes"; then
68920      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68921    else
68922      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68923    fi
68924  else
68925    if test "x$IS_RECONFIGURE" != "xyes"; then
68926      printf "A configuration has been successfully checked but not created\n"
68927    else
68928      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68929    fi
68930  fi
68931  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68932    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68933  else
68934    printf "using default settings.\n"
68935  fi
68936
68937  printf "\n"
68938  printf "Configuration summary:\n"
68939  printf "* Debug level:    $DEBUG_LEVEL\n"
68940  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68941  printf "* JDK variant:    $JDK_VARIANT\n"
68942  printf "* JVM variants:   $JVM_VARIANTS\n"
68943  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68944  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68945
68946  printf "\n"
68947  printf "Tools summary:\n"
68948  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68949    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68950  fi
68951  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68952  if test "x$TOOLCHAIN_VERSION" != "x"; then
68953    print_version=" $TOOLCHAIN_VERSION"
68954  fi
68955  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68956  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68957  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68958
68959  printf "\n"
68960  printf "Build performance summary:\n"
68961  printf "* Cores to use:   $JOBS\n"
68962  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68963  if test "x$CCACHE_STATUS" != "x"; then
68964    printf "* ccache status:  $CCACHE_STATUS\n"
68965  fi
68966  printf "\n"
68967
68968  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68969    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68970    printf "will result in longer build times.\n"
68971    printf "\n"
68972  fi
68973
68974  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68975    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68976    printf "These are not respected, and will be ignored. It is recommended\n"
68977    printf "that you clean your environment. The following variables are set:\n"
68978    printf "$FOUND_ALT_VARIABLES\n"
68979    printf "\n"
68980  fi
68981
68982  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68983    printf "WARNING: Your build output directory is not on a local disk.\n"
68984    printf "This will severely degrade build performance!\n"
68985    printf "It is recommended that you create an output directory on a local disk,\n"
68986    printf "and run the configure script again from that directory.\n"
68987    printf "\n"
68988  fi
68989
68990  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68991    printf "WARNING: The result of this configuration has overridden an older\n"
68992    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68993    printf "proper build. Failure to do so might result in strange build problems.\n"
68994    printf "\n"
68995  fi
68996
68997  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68998    printf "WARNING: The result of this configuration was not saved.\n"
68999    printf "You should run without '--no-create | -n' to create the configuration.\n"
69000    printf "\n"
69001  fi
69002
69003
69004
69005  # Locate config.log.
69006  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69007    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69008  elif test -e "./config.log"; then
69009    CONFIG_LOG_PATH="."
69010  fi
69011
69012  if test -e "$CONFIG_LOG_PATH/config.log"; then
69013    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69014    if test $? -eq 0; then
69015      printf "The following warnings were produced. Repeated here for convenience:\n"
69016      # We must quote sed expression (using []) to stop m4 from eating the [].
69017      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69018      printf "\n"
69019    fi
69020  fi
69021
69022